From owner-svn-src-all@FreeBSD.ORG Sun May 13 01:29:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37061106566B; Sun, 13 May 2012 01:29:50 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 17B388FC18; Sun, 13 May 2012 01:29:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4D1Tnxa060733; Sun, 13 May 2012 01:29:49 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4D1TnEO060731; Sun, 13 May 2012 01:29:49 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205130129.q4D1TnEO060731@svn.freebsd.org> From: Eitan Adler Date: Sun, 13 May 2012 01:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235382 - stable/9/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 01:29:50 -0000 Author: eadler Date: Sun May 13 01:29:49 2012 New Revision: 235382 URL: http://svn.freebsd.org/changeset/base/235382 Log: MFC r235209 r235227: Add a few new tips and update some old ones to more modern commands Approved by: cperciva (implicit) Modified: stable/9/games/fortune/datfiles/freebsd-tips Directory Properties: stable/9/games/fortune/ (props changed) Modified: stable/9/games/fortune/datfiles/freebsd-tips ============================================================================== --- stable/9/games/fortune/datfiles/freebsd-tips Sat May 12 22:20:55 2012 (r235381) +++ stable/9/games/fortune/datfiles/freebsd-tips Sun May 13 01:29:49 2012 (r235382) @@ -73,8 +73,8 @@ If you need to ask a question on the Fre contains lots of useful advice to help you get the best results. % -If you `set filec' (file completion) in tcsh and write a part of the -filename, pressing TAB will show you the available choices when there +If you write part of a filename in tcsh, +pressing TAB will show you the available choices when there is more than one, or complete the filename if there's only one match. % If you `set watch = (0 any any)' in tcsh, you will be notified when @@ -122,9 +122,6 @@ In order to support national characters less without creating other nationalisation aspects, set the environment variable LC_ALL to 'en_US.ISO8859-1'. % -In tcsh, you can `set autolist' to have the shell automatically show -all the possible matches when doing filename/directory expansion. -% "man firewall" will give advice for building a FreeBSD firewall -- David Scheidt % @@ -192,13 +189,6 @@ flag is your gateway. Nice bash prompt: PS1='(\[$(tput md)\]\t <\w>\[$(tput me)\]) $(echo $?) \$ ' -- Mathieu % -Nice tcsh prompts: - set prompt = '[%B%m%b] %B%~%b%# ' - set prompt = '%m %# ' - set prompt = '%n@%m%# ' - set prompt = '%n@%m:%/%# ' - set prompt = '%n@%m:%~%# ' -% Over quota? "du -s * | sort -n " will give you a sorted list of your directory sizes. -- David Scheidt @@ -263,7 +253,7 @@ To quickly create an empty file, use "to -- Dru % To read a compressed file without having to first uncompress it, use -"zcat" or "zmore" to view it. +"zcat" or "zless" to view it. -- Dru % To repeat the last command in the C shell, type "!!". @@ -282,7 +272,7 @@ will search '/', and all subdirectories, % To see all of the directories on your FreeBSD system, type - ls -R / | more + ls -R / | less -- Dru % To see how long it takes a command to run, type the word "time" before the @@ -322,7 +312,7 @@ been replaced with other messages, look Want colour in your directory listings? Use "ls -G". "ls -F" is also useful, and they can be combined as "ls -FG". % -Want to find a specific port, just type the following under /usr/ports, +Want to find a specific port, just type the following under /usr/ports or one its subdirectories: "make search name=" @@ -479,3 +469,9 @@ when you are trying to find where in the Try "whereis firefox" and "whereis whereis". -- Konstantinos Konstantinidis % +Want to run the same command again? +In tcsh you can type "!!" +% +Want to go the directory you were just in? +Type "cd -" +% From owner-svn-src-all@FreeBSD.ORG Sun May 13 01:30:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 734BA10657EA; Sun, 13 May 2012 01:30:22 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1E9F8FC12; Sun, 13 May 2012 01:30:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4D1U830060787; Sun, 13 May 2012 01:30:08 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4D1U8XK060786; Sun, 13 May 2012 01:30:08 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205130130.q4D1U8XK060786@svn.freebsd.org> From: Eitan Adler Date: Sun, 13 May 2012 01:30:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235383 - stable/8/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 01:30:22 -0000 Author: eadler Date: Sun May 13 01:30:08 2012 New Revision: 235383 URL: http://svn.freebsd.org/changeset/base/235383 Log: MFC r235209 r235227: Add a few new tips and update some old ones to more modern commands Approved by: cperciva (implicit) Modified: stable/8/games/fortune/datfiles/freebsd-tips Directory Properties: stable/8/games/fortune/ (props changed) Modified: stable/8/games/fortune/datfiles/freebsd-tips ============================================================================== --- stable/8/games/fortune/datfiles/freebsd-tips Sun May 13 01:29:49 2012 (r235382) +++ stable/8/games/fortune/datfiles/freebsd-tips Sun May 13 01:30:08 2012 (r235383) @@ -73,8 +73,8 @@ If you need to ask a question on the Fre contains lots of useful advice to help you get the best results. % -If you `set filec' (file completion) in tcsh and write a part of the -filename, pressing TAB will show you the available choices when there +If you write part of a filename in tcsh, +pressing TAB will show you the available choices when there is more than one, or complete the filename if there's only one match. % If you `set watch = (0 any any)' in tcsh, you will be notified when @@ -122,9 +122,6 @@ In order to support national characters less without creating other nationalisation aspects, set the environment variable LC_ALL to 'en_US.ISO8859-1'. % -In tcsh, you can `set autolist' to have the shell automatically show -all the possible matches when doing filename/directory expansion. -% "man firewall" will give advice for building a FreeBSD firewall -- David Scheidt % @@ -192,13 +189,6 @@ flag is your gateway. Nice bash prompt: PS1='(\[$(tput md)\]\t <\w>\[$(tput me)\]) $(echo $?) \$ ' -- Mathieu % -Nice tcsh prompts: - set prompt = '[%B%m%b] %B%~%b%# ' - set prompt = '%m %# ' - set prompt = '%n@%m%# ' - set prompt = '%n@%m:%/%# ' - set prompt = '%n@%m:%~%# ' -% Over quota? "du -s * | sort -n " will give you a sorted list of your directory sizes. -- David Scheidt @@ -263,7 +253,7 @@ To quickly create an empty file, use "to -- Dru % To read a compressed file without having to first uncompress it, use -"zcat" or "zmore" to view it. +"zcat" or "zless" to view it. -- Dru % To repeat the last command in the C shell, type "!!". @@ -282,7 +272,7 @@ will search '/', and all subdirectories, % To see all of the directories on your FreeBSD system, type - ls -R / | more + ls -R / | less -- Dru % To see how long it takes a command to run, type the word "time" before the @@ -322,7 +312,7 @@ been replaced with other messages, look Want colour in your directory listings? Use "ls -G". "ls -F" is also useful, and they can be combined as "ls -FG". % -Want to find a specific port, just type the following under /usr/ports, +Want to find a specific port, just type the following under /usr/ports or one its subdirectories: "make search name=" @@ -479,3 +469,9 @@ when you are trying to find where in the Try "whereis firefox" and "whereis whereis". -- Konstantinos Konstantinidis % +Want to run the same command again? +In tcsh you can type "!!" +% +Want to go the directory you were just in? +Type "cd -" +% From owner-svn-src-all@FreeBSD.ORG Sun May 13 01:30:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD3C91065786; Sun, 13 May 2012 01:30:28 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52EB18FC0C; Sun, 13 May 2012 01:30:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4D1USov060829; Sun, 13 May 2012 01:30:28 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4D1USbY060827; Sun, 13 May 2012 01:30:28 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205130130.q4D1USbY060827@svn.freebsd.org> From: Eitan Adler Date: Sun, 13 May 2012 01:30:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235384 - stable/7/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 01:30:34 -0000 Author: eadler Date: Sun May 13 01:30:27 2012 New Revision: 235384 URL: http://svn.freebsd.org/changeset/base/235384 Log: MFC r235209 r235227: Add a few new tips and update some old ones to more modern commands Approved by: cperciva (implicit) Modified: stable/7/games/fortune/datfiles/freebsd-tips Directory Properties: stable/7/games/fortune/ (props changed) Modified: stable/7/games/fortune/datfiles/freebsd-tips ============================================================================== --- stable/7/games/fortune/datfiles/freebsd-tips Sun May 13 01:30:08 2012 (r235383) +++ stable/7/games/fortune/datfiles/freebsd-tips Sun May 13 01:30:27 2012 (r235384) @@ -73,8 +73,8 @@ If you need to ask a question on the Fre contains lots of useful advice to help you get the best results. % -If you `set filec' (file completion) in tcsh and write a part of the -filename, pressing TAB will show you the available choices when there +If you write part of a filename in tcsh, +pressing TAB will show you the available choices when there is more than one, or complete the filename if there's only one match. % If you `set watch = (0 any any)' in tcsh, you will be notified when @@ -122,9 +122,6 @@ In order to support national characters less without creating other nationalisation aspects, set the environment variable LC_ALL to 'en_US.ISO8859-1'. % -In tcsh, you can `set autolist' to have the shell automatically show -all the possible matches when doing filename/directory expansion. -% "man firewall" will give advice for building a FreeBSD firewall -- David Scheidt % @@ -192,13 +189,6 @@ flag is your gateway. Nice bash prompt: PS1='(\[$(tput md)\]\t <\w>\[$(tput me)\]) $(echo $?) \$ ' -- Mathieu % -Nice tcsh prompts: - set prompt = '[%B%m%b] %B%~%b%# ' - set prompt = '%m %# ' - set prompt = '%n@%m%# ' - set prompt = '%n@%m:%/%# ' - set prompt = '%n@%m:%~%# ' -% Over quota? "du -s * | sort -n " will give you a sorted list of your directory sizes. -- David Scheidt @@ -263,7 +253,7 @@ To quickly create an empty file, use "to -- Dru % To read a compressed file without having to first uncompress it, use -"zcat" or "zmore" to view it. +"zcat" or "zless" to view it. -- Dru % To repeat the last command in the C shell, type "!!". @@ -282,7 +272,7 @@ will search '/', and all subdirectories, % To see all of the directories on your FreeBSD system, type - ls -R / | more + ls -R / | less -- Dru % To see how long it takes a command to run, type the word "time" before the @@ -322,7 +312,7 @@ been replaced with other messages, look Want colour in your directory listings? Use "ls -G". "ls -F" is also useful, and they can be combined as "ls -FG". % -Want to find a specific port, just type the following under /usr/ports, +Want to find a specific port, just type the following under /usr/ports or one its subdirectories: "make search name=" @@ -479,3 +469,9 @@ when you are trying to find where in the Try "whereis firefox" and "whereis whereis". -- Konstantinos Konstantinidis % +Want to run the same command again? +In tcsh you can type "!!" +% +Want to go the directory you were just in? +Type "cd -" +% From owner-svn-src-all@FreeBSD.ORG Sun May 13 01:33:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CDE9106564A; Sun, 13 May 2012 01:33:29 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E9D28FC12; Sun, 13 May 2012 01:33:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4D1XTUi060975; Sun, 13 May 2012 01:33:29 GMT (envelope-from jasone@svn.freebsd.org) Received: (from jasone@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4D1XSFH060971; Sun, 13 May 2012 01:33:28 GMT (envelope-from jasone@svn.freebsd.org) Message-Id: <201205130133.q4D1XSFH060971@svn.freebsd.org> From: Jason Evans Date: Sun, 13 May 2012 01:33:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235385 - in head/contrib/jemalloc: . doc include/jemalloc/internal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 01:33:29 -0000 Author: jasone Date: Sun May 13 01:33:28 2012 New Revision: 235385 URL: http://svn.freebsd.org/changeset/base/235385 Log: Fix config_lazy_lock so that thread caching isn't used for single-threaded applications. Modified: head/contrib/jemalloc/FREEBSD-diffs head/contrib/jemalloc/doc/jemalloc.3 head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h Modified: head/contrib/jemalloc/FREEBSD-diffs ============================================================================== --- head/contrib/jemalloc/FREEBSD-diffs Sun May 13 01:30:27 2012 (r235384) +++ head/contrib/jemalloc/FREEBSD-diffs Sun May 13 01:33:28 2012 (r235385) @@ -45,7 +45,7 @@ index 877c500..7d659a7 100644 + diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in -index 268cd14..cfb1fb9 100644 +index 268cd14..2acd2eb 100644 --- a/include/jemalloc/internal/jemalloc_internal.h.in +++ b/include/jemalloc/internal/jemalloc_internal.h.in @@ -1,5 +1,8 @@ @@ -67,6 +67,21 @@ index 268cd14..cfb1fb9 100644 #define JEMALLOC_NO_DEMANGLE #include "../jemalloc@install_suffix@.h" +@@ -95,13 +101,7 @@ static const bool config_fill = + false + #endif + ; +-static const bool config_lazy_lock = +-#ifdef JEMALLOC_LAZY_LOCK +- true +-#else +- false +-#endif +- ; ++static const bool config_lazy_lock = true; + static const bool config_prof = + #ifdef JEMALLOC_PROF + true diff --git a/include/jemalloc/internal/mutex.h b/include/jemalloc/internal/mutex.h index de44e14..564d604 100644 --- a/include/jemalloc/internal/mutex.h Modified: head/contrib/jemalloc/doc/jemalloc.3 ============================================================================== --- head/contrib/jemalloc/doc/jemalloc.3 Sun May 13 01:30:27 2012 (r235384) +++ head/contrib/jemalloc/doc/jemalloc.3 Sun May 13 01:33:28 2012 (r235385) @@ -2,12 +2,12 @@ .\" Title: JEMALLOC .\" Author: Jason Evans .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 05/11/2012 +.\" Date: 05/12/2012 .\" Manual: User Manual .\" Source: jemalloc 3.0.0-0-gfc9b1dbf69f59d7ecfc4ac68da9847e017e1d046 .\" Language: English .\" -.TH "JEMALLOC" "3" "05/11/2012" "jemalloc 3.0.0-0-gfc9b1dbf69f5" "User Manual" +.TH "JEMALLOC" "3" "05/12/2012" "jemalloc 3.0.0-0-gfc9b1dbf69f5" "User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- Modified: head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h Sun May 13 01:30:27 2012 (r235384) +++ head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h Sun May 13 01:33:28 2012 (r235385) @@ -101,13 +101,7 @@ static const bool config_fill = false #endif ; -static const bool config_lazy_lock = -#ifdef JEMALLOC_LAZY_LOCK - true -#else - false -#endif - ; +static const bool config_lazy_lock = true; static const bool config_prof = #ifdef JEMALLOC_PROF true From owner-svn-src-all@FreeBSD.ORG Sun May 13 01:59:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36480106564A; Sun, 13 May 2012 01:59:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2089C8FC08; Sun, 13 May 2012 01:59:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4D1xoE2061816; Sun, 13 May 2012 01:59:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4D1xoHT061814; Sun, 13 May 2012 01:59:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205130159.q4D1xoHT061814@svn.freebsd.org> From: Alexander Motin Date: Sun, 13 May 2012 01:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235386 - stable/9/sys/geom/multipath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 01:59:51 -0000 Author: mav Date: Sun May 13 01:59:50 2012 New Revision: 235386 URL: http://svn.freebsd.org/changeset/base/235386 Log: MFC r235069: Fix `gmultipath configure` for big-endian machines. Modified: stable/9/sys/geom/multipath/g_multipath.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/multipath/g_multipath.c ============================================================================== --- stable/9/sys/geom/multipath/g_multipath.c Sun May 13 01:33:28 2012 (r235385) +++ stable/9/sys/geom/multipath/g_multipath.c Sun May 13 01:59:50 2012 (r235386) @@ -944,7 +944,7 @@ g_multipath_ctl_configure(struct gctl_re struct g_geom *gp; struct g_consumer *cp; struct g_provider *pp; - struct g_multipath_metadata *md; + struct g_multipath_metadata md; const char *name; int error, *val; void *buf; @@ -980,14 +980,15 @@ g_multipath_ctl_configure(struct gctl_re return; } g_topology_unlock(); - md = buf = g_malloc(pp->sectorsize, M_WAITOK | M_ZERO); - strlcpy(md->md_magic, G_MULTIPATH_MAGIC, sizeof(md->md_magic)); - memcpy(md->md_uuid, sc->sc_uuid, sizeof (sc->sc_uuid)); - strlcpy(md->md_name, name, sizeof(md->md_name)); - md->md_version = G_MULTIPATH_VERSION; - md->md_size = pp->mediasize; - md->md_sectorsize = pp->sectorsize; - md->md_active_active = sc->sc_active_active; + buf = g_malloc(pp->sectorsize, M_WAITOK | M_ZERO); + strlcpy(md.md_magic, G_MULTIPATH_MAGIC, sizeof(md.md_magic)); + memcpy(md.md_uuid, sc->sc_uuid, sizeof (sc->sc_uuid)); + strlcpy(md.md_name, name, sizeof(md.md_name)); + md.md_version = G_MULTIPATH_VERSION; + md.md_size = pp->mediasize; + md.md_sectorsize = pp->sectorsize; + md.md_active_active = sc->sc_active_active; + multipath_metadata_encode(&md, buf); error = g_write_data(cp, pp->mediasize - pp->sectorsize, buf, pp->sectorsize); g_topology_lock(); From owner-svn-src-all@FreeBSD.ORG Sun May 13 02:09:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26199106566C; Sun, 13 May 2012 02:09:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 103F78FC08; Sun, 13 May 2012 02:09:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4D29RH5062204; Sun, 13 May 2012 02:09:27 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4D29RxA062202; Sun, 13 May 2012 02:09:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205130209.q4D29RxA062202@svn.freebsd.org> From: Alexander Motin Date: Sun, 13 May 2012 02:09:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235387 - stable/8/sys/geom/multipath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 02:09:28 -0000 Author: mav Date: Sun May 13 02:09:27 2012 New Revision: 235387 URL: http://svn.freebsd.org/changeset/base/235387 Log: MFC r235069: Fix `gmultipath configure` for big-endian machines. Modified: stable/8/sys/geom/multipath/g_multipath.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/geom/multipath/g_multipath.c ============================================================================== --- stable/8/sys/geom/multipath/g_multipath.c Sun May 13 01:59:50 2012 (r235386) +++ stable/8/sys/geom/multipath/g_multipath.c Sun May 13 02:09:27 2012 (r235387) @@ -942,7 +942,7 @@ g_multipath_ctl_configure(struct gctl_re struct g_geom *gp; struct g_consumer *cp; struct g_provider *pp; - struct g_multipath_metadata *md; + struct g_multipath_metadata md; const char *name; int error, *val; void *buf; @@ -978,14 +978,15 @@ g_multipath_ctl_configure(struct gctl_re return; } g_topology_unlock(); - md = buf = g_malloc(pp->sectorsize, M_WAITOK | M_ZERO); - strlcpy(md->md_magic, G_MULTIPATH_MAGIC, sizeof(md->md_magic)); - memcpy(md->md_uuid, sc->sc_uuid, sizeof (sc->sc_uuid)); - strlcpy(md->md_name, name, sizeof(md->md_name)); - md->md_version = G_MULTIPATH_VERSION; - md->md_size = pp->mediasize; - md->md_sectorsize = pp->sectorsize; - md->md_active_active = sc->sc_active_active; + buf = g_malloc(pp->sectorsize, M_WAITOK | M_ZERO); + strlcpy(md.md_magic, G_MULTIPATH_MAGIC, sizeof(md.md_magic)); + memcpy(md.md_uuid, sc->sc_uuid, sizeof (sc->sc_uuid)); + strlcpy(md.md_name, name, sizeof(md.md_name)); + md.md_version = G_MULTIPATH_VERSION; + md.md_size = pp->mediasize; + md.md_sectorsize = pp->sectorsize; + md.md_active_active = sc->sc_active_active; + multipath_metadata_encode(&md, buf); error = g_write_data(cp, pp->mediasize - pp->sectorsize, buf, pp->sectorsize); g_topology_lock(); From owner-svn-src-all@FreeBSD.ORG Sun May 13 03:28:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E360E1065674; Sun, 13 May 2012 03:28:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id B0BED8FC0A; Sun, 13 May 2012 03:28:00 +0000 (UTC) Received: from John-Baldwins-MacBook-Air.local (unknown [24.114.252.231]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E8177B915; Sat, 12 May 2012 23:27:59 -0400 (EDT) Message-ID: <4FAF2A3F.5090708@FreeBSD.org> Date: Sat, 12 May 2012 23:27:59 -0400 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Bruce Evans References: <201205111237.q4BCbGX2083596@svn.freebsd.org> <20120511124820.GN2358@deviant.kiev.zoral.com.ua> <6AE99277-D90F-453D-AE40-EE731DFD3BAB@FreeBSD.org> <20120511130955.GO2358@deviant.kiev.zoral.com.ua> <20120512014148.C1953@besplex.bde.org> In-Reply-To: <20120512014148.C1953@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sat, 12 May 2012 23:28:00 -0400 (EDT) Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, David Chisnall , svn-src-head@freebsd.org, Gabor Kovesdan , Konstantin Belousov Subject: Re: svn commit: r235267 - in head/usr.bin/sort: . nls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 03:28:01 -0000 On 5/11/12 1:17 PM, Bruce Evans wrote: > However, they may be some some boot programs that save space by not > bzeroing the bss. Not being a C program in this respect apparently > caused the following farcal churn in i386/boot2: > - the opts variable started with a bogus explicit initialization > to 0. Long ago (in 2003), but probably after the default of > -fzero-initialized-in-bss turned this into just a style bug, > the explicit initializaton was removed. > - zeroing of the bss was moved from i386/boot2/boot1.s ro rbx in 2004. > It hopefully still worked. > - in 2011, the kname variable was changed from char [1024] to a > pointer. The pointer was explicitly initialized to NULL. This > was not just a style bug, since the bss was apparently no > longer zeroed. > - initialization of the opts variable was apparently broken in the > same way some time before this (whenever the zeroing was optimized > away). > - in the next commit in 2011, it was claimed that the BSS is not > zeroed, and the initialization of kname was moved into main() > to fix this. bss was spelled BSS, so my greps didn't find this > immediately. > - in a later commit in 2012, the initialization of opts was moved into > main(), presumably for the same reason, but neither bss nor BSS was > mentioned in the commit log, so this took longer to find. > - these changes broke at least kname. Apparently, it can be initialized > to non-null before main() in some cases. This was fixed in the most > recent commit to boot2.c, in 2012, by moving the initialization of > kname out of main(). opts was moved similary. The commit message > doesn't mention bss or BSS, and says that this is to make clange > build again. But boot2 is compiled without -fzero-initialized-in-bss, > so initializing kname and opts outside of main() has no effect. They > are now uninitialized again, assuming that the 2011 commit message is > correct. Even the old char array for kname probably needed kname[0] > to be zero. We apparently depend on most memory being 0 when booting, > so that the chance of it being nonzero for these 2 variables is tiny. > > kname and opts are the only 2 global variables in i386/boot2 that need > to be initialized to 0 in some way (the others either need to be > initialized to non-0, so they never get put in the bss, or their initial > value doesn't matter. After reducing kname to a pointer, these variables > have total size 8. Perhaps the zeroing code would now take more than 8 > bytes. However, in the 2004 version when the zeroing code was in boot1.S, > it size seems to be 6 or 7 bytes (the code for this is smart). Thus the > savings might be negative, but they are more likely to be a whole 4-8 > bytes. There may be safer ways to save space. So I finally figured this out recently while looking at avg@'s recent patches. boot2's BSS is in fact zero'd by sys/boot/i386/btx/lib/btxcsu.S. This same code also zero's the BSS of /boot/loader. I have a patch to revert boot2 back to depending on the zero'd BSS in a tree, just need to commit it. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Sun May 13 05:08:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6ECBF106566C; Sun, 13 May 2012 05:08:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F3A58FC0C; Sun, 13 May 2012 05:08:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4D58EY1067702; Sun, 13 May 2012 05:08:14 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4D58EcO067699; Sun, 13 May 2012 05:08:14 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201205130508.q4D58EcO067699@svn.freebsd.org> From: Marius Strobl Date: Sun, 13 May 2012 05:08:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235388 - head/contrib/compiler-rt/lib/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 05:08:14 -0000 Author: marius Date: Sun May 13 05:08:13 2012 New Revision: 235388 URL: http://svn.freebsd.org/changeset/base/235388 Log: - Get rid of debugging support in order to get rid of the V8-specific C compiler frame size used there so this whole thing is V8/V9-agnostic. - Use 32-bit function alignment as GCC does when using UltraSPARC I or higher optimizations. - Don't waste delay slots when possible. Unfortunately, this still doesn't make libcompiler_rt a viable replacement for libgcc on sparc64 though as once installed instead, buildworld times increase by nearly 60% (which isn't related to these assembler functions). Modified: head/contrib/compiler-rt/lib/sparc64/divmod.m4 Modified: head/contrib/compiler-rt/lib/sparc64/divmod.m4 ============================================================================== --- head/contrib/compiler-rt/lib/sparc64/divmod.m4 Sun May 13 02:09:27 2012 (r235387) +++ head/contrib/compiler-rt/lib/sparc64/divmod.m4 Sun May 13 05:08:13 2012 (r235388) @@ -59,9 +59,6 @@ define(SC,`%g2') #include "../assembly.h" -.text - .align 4 - define(DEVELOP_QUOTIENT_BITS, ` !depth $1, accumulated bits $2 bl L.$1.eval(TWOSUPN+$2) @@ -84,12 +81,14 @@ L.$1.eval(TWOSUPN+$2): ifelse( $1, 1, `9:') ') ifelse( ANSWER, `quotient', ` +.text + .align 32 DEFINE_COMPILERRT_FUNCTION(__udivsi3) - save %sp,-64,%sp ! do this for debugging b divide mov 0,SIGN ! result always nonnegative +.text + .align 32 DEFINE_COMPILERRT_FUNCTION(__divsi3) - save %sp,-64,%sp ! do this for debugging orcc divisor,dividend,%g0 ! are either dividend or divisor negative bge divide ! if not, skip this junk xor divisor,dividend,SIGN ! record sign of result in sign of SIGN @@ -104,12 +103,14 @@ DEFINE_COMPILERRT_FUNCTION(__divsi3) neg dividend ! FALL THROUGH ',` +.text + .align 32 DEFINE_COMPILERRT_FUNCTION(__umodsi3) - save %sp,-64,%sp ! do this for debugging b divide mov 0,SIGN ! result always nonnegative +.text + .align 32 DEFINE_COMPILERRT_FUNCTION(__modsi3) - save %sp,-64,%sp ! do this for debugging orcc divisor,dividend,%g0 ! are either dividend or divisor negative bge divide ! if not, skip this junk mov dividend,SIGN ! record sign of result in sign of SIGN @@ -184,8 +185,8 @@ do_single_div: nop sub R,V,R mov 1,Q - b end_single_divloop - nop + b,a end_single_divloop + ! EMPTY single_divloop: sll Q,1,Q bl 1f @@ -202,8 +203,8 @@ single_divloop: deccc SC bge single_divloop tst R - b end_regular_divide - nop + b,a end_regular_divide + ! EMPTY not_really_big: 1: @@ -224,9 +225,8 @@ end_regular_divide: deccc ITER bge divloop tst R - bge got_result - nop - ! non-restoring fixup here + bl,a got_result + ! non-restoring fixup if remainder < 0, otherwise annulled ifelse( ANSWER, `quotient', ` dec Q ',` add R,divisor,R @@ -234,13 +234,11 @@ ifelse( ANSWER, `quotient', got_result: tst SIGN - bge 1f - restore - ! answer < 0 - retl ! leaf-routine return + bl,a 1f + ! negate for answer < 0, otherwise annulled ifelse( ANSWER, `quotient', -` neg %o2,%o0 ! quotient <- -Q -',` neg %o3,%o0 ! remainder <- -R +` neg %o2,%o2 ! Q <- -Q +',` neg %o3,%o3 ! R <- -R ') 1: retl ! leaf-routine return From owner-svn-src-all@FreeBSD.ORG Sun May 13 05:09:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 18BFC1065670; Sun, 13 May 2012 05:09:37 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 045708FC15; Sun, 13 May 2012 05:09:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4D59agC067774; Sun, 13 May 2012 05:09:36 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4D59avT067771; Sun, 13 May 2012 05:09:36 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201205130509.q4D59avT067771@svn.freebsd.org> From: Marius Strobl Date: Sun, 13 May 2012 05:09:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235389 - head/contrib/compiler-rt/lib/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 05:09:37 -0000 Author: marius Date: Sun May 13 05:09:36 2012 New Revision: 235389 URL: http://svn.freebsd.org/changeset/base/235389 Log: Regenerate after r235388. Modified: head/contrib/compiler-rt/lib/sparc64/divsi3.S head/contrib/compiler-rt/lib/sparc64/modsi3.S Modified: head/contrib/compiler-rt/lib/sparc64/divsi3.S ============================================================================== --- head/contrib/compiler-rt/lib/sparc64/divsi3.S Sun May 13 05:08:13 2012 (r235388) +++ head/contrib/compiler-rt/lib/sparc64/divsi3.S Sun May 13 05:09:36 2012 (r235389) @@ -47,13 +47,13 @@ */ #include "../assembly.h" .text - .align 4 + .align 32 DEFINE_COMPILERRT_FUNCTION(__udivsi3) - save %sp,-64,%sp ! do this for debugging b divide mov 0,%g3 ! result always nonnegative +.text + .align 32 DEFINE_COMPILERRT_FUNCTION(__divsi3) - save %sp,-64,%sp ! do this for debugging orcc %o1,%o0,%g0 ! are either %o0 or %o1 negative bge divide ! if not, skip this junk xor %o1,%o0,%g3 ! record sign of result in sign of %g3 @@ -126,8 +126,8 @@ do_single_div: nop sub %o3,%o5,%o3 mov 1,%o2 - b end_single_divloop - nop + b,a end_single_divloop + ! EMPTY single_divloop: sll %o2,1,%o2 bl 1f @@ -144,8 +144,8 @@ single_divloop: deccc %g2 bge single_divloop tst %o3 - b end_regular_divide - nop + b,a end_regular_divide + ! EMPTY not_really_big: 1: sll %o5,4,%o5 @@ -317,17 +317,14 @@ end_regular_divide: deccc %o4 bge divloop tst %o3 - bge got_result - nop - ! non-restoring fixup here + bl,a got_result + ! non-restoring fixup if remainder < 0, otherwise annulled dec %o2 got_result: tst %g3 - bge 1f - restore - ! answer < 0 - retl ! leaf-routine return - neg %o2,%o0 ! quotient <- -%o2 + bl,a 1f + ! negate for answer < 0, otherwise annulled + neg %o2,%o2 ! %o2 <- -%o2 1: retl ! leaf-routine return mov %o2,%o0 ! quotient <- %o2 Modified: head/contrib/compiler-rt/lib/sparc64/modsi3.S ============================================================================== --- head/contrib/compiler-rt/lib/sparc64/modsi3.S Sun May 13 05:08:13 2012 (r235388) +++ head/contrib/compiler-rt/lib/sparc64/modsi3.S Sun May 13 05:09:36 2012 (r235389) @@ -47,13 +47,13 @@ */ #include "../assembly.h" .text - .align 4 + .align 32 DEFINE_COMPILERRT_FUNCTION(__umodsi3) - save %sp,-64,%sp ! do this for debugging b divide mov 0,%g3 ! result always nonnegative +.text + .align 32 DEFINE_COMPILERRT_FUNCTION(__modsi3) - save %sp,-64,%sp ! do this for debugging orcc %o1,%o0,%g0 ! are either %o0 or %o1 negative bge divide ! if not, skip this junk mov %o0,%g3 ! record sign of result in sign of %g3 @@ -126,8 +126,8 @@ do_single_div: nop sub %o3,%o5,%o3 mov 1,%o2 - b end_single_divloop - nop + b,a end_single_divloop + ! EMPTY single_divloop: sll %o2,1,%o2 bl 1f @@ -144,8 +144,8 @@ single_divloop: deccc %g2 bge single_divloop tst %o3 - b end_regular_divide - nop + b,a end_regular_divide + ! EMPTY not_really_big: 1: sll %o5,4,%o5 @@ -317,17 +317,14 @@ end_regular_divide: deccc %o4 bge divloop tst %o3 - bge got_result - nop - ! non-restoring fixup here + bl,a got_result + ! non-restoring fixup if remainder < 0, otherwise annulled add %o3,%o1,%o3 got_result: tst %g3 - bge 1f - restore - ! answer < 0 - retl ! leaf-routine return - neg %o3,%o0 ! remainder <- -%o3 + bl,a 1f + ! negate for answer < 0, otherwise annulled + neg %o3,%o3 ! %o3 <- -%o3 1: retl ! leaf-routine return mov %o3,%o0 ! remainder <- %o3 From owner-svn-src-all@FreeBSD.ORG Sun May 13 09:22:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6906A1065670; Sun, 13 May 2012 09:22:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52D1B8FC14; Sun, 13 May 2012 09:22:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4D9MJDh075493; Sun, 13 May 2012 09:22:19 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4D9MJcJ075490; Sun, 13 May 2012 09:22:19 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205130922.q4D9MJcJ075490@svn.freebsd.org> From: Andriy Gapon Date: Sun, 13 May 2012 09:22:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235390 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 09:22:19 -0000 Author: avg Date: Sun May 13 09:22:18 2012 New Revision: 235390 URL: http://svn.freebsd.org/changeset/base/235390 Log: zfs boot code: mark spa_t arguments as const where they are used as such MFC after: 1 month Modified: head/sys/boot/zfs/zfs.c head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Sun May 13 05:09:36 2012 (r235389) +++ head/sys/boot/zfs/zfs.c Sun May 13 09:22:18 2012 (r235390) @@ -128,7 +128,7 @@ zfs_close(struct open_file *f) static int zfs_read(struct open_file *f, void *start, size_t size, size_t *resid /* out */) { - spa_t *spa = ((struct zfsmount *)f->f_devdata)->spa; + const spa_t *spa = ((struct zfsmount *)f->f_devdata)->spa; struct file *fp = (struct file *)f->f_fsdata; struct stat sb; size_t n; @@ -202,7 +202,7 @@ zfs_seek(struct open_file *f, off_t offs static int zfs_stat(struct open_file *f, struct stat *sb) { - spa_t *spa = ((struct zfsmount *)f->f_devdata)->spa; + const spa_t *spa = ((struct zfsmount *)f->f_devdata)->spa; struct file *fp = (struct file *)f->f_fsdata; return (zfs_dnode_stat(spa, &fp->f_dnode, sb)); @@ -211,7 +211,7 @@ zfs_stat(struct open_file *f, struct sta static int zfs_readdir(struct open_file *f, struct dirent *d) { - spa_t *spa = ((struct zfsmount *)f->f_devdata)->spa; + const spa_t *spa = ((struct zfsmount *)f->f_devdata)->spa; struct file *fp = (struct file *)f->f_fsdata; mzap_ent_phys_t mze; struct stat sb; Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Sun May 13 05:09:36 2012 (r235389) +++ head/sys/boot/zfs/zfsimpl.c Sun May 13 09:22:18 2012 (r235390) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); struct zfsmount { - spa_t *spa; + const spa_t *spa; objset_phys_t objset; uint64_t rootobj; }; @@ -63,7 +63,7 @@ static char *zfs_temp_buf, *zfs_temp_end #define TEMP_SIZE (1024 * 1024) -static int zio_read(spa_t *spa, const blkptr_t *bp, void *buf); +static int zio_read(const spa_t *spa, const blkptr_t *bp, void *buf); static void zfs_init(void) @@ -981,7 +981,7 @@ ilog2(int n) } static int -zio_read_gang(spa_t *spa, const blkptr_t *bp, void *buf) +zio_read_gang(const spa_t *spa, const blkptr_t *bp, void *buf) { blkptr_t gbh_bp; zio_gbh_phys_t zio_gb; @@ -1018,7 +1018,7 @@ zio_read_gang(spa_t *spa, const blkptr_t } static int -zio_read(spa_t *spa, const blkptr_t *bp, void *buf) +zio_read(const spa_t *spa, const blkptr_t *bp, void *buf) { int cpfunc = BP_GET_COMPRESS(bp); uint64_t align, size; @@ -1078,7 +1078,7 @@ zio_read(spa_t *spa, const blkptr_t *bp, } static int -dnode_read(spa_t *spa, const dnode_phys_t *dnode, off_t offset, void *buf, size_t buflen) +dnode_read(const spa_t *spa, const dnode_phys_t *dnode, off_t offset, void *buf, size_t buflen) { int ibshift = dnode->dn_indblkshift - SPA_BLKPTRSHIFT; int bsize = dnode->dn_datablkszsec << SPA_MINBLOCKSHIFT; @@ -1141,7 +1141,7 @@ dnode_read(spa_t *spa, const dnode_phys_ * scratch buffer contains the directory contents. */ static int -mzap_lookup(spa_t *spa, const dnode_phys_t *dnode, const char *name, uint64_t *value) +mzap_lookup(const dnode_phys_t *dnode, const char *name, uint64_t *value) { const mzap_phys_t *mz; const mzap_ent_phys_t *mze; @@ -1222,7 +1222,7 @@ fzap_leaf_value(const zap_leaf_t *zl, co * buffer contains the directory header. */ static int -fzap_lookup(spa_t *spa, const dnode_phys_t *dnode, const char *name, uint64_t *value) +fzap_lookup(const spa_t *spa, const dnode_phys_t *dnode, const char *name, uint64_t *value) { int bsize = dnode->dn_datablkszsec << SPA_MINBLOCKSHIFT; zap_phys_t zh = *(zap_phys_t *) zap_scratch; @@ -1300,7 +1300,7 @@ fzap_lookup(spa_t *spa, const dnode_phys * Lookup a name in a zap object and return its value as a uint64_t. */ static int -zap_lookup(spa_t *spa, const dnode_phys_t *dnode, const char *name, uint64_t *value) +zap_lookup(const spa_t *spa, const dnode_phys_t *dnode, const char *name, uint64_t *value) { int rc; uint64_t zap_type; @@ -1312,7 +1312,7 @@ zap_lookup(spa_t *spa, const dnode_phys_ zap_type = *(uint64_t *) zap_scratch; if (zap_type == ZBT_MICRO) - return mzap_lookup(spa, dnode, name, value); + return mzap_lookup(dnode, name, value); else if (zap_type == ZBT_HEADER) return fzap_lookup(spa, dnode, name, value); printf("ZFS: invalid zap_type=%d\n", (int)zap_type); @@ -1326,7 +1326,7 @@ zap_lookup(spa_t *spa, const dnode_phys_ * the directory contents. */ static int -mzap_list(spa_t *spa, const dnode_phys_t *dnode) +mzap_list(const dnode_phys_t *dnode) { const mzap_phys_t *mz; const mzap_ent_phys_t *mze; @@ -1356,7 +1356,7 @@ mzap_list(spa_t *spa, const dnode_phys_t * the directory header. */ static int -fzap_list(spa_t *spa, const dnode_phys_t *dnode) +fzap_list(const spa_t *spa, const dnode_phys_t *dnode) { int bsize = dnode->dn_datablkszsec << SPA_MINBLOCKSHIFT; zap_phys_t zh = *(zap_phys_t *) zap_scratch; @@ -1395,7 +1395,7 @@ fzap_list(spa_t *spa, const dnode_phys_t namelen = zc->l_entry.le_name_length; if (namelen > sizeof(name)) namelen = sizeof(name); - + /* * Paste the name back together. */ @@ -1429,7 +1429,7 @@ fzap_list(spa_t *spa, const dnode_phys_t * List a zap directory. */ static int -zap_list(spa_t *spa, const dnode_phys_t *dnode) +zap_list(const spa_t *spa, const dnode_phys_t *dnode) { uint64_t zap_type; size_t size = dnode->dn_datablkszsec * 512; @@ -1439,7 +1439,7 @@ zap_list(spa_t *spa, const dnode_phys_t zap_type = *(uint64_t *) zap_scratch; if (zap_type == ZBT_MICRO) - return mzap_list(spa, dnode); + return mzap_list(dnode); else return fzap_list(spa, dnode); } @@ -1447,7 +1447,7 @@ zap_list(spa_t *spa, const dnode_phys_t #endif static int -objset_get_dnode(spa_t *spa, const objset_phys_t *os, uint64_t objnum, dnode_phys_t *dnode) +objset_get_dnode(const spa_t *spa, const objset_phys_t *os, uint64_t objnum, dnode_phys_t *dnode) { off_t offset; @@ -1457,7 +1457,7 @@ objset_get_dnode(spa_t *spa, const objse } static int -mzap_rlookup(spa_t *spa, const dnode_phys_t *dnode, char *name, uint64_t value) +mzap_rlookup(const spa_t *spa, const dnode_phys_t *dnode, char *name, uint64_t value) { const mzap_phys_t *mz; const mzap_ent_phys_t *mze; @@ -1510,7 +1510,7 @@ fzap_name_copy(const zap_leaf_t *zl, con } static int -fzap_rlookup(spa_t *spa, const dnode_phys_t *dnode, char *name, uint64_t value) +fzap_rlookup(const spa_t *spa, const dnode_phys_t *dnode, char *name, uint64_t value) { int bsize = dnode->dn_datablkszsec << SPA_MINBLOCKSHIFT; zap_phys_t zh = *(zap_phys_t *) zap_scratch; @@ -1585,7 +1585,7 @@ fzap_rlookup(spa_t *spa, const dnode_phy } static int -zap_rlookup(spa_t *spa, const dnode_phys_t *dnode, char *name, uint64_t value) +zap_rlookup(const spa_t *spa, const dnode_phys_t *dnode, char *name, uint64_t value) { int rc; uint64_t zap_type; @@ -1603,7 +1603,7 @@ zap_rlookup(spa_t *spa, const dnode_phys } static int -zfs_rlookup(spa_t *spa, uint64_t objnum, char *result) +zfs_rlookup(const spa_t *spa, uint64_t objnum, char *result) { char name[256]; char component[256]; @@ -1661,7 +1661,7 @@ zfs_rlookup(spa_t *spa, uint64_t objnum, } static int -zfs_lookup_dataset(spa_t *spa, const char *name, uint64_t *objnum) +zfs_lookup_dataset(const spa_t *spa, const char *name, uint64_t *objnum) { char element[256]; uint64_t dir_obj, child_dir_zapobj; @@ -1714,7 +1714,7 @@ zfs_lookup_dataset(spa_t *spa, const cha * and return its details in *objset */ static int -zfs_mount_dataset(spa_t *spa, uint64_t objnum, objset_phys_t *objset) +zfs_mount_dataset(const spa_t *spa, uint64_t objnum, objset_phys_t *objset) { dnode_phys_t dataset; dsl_dataset_phys_t *ds; @@ -1739,7 +1739,7 @@ zfs_mount_dataset(spa_t *spa, uint64_t o * dataset if there is none and return its details in *objset */ static int -zfs_get_root(spa_t *spa, uint64_t *objid) +zfs_get_root(const spa_t *spa, uint64_t *objid) { dnode_phys_t dir, propdir; uint64_t props, bootfs, root; @@ -1784,7 +1784,7 @@ zfs_get_root(spa_t *spa, uint64_t *objid } static int -zfs_mount(spa_t *spa, uint64_t rootobj, struct zfsmount *mount) +zfs_mount(const spa_t *spa, uint64_t rootobj, struct zfsmount *mount) { mount->spa = spa; @@ -1822,7 +1822,7 @@ zfs_spa_init(spa_t *spa) } static int -zfs_dnode_stat(spa_t *spa, dnode_phys_t *dn, struct stat *sb) +zfs_dnode_stat(const spa_t *spa, dnode_phys_t *dn, struct stat *sb) { if (dn->dn_bonustype != DMU_OT_SA) { @@ -1881,7 +1881,7 @@ zfs_lookup(const struct zfsmount *mount, { int rc; uint64_t objnum, rootnum, parentnum; - spa_t *spa; + const spa_t *spa; dnode_phys_t dn; const char *p, *q; char element[256]; From owner-svn-src-all@FreeBSD.ORG Sun May 13 09:25:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31E761065672; Sun, 13 May 2012 09:25:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DD138FC19; Sun, 13 May 2012 09:25:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4D9Pdde075656; Sun, 13 May 2012 09:25:39 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4D9Pdtp075654; Sun, 13 May 2012 09:25:39 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205130925.q4D9Pdtp075654@svn.freebsd.org> From: Andriy Gapon Date: Sun, 13 May 2012 09:25:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235391 - head/sys/i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 09:25:40 -0000 Author: avg Date: Sun May 13 09:25:39 2012 New Revision: 235391 URL: http://svn.freebsd.org/changeset/base/235391 Log: i386 bootinfo: re-arrange EFI fields for natural alignment and packing Suggested by: bde MFC after: 2 weeks Modified: head/sys/i386/include/bootinfo.h Modified: head/sys/i386/include/bootinfo.h ============================================================================== --- head/sys/i386/include/bootinfo.h Sun May 13 09:22:18 2012 (r235390) +++ head/sys/i386/include/bootinfo.h Sun May 13 09:25:39 2012 (r235391) @@ -65,13 +65,13 @@ struct bootinfo { u_int32_t bi_kernend; /* end of kernel space */ u_int32_t bi_envp; /* environment */ u_int32_t bi_modulep; /* preloaded modules */ + uint32_t bi_memdesc_version; /* EFI memory desc version */ + uint64_t bi_memdesc_size; /* sizeof EFI memory desc */ + uint64_t bi_memmap; /* pa of EFI memory map */ + uint64_t bi_memmap_size; /* size of EFI memory map */ uint64_t bi_hcdp; /* DIG64 HCDP table */ uint64_t bi_fpswa; /* FPSWA interface */ uint64_t bi_systab; /* pa of EFI system table */ - uint64_t bi_memmap; /* pa of EFI memory map */ - uint64_t bi_memmap_size; /* size of EFI memory map */ - uint64_t bi_memdesc_size; /* sizeof EFI memory desc */ - uint32_t bi_memdesc_version; /* EFI memory desc version */ }; #ifdef _KERNEL From owner-svn-src-all@FreeBSD.ORG Sun May 13 09:27:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B35EA106566C; Sun, 13 May 2012 09:27:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9EE408FC15; Sun, 13 May 2012 09:27:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4D9R8UW075744; Sun, 13 May 2012 09:27:08 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4D9R8jf075742; Sun, 13 May 2012 09:27:08 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205130927.q4D9R8jf075742@svn.freebsd.org> From: Andriy Gapon Date: Sun, 13 May 2012 09:27:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235392 - head/tools/tools/zfsboottest X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 09:27:08 -0000 Author: avg Date: Sun May 13 09:27:08 2012 New Revision: 235392 URL: http://svn.freebsd.org/changeset/base/235392 Log: zfsboottest: update for the recent zfs boot code changes MFC after: 1 month Modified: head/tools/tools/zfsboottest/zfsboottest.c Modified: head/tools/tools/zfsboottest/zfsboottest.c ============================================================================== --- head/tools/tools/zfsboottest/zfsboottest.c Sun May 13 09:25:39 2012 (r235391) +++ head/tools/tools/zfsboottest/zfsboottest.c Sun May 13 09:27:08 2012 (r235392) @@ -89,7 +89,11 @@ main(int argc, char** argv) char buf[512], hash[33]; MD5_CTX ctx; struct stat sb; + struct zfsmount zfsmnt; dnode_phys_t dn; +#if 0 + uint64_t rootobj; +#endif spa_t *spa; off_t off; ssize_t n; @@ -138,14 +142,28 @@ main(int argc, char** argv) exit(1); } - if (zfs_mount_pool(spa)) { - fprintf(stderr, "can't mount pool\n"); + if (zfs_spa_init(spa)) { + fprintf(stderr, "can't init pool\n"); exit(1); } +#if 0 + if (zfs_get_root(spa, &rootobj)) { + fprintf(stderr, "can't get root\n"); + exit(1); + } + + if (zfs_mount(spa, rootobj, &zfsmnt)) { +#else + if (zfs_mount(spa, 0, &zfsmnt)) { + fprintf(stderr, "can't mount\n"); + exit(1); + } +#endif + printf("\n"); for (++i, failures = 0; i < argc; i++) { - if (zfs_lookup(spa, argv[i], &dn)) { + if (zfs_lookup(&zfsmnt, argv[i], &dn)) { fprintf(stderr, "%s: can't lookup\n", argv[i]); failures++; continue; From owner-svn-src-all@FreeBSD.ORG Sun May 13 10:31:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9AEAF106566B; Sun, 13 May 2012 10:31:09 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BA328FC0A; Sun, 13 May 2012 10:31:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DAV9lD079385; Sun, 13 May 2012 10:31:09 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DAV9j2079383; Sun, 13 May 2012 10:31:09 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201205131031.q4DAV9j2079383@svn.freebsd.org> From: Sean Bruno Date: Sun, 13 May 2012 10:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235393 - stable/9/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 10:31:09 -0000 Author: sbruno Date: Sun May 13 10:31:08 2012 New Revision: 235393 URL: http://svn.freebsd.org/changeset/base/235393 Log: MFC 235210 Modify the binding of queues to attach to as many CPUs as possible when using more than one igb(4) adapter. This means that queues will not be bound to the same CPUs if there are more CPUs availble. This is only applicable to a system that has multiple interfaces. Modified: stable/9/sys/dev/e1000/if_igb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/e1000/if_igb.c ============================================================================== --- stable/9/sys/dev/e1000/if_igb.c Sun May 13 09:27:08 2012 (r235392) +++ stable/9/sys/dev/e1000/if_igb.c Sun May 13 10:31:08 2012 (r235393) @@ -362,6 +362,13 @@ TUNABLE_INT("hw.igb.num_queues", &igb_nu SYSCTL_INT(_hw_igb, OID_AUTO, num_queues, CTLFLAG_RDTUN, &igb_num_queues, 0, "Number of queues to configure, 0 indicates autoconfigure"); +/* +** Global variable to store last used CPU when binding queues +** to CPUs in igb_allocate_msix. Starts at CPU_FIRST and increments when a +** queue is bound to a cpu. +*/ +static int igb_last_bind_cpu = -1; + /* How many packets rxeof tries to clean at a time */ static int igb_rx_process_limit = 100; TUNABLE_INT("hw.igb.rx_process_limit", &igb_rx_process_limit); @@ -2323,8 +2330,16 @@ igb_allocate_msix(struct adapter *adapte ** Bind the msix vector, and thus the ** rings to the corresponding cpu. */ - if (adapter->num_queues > 1) - bus_bind_intr(dev, que->res, i); + if (adapter->num_queues > 1) { + if (igb_last_bind_cpu < 0) + igb_last_bind_cpu = CPU_FIRST(); + bus_bind_intr(dev, que->res, igb_last_bind_cpu); + device_printf(dev, + "Bound queue %d to cpu %d\n", + i,igb_last_bind_cpu); + igb_last_bind_cpu = CPU_NEXT(igb_last_bind_cpu); + igb_last_bind_cpu = igb_last_bind_cpu % mp_ncpus; + } #if __FreeBSD_version >= 800000 TASK_INIT(&que->txr->txq_task, 0, igb_deferred_mq_start, que->txr); From owner-svn-src-all@FreeBSD.ORG Sun May 13 10:54:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60FE6106566B; Sun, 13 May 2012 10:54:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C3E88FC14; Sun, 13 May 2012 10:54:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DAsi2F080116; Sun, 13 May 2012 10:54:44 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DAsira080114; Sun, 13 May 2012 10:54:44 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205131054.q4DAsira080114@svn.freebsd.org> From: Andriy Gapon Date: Sun, 13 May 2012 10:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235394 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 10:54:44 -0000 Author: avg Date: Sun May 13 10:54:43 2012 New Revision: 235394 URL: http://svn.freebsd.org/changeset/base/235394 Log: zfs boot: cleanup remnants of temporary compat code MFC after: 1 month Modified: head/sys/boot/zfs/zfs.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Sun May 13 10:31:08 2012 (r235393) +++ head/sys/boot/zfs/zfs.c Sun May 13 10:54:43 2012 (r235394) @@ -56,7 +56,6 @@ static int zfs_stat(struct open_file *f, static int zfs_readdir(struct open_file *f, struct dirent *d); struct devsw zfs_dev; -struct devsw zfs_dev_compat; struct fs_ops zfs_fsops = { "zfs", @@ -90,7 +89,7 @@ zfs_open(const char *upath, struct open_ struct file *fp; int rc; - if (f->f_dev != &zfs_dev && f->f_dev != &zfs_dev_compat) + if (f->f_dev != &zfs_dev) return (EINVAL); /* allocate file system specific data structure */ From owner-svn-src-all@FreeBSD.ORG Sun May 13 11:34:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 545E4106566C; Sun, 13 May 2012 11:34:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F9868FC0C; Sun, 13 May 2012 11:34:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DBY6Z3081409; Sun, 13 May 2012 11:34:06 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DBY6YO081407; Sun, 13 May 2012 11:34:06 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205131134.q4DBY6YO081407@svn.freebsd.org> From: Andriy Gapon Date: Sun, 13 May 2012 11:34:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235395 - head/sys/boot/pc98/libpc98 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 11:34:06 -0000 Author: avg Date: Sun May 13 11:34:05 2012 New Revision: 235395 URL: http://svn.freebsd.org/changeset/base/235395 Log: libpc98: unbreak after zfs-related changes in libi386 code Pointyhat to: avg MFC after: 1 month Modified: head/sys/boot/pc98/libpc98/Makefile Modified: head/sys/boot/pc98/libpc98/Makefile ============================================================================== --- head/sys/boot/pc98/libpc98/Makefile Sun May 13 10:54:43 2012 (r235394) +++ head/sys/boot/pc98/libpc98/Makefile Sun May 13 11:34:05 2012 (r235395) @@ -10,6 +10,8 @@ SRCS= bioscd.c biosdisk.c biosmem.c bios comconsole.c devicename.c elf32_freebsd.c \ i386_copy.c i386_module.c nullconsole.c pc98_sys.c pxe.c pxetramp.s \ time.c vidconsole.c +.PATH: ${.CURDIR}/../../zfs +SRCS+= devicename_stubs.c # Enable PXE TFTP or NFS support, not both. .if defined(LOADER_TFTP_SUPPORT) From owner-svn-src-all@FreeBSD.ORG Sun May 13 12:50:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7117D106566B; Sun, 13 May 2012 12:50:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58D548FC17; Sun, 13 May 2012 12:50:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DCoh9p083782; Sun, 13 May 2012 12:50:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DCohoD083772; Sun, 13 May 2012 12:50:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205131250.q4DCohoD083772@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 13 May 2012 12:50:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235396 - in stable/9/libexec/rtld-elf: . amd64 arm i386 ia64 powerpc powerpc64 sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 12:50:43 -0000 Author: kib Date: Sun May 13 12:50:42 2012 New Revision: 235396 URL: http://svn.freebsd.org/changeset/base/235396 Log: MFC r234840: Split the symlook_obj1 into a loop iterating over the ELF object symbol hash elements, and a helper matched_symbol() which match the given hash entry and request, performing needed type and version checks. MFC r234841: Add GNU hash support for rtld. MFC r235054: Work around a situation where symlook_obj() could be called for the object for which digest_dynamic1() was not done yet. Just return EINVAL and do not try to dereference NULL buckets hash array. Modified: stable/9/libexec/rtld-elf/amd64/reloc.c stable/9/libexec/rtld-elf/arm/reloc.c stable/9/libexec/rtld-elf/i386/reloc.c stable/9/libexec/rtld-elf/ia64/reloc.c stable/9/libexec/rtld-elf/powerpc/reloc.c stable/9/libexec/rtld-elf/powerpc64/reloc.c stable/9/libexec/rtld-elf/rtld.c stable/9/libexec/rtld-elf/rtld.h stable/9/libexec/rtld-elf/sparc64/reloc.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/amd64/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/amd64/reloc.c Sun May 13 11:34:05 2012 (r235395) +++ stable/9/libexec/rtld-elf/amd64/reloc.c Sun May 13 12:50:42 2012 (r235396) @@ -132,7 +132,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry * limited amounts of stack available so we cannot use alloca(). */ if (obj != obj_rtld) { - cache = calloc(obj->nchains, sizeof(SymCache)); + cache = calloc(obj->dynsymcount, sizeof(SymCache)); /* No need to check for NULL here */ } else cache = NULL; Modified: stable/9/libexec/rtld-elf/arm/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/arm/reloc.c Sun May 13 11:34:05 2012 (r235395) +++ stable/9/libexec/rtld-elf/arm/reloc.c Sun May 13 12:50:42 2012 (r235396) @@ -268,7 +268,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry * The dynamic loader may be called from a thread, we have * limited amounts of stack available so we cannot use alloca(). */ - cache = calloc(obj->nchains, sizeof(SymCache)); + cache = calloc(obj->dynsymcount, sizeof(SymCache)); /* No need to check for NULL here */ rellim = (const Elf_Rel *)((caddr_t)obj->rel + obj->relsize); Modified: stable/9/libexec/rtld-elf/i386/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/i386/reloc.c Sun May 13 11:34:05 2012 (r235395) +++ stable/9/libexec/rtld-elf/i386/reloc.c Sun May 13 12:50:42 2012 (r235396) @@ -133,7 +133,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry * limited amounts of stack available so we cannot use alloca(). */ if (obj != obj_rtld) { - cache = calloc(obj->nchains, sizeof(SymCache)); + cache = calloc(obj->dynsymcount, sizeof(SymCache)); /* No need to check for NULL here */ } else cache = NULL; Modified: stable/9/libexec/rtld-elf/ia64/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/ia64/reloc.c Sun May 13 11:34:05 2012 (r235395) +++ stable/9/libexec/rtld-elf/ia64/reloc.c Sun May 13 12:50:42 2012 (r235396) @@ -104,7 +104,7 @@ alloc_fptrs(Obj_Entry *obj, bool mapped) struct fptr **fptrs; size_t fbytes; - fbytes = obj->nchains * sizeof(struct fptr *); + fbytes = obj->dynsymcount * sizeof(struct fptr *); /* * Avoid malloc, if requested. Happens when relocating @@ -138,7 +138,7 @@ free_fptrs(Obj_Entry *obj, bool mapped) if (fptrs == NULL) return; - fbytes = obj->nchains * sizeof(struct fptr *); + fbytes = obj->dynsymcount * sizeof(struct fptr *); if (mapped) munmap(fptrs, fbytes); else @@ -348,7 +348,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry const Elf_Rela *relalim; const Elf_Rela *rela; SymCache *cache; - int bytes = obj->nchains * sizeof(SymCache); + int bytes = obj->dynsymcount * sizeof(SymCache); int r = -1; /* Modified: stable/9/libexec/rtld-elf/powerpc/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/powerpc/reloc.c Sun May 13 11:34:05 2012 (r235395) +++ stable/9/libexec/rtld-elf/powerpc/reloc.c Sun May 13 12:50:42 2012 (r235396) @@ -299,7 +299,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry * limited amounts of stack available so we cannot use alloca(). */ if (obj != obj_rtld) { - cache = calloc(obj->nchains, sizeof(SymCache)); + cache = calloc(obj->dynsymcount, sizeof(SymCache)); /* No need to check for NULL here */ } else cache = NULL; Modified: stable/9/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/powerpc64/reloc.c Sun May 13 11:34:05 2012 (r235395) +++ stable/9/libexec/rtld-elf/powerpc64/reloc.c Sun May 13 12:50:42 2012 (r235396) @@ -287,7 +287,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry const Elf_Rela *relalim; const Elf_Rela *rela; SymCache *cache; - int bytes = obj->nchains * sizeof(SymCache); + int bytes = obj->dynsymcount * sizeof(SymCache); int r = -1; /* Modified: stable/9/libexec/rtld-elf/rtld.c ============================================================================== --- stable/9/libexec/rtld-elf/rtld.c Sun May 13 11:34:05 2012 (r235395) +++ stable/9/libexec/rtld-elf/rtld.c Sun May 13 12:50:42 2012 (r235396) @@ -1,7 +1,8 @@ /*- * Copyright 1996, 1997, 1998, 1999, 2000 John D. Polstra. * Copyright 2003 Alexander Kabaev . - * Copyright 2009, 2010, 2011 Konstantin Belousov . + * Copyright 2009-2012 Konstantin Belousov . + * Copyright 2012 John Marino . * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -132,7 +133,8 @@ static int symlook_global(SymLook *, Don static void symlook_init_from_req(SymLook *, const SymLook *); static int symlook_list(SymLook *, const Objlist *, DoneList *); static int symlook_needed(SymLook *, const Needed_Entry *, DoneList *); -static int symlook_obj1(SymLook *, const Obj_Entry *); +static int symlook_obj1_sysv(SymLook *, const Obj_Entry *); +static int symlook_obj1_gnu(SymLook *, const Obj_Entry *); static void trace_loaded_objects(Obj_Entry *); static void unlink_object(Obj_Entry *); static void unload_object(Obj_Entry *); @@ -149,6 +151,9 @@ static int object_match_name(const Obj_ static void ld_utrace_log(int, void *, void *, size_t, int, const char *); static void rtld_fill_dl_phdr_info(const Obj_Entry *obj, struct dl_phdr_info *phdr_info); +static uint32_t gnu_hash(const char *); +static bool matched_symbol(SymLook *, const Obj_Entry *, Sym_Match_Result *, + const unsigned long); void r_debug_state(struct r_debug *, struct link_map *) __noinline; @@ -485,6 +490,9 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ } digest_dynamic(obj_main, 0); + dbg("%s valid_hash_sysv %d valid_hash_gnu %d dynsymcount %d", + obj_main->path, obj_main->valid_hash_sysv, obj_main->valid_hash_gnu, + obj_main->dynsymcount); linkmap_add(obj_main); linkmap_add(&obj_rtld); @@ -822,6 +830,11 @@ digest_dynamic1(Obj_Entry *obj, int earl Needed_Entry **needed_tail = &obj->needed; Needed_Entry **needed_filtees_tail = &obj->needed_filtees; Needed_Entry **needed_aux_filtees_tail = &obj->needed_aux_filtees; + const Elf_Hashelt *hashtab; + const Elf32_Word *hashval; + Elf32_Word bkt, nmaskwords; + int bloom_size32; + bool nmw_power2; int plttype = DT_REL; *dyn_rpath = NULL; @@ -911,12 +924,35 @@ digest_dynamic1(Obj_Entry *obj, int earl case DT_HASH: { - const Elf_Hashelt *hashtab = (const Elf_Hashelt *) - (obj->relocbase + dynp->d_un.d_ptr); + hashtab = (const Elf_Hashelt *)(obj->relocbase + + dynp->d_un.d_ptr); obj->nbuckets = hashtab[0]; obj->nchains = hashtab[1]; obj->buckets = hashtab + 2; obj->chains = obj->buckets + obj->nbuckets; + obj->valid_hash_sysv = obj->nbuckets > 0 && obj->nchains > 0 && + obj->buckets != NULL; + } + break; + + case DT_GNU_HASH: + { + hashtab = (const Elf_Hashelt *)(obj->relocbase + + dynp->d_un.d_ptr); + obj->nbuckets_gnu = hashtab[0]; + obj->symndx_gnu = hashtab[1]; + nmaskwords = hashtab[2]; + bloom_size32 = (__ELF_WORD_SIZE / 32) * nmaskwords; + /* Number of bitmask words is required to be power of 2 */ + nmw_power2 = ((nmaskwords & (nmaskwords - 1)) == 0); + obj->maskwords_bm_gnu = nmaskwords - 1; + obj->shift2_gnu = hashtab[3]; + obj->bloom_gnu = (Elf_Addr *) (hashtab + 4); + obj->buckets_gnu = hashtab + 4 + bloom_size32; + obj->chain_zero_gnu = obj->buckets_gnu + obj->nbuckets_gnu - + obj->symndx_gnu; + obj->valid_hash_gnu = nmw_power2 && obj->nbuckets_gnu > 0 && + obj->buckets_gnu != NULL; } break; @@ -1093,6 +1129,22 @@ digest_dynamic1(Obj_Entry *obj, int earl obj->pltrelasize = obj->pltrelsize; obj->pltrelsize = 0; } + + /* Determine size of dynsym table (equal to nchains of sysv hash) */ + if (obj->valid_hash_sysv) + obj->dynsymcount = obj->nchains; + else if (obj->valid_hash_gnu) { + obj->dynsymcount = 0; + for (bkt = 0; bkt < obj->nbuckets_gnu; bkt++) { + if (obj->buckets_gnu[bkt] == 0) + continue; + hashval = &obj->chain_zero_gnu[obj->buckets_gnu[bkt]]; + do + obj->dynsymcount++; + while ((*hashval++ & 1u) == 0); + } + obj->dynsymcount += obj->symndx_gnu; + } } static void @@ -1309,6 +1361,22 @@ elf_hash(const char *name) } /* + * The GNU hash function is the Daniel J. Bernstein hash clipped to 32 bits + * unsigned in case it's implemented with a wider type. + */ +static uint32_t +gnu_hash(const char *s) +{ + uint32_t h; + unsigned char c; + + h = 5381; + for (c = *s; c != '\0'; c = *++s) + h = h * 33 + c; + return (h & 0xffffffff); +} + +/* * Find the library with the given name, and return its full pathname. * The returned string is dynamically allocated. Generates an error * message and returns NULL if the library cannot be found. @@ -1384,7 +1452,7 @@ find_symdef(unsigned long symnum, const * If we have already found this symbol, get the information from * the cache. */ - if (symnum >= refobj->nchains) + if (symnum >= refobj->dynsymcount) return NULL; /* Bad object */ if (cache != NULL && cache[symnum].sym != NULL) { *defobj_out = cache[symnum].obj; @@ -1882,6 +1950,8 @@ do_load_object(int fd, const char *name, object_add_name(obj, name); obj->path = path; digest_dynamic(obj, 0); + dbg("%s valid_hash_sysv %d valid_hash_gnu %d dynsymcount %d", obj->path, + obj->valid_hash_sysv, obj->valid_hash_gnu, obj->dynsymcount); if (obj->z_noopen && (flags & (RTLD_LO_DLOPEN | RTLD_LO_TRACE)) == RTLD_LO_DLOPEN) { dbg("refusing to load non-loadable \"%s\"", obj->path); @@ -2165,8 +2235,8 @@ relocate_objects(Obj_Entry *first, bool if (obj != rtldobj) dbg("relocating \"%s\"", obj->path); - if (obj->nbuckets == 0 || obj->nchains == 0 || obj->buckets == NULL || - obj->symtab == NULL || obj->strtab == NULL) { + if (obj->symtab == NULL || obj->strtab == NULL || + !(obj->valid_hash_sysv || obj->valid_hash_gnu)) { _rtld_error("%s: Shared object has no run-time symbol table", obj->path); return -1; @@ -2838,7 +2908,7 @@ dladdr(const void *addr, Dl_info *info) * Walk the symbol list looking for the symbol whose address is * closest to the address sent in. */ - for (symoffset = 0; symoffset < obj->nchains; symoffset++) { + for (symoffset = 0; symoffset < obj->dynsymcount; symoffset++) { def = obj->symtab + symoffset; /* @@ -3409,7 +3479,17 @@ symlook_obj(SymLook *req, const Obj_Entr SymLook req1; int flags, res, mres; - mres = symlook_obj1(req, obj); + /* + * If there is at least one valid hash at this point, we prefer to + * use the faster GNU version if available. + */ + if (obj->valid_hash_gnu) + mres = symlook_obj1_gnu(req, obj); + else if (obj->valid_hash_sysv) + mres = symlook_obj1_sysv(req, obj); + else + return (EINVAL); + if (mres == 0) { if (obj->needed_filtees != NULL) { flags = (req->flags & SYMLOOK_EARLY) ? RTLD_LO_EARLY : 0; @@ -3439,28 +3519,15 @@ symlook_obj(SymLook *req, const Obj_Entr return (mres); } -static int -symlook_obj1(SymLook *req, const Obj_Entry *obj) +/* Symbol match routine common to both hash functions */ +static bool +matched_symbol(SymLook *req, const Obj_Entry *obj, Sym_Match_Result *result, + const unsigned long symnum) { - unsigned long symnum; - const Elf_Sym *vsymp; - Elf_Versym verndx; - int vcount; - - if (obj->buckets == NULL) - return (ESRCH); - - vsymp = NULL; - vcount = 0; - symnum = obj->buckets[req->hash % obj->nbuckets]; - - for (; symnum != STN_UNDEF; symnum = obj->chains[symnum]) { + Elf_Versym verndx; const Elf_Sym *symp; const char *strp; - if (symnum >= obj->nchains) - return (ESRCH); /* Bad object */ - symp = obj->symtab + symnum; strp = obj->strtab + symp->st_name; @@ -3468,103 +3535,183 @@ symlook_obj1(SymLook *req, const Obj_Ent case STT_FUNC: case STT_NOTYPE: case STT_OBJECT: + case STT_COMMON: case STT_GNU_IFUNC: - if (symp->st_value == 0) - continue; + if (symp->st_value == 0) + return (false); /* fallthrough */ case STT_TLS: - if (symp->st_shndx != SHN_UNDEF) - break; + if (symp->st_shndx != SHN_UNDEF) + break; #ifndef __mips__ - else if (((req->flags & SYMLOOK_IN_PLT) == 0) && - (ELF_ST_TYPE(symp->st_info) == STT_FUNC)) - break; + else if (((req->flags & SYMLOOK_IN_PLT) == 0) && + (ELF_ST_TYPE(symp->st_info) == STT_FUNC)) + break; /* fallthrough */ #endif default: - continue; + return (false); } if (req->name[0] != strp[0] || strcmp(req->name, strp) != 0) - continue; + return (false); if (req->ventry == NULL) { - if (obj->versyms != NULL) { - verndx = VER_NDX(obj->versyms[symnum]); - if (verndx > obj->vernum) { - _rtld_error("%s: symbol %s references wrong version %d", - obj->path, obj->strtab + symnum, verndx); - continue; - } - /* - * If we are not called from dlsym (i.e. this is a normal - * relocation from unversioned binary), accept the symbol - * immediately if it happens to have first version after - * this shared object became versioned. Otherwise, if - * symbol is versioned and not hidden, remember it. If it - * is the only symbol with this name exported by the - * shared object, it will be returned as a match at the - * end of the function. If symbol is global (verndx < 2) - * accept it unconditionally. - */ - if ((req->flags & SYMLOOK_DLSYM) == 0 && - verndx == VER_NDX_GIVEN) { - req->sym_out = symp; - req->defobj_out = obj; - return (0); + if (obj->versyms != NULL) { + verndx = VER_NDX(obj->versyms[symnum]); + if (verndx > obj->vernum) { + _rtld_error( + "%s: symbol %s references wrong version %d", + obj->path, obj->strtab + symnum, verndx); + return (false); + } + /* + * If we are not called from dlsym (i.e. this + * is a normal relocation from unversioned + * binary), accept the symbol immediately if + * it happens to have first version after this + * shared object became versioned. Otherwise, + * if symbol is versioned and not hidden, + * remember it. If it is the only symbol with + * this name exported by the shared object, it + * will be returned as a match by the calling + * function. If symbol is global (verndx < 2) + * accept it unconditionally. + */ + if ((req->flags & SYMLOOK_DLSYM) == 0 && + verndx == VER_NDX_GIVEN) { + result->sym_out = symp; + return (true); + } + else if (verndx >= VER_NDX_GIVEN) { + if ((obj->versyms[symnum] & VER_NDX_HIDDEN) + == 0) { + if (result->vsymp == NULL) + result->vsymp = symp; + result->vcount++; + } + return (false); + } } - else if (verndx >= VER_NDX_GIVEN) { - if ((obj->versyms[symnum] & VER_NDX_HIDDEN) == 0) { - if (vsymp == NULL) - vsymp = symp; - vcount ++; - } - continue; - } - } - req->sym_out = symp; - req->defobj_out = obj; - return (0); - } else { - if (obj->versyms == NULL) { + result->sym_out = symp; + return (true); + } + if (obj->versyms == NULL) { if (object_match_name(obj, req->ventry->name)) { - _rtld_error("%s: object %s should provide version %s for " - "symbol %s", obj_rtld.path, obj->path, - req->ventry->name, obj->strtab + symnum); - continue; + _rtld_error("%s: object %s should provide version %s " + "for symbol %s", obj_rtld.path, obj->path, + req->ventry->name, obj->strtab + symnum); + return (false); } - } else { + } else { verndx = VER_NDX(obj->versyms[symnum]); if (verndx > obj->vernum) { - _rtld_error("%s: symbol %s references wrong version %d", - obj->path, obj->strtab + symnum, verndx); - continue; + _rtld_error("%s: symbol %s references wrong version %d", + obj->path, obj->strtab + symnum, verndx); + return (false); } if (obj->vertab[verndx].hash != req->ventry->hash || strcmp(obj->vertab[verndx].name, req->ventry->name)) { - /* - * Version does not match. Look if this is a global symbol - * and if it is not hidden. If global symbol (verndx < 2) - * is available, use it. Do not return symbol if we are - * called by dlvsym, because dlvsym looks for a specific - * version and default one is not what dlvsym wants. - */ - if ((req->flags & SYMLOOK_DLSYM) || - (obj->versyms[symnum] & VER_NDX_HIDDEN) || - (verndx >= VER_NDX_GIVEN)) - continue; + /* + * Version does not match. Look if this is a + * global symbol and if it is not hidden. If + * global symbol (verndx < 2) is available, + * use it. Do not return symbol if we are + * called by dlvsym, because dlvsym looks for + * a specific version and default one is not + * what dlvsym wants. + */ + if ((req->flags & SYMLOOK_DLSYM) || + (verndx >= VER_NDX_GIVEN) || + (obj->versyms[symnum] & VER_NDX_HIDDEN)) + return (false); } - } - req->sym_out = symp; - req->defobj_out = obj; - return (0); } - } - if (vcount == 1) { - req->sym_out = vsymp; - req->defobj_out = obj; - return (0); - } - return (ESRCH); + result->sym_out = symp; + return (true); +} + +/* + * Search for symbol using SysV hash function. + * obj->buckets is known not to be NULL at this point; the test for this was + * performed with the obj->valid_hash_sysv assignment. + */ +static int +symlook_obj1_sysv(SymLook *req, const Obj_Entry *obj) +{ + unsigned long symnum; + Sym_Match_Result matchres; + + matchres.sym_out = NULL; + matchres.vsymp = NULL; + matchres.vcount = 0; + + for (symnum = obj->buckets[req->hash % obj->nbuckets]; + symnum != STN_UNDEF; symnum = obj->chains[symnum]) { + if (symnum >= obj->nchains) + return (ESRCH); /* Bad object */ + + if (matched_symbol(req, obj, &matchres, symnum)) { + req->sym_out = matchres.sym_out; + req->defobj_out = obj; + return (0); + } + } + if (matchres.vcount == 1) { + req->sym_out = matchres.vsymp; + req->defobj_out = obj; + return (0); + } + return (ESRCH); +} + +/* Search for symbol using GNU hash function */ +static int +symlook_obj1_gnu(SymLook *req, const Obj_Entry *obj) +{ + Elf_Addr bloom_word; + const Elf32_Word *hashval; + Elf32_Word bucket; + Sym_Match_Result matchres; + unsigned int h1, h2; + unsigned long symnum; + + matchres.sym_out = NULL; + matchres.vsymp = NULL; + matchres.vcount = 0; + + /* Pick right bitmask word from Bloom filter array */ + bloom_word = obj->bloom_gnu[(req->hash_gnu / __ELF_WORD_SIZE) & + obj->maskwords_bm_gnu]; + + /* Calculate modulus word size of gnu hash and its derivative */ + h1 = req->hash_gnu & (__ELF_WORD_SIZE - 1); + h2 = ((req->hash_gnu >> obj->shift2_gnu) & (__ELF_WORD_SIZE - 1)); + + /* Filter out the "definitely not in set" queries */ + if (((bloom_word >> h1) & (bloom_word >> h2) & 1) == 0) + return (ESRCH); + + /* Locate hash chain and corresponding value element*/ + bucket = obj->buckets_gnu[req->hash_gnu % obj->nbuckets_gnu]; + if (bucket == 0) + return (ESRCH); + hashval = &obj->chain_zero_gnu[bucket]; + do { + if (((*hashval ^ req->hash_gnu) >> 1) == 0) { + symnum = hashval - obj->chain_zero_gnu; + if (matched_symbol(req, obj, &matchres, symnum)) { + req->sym_out = matchres.sym_out; + req->defobj_out = obj; + return (0); + } + } + } while ((*hashval++ & 1) == 0); + if (matchres.vcount == 1) { + req->sym_out = matchres.vsymp; + req->defobj_out = obj; + return (0); + } + return (ESRCH); } static void @@ -4353,6 +4500,7 @@ symlook_init(SymLook *dst, const char *n bzero(dst, sizeof(*dst)); dst->name = name; dst->hash = elf_hash(name); + dst->hash_gnu = gnu_hash(name); } static void @@ -4361,6 +4509,7 @@ symlook_init_from_req(SymLook *dst, cons dst->name = src->name; dst->hash = src->hash; + dst->hash_gnu = src->hash_gnu; dst->ventry = src->ventry; dst->flags = src->flags; dst->defobj_out = NULL; Modified: stable/9/libexec/rtld-elf/rtld.h ============================================================================== --- stable/9/libexec/rtld-elf/rtld.h Sun May 13 11:34:05 2012 (r235395) +++ stable/9/libexec/rtld-elf/rtld.h Sun May 13 12:50:42 2012 (r235396) @@ -126,6 +126,12 @@ typedef struct Struct_Ver_Entry { const char *file; } Ver_Entry; +typedef struct Struct_Sym_Match_Result { + const Elf_Sym *sym_out; + const Elf_Sym *vsymp; + int vcount; +} Sym_Match_Result; + #define VER_INFO_HIDDEN 0x01 /* @@ -204,7 +210,16 @@ typedef struct Struct_Obj_Entry { const Elf_Hashelt *buckets; /* Hash table buckets array */ unsigned long nbuckets; /* Number of buckets */ const Elf_Hashelt *chains; /* Hash table chain array */ - unsigned long nchains; /* Number of chains */ + unsigned long nchains; /* Number of entries in chain array */ + + Elf32_Word nbuckets_gnu; /* Number of GNU hash buckets*/ + Elf32_Word symndx_gnu; /* 1st accessible symbol on dynsym table */ + Elf32_Word maskwords_bm_gnu; /* Bloom filter words - 1 (bitmask) */ + Elf32_Word shift2_gnu; /* Bloom filter shift count */ + Elf32_Word dynsymcount; /* Total entries in dynsym table */ + Elf_Addr *bloom_gnu; /* Bloom filter used by GNU hash func */ + const Elf_Hashelt *buckets_gnu; /* GNU hash table bucket array */ + const Elf_Hashelt *chain_zero_gnu; /* GNU hash table value array (Zeroed) */ char *rpath; /* Search path specified in object */ Needed_Entry *needed; /* Shared objects needed by this one (%) */ @@ -251,6 +266,8 @@ typedef struct Struct_Obj_Entry { bool irelative : 1; /* Object has R_MACHDEP_IRELATIVE relocs */ bool gnu_ifunc : 1; /* Object has references to STT_GNU_IFUNC */ bool crt_no_init : 1; /* Object' crt does not call _init/_fini */ + bool valid_hash_sysv : 1; /* A valid System V hash hash tag is available */ + bool valid_hash_gnu : 1; /* A valid GNU hash tag is available */ struct link_map linkmap; /* For GDB and dlinfo() */ Objlist dldags; /* Object belongs to these dlopened DAGs (%) */ @@ -310,6 +327,7 @@ struct Struct_RtldLockState { typedef struct Struct_SymLook { const char *name; unsigned long hash; + uint32_t hash_gnu; const Ver_Entry *ventry; int flags; const Obj_Entry *defobj_out; Modified: stable/9/libexec/rtld-elf/sparc64/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/sparc64/reloc.c Sun May 13 11:34:05 2012 (r235395) +++ stable/9/libexec/rtld-elf/sparc64/reloc.c Sun May 13 12:50:42 2012 (r235396) @@ -305,7 +305,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry * limited amounts of stack available so we cannot use alloca(). */ if (obj != obj_rtld) { - cache = calloc(obj->nchains, sizeof(SymCache)); + cache = calloc(obj->dynsymcount, sizeof(SymCache)); /* No need to check for NULL here */ } else cache = NULL; From owner-svn-src-all@FreeBSD.ORG Sun May 13 13:35:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD6A81065670; Sun, 13 May 2012 13:35:50 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEBDE8FC0C; Sun, 13 May 2012 13:35:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DDZodM085266; Sun, 13 May 2012 13:35:50 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DDZoSa085264; Sun, 13 May 2012 13:35:50 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201205131335.q4DDZoSa085264@svn.freebsd.org> From: Rick Macklem Date: Sun, 13 May 2012 13:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235397 - in stable/9/sys: fs/nfsclient i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 13:35:51 -0000 Author: rmacklem Date: Sun May 13 13:35:50 2012 New Revision: 235397 URL: http://svn.freebsd.org/changeset/base/235397 Log: MFC: r234742 It was reported via email that some non-FreeBSD NFS servers do not include file attributes in the reply to an NFS create RPC under certain circumstances. This resulted in a vnode of type VNON that was not usable. This patch adds an NFS getattr RPC to nfs_create() for this case, to fix the problem. It was tested by the person that reported the problem and confirmed to fix this case for their server. Modified: stable/9/sys/fs/nfsclient/nfs_clvnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clvnops.c Sun May 13 12:50:42 2012 (r235396) +++ stable/9/sys/fs/nfsclient/nfs_clvnops.c Sun May 13 13:35:50 2012 (r235397) @@ -1546,7 +1546,10 @@ again: (void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1); if (!error) { newvp = NFSTOV(np); - if (attrflag) + if (attrflag == 0) + error = nfsrpc_getattr(newvp, cnp->cn_cred, + cnp->cn_thread, &nfsva, NULL); + if (error == 0) error = nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL, 0, 1); } From owner-svn-src-all@FreeBSD.ORG Sun May 13 13:57:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6C49C1065670; Sun, 13 May 2012 13:57:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 535C18FC12; Sun, 13 May 2012 13:57:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DDvsva085981; Sun, 13 May 2012 13:57:54 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DDvsfU085968; Sun, 13 May 2012 13:57:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205131357.q4DDvsfU085968@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 13 May 2012 13:57:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235398 - in stable/9: gnu/usr.bin/binutils/ar gnu/usr.bin/binutils/as gnu/usr.bin/binutils/ld gnu/usr.bin/binutils/ranlib gnu/usr.bin/cc/cc gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus sh... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 13:57:54 -0000 Author: kib Date: Sun May 13 13:57:53 2012 New Revision: 235398 URL: http://svn.freebsd.org/changeset/base/235398 Log: MFC r234782: Add src.conf option WITH_SHARED_TOOLCHAIN to enable building the toolchain binaries as dynamically linked. Option is disabled by default. MFC r235152 (by imp): Make is part of the bootstrap path, so we need to guard against this not being defined. Otherwise we don't make a new make when the old make is incompatible. Added: stable/9/tools/build/options/WITH_SHARED_TOOLCHAIN - copied unchanged from r234782, head/tools/build/options/WITH_SHARED_TOOLCHAIN Modified: stable/9/gnu/usr.bin/binutils/ar/Makefile stable/9/gnu/usr.bin/binutils/as/Makefile stable/9/gnu/usr.bin/binutils/ld/Makefile stable/9/gnu/usr.bin/binutils/ranlib/Makefile stable/9/gnu/usr.bin/cc/cc/Makefile stable/9/gnu/usr.bin/cc/cc1/Makefile stable/9/gnu/usr.bin/cc/cc1plus/Makefile stable/9/share/mk/bsd.own.mk stable/9/usr.bin/ar/Makefile stable/9/usr.bin/make/Makefile Directory Properties: stable/9/ (props changed) stable/9/gnu/usr.bin/binutils/ (props changed) stable/9/share/mk/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/options/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/ar/ (props changed) stable/9/usr.bin/make/ (props changed) Modified: stable/9/gnu/usr.bin/binutils/ar/Makefile ============================================================================== --- stable/9/gnu/usr.bin/binutils/ar/Makefile Sun May 13 13:35:50 2012 (r235397) +++ stable/9/gnu/usr.bin/binutils/ar/Makefile Sun May 13 13:57:53 2012 (r235398) @@ -1,6 +1,7 @@ # $FreeBSD$ .include "../Makefile.inc0" +.include .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc @@ -16,7 +17,9 @@ CFLAGS+= -D_GNU_SOURCE CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils CFLAGS+= -I${SRCDIR}/binutils CFLAGS+= -I${SRCDIR}/bfd +.if ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?= yes +.endif DPADD= ${RELTOP}/libbinutils/libbinutils.a DPADD+= ${RELTOP}/libbfd/libbfd.a DPADD+= ${RELTOP}/libiberty/libiberty.a Modified: stable/9/gnu/usr.bin/binutils/as/Makefile ============================================================================== --- stable/9/gnu/usr.bin/binutils/as/Makefile Sun May 13 13:35:50 2012 (r235397) +++ stable/9/gnu/usr.bin/binutils/as/Makefile Sun May 13 13:57:53 2012 (r235398) @@ -4,6 +4,7 @@ # BINDIR .include "${.CURDIR}/../../Makefile.inc" .include "${.CURDIR}/../Makefile.inc0" +.include .PATH: ${SRCDIR}/gas ${SRCDIR}/gas/config @@ -72,7 +73,9 @@ CFLAGS+= -D_GNU_SOURCE CFLAGS+= -I${SRCDIR}/gas -I${SRCDIR}/bfd -I${SRCDIR}/gas/config -I${SRCDIR} CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${TARGET_CPUARCH}-freebsd +.if ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?= yes +.endif DPADD= ${RELTOP}/libbfd/libbfd.a DPADD+= ${RELTOP}/libiberty/libiberty.a Modified: stable/9/gnu/usr.bin/binutils/ld/Makefile ============================================================================== --- stable/9/gnu/usr.bin/binutils/ld/Makefile Sun May 13 13:35:50 2012 (r235397) +++ stable/9/gnu/usr.bin/binutils/ld/Makefile Sun May 13 13:57:53 2012 (r235398) @@ -1,6 +1,7 @@ # $FreeBSD$ .include "../Makefile.inc0" +.include .PATH: ${SRCDIR}/ld @@ -34,7 +35,9 @@ CFLAGS+= -DBINDIR=\"${BINDIR}\" -DTARGET CFLAGS+= -DTOOLBINDIR=\"${TOOLS_PREFIX}/${BINDIR}/libexec\" CFLAGS+= -D_GNU_SOURCE CFLAGS+= -I${SRCDIR}/ld -I${SRCDIR}/bfd +.if ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?= yes +.endif DPADD= ${RELTOP}/libbfd/libbfd.a DPADD+= ${RELTOP}/libiberty/libiberty.a LDADD= ${DPADD} Modified: stable/9/gnu/usr.bin/binutils/ranlib/Makefile ============================================================================== --- stable/9/gnu/usr.bin/binutils/ranlib/Makefile Sun May 13 13:35:50 2012 (r235397) +++ stable/9/gnu/usr.bin/binutils/ranlib/Makefile Sun May 13 13:57:53 2012 (r235398) @@ -1,6 +1,7 @@ # $FreeBSD$ .include "../Makefile.inc0" +.include .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc @@ -16,7 +17,9 @@ CFLAGS+= -D_GNU_SOURCE CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils CFLAGS+= -I${SRCDIR}/binutils CFLAGS+= -I${SRCDIR}/bfd +.if ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?= yes +.endif DPADD= ${RELTOP}/libbinutils/libbinutils.a DPADD+= ${RELTOP}/libbfd/libbfd.a DPADD+= ${RELTOP}/libiberty/libiberty.a Modified: stable/9/gnu/usr.bin/cc/cc/Makefile ============================================================================== --- stable/9/gnu/usr.bin/cc/cc/Makefile Sun May 13 13:35:50 2012 (r235397) +++ stable/9/gnu/usr.bin/cc/cc/Makefile Sun May 13 13:57:53 2012 (r235398) @@ -9,7 +9,9 @@ PROG= gcc MAN= gcc.1 SRCS+= gccspec.c +.if ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?=yes +.endif MLINKS= gcc.1 g++.1 .if ${MK_CLANG_IS_CC} == "no" Modified: stable/9/gnu/usr.bin/cc/cc1/Makefile ============================================================================== --- stable/9/gnu/usr.bin/cc/cc1/Makefile Sun May 13 13:35:50 2012 (r235397) +++ stable/9/gnu/usr.bin/cc/cc1/Makefile Sun May 13 13:57:53 2012 (r235398) @@ -1,14 +1,17 @@ # $FreeBSD$ .include "../Makefile.inc" +NO_MAN= +.include .PATH: ${GCCDIR} PROG= cc1 SRCS= main.c c-parser.c c-lang.c BINDIR= /usr/libexec -NO_MAN= +.if ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?=yes +.endif OBJS+= ${PROG}-checksum.o DPADD= ${LIBBACKEND} ${LIBCPP} ${LIBDECNUMBER} ${LIBIBERTY} Modified: stable/9/gnu/usr.bin/cc/cc1plus/Makefile ============================================================================== --- stable/9/gnu/usr.bin/cc/cc1plus/Makefile Sun May 13 13:35:50 2012 (r235397) +++ stable/9/gnu/usr.bin/cc/cc1plus/Makefile Sun May 13 13:57:53 2012 (r235398) @@ -1,6 +1,8 @@ # $FreeBSD$ .include "../Makefile.inc" +NO_MAN= +.include .PATH: ${GCCDIR}/cp ${GCCDIR} @@ -13,8 +15,9 @@ SRCS+= main.c cp-lang.c c-opts.c call.c cp-objcp-common.c cp-gimplify.c tree-mudflap.c BINDIR= /usr/libexec -NO_MAN= +.if ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?=yes +.endif CFLAGS+= -I${GCCDIR}/cp -I. Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Sun May 13 13:35:50 2012 (r235397) +++ stable/9/share/mk/bsd.own.mk Sun May 13 13:57:53 2012 (r235398) @@ -418,7 +418,8 @@ __DEFAULT_NO_OPTIONS = \ HESIOD \ ICONV \ IDEA \ - OFED + OFED \ + SHARED_TOOLCHAIN # # Default behaviour of some options depends on the architecture. Unfortunately Copied: stable/9/tools/build/options/WITH_SHARED_TOOLCHAIN (from r234782, head/tools/build/options/WITH_SHARED_TOOLCHAIN) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITH_SHARED_TOOLCHAIN Sun May 13 13:57:53 2012 (r235398, copy of r234782, head/tools/build/options/WITH_SHARED_TOOLCHAIN) @@ -0,0 +1,6 @@ +.\" $FreeBSD$ +Set to build the toolchain binaries shared. +The set includes +.Xr cc 1 , +.Xr make 1 +and neccessary utilites like assembler, linker and library archive manager. Modified: stable/9/usr.bin/ar/Makefile ============================================================================== --- stable/9/usr.bin/ar/Makefile Sun May 13 13:35:50 2012 (r235397) +++ stable/9/usr.bin/ar/Makefile Sun May 13 13:57:53 2012 (r235398) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PROG= ar SRCS= ar.c acplex.l acpyacc.y read.c util.c write.c y.tab.h @@ -8,7 +10,9 @@ LDADD= -larchive -lelf CFLAGS+=-I. -I${.CURDIR} +.if ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?= yes +.endif LINKS= ${BINDIR}/ar ${BINDIR}/ranlib MLINKS= ar.1 ranlib.1 Modified: stable/9/usr.bin/make/Makefile ============================================================================== --- stable/9/usr.bin/make/Makefile Sun May 13 13:35:50 2012 (r235397) +++ stable/9/usr.bin/make/Makefile Sun May 13 13:57:53 2012 (r235398) @@ -2,13 +2,17 @@ # $Id: Makefile,v 1.6 1994/06/30 05:33:39 cgd Exp $ # $FreeBSD$ +.include + PROG= make CFLAGS+=-I${.CURDIR} SRCS= arch.c buf.c cond.c dir.c for.c hash.c hash_tables.c job.c \ lst.c main.c make.c parse.c proc.c shell.c str.c suff.c targ.c \ util.c var.c +.if !defined(MK_SHARED_TOOLCHAIN) || ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?= YES +.endif CFLAGS+=-DMAKE_VERSION=\"5200408120\" # There is no obvious performance improvement currently. From owner-svn-src-all@FreeBSD.ORG Sun May 13 14:02:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BDAA106564A; Sun, 13 May 2012 14:02:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53BB98FC15; Sun, 13 May 2012 14:02:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DE2fBB086187; Sun, 13 May 2012 14:02:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DE2fJV086185; Sun, 13 May 2012 14:02:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205131402.q4DE2fJV086185@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 13 May 2012 14:02:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235399 - stable/9/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 14:02:41 -0000 Author: kib Date: Sun May 13 14:02:40 2012 New Revision: 235399 URL: http://svn.freebsd.org/changeset/base/235399 Log: Regenerate Modified: stable/9/share/man/man5/src.conf.5 Modified: stable/9/share/man/man5/src.conf.5 ============================================================================== --- stable/9/share/man/man5/src.conf.5 Sun May 13 13:57:53 2012 (r235398) +++ stable/9/share/man/man5/src.conf.5 Sun May 13 14:02:40 2012 (r235399) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru +.\" from FreeBSD: stable/9/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru .\" $FreeBSD$ -.Dd February 6, 2012 +.Dd May 13, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -78,51 +78,51 @@ The following list provides a name and s that can be used for source builds. .Bl -tag -width indent .It Va WITHOUT_ACCT -.\" from FreeBSD: head/tools/build/options/WITHOUT_ACCT 223201 2011-06-17 20:47:44Z ed +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_ACCT 223201 2011-06-17 20:47:44Z ed Set to not build process accounting tools such as .Xr accton 8 and .Xr sa 8 . .It Va WITHOUT_ACPI -.\" from FreeBSD: head/tools/build/options/WITHOUT_ACPI 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_ACPI 156932 2006-03-21 07:50:50Z ru Set to not build .Xr acpiconf 8 , .Xr acpidump 8 and related programs. .It Va WITHOUT_AMD -.\" from FreeBSD: head/tools/build/options/WITHOUT_AMD 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_AMD 183242 2008-09-21 22:02:26Z sam Set to not build .Xr amd 8 , and related programs. .It Va WITHOUT_APM -.\" from FreeBSD: head/tools/build/options/WITHOUT_APM 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_APM 183242 2008-09-21 22:02:26Z sam Set to not build .Xr apm 8 , .Xr apmd 8 and related programs. .It Va WITHOUT_ASSERT_DEBUG -.\" from FreeBSD: head/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 2006-09-11 13:55:27Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 2006-09-11 13:55:27Z ru Set to compile programs and libraries without the .Xr assert 3 checks. .It Va WITHOUT_AT -.\" from FreeBSD: head/tools/build/options/WITHOUT_AT 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_AT 183242 2008-09-21 22:02:26Z sam Set to not build .Xr at 1 and related utilities. .It Va WITHOUT_ATM -.\" from FreeBSD: head/tools/build/options/WITHOUT_ATM 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_ATM 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to ATM networking. .It Va WITHOUT_AUDIT -.\" from FreeBSD: head/tools/build/options/WITHOUT_AUDIT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_AUDIT 156932 2006-03-21 07:50:50Z ru Set to not build audit support into system programs. .It Va WITHOUT_AUTHPF -.\" from FreeBSD: head/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru Set to not build .Xr authpf 8 . .It Va WITHOUT_BIND -.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BIND 156932 2006-03-21 07:50:50Z ru Setting this variable will prevent any part of BIND from being built. When set, it also enforces the following options: .Pp @@ -143,31 +143,31 @@ When set, it also enforces the following .Va WITHOUT_BIND_UTILS .El .It Va WITHOUT_BIND_DNSSEC -.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_DNSSEC 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BIND_DNSSEC 156932 2006-03-21 07:50:50Z ru Set to avoid building or installing the DNSSEC related binaries, .Xr dnssec-keygen 8 and .Xr dnssec-signzone 8 . .It Va WITHOUT_BIND_ETC -.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_ETC 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BIND_ETC 156932 2006-03-21 07:50:50Z ru Set to avoid installing the default files to .Pa /var/named/etc/namedb . .It Va WITH_BIND_IDN -.\" from FreeBSD: head/tools/build/options/WITH_BIND_IDN 193280 2009-06-01 21:58:59Z dougb +.\" from FreeBSD: stable/9/tools/build/options/WITH_BIND_IDN 193280 2009-06-01 21:58:59Z dougb Set to enable IDN support for dig, host, and nslookup. This requires ports/dns/idnkit to be installed in /usr/local. .It Va WITH_BIND_LARGE_FILE -.\" from FreeBSD: head/tools/build/options/WITH_BIND_LARGE_FILE 193280 2009-06-01 21:58:59Z dougb +.\" from FreeBSD: stable/9/tools/build/options/WITH_BIND_LARGE_FILE 193280 2009-06-01 21:58:59Z dougb Set to enable 64-bit file support. .It Va WITH_BIND_LIBS -.\" from FreeBSD: head/tools/build/options/WITH_BIND_LIBS 193280 2009-06-01 21:58:59Z dougb +.\" from FreeBSD: stable/9/tools/build/options/WITH_BIND_LIBS 193280 2009-06-01 21:58:59Z dougb Set to install BIND libraries and include files. .It Va WITHOUT_BIND_LIBS_LWRES -.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_LIBS_LWRES 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BIND_LIBS_LWRES 156932 2006-03-21 07:50:50Z ru Set to avoid installing the lightweight resolver library in .Pa /usr/lib . .It Va WITHOUT_BIND_MTREE -.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_MTREE 157717 2006-04-13 10:37:29Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BIND_MTREE 157717 2006-04-13 10:37:29Z ru Set to avoid running .Xr mtree 8 to create the chroot directory structure under @@ -182,7 +182,7 @@ When set, it also enforces the following .Va WITHOUT_BIND_ETC .El .It Va WITHOUT_BIND_NAMED -.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_NAMED 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BIND_NAMED 156932 2006-03-21 07:50:50Z ru Set to avoid building or installing .Xr named 8 , .Xr named.reload 8 , @@ -192,10 +192,10 @@ Set to avoid building or installing and .Xr rndc-confgen 8 . .It Va WITH_BIND_SIGCHASE -.\" from FreeBSD: head/tools/build/options/WITH_BIND_SIGCHASE 193280 2009-06-01 21:58:59Z dougb +.\" from FreeBSD: stable/9/tools/build/options/WITH_BIND_SIGCHASE 193280 2009-06-01 21:58:59Z dougb Set to enable DNSSEC validation support for dig, host, and nslookup. .It Va WITHOUT_BIND_UTILS -.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_UTILS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BIND_UTILS 156932 2006-03-21 07:50:50Z ru Set to avoid building or installing the BIND userland utilities, .Xr dig 1 , .Xr host 1 , @@ -203,11 +203,11 @@ Set to avoid building or installing the and .Xr nsupdate 8 . .It Va WITH_BIND_XML -.\" from FreeBSD: head/tools/build/options/WITH_BIND_XML 193280 2009-06-01 21:58:59Z dougb +.\" from FreeBSD: stable/9/tools/build/options/WITH_BIND_XML 193280 2009-06-01 21:58:59Z dougb Set to enable the http statistics interface for named. This requires ports/textproc/libxml2 to be installed in /usr/local. .It Va WITHOUT_BINUTILS -.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 222090 2011-05-19 05:13:25Z imp +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BINUTILS 222090 2011-05-19 05:13:25Z imp Set to not install binutils (as, c++-filt, gconv, gnu-ar, gnu-randlib, ld, nm, objcopy, objdump, readelf, size and strip) .Bf -symbolic @@ -215,25 +215,25 @@ The option does not generally work for b toolchain is enabled. .Ef .It Va WITHOUT_BLUETOOTH -.\" from FreeBSD: head/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru Set to not build Bluetooth related kernel modules, programs and libraries. .It Va WITHOUT_BOOT -.\" from FreeBSD: head/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. .It Va WITHOUT_BSD_CPIO -.\" from FreeBSD: head/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb Set to not build the BSD licensed version of cpio based on .Xr libarchive 3 . .It Va WITH_BSD_GREP -.\" from FreeBSD: head/tools/build/options/WITH_BSD_GREP 222273 2011-05-25 01:04:12Z obrien +.\" from FreeBSD: stable/9/tools/build/options/WITH_BSD_GREP 222273 2011-05-25 01:04:12Z obrien Install BSD-licensed grep as '[ef]grep' instead of GNU grep. .It Va WITHOUT_BSNMP -.\" from FreeBSD: head/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam Set to not build or install .Xr bsnmpd 1 and related libraries and data files. .It Va WITHOUT_BZIP2 -.\" from FreeBSD: head/tools/build/options/WITHOUT_BZIP2 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BZIP2 174550 2007-12-12 16:43:17Z ru Set to not build contributed bzip2 software as a part of the base system. .Bf -symbolic The option has no effect yet. @@ -245,14 +245,14 @@ When set, it also enforces the following .Va WITHOUT_BZIP2_SUPPORT .El .It Va WITHOUT_BZIP2_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_BZIP2_SUPPORT 166255 2007-01-26 10:19:08Z delphij +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BZIP2_SUPPORT 166255 2007-01-26 10:19:08Z delphij Set to build some programs without optional bzip2 support. .It Va WITHOUT_CALENDAR -.\" from FreeBSD: head/tools/build/options/WITHOUT_CALENDAR 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_CALENDAR 156932 2006-03-21 07:50:50Z ru Set to not build .Xr calendar 1 . .It Va WITHOUT_CDDL -.\" from FreeBSD: head/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb Set to not build code licensed under Sun's CDDL. When set, it also enforces the following options: .Pp @@ -261,11 +261,11 @@ When set, it also enforces the following .Va WITHOUT_ZFS .El .It Va WITHOUT_CLANG -.\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG 208971 2010-06-10 06:20:26Z ed +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_CLANG 208971 2010-06-10 06:20:26Z ed Set to not build the Clang C/C++ compiler. .Pp It is a default setting on -arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb, powerpc/powerpc64 and sparc64/sparc64. +arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb and sparc64/sparc64. When set, it also enforces the following options: .Pp .Bl -item -compact @@ -275,16 +275,16 @@ When set, it also enforces the following .Va WITHOUT_CLANG_IS_CC .El .It Va WITH_CLANG -.\" from FreeBSD: head/tools/build/options/WITH_CLANG 221730 2011-05-10 11:14:40Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITH_CLANG 221730 2011-05-10 11:14:40Z ru Set to build the Clang C/C++ compiler. .Pp It is a default setting on -amd64/amd64, i386/i386, pc98/i386 and powerpc/powerpc. +amd64/amd64, i386/i386, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITH_CLANG_EXTRAS -.\" from FreeBSD: head/tools/build/options/WITH_CLANG_EXTRAS 231057 2012-02-05 23:56:22Z dim +.\" from FreeBSD: stable/9/tools/build/options/WITH_CLANG_EXTRAS 231919 2012-02-19 23:35:56Z dim Set to build additional clang and llvm tools, such as bugpoint. .It Va WITH_CLANG_IS_CC -.\" from FreeBSD: head/tools/build/options/WITH_CLANG_IS_CC 232322 2012-02-29 22:58:51Z dim +.\" from FreeBSD: stable/9/tools/build/options/WITH_CLANG_IS_CC 233099 2012-03-17 22:29:05Z dim Set to install the Clang C/C++ compiler as .Pa /usr/bin/cc , @@ -293,11 +293,11 @@ and .Pa /usr/bin/cpp . .It Va WITHOUT_CPP -.\" from FreeBSD: head/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru Set to not build .Xr cpp 1 . .It Va WITHOUT_CRYPT -.\" from FreeBSD: head/tools/build/options/WITHOUT_CRYPT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_CRYPT 156932 2006-03-21 07:50:50Z ru Set to not build any crypto code. When set, it also enforces the following options: .Pp @@ -321,15 +321,15 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_CTM -.\" from FreeBSD: head/tools/build/options/WITHOUT_CTM 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_CTM 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ctm 1 and related utilities. .It Va WITHOUT_CVS -.\" from FreeBSD: head/tools/build/options/WITHOUT_CVS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_CVS 156932 2006-03-21 07:50:50Z ru Set to not build CVS. .It Va WITHOUT_CXX -.\" from FreeBSD: head/tools/build/options/WITHOUT_CXX 220402 2011-04-06 20:19:07Z uqs +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_CXX 220402 2011-04-06 20:19:07Z uqs Set to not build .Xr g++ 1 and related libraries. @@ -348,70 +348,70 @@ When set, it also enforces the following .Va WITHOUT_GROFF .El .It Va WITHOUT_DICT -.\" from FreeBSD: head/tools/build/options/WITHOUT_DICT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_DICT 156932 2006-03-21 07:50:50Z ru Set to not build the Webster dictionary files. .It Va WITHOUT_DYNAMICROOT -.\" from FreeBSD: head/tools/build/options/WITHOUT_DYNAMICROOT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_DYNAMICROOT 156932 2006-03-21 07:50:50Z ru Set this if you do not want to link .Pa /bin and .Pa /sbin dynamically. .It Va WITHOUT_EXAMPLES -.\" from FreeBSD: head/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru Set to avoid installing examples to .Pa /usr/share/examples/ . .It Va WITHOUT_FDT -.\" from FreeBSD: head/tools/build/options/WITHOUT_FDT 221539 2011-05-06 19:10:27Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_FDT 221539 2011-05-06 19:10:27Z ru Set to not build Flattened Device Tree support as part of the base system. This includes the device tree compiler (dtc) and libfdt support library. .Pp It is a default setting on -amd64/amd64, i386/i386, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb, pc98/i386, powerpc/powerpc64 and sparc64/sparc64. +amd64/amd64, i386/i386, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb, pc98/i386 and sparc64/sparc64. .It Va WITH_FDT -.\" from FreeBSD: head/tools/build/options/WITH_FDT 221730 2011-05-10 11:14:40Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITH_FDT 221730 2011-05-10 11:14:40Z ru Set to build Flattened Device Tree support as part of the base system. This includes the device tree compiler (dtc) and libfdt support library. .Pp It is a default setting on -arm/arm, arm/armeb and powerpc/powerpc. +arm/arm, arm/armeb, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_FLOPPY -.\" from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru Set to not build or install programs for operating floppy disk driver. .It Va WITHOUT_FORTH -.\" from FreeBSD: head/tools/build/options/WITHOUT_FORTH 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_FORTH 156932 2006-03-21 07:50:50Z ru Set to build bootloaders without Forth support. .It Va WITHOUT_FP_LIBC -.\" from FreeBSD: head/tools/build/options/WITHOUT_FP_LIBC 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_FP_LIBC 156932 2006-03-21 07:50:50Z ru Set to build .Nm libc without floating-point support. .It Va WITHOUT_FREEBSD_UPDATE -.\" from FreeBSD: head/tools/build/options/WITHOUT_FREEBSD_UPDATE 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_FREEBSD_UPDATE 183242 2008-09-21 22:02:26Z sam Set to not build .Xr freebsd-update 8 . .It Va WITHOUT_GAMES -.\" from FreeBSD: head/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru Set to not build games. .It Va WITHOUT_GCC -.\" from FreeBSD: head/tools/build/options/WITHOUT_GCC 222090 2011-05-19 05:13:25Z imp +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_GCC 222090 2011-05-19 05:13:25Z imp Set to not install gcc and g++. .Bf -symbolic The option does not generally work for build targets, unless some alternative toolchain is enabled. .Ef .It Va WITHOUT_GCOV -.\" from FreeBSD: head/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru Set to not build the .Xr gcov 1 tool. .It Va WITHOUT_GDB -.\" from FreeBSD: head/tools/build/options/WITHOUT_GDB 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_GDB 156932 2006-03-21 07:50:50Z ru Set to not build .Xr gdb 1 . .It Va WITHOUT_GNU -.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_GNU 174550 2007-12-12 16:43:17Z ru Set to not build contributed GNU software as a part of the base system. This option can be useful if the system built must not contain any code covered by the GNU Public License due to legal reasons. @@ -425,18 +425,18 @@ When set, it also enforces the following .Va WITHOUT_GNU_SUPPORT .El .It Va WITHOUT_GNU_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without optional GNU support. .It Va WITHOUT_GPIB -.\" from FreeBSD: head/tools/build/options/WITHOUT_GPIB 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_GPIB 156932 2006-03-21 07:50:50Z ru Set to not build GPIB bus support. .It Va WITHOUT_GPIO -.\" from FreeBSD: head/tools/build/options/WITHOUT_GPIO 221541 2011-05-06 19:14:06Z ru +.\" $FreeBSD$ Set to not build .Xr gpioctl 8 as part of the base system. .It Va WITHOUT_GROFF -.\" from FreeBSD: head/tools/build/options/WITHOUT_GROFF 218941 2011-02-22 08:13:49Z uqs +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_GROFF 218941 2011-02-22 08:13:49Z uqs Set to not build .Xr groff 1 and @@ -444,26 +444,26 @@ and You should consider installing the textproc/groff port to not break .Xr man 1 . .It Va WITHOUT_GSSAPI -.\" from FreeBSD: head/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru Set to not build libgssapi. .It Va WITH_HESIOD -.\" from FreeBSD: head/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru Set to build Hesiod support. .It Va WITHOUT_HTML -.\" from FreeBSD: head/tools/build/options/WITHOUT_HTML 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_HTML 156932 2006-03-21 07:50:50Z ru Set to not build HTML docs. .It Va WITH_ICONV -.\" from FreeBSD: head/tools/build/options/WITH_ICONV 219020 2011-02-25 00:10:26Z gabor +.\" from FreeBSD: stable/9/tools/build/options/WITH_ICONV 219020 2011-02-25 00:10:26Z gabor Set to build iconv as part of libc. .It Va WITH_IDEA -.\" from FreeBSD: head/tools/build/options/WITH_IDEA 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITH_IDEA 156932 2006-03-21 07:50:50Z ru Set to build the IDEA encryption code. This code is patented in the USA and many European countries. It is .Em "YOUR RESPONSIBILITY" to determine if you can legally use IDEA. .It Va WITHOUT_INET -.\" from FreeBSD: head/tools/build/options/WITHOUT_INET 221266 2011-04-30 17:58:28Z bz +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_INET 221266 2011-04-30 17:58:28Z bz Set to not build programs and libraries related to IPv4 networking. When set, it also enforces the following options: .Pp @@ -472,7 +472,7 @@ When set, it also enforces the following .Va WITHOUT_INET_SUPPORT .El .It Va WITHOUT_INET6 -.\" from FreeBSD: head/tools/build/options/WITHOUT_INET6 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_INET6 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to IPv6 networking. When set, it also enforces the following options: @@ -482,30 +482,30 @@ When set, it also enforces the following .Va WITHOUT_INET6_SUPPORT .El .It Va WITHOUT_INET6_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_INET6_SUPPORT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_INET6_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build libraries, programs, and kernel modules without IPv6 support. .It Va WITHOUT_INET_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_INET_SUPPORT 221266 2011-04-30 17:58:28Z bz +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_INET_SUPPORT 221266 2011-04-30 17:58:28Z bz Set to build libraries, programs, and kernel modules without IPv4 support. .It Va WITHOUT_INFO -.\" from FreeBSD: head/tools/build/options/WITHOUT_INFO 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_INFO 156932 2006-03-21 07:50:50Z ru Set to not make or install .Xr info 5 files. .It Va WITHOUT_INSTALLLIB -.\" from FreeBSD: head/tools/build/options/WITHOUT_INSTALLLIB 174497 2007-12-09 21:56:21Z dougb +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_INSTALLLIB 174497 2007-12-09 21:56:21Z dougb Set this if you do not want to install optional libraries. For example when creating a .Xr nanobsd 8 image. .It Va WITHOUT_IPFILTER -.\" from FreeBSD: head/tools/build/options/WITHOUT_IPFILTER 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_IPFILTER 156932 2006-03-21 07:50:50Z ru Set to not build IP Filter package. .It Va WITHOUT_IPFW -.\" from FreeBSD: head/tools/build/options/WITHOUT_IPFW 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_IPFW 183242 2008-09-21 22:02:26Z sam Set to not build IPFW tools. .It Va WITHOUT_IPX -.\" from FreeBSD: head/tools/build/options/WITHOUT_IPX 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_IPX 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to IPX networking. When set, it also enforces the following options: .Pp @@ -516,14 +516,14 @@ When set, it also enforces the following .Va WITHOUT_NCP .El .It Va WITHOUT_IPX_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_IPX_SUPPORT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_IPX_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without IPX support. .It Va WITHOUT_JAIL -.\" from FreeBSD: head/tools/build/options/WITHOUT_JAIL 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_JAIL 183242 2008-09-21 22:02:26Z sam Set to not build tools for the support of jails; e.g. .Xr jail 8 . .It Va WITHOUT_KERBEROS -.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS 174549 2007-12-12 16:42:03Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_KERBEROS 174549 2007-12-12 16:42:03Z ru Set this if you do not want to build Kerberos 5 (KTH Heimdal). When set, it also enforces the following options: .Pp @@ -541,7 +541,7 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_KERBEROS_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS_SUPPORT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_KERBEROS_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without Kerberos support, like .Xr cvs 1 , .Xr ssh 1 , @@ -550,13 +550,13 @@ Set to build some programs without Kerbe and .Xr telnetd 8 . .It Va WITHOUT_KERNEL_SYMBOLS -.\" from FreeBSD: head/tools/build/options/WITHOUT_KERNEL_SYMBOLS 222189 2011-05-22 18:23:17Z imp +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_KERNEL_SYMBOLS 222189 2011-05-22 18:23:17Z imp Set to not install kernel symbol files. .Bf -symbolic This option is recommended for those people who have small root partitions. .Ef .It Va WITHOUT_KVM -.\" from FreeBSD: head/tools/build/options/WITHOUT_KVM 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_KVM 174550 2007-12-12 16:43:17Z ru Set to not build the .Nm libkvm library as a part of the base system. @@ -570,23 +570,23 @@ When set, it also enforces the following .Va WITHOUT_KVM_SUPPORT .El .It Va WITHOUT_KVM_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_KVM_SUPPORT 170644 2007-06-13 02:08:04Z sepotvin +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_KVM_SUPPORT 170644 2007-06-13 02:08:04Z sepotvin Set to build some programs without optional .Nm libkvm support. .It Va WITHOUT_LEGACY_CONSOLE -.\" from FreeBSD: head/tools/build/options/WITHOUT_LEGACY_CONSOLE 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_LEGACY_CONSOLE 183242 2008-09-21 22:02:26Z sam Set to not build programs that support a legacy PC console; e.g. .Xr kbdcontrol 8 and .Xr vidcontrol 8 . .It Va WITHOUT_LIB32 -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIB32 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/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 .Nm ld-elf32.so.1 runtime linker. .It Va WITHOUT_LIBPTHREAD -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm Set to not build the .Nm libpthread providing library, @@ -614,7 +614,7 @@ When set, it also enforces the following .Va WITHOUT_LIBTHR .El .It Va WITHOUT_LIBTHR -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBTHR 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_LIBTHR 156932 2006-03-21 07:50:50Z ru Set to not build the .Nm libthr (1:1 threading) @@ -640,21 +640,21 @@ When set, it also enforces the following .Va WITHOUT_BIND_UTILS .El .It Va WITHOUT_LOCALES -.\" from FreeBSD: head/tools/build/options/WITHOUT_LOCALES 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_LOCALES 156932 2006-03-21 07:50:50Z ru Set to not build localization files; see .Xr locale 1 . .It Va WITHOUT_LOCATE -.\" from FreeBSD: head/tools/build/options/WITHOUT_LOCATE 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_LOCATE 183242 2008-09-21 22:02:26Z sam Set to not build .Xr locate 1 and related programs. .It Va WITHOUT_LPR -.\" from FreeBSD: head/tools/build/options/WITHOUT_LPR 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_LPR 156932 2006-03-21 07:50:50Z ru Set to not build .Xr lpr 1 and related programs. .It Va WITHOUT_MAIL -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAIL 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_MAIL 183242 2008-09-21 22:02:26Z sam Set to not build any mail support (MUA or MTA). When set, it also enforces the following options: .Pp @@ -665,17 +665,17 @@ When set, it also enforces the following .Va WITHOUT_SENDMAIL .El .It Va WITHOUT_MAILWRAPPER -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAILWRAPPER 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_MAILWRAPPER 156932 2006-03-21 07:50:50Z ru Set to not build the .Xr mailwrapper 8 MTA selector. .It Va WITHOUT_MAKE -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAKE 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_MAKE 183242 2008-09-21 22:02:26Z sam Set to not install .Xr make 1 and related support files. .It Va WITHOUT_MAN -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAN 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_MAN 156932 2006-03-21 07:50:50Z ru Set to not build manual pages. When set, the following options are also in effect: .Pp @@ -686,7 +686,7 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_MAN_UTILS -.\" from FreeBSD: head/tools/build/options/WITHOUT_MAN_UTILS 208322 2010-05-20 00:07:21Z jkim +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_MAN_UTILS 208322 2010-05-20 00:07:21Z jkim Set to not build utilities for manual pages, .Xr apropos 1 , .Xr catman 1 , @@ -696,20 +696,20 @@ Set to not build utilities for manual pa .Xr manctl 8 , and related support files. .It Va WITHOUT_NCP -.\" from FreeBSD: head/tools/build/options/WITHOUT_NCP 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_NCP 156932 2006-03-21 07:50:50Z ru Set to not build programs, libraries, and kernel modules related to NetWare Core protocol. .It Va WITHOUT_NDIS -.\" from FreeBSD: head/tools/build/options/WITHOUT_NDIS 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_NDIS 183242 2008-09-21 22:02:26Z sam Set to not build programs and libraries related to NDIS emulation support. .It Va WITHOUT_NETCAT -.\" from FreeBSD: head/tools/build/options/WITHOUT_NETCAT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_NETCAT 156932 2006-03-21 07:50:50Z ru Set to not build .Xr nc 1 utility. .It Va WITHOUT_NETGRAPH -.\" from FreeBSD: head/tools/build/options/WITHOUT_NETGRAPH 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_NETGRAPH 183242 2008-09-21 22:02:26Z sam Set to not build applications to support .Xr netgraph 4 . When set, it also enforces the following options: @@ -723,10 +723,10 @@ When set, it also enforces the following .Va WITHOUT_NETGRAPH_SUPPORT .El .It Va WITHOUT_NETGRAPH_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_NETGRAPH_SUPPORT 183305 2008-09-23 16:11:15Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_NETGRAPH_SUPPORT 183305 2008-09-23 16:11:15Z sam Set to build libraries, programs, and kernel modules without netgraph support. .It Va WITHOUT_NIS -.\" from FreeBSD: head/tools/build/options/WITHOUT_NIS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_NIS 156932 2006-03-21 07:50:50Z ru Set to not build .Xr NIS 8 support and related programs. @@ -736,14 +736,14 @@ and remove .Sq nis entries. .It Va WITHOUT_NLS -.\" from FreeBSD: head/tools/build/options/WITHOUT_NLS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_NLS 156932 2006-03-21 07:50:50Z ru Set to not build NLS catalogs. .It Va WITHOUT_NLS_CATALOGS -.\" from FreeBSD: head/tools/build/options/WITHOUT_NLS_CATALOGS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_NLS_CATALOGS 156932 2006-03-21 07:50:50Z ru Set to not build NLS catalog support for .Xr csh 1 . .It Va WITHOUT_NS_CACHING -.\" from FreeBSD: head/tools/build/options/WITHOUT_NS_CACHING 172803 2007-10-19 14:01:25Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_NS_CACHING 172803 2007-10-19 14:01:25Z ru Set to disable name caching in the .Pa nsswitch subsystem. @@ -751,20 +751,20 @@ The generic caching daemon, .Xr nscd 8 , will not be built either if this option is set. .It Va WITHOUT_NTP -.\" from FreeBSD: head/tools/build/options/WITHOUT_NTP 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_NTP 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ntpd 8 and related programs. .It Va WITH_OFED -.\" from FreeBSD: head/tools/build/options/WITH_OFED 222016 2011-05-17 11:06:41Z ru +.\" $FreeBSD$ Set to build the .Dq "OpenFabrics Enterprise Distribution" Infiniband software stack. .It Va WITHOUT_OPENSSH -.\" from FreeBSD: head/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSH. .It Va WITHOUT_OPENSSL -.\" from FreeBSD: head/tools/build/options/WITHOUT_OPENSSL 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_OPENSSL 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSL. When set, it also enforces the following options: .Pp @@ -786,7 +786,7 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_PAM -.\" from FreeBSD: head/tools/build/options/WITHOUT_PAM 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_PAM 174550 2007-12-12 16:43:17Z ru Set to not build PAM library and modules. .Bf -symbolic This option is deprecated and does nothing. @@ -798,13 +798,13 @@ When set, it also enforces the following .Va WITHOUT_PAM_SUPPORT .El .It Va WITHOUT_PAM_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_PAM_SUPPORT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_PAM_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without PAM support, particularly .Xr ftpd 8 and .Xr ppp 8 . .It Va WITHOUT_PF -.\" from FreeBSD: head/tools/build/options/WITHOUT_PF 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_PF 156932 2006-03-21 07:50:50Z ru Set to not build PF firewall package. When set, it also enforces the following options: .Pp @@ -813,35 +813,35 @@ When set, it also enforces the following .Va WITHOUT_AUTHPF .El .It Va WITHOUT_PKGTOOLS -.\" from FreeBSD: head/tools/build/options/WITHOUT_PKGTOOLS 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_PKGTOOLS 183242 2008-09-21 22:02:26Z sam Set to not build .Xr pkg_add 8 and related programs. .It Va WITHOUT_PMC -.\" from FreeBSD: head/tools/build/options/WITHOUT_PMC 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_PMC 183242 2008-09-21 22:02:26Z sam Set to not build .Xr pmccontrol 8 and related programs. .It Va WITHOUT_PORTSNAP -.\" from FreeBSD: head/tools/build/options/WITHOUT_PORTSNAP 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_PORTSNAP 183242 2008-09-21 22:02:26Z sam Set to not build or install .Xr portsnap 8 and related files. .It Va WITHOUT_PPP -.\" from FreeBSD: head/tools/build/options/WITHOUT_PPP 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_PPP 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ppp 8 and related programs. .It Va WITHOUT_PROFILE -.\" from FreeBSD: head/tools/build/options/WITHOUT_PROFILE 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_PROFILE 156932 2006-03-21 07:50:50Z ru Set to avoid compiling profiled libraries. .It Va WITHOUT_QUOTAS -.\" from FreeBSD: head/tools/build/options/WITHOUT_QUOTAS 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_QUOTAS 183242 2008-09-21 22:02:26Z sam Set to not build .Xr quota 8 and related programs. .It Va WITHOUT_RCMDS -.\" from FreeBSD: head/tools/build/options/WITHOUT_RCMDS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_RCMDS 156932 2006-03-21 07:50:50Z ru Disable building of the .Bx r-commands. @@ -850,63 +850,87 @@ This includes .Xr rsh 1 , etc. .It Va WITHOUT_RCS -.\" from FreeBSD: head/tools/build/options/WITHOUT_RCS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_RCS 156932 2006-03-21 07:50:50Z ru Set to not build .Xr rcs 1 and related utilities. .It Va WITHOUT_RESCUE -.\" from FreeBSD: head/tools/build/options/WITHOUT_RESCUE 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_RESCUE 156932 2006-03-21 07:50:50Z ru Set to not build .Xr rescue 8 . .It Va WITHOUT_ROUTED -.\" from FreeBSD: head/tools/build/options/WITHOUT_ROUTED 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_ROUTED 183242 2008-09-21 22:02:26Z sam Set to not build .Xr routed 8 utility. .It Va WITHOUT_SENDMAIL -.\" from FreeBSD: head/tools/build/options/WITHOUT_SENDMAIL 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_SENDMAIL 156932 2006-03-21 07:50:50Z ru Set to not build .Xr sendmail 8 and related programs. .It Va WITHOUT_SETUID_LOGIN -.\" from FreeBSD: head/tools/build/options/WITHOUT_SETUID_LOGIN 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_SETUID_LOGIN 156932 2006-03-21 07:50:50Z ru Set this to disable the installation of .Xr login 1 as a set-user-ID root program. .It Va WITHOUT_SHAREDOCS -.\" from FreeBSD: head/tools/build/options/WITHOUT_SHAREDOCS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_SHAREDOCS 156932 2006-03-21 07:50:50Z ru Set to not build the .Bx 4.4 legacy docs. +.It Va WITH_SHARED_TOOLCHAIN +.\" from FreeBSD: stable/9/tools/build/options/WITH_SHARED_TOOLCHAIN 235398 2012-05-13 13:57:53Z kib +Set to build the toolchain binaries shared. +The set includes +.Xr cc 1 , +.Xr make 1 +and neccessary utilites like assembler, linker and library archive manager. +.It Va WITHOUT_SOURCELESS +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_SOURCELESS 231905 2012-02-19 07:44:38Z rmh +Set to not build kernel modules that include sourceless code (either microcode or native code for host CPU). +When set, it also enforces the following options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_SOURCELESS_HOST +.It +.Va WITHOUT_SOURCELESS_UCODE +.El +.It Va WITHOUT_SOURCELESS_HOST +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_SOURCELESS_HOST 231905 2012-02-19 07:44:38Z rmh +Set to not build kernel modules that include sourceless native code for host CPU. +.It Va WITHOUT_SOURCELESS_UCODE +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_SOURCELESS_UCODE 231905 2012-02-19 07:44:38Z rmh +Set to not build kernel modules that include sourceless microcode. .It Va WITHOUT_SSP -.\" from FreeBSD: head/tools/build/options/WITHOUT_SSP 180012 2008-06-25 21:33:28Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_SSP 180012 2008-06-25 21:33:28Z ru Set to not build world with propolice stack smashing protection. .It Va WITHOUT_SYMVER -.\" from FreeBSD: head/tools/build/options/WITHOUT_SYMVER 169649 2007-05-17 05:03:24Z deischen +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_SYMVER 169649 2007-05-17 05:03:24Z deischen Set to disable symbol versioning when building shared libraries. .It Va WITHOUT_SYSCONS -.\" from FreeBSD: head/tools/build/options/WITHOUT_SYSCONS 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_SYSCONS 156932 2006-03-21 07:50:50Z ru Set to not build .Xr syscons 4 support files such as keyboard maps, fonts, and screen output maps. .It Va WITHOUT_SYSINSTALL -.\" from FreeBSD: head/tools/build/options/WITHOUT_SYSINSTALL 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_SYSINSTALL 183242 2008-09-21 22:02:26Z sam Set to not build .Xr sysinstall 8 and related programs. .It Va WITHOUT_TCSH -.\" from FreeBSD: head/tools/build/options/WITHOUT_TCSH 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_TCSH 156932 2006-03-21 07:50:50Z ru Set to not build and install .Pa /bin/csh (which is .Xr tcsh 1 ) . .It Va WITHOUT_TELNET -.\" from FreeBSD: head/tools/build/options/WITHOUT_TELNET 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_TELNET 183242 2008-09-21 22:02:26Z sam Set to not build .Xr telnet 8 and related programs. .It Va WITHOUT_TEXTPROC -.\" from FreeBSD: head/tools/build/options/WITHOUT_TEXTPROC 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_TEXTPROC 183242 2008-09-21 22:02:26Z sam Set to not build programs used for text processing. When set, it also enforces the following options: @@ -916,7 +940,7 @@ When set, it also enforces the following .Va WITHOUT_GROFF .El .It Va WITHOUT_TOOLCHAIN -.\" from FreeBSD: head/tools/build/options/WITHOUT_TOOLCHAIN 174550 2007-12-12 16:43:17Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_TOOLCHAIN 174550 2007-12-12 16:43:17Z ru Set to not install programs used for program development, compilers, debuggers etc. @@ -938,10 +962,10 @@ When set, it also enforces the following .Va WITHOUT_GDB .El .It Va WITHOUT_USB -.\" from FreeBSD: head/tools/build/options/WITHOUT_USB 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/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_UTMPX -.\" from FreeBSD: head/tools/build/options/WITHOUT_UTMPX 223209 2011-06-17 21:30:21Z ed +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_UTMPX 223209 2011-06-17 21:30:21Z ed Set to not build user accounting tools such as .Xr last 1 , .Xr users 1 , @@ -952,7 +976,7 @@ Set to not build user accounting tools s and .Xr utxrm 8 . .It Va WITHOUT_WIRELESS -.\" from FreeBSD: head/tools/build/options/WITHOUT_WIRELESS 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_WIRELESS 183242 2008-09-21 22:02:26Z sam Set to not build programs used for 802.11 wireless networks; especially .Xr wpa_supplicant 8 and @@ -964,21 +988,21 @@ When set, it also enforces the following .Va WITHOUT_WIRELESS_SUPPORT .El .It Va WITHOUT_WIRELESS_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_WIRELESS_SUPPORT 183305 2008-09-23 16:11:15Z sam +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_WIRELESS_SUPPORT 183305 2008-09-23 16:11:15Z sam Set to build libraries, programs, and kernel modules without 802.11 wireless support. .It Va WITHOUT_WPA_SUPPLICANT_EAPOL -.\" from FreeBSD: head/tools/build/options/WITHOUT_WPA_SUPPLICANT_EAPOL 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_WPA_SUPPLICANT_EAPOL 156932 2006-03-21 07:50:50Z ru Build .Xr wpa_supplicant 8 without support for the IEEE 802.1X protocol and without support for EAP-PEAP, EAP-TLS, EAP-LEAP, and EAP-TTLS protocols (usable only via 802.1X). .It Va WITHOUT_ZFS -.\" from FreeBSD: head/tools/build/options/WITHOUT_ZFS 168409 2007-04-06 02:13:30Z pjd +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_ZFS 168409 2007-04-06 02:13:30Z pjd Set to not build ZFS file system. .It Va WITHOUT_ZONEINFO -.\" from FreeBSD: head/tools/build/options/WITHOUT_ZONEINFO 171994 2007-08-27 20:01:08Z remko +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_ZONEINFO 171994 2007-08-27 20:01:08Z remko Set to not build the timezone database .El .Sh FILES From owner-svn-src-all@FreeBSD.ORG Sun May 13 14:16:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 04EC5106566C; Sun, 13 May 2012 14:16:05 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D948B8FC14; Sun, 13 May 2012 14:16:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DEG4Kl086641; Sun, 13 May 2012 14:16:04 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DEG4Sc086632; Sun, 13 May 2012 14:16:04 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201205131416.q4DEG4Sc086632@svn.freebsd.org> From: Joel Dahl Date: Sun, 13 May 2012 14:16:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235400 - in head: bin/expr bin/sh bin/test lib/libc/posix1e sbin/setkey usr.bin/dc usr.bin/make usr.bin/mklocale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 14:16:05 -0000 Author: joel (doc committer) Date: Sun May 13 14:16:04 2012 New Revision: 235400 URL: http://svn.freebsd.org/changeset/base/235400 Log: Minor mdoc nits. Modified: head/bin/expr/expr.1 head/bin/sh/sh.1 head/bin/test/test.1 head/lib/libc/posix1e/mac_prepare.3 head/sbin/setkey/setkey.8 head/usr.bin/dc/dc.1 head/usr.bin/make/make.1 head/usr.bin/mklocale/mklocale.1 Modified: head/bin/expr/expr.1 ============================================================================== --- head/bin/expr/expr.1 Sun May 13 14:02:40 2012 (r235399) +++ head/bin/expr/expr.1 Sun May 13 14:16:04 2012 (r235400) @@ -77,7 +77,7 @@ Operators with equal precedence are grou and .Ql } . .Bl -tag -width indent -.It Ar expr1 Li | Ar expr2 +.It Ar expr1 Li \&| Ar expr2 Return the evaluation of .Ar expr1 if it is neither an empty string nor zero; Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Sun May 13 14:02:40 2012 (r235399) +++ head/bin/sh/sh.1 Sun May 13 14:16:04 2012 (r235400) @@ -375,8 +375,8 @@ The following is a list of valid operato .Bl -tag -width indent .It Control operators: .Bl -column "XXX" "XXX" "XXX" "XXX" "XXX" -offset center -compact -.It Li & Ta Li && Ta Li ( Ta Li ) Ta Li \en -.It Li ;; Ta Li ;& Ta Li ; Ta Li | Ta Li || +.It Li & Ta Li && Ta Li \&( Ta Li \&) Ta Li \en +.It Li ;; Ta Li ;& Ta Li \&; Ta Li \&| Ta Li || .El .It Redirection operators: .Bl -column "XXX" "XXX" "XXX" "XXX" "XXX" -offset center -compact Modified: head/bin/test/test.1 ============================================================================== --- head/bin/test/test.1 Sun May 13 14:02:40 2012 (r235399) +++ head/bin/test/test.1 Sun May 13 14:16:04 2012 (r235400) @@ -43,7 +43,7 @@ .Nm .Ar expression .Nm \&[ -.Ar expression Cm ] +.Ar expression Cm \&] .Sh DESCRIPTION The .Nm Modified: head/lib/libc/posix1e/mac_prepare.3 ============================================================================== --- head/lib/libc/posix1e/mac_prepare.3 Sun May 13 14:02:40 2012 (r235399) +++ head/lib/libc/posix1e/mac_prepare.3 Sun May 13 14:16:04 2012 (r235400) @@ -64,7 +64,7 @@ when the label was prepared. Elements are specified in a nul-terminated string, using commas to delimit fields. Element names may be prefixed with the -.Dv ? +.Ql \&? character to indicate that a failure by the kernel to retrieve that element should not be considered fatal. .Pp Modified: head/sbin/setkey/setkey.8 ============================================================================== --- head/sbin/setkey/setkey.8 Sun May 13 14:02:40 2012 (r235399) +++ head/sbin/setkey/setkey.8 Sun May 13 14:16:04 2012 (r235400) @@ -130,7 +130,7 @@ are treated as comment lines. .Ar src Ar dst Ar protocol Ar spi .Op Ar extensions .Ar algorithm ... -.Li ; +.Li \&; .Xc Add an SAD entry. .Li add @@ -141,7 +141,7 @@ including when the key length does not m .Li get .Op Fl 46n .Ar src Ar dst Ar protocol Ar spi -.Li ; +.Li \&; .Xc Show an SAD entry. .\" @@ -149,7 +149,7 @@ Show an SAD entry. .Li delete .Op Fl 46n .Ar src Ar dst Ar protocol Ar spi -.Li ; +.Li \&; .Xc Remove an SAD entry. .\" @@ -157,14 +157,14 @@ Remove an SAD entry. .Li deleteall .Op Fl 46n .Ar src Ar dst Ar protocol -.Li ; +.Li \&; .Xc Remove all SAD entries that match the specification. .\" .It Xo .Li flush .Op Ar protocol -.Li ; +.Li \&; .Xc Clear all SAD entries matched by the options. .Fl F @@ -173,7 +173,7 @@ on the command line achieves the same fu .It Xo .Li dump .Op Ar protocol -.Li ; +.Li \&; .Xc Dumps all SAD entries matched by the options. .Fl D @@ -183,7 +183,7 @@ on the command line achieves the same fu .Li spdadd .Op Fl 46n .Ar src_range Ar dst_range Ar upperspec Ar policy -.Li ; +.Li \&; .Xc Add an SPD entry. .\" @@ -191,13 +191,13 @@ Add an SPD entry. .Li spddelete .Op Fl 46n .Ar src_range Ar dst_range Ar upperspec Fl P Ar direction -.Li ; +.Li \&; .Xc Delete an SPD entry. .\" .It Xo .Li spdflush -.Li ; +.Li \&; .Xc Clear all SPD entries. .Fl FP @@ -205,7 +205,7 @@ on the command line achieves the same fu .\" .It Xo .Li spddump -.Li ; +.Li \&; .Xc Dumps all SPD entries. .Fl DP Modified: head/usr.bin/dc/dc.1 ============================================================================== --- head/usr.bin/dc/dc.1 Sun May 13 14:02:40 2012 (r235399) +++ head/usr.bin/dc/dc.1 Sun May 13 14:16:04 2012 (r235400) @@ -315,7 +315,7 @@ The length of a number is its number of and decimal point. .It Ic z The stack level is pushed onto the stack. -.It Cm [ Ns ... Ns Cm ] +.It Cm \&[ Ns ... Ns Cm \&] Puts the bracketed .Tn ASCII string onto the top of the stack. @@ -375,12 +375,12 @@ command. .It Ic \&? A line of input is taken from the input source (usually the terminal) and executed. -.It Ic : Ns Ar r +.It Ic \&: Ns Ar r Pop two values from the stack. The second value on the stack is stored into the array .Ar r indexed by the top of stack. -.It Ic ; Ns Ar r +.It Ic \&; Ns Ar r Pop a value from the stack. The value is used as an index into register .Ar r . Modified: head/usr.bin/make/make.1 ============================================================================== --- head/usr.bin/make/make.1 Sun May 13 14:02:40 2012 (r235399) +++ head/usr.bin/make/make.1 Sun May 13 14:16:04 2012 (r235400) @@ -1661,7 +1661,7 @@ To prevent infinite loops the following .Ic :: targets that have no prerequisites .It -.Ic ! +.Ic \&! targets .It targets that have Modified: head/usr.bin/mklocale/mklocale.1 ============================================================================== --- head/usr.bin/mklocale/mklocale.1 Sun May 13 14:02:40 2012 (r235399) +++ head/usr.bin/mklocale/mklocale.1 Sun May 13 14:16:04 2012 (r235400) @@ -123,7 +123,7 @@ All are equivalent. .It Dv ">\|\^)\|]" Used to end a mapping. All are equivalent. -.It Dv : +.It Dv ":" Used as a delimiter in mappings. .El .El From owner-svn-src-all@FreeBSD.ORG Sun May 13 14:28:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 327F0106566C; Sun, 13 May 2012 14:28:02 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92C258FC15; Sun, 13 May 2012 14:28:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DES1Cm087033; Sun, 13 May 2012 14:28:01 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DES1MX087031; Sun, 13 May 2012 14:28:01 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201205131428.q4DES1MX087031@svn.freebsd.org> From: Joel Dahl Date: Sun, 13 May 2012 14:28:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235401 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 14:28:02 -0000 Author: joel (doc committer) Date: Sun May 13 14:28:00 2012 New Revision: 235401 URL: http://svn.freebsd.org/changeset/base/235401 Log: mdoc: avoid unterminated quoted strings. Modified: head/lib/libc/net/nsdispatch.3 Modified: head/lib/libc/net/nsdispatch.3 ============================================================================== --- head/lib/libc/net/nsdispatch.3 Sun May 13 14:16:04 2012 (r235400) +++ head/lib/libc/net/nsdispatch.3 Sun May 13 14:28:00 2012 (r235401) @@ -173,11 +173,11 @@ While there is support for arbitrary sou #defines for commonly implemented sources are available: .Bl -column NSSRC_COMPAT compat -offset indent .It Sy "#define value" -.It Dv NSSRC_FILES Ta """files"" -.It Dv NSSRC_DB Ta """db"" -.It Dv NSSRC_DNS Ta """dns"" -.It Dv NSSRC_NIS Ta """nis"" -.It Dv NSSRC_COMPAT Ta """compat"" +.It Dv NSSRC_FILES Ta \&"files\&" +.It Dv NSSRC_DB Ta \&"db\&" +.It Dv NSSRC_DNS Ta \&"dns\&" +.It Dv NSSRC_NIS Ta \&"nis\&" +.It Dv NSSRC_COMPAT Ta \&"compat\&" .El .Pp Refer to From owner-svn-src-all@FreeBSD.ORG Sun May 13 16:07:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D3E3106566B; Sun, 13 May 2012 16:07:54 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 476848FC0A; Sun, 13 May 2012 16:07:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DG7sU9090183; Sun, 13 May 2012 16:07:54 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DG7sRo090181; Sun, 13 May 2012 16:07:54 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205131607.q4DG7sRo090181@svn.freebsd.org> From: Michael Tuexen Date: Sun, 13 May 2012 16:07:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235402 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 16:07:54 -0000 Author: tuexen Date: Sun May 13 16:07:53 2012 New Revision: 235402 URL: http://svn.freebsd.org/changeset/base/235402 Log: Ensure the user can read COMM_LOST notifications on 1-to-1 style sockets. MFC after: 3 days Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun May 13 14:28:00 2012 (r235401) +++ head/sys/netinet/sctputil.c Sun May 13 16:07:53 2012 (r235402) @@ -2609,10 +2609,82 @@ sctp_notify_assoc_change(uint16_t state, #endif + if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVASSOCEVNT)) { + notif_len = sizeof(struct sctp_assoc_change); + if (abort != NULL) { + abort_len = htons(abort->ch.chunk_length); + } else { + abort_len = 0; + } + if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { + notif_len += SCTP_ASSOC_SUPPORTS_MAX; + } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { + notif_len += abort_len; + } + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + /* Retry with smaller value. */ + notif_len = sizeof(struct sctp_assoc_change); + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + goto set_error; + } + } + SCTP_BUF_NEXT(m_notify) = NULL; + sac = mtod(m_notify, struct sctp_assoc_change *); + sac->sac_type = SCTP_ASSOC_CHANGE; + sac->sac_flags = 0; + sac->sac_length = sizeof(struct sctp_assoc_change); + sac->sac_state = state; + sac->sac_error = error; + /* XXX verify these stream counts */ + sac->sac_outbound_streams = stcb->asoc.streamoutcnt; + sac->sac_inbound_streams = stcb->asoc.streamincnt; + sac->sac_assoc_id = sctp_get_associd(stcb); + if (notif_len > sizeof(struct sctp_assoc_change)) { + if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { + i = 0; + if (stcb->asoc.peer_supports_prsctp) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; + } + if (stcb->asoc.peer_supports_auth) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; + } + if (stcb->asoc.peer_supports_asconf) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; + } + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; + if (stcb->asoc.peer_supports_strreset) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; + } + sac->sac_length += i; + } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { + memcpy(sac->sac_info, abort, abort_len); + sac->sac_length += abort_len; + } + } + SCTP_BUF_LEN(m_notify) = sac->sac_length; + control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination, + 0, 0, stcb->asoc.context, 0, 0, 0, + m_notify); + if (control != NULL) { + control->length = SCTP_BUF_LEN(m_notify); + /* not that we need this */ + control->tail_mbuf = m_notify; + control->spec_flags = M_NOTIFICATION; + sctp_add_to_readq(stcb->sctp_ep, stcb, + control, + &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, + so_locked); + } else { + sctp_m_freem(m_notify); + } + } /* - * For TCP model AND UDP connected sockets we will send an error up - * when an ABORT comes in. + * For 1-to-1 style sockets, we send up and error when an ABORT + * comes in. */ +set_error: if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC))) { @@ -2623,127 +2695,34 @@ sctp_notify_assoc_change(uint16_t state, SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNRESET); stcb->sctp_socket->so_error = ECONNRESET; } - /* Wake ANY sleepers */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - if (!so_locked) { - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { - SCTP_SOCKET_UNLOCK(so, 1); - return; - } - } -#endif - socantrcvmore(stcb->sctp_socket); - sorwakeup(stcb->sctp_socket); - sowwakeup(stcb->sctp_socket); + } + /* Wake ANY sleepers */ #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - if (!so_locked) { + so = SCTP_INP_SO(stcb->sctp_ep); + if (!so_locked) { + atomic_add_int(&stcb->asoc.refcnt, 1); + SCTP_TCB_UNLOCK(stcb); + SCTP_SOCKET_LOCK(so, 1); + SCTP_TCB_LOCK(stcb); + atomic_subtract_int(&stcb->asoc.refcnt, 1); + if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { SCTP_SOCKET_UNLOCK(so, 1); - } -#endif - } - if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVASSOCEVNT)) { - /* event not enabled */ - return; - } - notif_len = sizeof(struct sctp_assoc_change); - if (abort != NULL) { - abort_len = htons(abort->ch.chunk_length); - } else { - abort_len = 0; - } - if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { - notif_len += SCTP_ASSOC_SUPPORTS_MAX; - } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { - notif_len += abort_len; - } - m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); - if (m_notify == NULL) { - /* Retry with smaller value. */ - notif_len = sizeof(struct sctp_assoc_change); - m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); - if (m_notify == NULL) { return; } } - SCTP_BUF_NEXT(m_notify) = NULL; - sac = mtod(m_notify, struct sctp_assoc_change *); - sac->sac_type = SCTP_ASSOC_CHANGE; - sac->sac_flags = 0; - sac->sac_length = sizeof(struct sctp_assoc_change); - sac->sac_state = state; - sac->sac_error = error; - /* XXX verify these stream counts */ - sac->sac_outbound_streams = stcb->asoc.streamoutcnt; - sac->sac_inbound_streams = stcb->asoc.streamincnt; - sac->sac_assoc_id = sctp_get_associd(stcb); - if (notif_len > sizeof(struct sctp_assoc_change)) { - if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { - i = 0; - if (stcb->asoc.peer_supports_prsctp) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; - } - if (stcb->asoc.peer_supports_auth) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; - } - if (stcb->asoc.peer_supports_asconf) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; - } - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; - if (stcb->asoc.peer_supports_strreset) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; - } - sac->sac_length += i; - } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { - memcpy(sac->sac_info, abort, abort_len); - sac->sac_length += abort_len; - } - } - SCTP_BUF_LEN(m_notify) = sac->sac_length; - control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination, - 0, 0, stcb->asoc.context, 0, 0, 0, - m_notify); - if (control == NULL) { - /* no memory */ - sctp_m_freem(m_notify); - return; - } - control->length = SCTP_BUF_LEN(m_notify); - /* not that we need this */ - control->tail_mbuf = m_notify; - control->spec_flags = M_NOTIFICATION; - sctp_add_to_readq(stcb->sctp_ep, stcb, - control, - &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, - so_locked); - if (state == SCTP_COMM_LOST) { - /* Wake up any sleeper */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - if (!so_locked) { - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { - SCTP_SOCKET_UNLOCK(so, 1); - return; - } - } #endif - sctp_sowwakeup(stcb->sctp_ep, stcb->sctp_socket); + if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || + (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && + ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC))) { + socantrcvmore(stcb->sctp_socket); + } + sorwakeup(stcb->sctp_socket); + sowwakeup(stcb->sctp_socket); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - if (!so_locked) { - SCTP_SOCKET_UNLOCK(so, 1); - } -#endif + if (!so_locked) { + SCTP_SOCKET_UNLOCK(so, 1); } +#endif } static void @@ -5220,7 +5199,7 @@ restart_nosblocks: (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE)) { goto out; } - if (so->so_rcv.sb_state & SBS_CANTRCVMORE) { + if ((so->so_rcv.sb_state & SBS_CANTRCVMORE) && (so->so_rcv.sb_cc == 0)) { if (so->so_error) { error = so->so_error; if ((in_flags & MSG_PEEK) == 0) @@ -5228,7 +5207,6 @@ restart_nosblocks: goto out; } else { if (so->so_rcv.sb_cc == 0) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, ENOTCONN); /* indicate EOF */ error = 0; goto out; From owner-svn-src-all@FreeBSD.ORG Sun May 13 16:56:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3385106564A; Sun, 13 May 2012 16:56:16 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD3418FC1B; Sun, 13 May 2012 16:56:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DGuGUJ091746; Sun, 13 May 2012 16:56:16 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DGuGJU091739; Sun, 13 May 2012 16:56:16 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205131656.q4DGuGJU091739@svn.freebsd.org> From: Michael Tuexen Date: Sun, 13 May 2012 16:56:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235403 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 16:56:17 -0000 Author: tuexen Date: Sun May 13 16:56:16 2012 New Revision: 235403 URL: http://svn.freebsd.org/changeset/base/235403 Log: Use ECONNABORTED in cases where the ABORT was sent to the peer. MFC after: 3 days Modified: head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Sun May 13 16:07:53 2012 (r235402) +++ head/sys/netinet/sctp_constants.h Sun May 13 16:56:16 2012 (r235403) @@ -757,7 +757,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_NOTIFY_INTERFACE_UP 4 #define SCTP_NOTIFY_DG_FAIL 5 #define SCTP_NOTIFY_STRDATA_ERR 6 -#define SCTP_NOTIFY_ASSOC_ABORTED 7 +#define SCTP_NOTIFY_ASSOC_LOC_ABORTED 7 #define SCTP_NOTIFY_PEER_OPENED_STREAM 8 #define SCTP_NOTIFY_STREAM_OPENED_OK 9 #define SCTP_NOTIFY_ASSOC_RESTART 10 @@ -781,7 +781,8 @@ __FBSDID("$FreeBSD$"); #define SCTP_NOTIFY_SENDER_DRY 29 #define SCTP_NOTIFY_STR_RESET_DENIED_OUT 30 #define SCTP_NOTIFY_STR_RESET_DENIED_IN 31 -#define SCTP_NOTIFY_MAX 31 +#define SCTP_NOTIFY_ASSOC_REM_ABORTED 32 +#define SCTP_NOTIFY_MAX 32 /* This is the value for messages that are NOT completely Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun May 13 16:07:53 2012 (r235402) +++ head/sys/netinet/sctp_input.c Sun May 13 16:56:16 2012 (r235403) @@ -782,7 +782,7 @@ sctp_handle_abort(struct sctp_abort_chun /* stop any receive timers */ sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_6); /* notify user of the abort and clean up... */ - sctp_abort_notification(stcb, error, abort, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 1, error, abort, SCTP_SO_NOT_LOCKED); /* free the tcb */ SCTP_STAT_INCR_COUNTER32(sctps_aborted); if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) || @@ -1173,7 +1173,7 @@ sctp_handle_error(struct sctp_chunkhdr * asoc->stale_cookie_count++; if (asoc->stale_cookie_count > asoc->max_init_times) { - sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, 0, NULL, SCTP_SO_NOT_LOCKED); /* now free the asoc */ #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sun May 13 16:07:53 2012 (r235402) +++ head/sys/netinet/sctp_usrreq.c Sun May 13 16:56:16 2012 (r235403) @@ -283,7 +283,7 @@ sctp_notify(struct sctp_inpcb *inp, * now is dead. In either case treat it like a OOTB abort * with no TCB */ - sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 1, 0, NULL, SCTP_SO_NOT_LOCKED); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun May 13 16:07:53 2012 (r235402) +++ head/sys/netinet/sctputil.c Sun May 13 16:56:16 2012 (r235403) @@ -2592,7 +2592,7 @@ sctp_pad_lastmbuf(struct mbuf *m, int pa static void sctp_notify_assoc_change(uint16_t state, struct sctp_tcb *stcb, - uint16_t error, struct sctp_abort_chunk *abort, int so_locked + uint16_t error, struct sctp_abort_chunk *abort, uint8_t from_peer, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -2688,12 +2688,17 @@ set_error: if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC))) { - if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_WAIT) { - SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNREFUSED); - stcb->sctp_socket->so_error = ECONNREFUSED; + if (from_peer) { + if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_WAIT) { + SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNREFUSED); + stcb->sctp_socket->so_error = ECONNREFUSED; + } else { + SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNRESET); + stcb->sctp_socket->so_error = ECONNRESET; + } } else { - SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNRESET); - stcb->sctp_socket->so_error = ECONNRESET; + SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNABORTED); + stcb->sctp_socket->so_error = ECONNABORTED; } } /* Wake ANY sleepers */ @@ -3493,7 +3498,7 @@ sctp_ulp_notify(uint32_t notification, s switch (notification) { case SCTP_NOTIFY_ASSOC_UP: if (stcb->asoc.assoc_up_sent == 0) { - sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error, NULL, so_locked); + sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error, NULL, 0, so_locked); stcb->asoc.assoc_up_sent = 1; } if (stcb->asoc.adaptation_needed && (stcb->asoc.adaptation_sent == 0)) { @@ -3505,7 +3510,7 @@ sctp_ulp_notify(uint32_t notification, s } break; case SCTP_NOTIFY_ASSOC_DOWN: - sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, NULL, so_locked); + sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, NULL, 0, so_locked); break; case SCTP_NOTIFY_INTERFACE_DOWN: { @@ -3553,12 +3558,20 @@ sctp_ulp_notify(uint32_t notification, s } case SCTP_NOTIFY_STRDATA_ERR: break; - case SCTP_NOTIFY_ASSOC_ABORTED: + case SCTP_NOTIFY_ASSOC_LOC_ABORTED: if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) || ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) { - sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, data, so_locked); + sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, data, 0, so_locked); } else { - sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, so_locked); + sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, 0, so_locked); + } + break; + case SCTP_NOTIFY_ASSOC_REM_ABORTED: + if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) || + ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) { + sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, data, 1, so_locked); + } else { + sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, 1, so_locked); } break; case SCTP_NOTIFY_PEER_OPENED_STREAM: @@ -3566,7 +3579,7 @@ sctp_ulp_notify(uint32_t notification, s case SCTP_NOTIFY_STREAM_OPENED_OK: break; case SCTP_NOTIFY_ASSOC_RESTART: - sctp_notify_assoc_change(SCTP_RESTART, stcb, error, NULL, so_locked); + sctp_notify_assoc_change(SCTP_RESTART, stcb, error, NULL, 0, so_locked); if (stcb->asoc.peer_supports_auth == 0) { sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0, NULL, so_locked); @@ -3735,7 +3748,7 @@ sctp_report_all_outbound(struct sctp_tcb } void -sctp_abort_notification(struct sctp_tcb *stcb, uint16_t error, +sctp_abort_notification(struct sctp_tcb *stcb, uint8_t from_peer, uint16_t error, struct sctp_abort_chunk *abort, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED @@ -3757,7 +3770,11 @@ sctp_abort_notification(struct sctp_tcb } /* Tell them we lost the asoc */ sctp_report_all_outbound(stcb, 1, so_locked); - sctp_ulp_notify(SCTP_NOTIFY_ASSOC_ABORTED, stcb, error, abort, so_locked); + if (from_peer) { + sctp_ulp_notify(SCTP_NOTIFY_ASSOC_REM_ABORTED, stcb, error, abort, so_locked); + } else { + sctp_ulp_notify(SCTP_NOTIFY_ASSOC_LOC_ABORTED, stcb, error, abort, so_locked); + } } void @@ -3776,7 +3793,7 @@ sctp_abort_association(struct sctp_inpcb if (stcb != NULL) { /* We have a TCB to abort, send notification too */ vtag = stcb->asoc.peer_vtag; - sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, 0, NULL, SCTP_SO_NOT_LOCKED); /* get the assoc vrf id and table id */ vrf_id = stcb->asoc.vrf_id; stcb->asoc.state |= SCTP_STATE_WAS_ABORTED; @@ -3899,7 +3916,7 @@ sctp_abort_an_association(struct sctp_in } /* notify the ulp */ if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) { - sctp_abort_notification(stcb, 0, NULL, so_locked); + sctp_abort_notification(stcb, 0, 0, NULL, so_locked); } /* notify the peer */ sctp_send_abort_tcb(stcb, op_err, so_locked); Modified: head/sys/netinet/sctputil.h ============================================================================== --- head/sys/netinet/sctputil.h Sun May 13 16:07:53 2012 (r235402) +++ head/sys/netinet/sctputil.h Sun May 13 16:56:16 2012 (r235403) @@ -179,7 +179,7 @@ sctp_report_all_outbound(struct sctp_tcb int sctp_expand_mapping_array(struct sctp_association *, uint32_t); void -sctp_abort_notification(struct sctp_tcb *, uint16_t, +sctp_abort_notification(struct sctp_tcb *, uint8_t, uint16_t, struct sctp_abort_chunk *, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Sun May 13 16:07:53 2012 (r235402) +++ head/sys/netinet6/sctp6_usrreq.c Sun May 13 16:56:16 2012 (r235403) @@ -439,7 +439,7 @@ sctp6_notify(struct sctp_inpcb *inp, * now is dead. In either case treat it like a OOTB abort * with no TCB */ - sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 1, 0, NULL, SCTP_SO_NOT_LOCKED); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); From owner-svn-src-all@FreeBSD.ORG Sun May 13 17:01:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A080106566C; Sun, 13 May 2012 17:01:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6F378FC08; Sun, 13 May 2012 17:01:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DH1Wjo091973; Sun, 13 May 2012 17:01:32 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DH1WkQ091958; Sun, 13 May 2012 17:01:32 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205131701.q4DH1WkQ091958@svn.freebsd.org> From: Andriy Gapon Date: Sun, 13 May 2012 17:01:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235404 - in stable/9/sys: cddl/contrib/opensolaris/uts/common/dtrace i386/conf kern security/mac sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 17:01:33 -0000 Author: avg Date: Sun May 13 17:01:32 2012 New Revision: 235404 URL: http://svn.freebsd.org/changeset/base/235404 Log: MFC r228424,228448: panic: add a switch and infrastructure for stopping other CPUs in SMP case Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/9/sys/kern/kern_lock.c stable/9/sys/kern/kern_mutex.c stable/9/sys/kern/kern_rmlock.c stable/9/sys/kern/kern_rwlock.c stable/9/sys/kern/kern_shutdown.c stable/9/sys/kern/kern_sx.c stable/9/sys/kern/kern_synch.c stable/9/sys/kern/subr_kdb.c stable/9/sys/kern/subr_lock.c stable/9/sys/kern/subr_witness.c (contents, props changed) stable/9/sys/security/mac/mac_priv.c stable/9/sys/sys/mutex.h stable/9/sys/sys/systm.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun May 13 16:56:16 2012 (r235403) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun May 13 17:01:32 2012 (r235404) @@ -5877,6 +5877,9 @@ dtrace_probe(dtrace_id_t id, uintptr_t a volatile uint16_t *flags; hrtime_t now; + if (panicstr != NULL) + return; + #if defined(sun) /* * Kick out immediately if this CPU is still being born (in which case Modified: stable/9/sys/kern/kern_lock.c ============================================================================== --- stable/9/sys/kern/kern_lock.c Sun May 13 16:56:16 2012 (r235403) +++ stable/9/sys/kern/kern_lock.c Sun May 13 17:01:32 2012 (r235404) @@ -1227,6 +1227,9 @@ _lockmgr_disown(struct lock *lk, const c { uintptr_t tid, x; + if (SCHEDULER_STOPPED()) + return; + tid = (uintptr_t)curthread; _lockmgr_assert(lk, KA_XLOCKED | KA_NOTRECURSED, file, line); Modified: stable/9/sys/kern/kern_mutex.c ============================================================================== --- stable/9/sys/kern/kern_mutex.c Sun May 13 16:56:16 2012 (r235403) +++ stable/9/sys/kern/kern_mutex.c Sun May 13 17:01:32 2012 (r235404) @@ -191,6 +191,8 @@ void _mtx_lock_flags(struct mtx *m, int opts, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_lock() of destroyed mutex @ %s:%d", file, line)); @@ -210,6 +212,9 @@ _mtx_lock_flags(struct mtx *m, int opts, void _mtx_unlock_flags(struct mtx *m, int opts, const char *file, int line) { + + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_unlock() of destroyed mutex @ %s:%d", file, line)); @@ -231,6 +236,8 @@ void _mtx_lock_spin_flags(struct mtx *m, int opts, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_lock_spin() of destroyed mutex @ %s:%d", file, line)); @@ -253,6 +260,8 @@ void _mtx_unlock_spin_flags(struct mtx *m, int opts, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_unlock_spin() of destroyed mutex @ %s:%d", file, line)); @@ -281,6 +290,9 @@ _mtx_trylock(struct mtx *m, int opts, co #endif int rval; + if (SCHEDULER_STOPPED()) + return (1); + MPASS(curthread != NULL); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_trylock() of destroyed mutex @ %s:%d", file, line)); @@ -337,6 +349,9 @@ _mtx_lock_sleep(struct mtx *m, uintptr_t int64_t sleep_time = 0; #endif + if (SCHEDULER_STOPPED()) + return; + if (mtx_owned(m)) { KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0, ("_mtx_lock_sleep: recursed on non-recursive mutex %s @ %s:%d\n", @@ -507,6 +522,9 @@ _mtx_lock_spin(struct mtx *m, uintptr_t uint64_t waittime = 0; #endif + if (SCHEDULER_STOPPED()) + return; + if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spinning", m); @@ -554,6 +572,10 @@ _thread_lock_flags(struct thread *td, in i = 0; tid = (uintptr_t)curthread; + + if (SCHEDULER_STOPPED()) + return; + for (;;) { retry: spinlock_enter(); @@ -655,6 +677,9 @@ _mtx_unlock_sleep(struct mtx *m, int opt { struct turnstile *ts; + if (SCHEDULER_STOPPED()) + return; + if (mtx_recursed(m)) { if (--(m->mtx_recurse) == 0) atomic_clear_ptr(&m->mtx_lock, MTX_RECURSED); Modified: stable/9/sys/kern/kern_rmlock.c ============================================================================== --- stable/9/sys/kern/kern_rmlock.c Sun May 13 16:56:16 2012 (r235403) +++ stable/9/sys/kern/kern_rmlock.c Sun May 13 17:01:32 2012 (r235404) @@ -344,6 +344,9 @@ _rm_rlock(struct rmlock *rm, struct rm_p struct thread *td = curthread; struct pcpu *pc; + if (SCHEDULER_STOPPED()) + return (1); + tracker->rmp_flags = 0; tracker->rmp_thread = td; tracker->rmp_rmlock = rm; @@ -413,6 +416,9 @@ _rm_runlock(struct rmlock *rm, struct rm struct pcpu *pc; struct thread *td = tracker->rmp_thread; + if (SCHEDULER_STOPPED()) + return; + td->td_critnest++; /* critical_enter(); */ pc = cpuid_to_pcpu[td->td_oncpu]; /* pcpu_find(td->td_oncpu); */ rm_tracker_remove(pc, tracker); @@ -432,6 +438,9 @@ _rm_wlock(struct rmlock *rm) struct turnstile *ts; cpuset_t readcpus; + if (SCHEDULER_STOPPED()) + return; + if (rm->lock_object.lo_flags & RM_SLEEPABLE) sx_xlock(&rm->rm_lock_sx); else @@ -486,6 +495,9 @@ _rm_wunlock(struct rmlock *rm) void _rm_wlock_debug(struct rmlock *rm, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; + WITNESS_CHECKORDER(&rm->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); @@ -507,6 +519,9 @@ void _rm_wunlock_debug(struct rmlock *rm, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; + curthread->td_locks--; if (rm->lock_object.lo_flags & RM_SLEEPABLE) WITNESS_UNLOCK(&rm->rm_lock_sx.lock_object, LOP_EXCLUSIVE, @@ -521,6 +536,10 @@ int _rm_rlock_debug(struct rmlock *rm, struct rm_priotracker *tracker, int trylock, const char *file, int line) { + + if (SCHEDULER_STOPPED()) + return (1); + if (!trylock && (rm->lock_object.lo_flags & RM_SLEEPABLE)) WITNESS_CHECKORDER(&rm->rm_lock_sx.lock_object, LOP_NEWORDER, file, line, NULL); @@ -544,6 +563,9 @@ _rm_runlock_debug(struct rmlock *rm, str const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; + curthread->td_locks--; WITNESS_UNLOCK(&rm->lock_object, 0, file, line); LOCK_LOG_LOCK("RMRUNLOCK", &rm->lock_object, 0, 0, file, line); Modified: stable/9/sys/kern/kern_rwlock.c ============================================================================== --- stable/9/sys/kern/kern_rwlock.c Sun May 13 16:56:16 2012 (r235403) +++ stable/9/sys/kern/kern_rwlock.c Sun May 13 17:01:32 2012 (r235404) @@ -229,6 +229,8 @@ void _rw_wlock(struct rwlock *rw, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_wlock() of destroyed rwlock @ %s:%d", file, line)); @@ -245,6 +247,9 @@ _rw_try_wlock(struct rwlock *rw, const c { int rval; + if (SCHEDULER_STOPPED()) + return (1); + KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_try_wlock() of destroyed rwlock @ %s:%d", file, line)); @@ -269,6 +274,8 @@ void _rw_wunlock(struct rwlock *rw, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_wunlock() of destroyed rwlock @ %s:%d", file, line)); @@ -313,6 +320,9 @@ _rw_rlock(struct rwlock *rw, const char int64_t sleep_time = 0; #endif + if (SCHEDULER_STOPPED()) + return; + KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_rlock() of destroyed rwlock @ %s:%d", file, line)); KASSERT(rw_wowner(rw) != curthread, @@ -495,6 +505,9 @@ _rw_try_rlock(struct rwlock *rw, const c { uintptr_t x; + if (SCHEDULER_STOPPED()) + return (1); + for (;;) { x = rw->rw_lock; KASSERT(rw->rw_lock != RW_DESTROYED, @@ -521,6 +534,9 @@ _rw_runlock(struct rwlock *rw, const cha struct turnstile *ts; uintptr_t x, v, queue; + if (SCHEDULER_STOPPED()) + return; + KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_runlock() of destroyed rwlock @ %s:%d", file, line)); _rw_assert(rw, RA_RLOCKED, file, line); @@ -646,6 +662,9 @@ _rw_wlock_hard(struct rwlock *rw, uintpt int64_t sleep_time = 0; #endif + if (SCHEDULER_STOPPED()) + return; + if (rw_wlocked(rw)) { KASSERT(rw->lock_object.lo_flags & LO_RECURSABLE, ("%s: recursing but non-recursive rw %s @ %s:%d\n", @@ -810,6 +829,9 @@ _rw_wunlock_hard(struct rwlock *rw, uint uintptr_t v; int queue; + if (SCHEDULER_STOPPED()) + return; + if (rw_wlocked(rw) && rw_recursed(rw)) { rw->rw_recurse--; if (LOCK_LOG_TEST(&rw->lock_object, 0)) @@ -872,6 +894,9 @@ _rw_try_upgrade(struct rwlock *rw, const struct turnstile *ts; int success; + if (SCHEDULER_STOPPED()) + return (1); + KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_try_upgrade() of destroyed rwlock @ %s:%d", file, line)); _rw_assert(rw, RA_RLOCKED, file, line); @@ -942,6 +967,9 @@ _rw_downgrade(struct rwlock *rw, const c uintptr_t tid, v; int rwait, wwait; + if (SCHEDULER_STOPPED()) + return; + KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_downgrade() of destroyed rwlock @ %s:%d", file, line)); _rw_assert(rw, RA_WLOCKED | RA_NOTRECURSED, file, line); Modified: stable/9/sys/kern/kern_shutdown.c ============================================================================== --- stable/9/sys/kern/kern_shutdown.c Sun May 13 16:56:16 2012 (r235403) +++ stable/9/sys/kern/kern_shutdown.c Sun May 13 17:01:32 2012 (r235404) @@ -121,6 +121,11 @@ SYSCTL_INT(_kern, OID_AUTO, sync_on_pani &sync_on_panic, 0, "Do a sync before rebooting from a panic"); TUNABLE_INT("kern.sync_on_panic", &sync_on_panic); +static int stop_scheduler_on_panic = 0; +SYSCTL_INT(_kern, OID_AUTO, stop_scheduler_on_panic, CTLFLAG_RW | CTLFLAG_TUN, + &stop_scheduler_on_panic, 0, "stop scheduler upon entering panic"); +TUNABLE_INT("kern.stop_scheduler_on_panic", &stop_scheduler_on_panic); + SYSCTL_NODE(_kern, OID_AUTO, shutdown, CTLFLAG_RW, 0, "Shutdown environment"); #ifndef DIAGNOSTIC @@ -137,6 +142,7 @@ SYSCTL_INT(_kern_shutdown, OID_AUTO, sho */ const char *panicstr; +int stop_scheduler; /* system stopped CPUs for panic */ int dumping; /* system is dumping */ int rebooting; /* system is rebooting */ static struct dumperinfo dumper; /* our selected dumper */ @@ -293,10 +299,12 @@ kern_reboot(int howto) * systems don't shutdown properly (i.e., ACPI power off) if we * run on another processor. */ - thread_lock(curthread); - sched_bind(curthread, 0); - thread_unlock(curthread); - KASSERT(PCPU_GET(cpuid) == 0, ("%s: not running on cpu 0", __func__)); + if (!SCHEDULER_STOPPED()) { + thread_lock(curthread); + sched_bind(curthread, 0); + thread_unlock(curthread); + KASSERT(PCPU_GET(cpuid) == 0, ("boot: not running on cpu 0")); + } #endif /* We're in the process of rebooting. */ rebooting = 1; @@ -546,13 +554,18 @@ panic(const char *fmt, ...) { #ifdef SMP static volatile u_int panic_cpu = NOCPU; + cpuset_t other_cpus; #endif struct thread *td = curthread; int bootopt, newpanic; va_list ap; static char buf[256]; - critical_enter(); + if (stop_scheduler_on_panic) + spinlock_enter(); + else + critical_enter(); + #ifdef SMP /* * We don't want multiple CPU's to panic at the same time, so we @@ -565,6 +578,22 @@ panic(const char *fmt, ...) PCPU_GET(cpuid)) == 0) while (panic_cpu != NOCPU) ; /* nothing */ + + if (stop_scheduler_on_panic) { + if (panicstr == NULL && !kdb_active) { + other_cpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &other_cpus); + stop_cpus_hard(other_cpus); + } + + /* + * We set stop_scheduler here and not in the block above, + * because we want to ensure that if panic has been called and + * stop_scheduler_on_panic is true, then stop_scheduler will + * always be set. Even if panic has been entered from kdb. + */ + stop_scheduler = 1; + } #endif bootopt = RB_AUTOBOOT; @@ -603,7 +632,8 @@ panic(const char *fmt, ...) /* thread_unlock(td); */ if (!sync_on_panic) bootopt |= RB_NOSYNC; - critical_exit(); + if (!stop_scheduler_on_panic) + critical_exit(); kern_reboot(bootopt); } Modified: stable/9/sys/kern/kern_sx.c ============================================================================== --- stable/9/sys/kern/kern_sx.c Sun May 13 16:56:16 2012 (r235403) +++ stable/9/sys/kern/kern_sx.c Sun May 13 17:01:32 2012 (r235404) @@ -238,6 +238,8 @@ _sx_slock(struct sx *sx, int opts, const { int error = 0; + if (SCHEDULER_STOPPED()) + return (0); MPASS(curthread != NULL); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_slock() of destroyed sx @ %s:%d", file, line)); @@ -257,6 +259,9 @@ _sx_try_slock(struct sx *sx, const char { uintptr_t x; + if (SCHEDULER_STOPPED()) + return (1); + for (;;) { x = sx->sx_lock; KASSERT(x != SX_LOCK_DESTROYED, @@ -280,6 +285,8 @@ _sx_xlock(struct sx *sx, int opts, const { int error = 0; + if (SCHEDULER_STOPPED()) + return (0); MPASS(curthread != NULL); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_xlock() of destroyed sx @ %s:%d", file, line)); @@ -301,6 +308,9 @@ _sx_try_xlock(struct sx *sx, const char { int rval; + if (SCHEDULER_STOPPED()) + return (1); + MPASS(curthread != NULL); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_try_xlock() of destroyed sx @ %s:%d", file, line)); @@ -327,6 +337,8 @@ void _sx_sunlock(struct sx *sx, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_sunlock() of destroyed sx @ %s:%d", file, line)); @@ -342,6 +354,8 @@ void _sx_xunlock(struct sx *sx, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_xunlock() of destroyed sx @ %s:%d", file, line)); @@ -366,6 +380,9 @@ _sx_try_upgrade(struct sx *sx, const cha uintptr_t x; int success; + if (SCHEDULER_STOPPED()) + return (1); + KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_try_upgrade() of destroyed sx @ %s:%d", file, line)); _sx_assert(sx, SA_SLOCKED, file, line); @@ -396,6 +413,9 @@ _sx_downgrade(struct sx *sx, const char uintptr_t x; int wakeup_swapper; + if (SCHEDULER_STOPPED()) + return; + KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_downgrade() of destroyed sx @ %s:%d", file, line)); _sx_assert(sx, SA_XLOCKED | SA_NOTRECURSED, file, line); @@ -478,6 +498,9 @@ _sx_xlock_hard(struct sx *sx, uintptr_t int64_t sleep_time = 0; #endif + if (SCHEDULER_STOPPED()) + return (0); + /* If we already hold an exclusive lock, then recurse. */ if (sx_xlocked(sx)) { KASSERT((sx->lock_object.lo_flags & LO_RECURSABLE) != 0, @@ -678,6 +701,9 @@ _sx_xunlock_hard(struct sx *sx, uintptr_ uintptr_t x; int queue, wakeup_swapper; + if (SCHEDULER_STOPPED()) + return; + MPASS(!(sx->sx_lock & SX_LOCK_SHARED)); /* If the lock is recursed, then unrecurse one level. */ @@ -750,6 +776,9 @@ _sx_slock_hard(struct sx *sx, int opts, int64_t sleep_time = 0; #endif + if (SCHEDULER_STOPPED()) + return (0); + /* * As with rwlocks, we don't make any attempt to try to block * shared locks once there is an exclusive waiter. @@ -916,6 +945,9 @@ _sx_sunlock_hard(struct sx *sx, const ch uintptr_t x; int wakeup_swapper; + if (SCHEDULER_STOPPED()) + return; + for (;;) { x = sx->sx_lock; Modified: stable/9/sys/kern/kern_synch.c ============================================================================== --- stable/9/sys/kern/kern_synch.c Sun May 13 16:56:16 2012 (r235403) +++ stable/9/sys/kern/kern_synch.c Sun May 13 17:01:32 2012 (r235404) @@ -158,7 +158,7 @@ _sleep(void *ident, struct lock_object * else class = NULL; - if (cold) { + if (cold || SCHEDULER_STOPPED()) { /* * During autoconfiguration, just return; * don't run any other threads or panic below, @@ -260,7 +260,7 @@ msleep_spin(void *ident, struct mtx *mtx KASSERT(p != NULL, ("msleep1")); KASSERT(ident != NULL && TD_IS_RUNNING(td), ("msleep")); - if (cold) { + if (cold || SCHEDULER_STOPPED()) { /* * During autoconfiguration, just return; * don't run any other threads or panic below, @@ -429,6 +429,8 @@ mi_switch(int flags, struct thread *newt */ if (kdb_active) kdb_switch(); + if (SCHEDULER_STOPPED()) + return; if (flags & SW_VOL) { td->td_ru.ru_nvcsw++; td->td_swvoltick = ticks; Modified: stable/9/sys/kern/subr_kdb.c ============================================================================== --- stable/9/sys/kern/subr_kdb.c Sun May 13 16:56:16 2012 (r235403) +++ stable/9/sys/kern/subr_kdb.c Sun May 13 17:01:32 2012 (r235404) @@ -221,13 +221,7 @@ kdb_sysctl_trap_code(SYSCTL_HANDLER_ARGS void kdb_panic(const char *msg) { -#ifdef SMP - cpuset_t other_cpus; - other_cpus = all_cpus; - CPU_CLR(PCPU_GET(cpuid), &other_cpus); - stop_cpus_hard(other_cpus); -#endif printf("KDB: panic\n"); panic("%s", msg); } @@ -589,6 +583,9 @@ kdb_trap(int type, int code, struct trap struct kdb_dbbe *be; register_t intr; int handled; +#ifdef SMP + int did_stop_cpus; +#endif be = kdb_dbbe; if (be == NULL || be->dbbe_trap == NULL) @@ -601,9 +598,13 @@ kdb_trap(int type, int code, struct trap intr = intr_disable(); #ifdef SMP - other_cpus = all_cpus; - CPU_CLR(PCPU_GET(cpuid), &other_cpus); - stop_cpus_hard(other_cpus); + if (!SCHEDULER_STOPPED()) { + other_cpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &other_cpus); + stop_cpus_hard(other_cpus); + did_stop_cpus = 1; + } else + did_stop_cpus = 0; #endif kdb_active++; @@ -629,7 +630,8 @@ kdb_trap(int type, int code, struct trap kdb_active--; #ifdef SMP - restart_cpus(stopped_cpus); + if (did_stop_cpus) + restart_cpus(stopped_cpus); #endif intr_restore(intr); Modified: stable/9/sys/kern/subr_lock.c ============================================================================== --- stable/9/sys/kern/subr_lock.c Sun May 13 16:56:16 2012 (r235403) +++ stable/9/sys/kern/subr_lock.c Sun May 13 17:01:32 2012 (r235404) @@ -532,6 +532,9 @@ lock_profile_obtain_lock_success(struct struct lock_profile_object *l; int spin; + if (SCHEDULER_STOPPED()) + return; + /* don't reset the timer when/if recursing */ if (!lock_prof_enable || (lo->lo_flags & LO_NOPROFILE)) return; @@ -596,6 +599,8 @@ lock_profile_release_lock(struct lock_ob struct lpohead *head; int spin; + if (SCHEDULER_STOPPED()) + return; if (lo->lo_flags & LO_NOPROFILE) return; spin = (LOCK_CLASS(lo)->lc_flags & LC_SPINLOCK) ? 1 : 0; Modified: stable/9/sys/kern/subr_witness.c ============================================================================== --- stable/9/sys/kern/subr_witness.c Sun May 13 16:56:16 2012 (r235403) +++ stable/9/sys/kern/subr_witness.c Sun May 13 17:01:32 2012 (r235404) @@ -2161,6 +2161,13 @@ witness_save(struct lock_object *lock, c struct lock_instance *instance; struct lock_class *class; + /* + * This function is used independently in locking code to deal with + * Giant, SCHEDULER_STOPPED() check can be removed here after Giant + * is gone. + */ + if (SCHEDULER_STOPPED()) + return; KASSERT(witness_cold == 0, ("%s: witness_cold", __func__)); if (lock->lo_witness == NULL || witness_watch == -1 || panicstr != NULL) return; @@ -2187,6 +2194,13 @@ witness_restore(struct lock_object *lock struct lock_instance *instance; struct lock_class *class; + /* + * This function is used independently in locking code to deal with + * Giant, SCHEDULER_STOPPED() check can be removed here after Giant + * is gone. + */ + if (SCHEDULER_STOPPED()) + return; KASSERT(witness_cold == 0, ("%s: witness_cold", __func__)); if (lock->lo_witness == NULL || witness_watch == -1 || panicstr != NULL) return; Modified: stable/9/sys/security/mac/mac_priv.c ============================================================================== --- stable/9/sys/security/mac/mac_priv.c Sun May 13 16:56:16 2012 (r235403) +++ stable/9/sys/security/mac/mac_priv.c Sun May 13 17:01:32 2012 (r235404) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include "opt_mac.h" #include -#include #include #include #include Modified: stable/9/sys/sys/mutex.h ============================================================================== --- stable/9/sys/sys/mutex.h Sun May 13 16:56:16 2012 (r235403) +++ stable/9/sys/sys/mutex.h Sun May 13 17:01:32 2012 (r235404) @@ -374,7 +374,8 @@ do { \ \ if (mtx_owned(&Giant)) { \ WITNESS_SAVE(&Giant.lock_object, Giant); \ - for (_giantcnt = 0; mtx_owned(&Giant); _giantcnt++) \ + for (_giantcnt = 0; mtx_owned(&Giant) && \ + !SCHEDULER_STOPPED(); _giantcnt++) \ mtx_unlock(&Giant); \ } Modified: stable/9/sys/sys/systm.h ============================================================================== --- stable/9/sys/sys/systm.h Sun May 13 16:56:16 2012 (r235403) +++ stable/9/sys/sys/systm.h Sun May 13 17:01:32 2012 (r235404) @@ -47,6 +47,7 @@ extern int cold; /* nonzero if we are doing a cold boot */ extern int rebooting; /* kern_reboot() has been called. */ +extern int stop_scheduler; /* only one thread runs after panic */ extern const char *panicstr; /* panic message */ extern char version[]; /* system version */ extern char copyright[]; /* system copyright */ @@ -109,6 +110,14 @@ enum VM_GUEST { VM_GUEST_NO = 0, VM_GUES ((uintptr_t)&(var) & (sizeof(void *) - 1)) == 0, msg) /* + * If we have already panic'd and this is the thread that called + * panic(), then don't block on any mutexes but silently succeed. + * Otherwise, the kernel will deadlock since the scheduler isn't + * going to run the thread that holds any lock we need. + */ +#define SCHEDULER_STOPPED() __predict_false(stop_scheduler) + +/* * XXX the hints declarations are even more misplaced than most declarations * in this file, since they are needed in one file (per arch) and only used * in two files. From owner-svn-src-all@FreeBSD.ORG Sun May 13 17:04:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E00001065672; Sun, 13 May 2012 17:04:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C02D38FC12; Sun, 13 May 2012 17:04:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DH4lQ5092129; Sun, 13 May 2012 17:04:47 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DH4lIi092113; Sun, 13 May 2012 17:04:47 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205131704.q4DH4lIi092113@svn.freebsd.org> From: Andriy Gapon Date: Sun, 13 May 2012 17:04:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235405 - in stable/9/sys: dev/cfe dev/dcons dev/ofw dev/sio dev/syscons dev/uart dev/usb/serial dev/xen/console gdb i386/conf ia64/ia64 kern mips/adm5120 pc98/cbus powerpc/mambo sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 17:04:48 -0000 Author: avg Date: Sun May 13 17:04:46 2012 New Revision: 235405 URL: http://svn.freebsd.org/changeset/base/235405 Log: MFC r228631: kern cons: introduce infrastructure for console grabbing by kernel Modified: stable/9/sys/dev/cfe/cfe_console.c stable/9/sys/dev/dcons/dcons_os.c stable/9/sys/dev/ofw/ofw_console.c stable/9/sys/dev/sio/sio.c stable/9/sys/dev/syscons/syscons.c stable/9/sys/dev/uart/uart_tty.c stable/9/sys/dev/usb/serial/usb_serial.c stable/9/sys/dev/xen/console/console.c stable/9/sys/gdb/gdb_cons.c stable/9/sys/ia64/ia64/ssc.c stable/9/sys/kern/kern_cons.c stable/9/sys/mips/adm5120/console.c stable/9/sys/pc98/cbus/sio.c stable/9/sys/powerpc/mambo/mambo_console.c stable/9/sys/sys/cons.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/dev/cfe/cfe_console.c ============================================================================== --- stable/9/sys/dev/cfe/cfe_console.c Sun May 13 17:01:32 2012 (r235404) +++ stable/9/sys/dev/cfe/cfe_console.c Sun May 13 17:04:46 2012 (r235405) @@ -76,6 +76,8 @@ static cn_init_t cfe_cninit; static cn_term_t cfe_cnterm; static cn_getc_t cfe_cngetc; static cn_putc_t cfe_cnputc; +static cn_grab_t cfe_cngrab; +static cn_ungrab_t cfe_cnungrab; CONSOLE_DRIVER(cfe); @@ -183,6 +185,18 @@ cfe_cnterm(struct consdev *cp) } +static void +cfe_cngrab(struct consdev *cp) +{ + +} + +static void +cfe_cnungrab(struct consdev *cp) +{ + +} + static int cfe_cngetc(struct consdev *cp) { Modified: stable/9/sys/dev/dcons/dcons_os.c ============================================================================== --- stable/9/sys/dev/dcons/dcons_os.c Sun May 13 17:01:32 2012 (r235404) +++ stable/9/sys/dev/dcons/dcons_os.c Sun May 13 17:04:46 2012 (r235405) @@ -109,6 +109,8 @@ static cn_init_t dcons_cninit; static cn_term_t dcons_cnterm; static cn_getc_t dcons_cngetc; static cn_putc_t dcons_cnputc; +static cn_grab_t dcons_cngrab; +static cn_ungrab_t dcons_cnungrab; CONSOLE_DRIVER(dcons); @@ -246,6 +248,16 @@ dcons_cnterm(struct consdev *cp) { } +static void +dcons_cngrab(struct consdev *cp) +{ +} + +static void +dcons_cnungrab(struct consdev *cp) +{ +} + static int dcons_cngetc(struct consdev *cp) { Modified: stable/9/sys/dev/ofw/ofw_console.c ============================================================================== --- stable/9/sys/dev/ofw/ofw_console.c Sun May 13 17:01:32 2012 (r235404) +++ stable/9/sys/dev/ofw/ofw_console.c Sun May 13 17:04:46 2012 (r235405) @@ -74,6 +74,8 @@ static cn_init_t ofw_cninit; static cn_term_t ofw_cnterm; static cn_getc_t ofw_cngetc; static cn_putc_t ofw_cnputc; +static cn_grab_t ofw_cngrab; +static cn_ungrab_t ofw_cnungrab; CONSOLE_DRIVER(ofw); @@ -192,6 +194,16 @@ ofw_cnterm(struct consdev *cp) { } +static void +ofw_cngrab(struct consdev *cp) +{ +} + +static void +ofw_cnungrab(struct consdev *cp) +{ +} + static int ofw_cngetc(struct consdev *cp) { Modified: stable/9/sys/dev/sio/sio.c ============================================================================== --- stable/9/sys/dev/sio/sio.c Sun May 13 17:01:32 2012 (r235404) +++ stable/9/sys/dev/sio/sio.c Sun May 13 17:04:46 2012 (r235405) @@ -2293,6 +2293,8 @@ static cn_init_t sio_cninit; static cn_term_t sio_cnterm; static cn_getc_t sio_cngetc; static cn_putc_t sio_cnputc; +static cn_grab_t sio_cngrab; +static cn_ungrab_t sio_cnungrab; CONSOLE_DRIVER(sio); @@ -2512,6 +2514,16 @@ sio_cnterm(cp) comconsole = -1; } +static void +sio_cngrab(struct consdev *cp) +{ +} + +static void +sio_cnungrab(struct consdev *cp) +{ +} + static int sio_cngetc(struct consdev *cd) { Modified: stable/9/sys/dev/syscons/syscons.c ============================================================================== --- stable/9/sys/dev/syscons/syscons.c Sun May 13 17:01:32 2012 (r235404) +++ stable/9/sys/dev/syscons/syscons.c Sun May 13 17:04:46 2012 (r235405) @@ -229,6 +229,8 @@ static cn_init_t sc_cninit; static cn_term_t sc_cnterm; static cn_getc_t sc_cngetc; static cn_putc_t sc_cnputc; +static cn_grab_t sc_cngrab; +static cn_ungrab_t sc_cnungrab; CONSOLE_DRIVER(sc); @@ -1609,6 +1611,16 @@ sc_cnterm(struct consdev *cp) } static void +sc_cngrab(struct consdev *cp) +{ +} + +static void +sc_cnungrab(struct consdev *cp) +{ +} + +static void sc_cnputc(struct consdev *cd, int c) { u_char buf[1]; Modified: stable/9/sys/dev/uart/uart_tty.c ============================================================================== --- stable/9/sys/dev/uart/uart_tty.c Sun May 13 17:01:32 2012 (r235404) +++ stable/9/sys/dev/uart/uart_tty.c Sun May 13 17:04:46 2012 (r235405) @@ -54,6 +54,8 @@ static cn_init_t uart_cninit; static cn_term_t uart_cnterm; static cn_getc_t uart_cngetc; static cn_putc_t uart_cnputc; +static cn_grab_t uart_cngrab; +static cn_ungrab_t uart_cnungrab; CONSOLE_DRIVER(uart); @@ -108,6 +110,16 @@ uart_cnterm(struct consdev *cp) } static void +uart_cngrab(struct consdev *cp) +{ +} + +static void +uart_cnungrab(struct consdev *cp) +{ +} + +static void uart_cnputc(struct consdev *cp, int c) { Modified: stable/9/sys/dev/usb/serial/usb_serial.c ============================================================================== --- stable/9/sys/dev/usb/serial/usb_serial.c Sun May 13 17:01:32 2012 (r235404) +++ stable/9/sys/dev/usb/serial/usb_serial.c Sun May 13 17:04:46 2012 (r235405) @@ -1336,6 +1336,8 @@ static cn_init_t ucom_cninit; static cn_term_t ucom_cnterm; static cn_getc_t ucom_cngetc; static cn_putc_t ucom_cnputc; +static cn_grab_t ucom_cngrab; +static cn_ungrab_t ucom_cnungrab; CONSOLE_DRIVER(ucom); @@ -1360,6 +1362,16 @@ ucom_cnterm(struct consdev *cp) { } +static void +ucom_cngrab(struct consdev *cp) +{ +} + +static void +ucom_cnungrab(struct consdev *cp) +{ +} + static int ucom_cngetc(struct consdev *cd) { Modified: stable/9/sys/dev/xen/console/console.c ============================================================================== --- stable/9/sys/dev/xen/console/console.c Sun May 13 17:01:32 2012 (r235404) +++ stable/9/sys/dev/xen/console/console.c Sun May 13 17:04:46 2012 (r235405) @@ -50,6 +50,8 @@ static cn_init_t xc_cninit; static cn_term_t xc_cnterm; static cn_getc_t xc_cngetc; static cn_putc_t xc_cnputc; +static cn_grab_t xc_cngrab; +static cn_ungrab_t xc_cnungrab; #define XC_POLLTIME (hz/10) @@ -126,6 +128,16 @@ xc_cnterm(struct consdev *cp) { } +static void +xc_cngrab(struct consdev *cp) +{ +} + +static void +xc_cnungrab(struct consdev *cp) +{ +} + static int xc_cngetc(struct consdev *dev) { Modified: stable/9/sys/gdb/gdb_cons.c ============================================================================== --- stable/9/sys/gdb/gdb_cons.c Sun May 13 17:01:32 2012 (r235404) +++ stable/9/sys/gdb/gdb_cons.c Sun May 13 17:04:46 2012 (r235405) @@ -87,6 +87,16 @@ gdb_cnterm(struct consdev *cp) { } +static void +gdb_cngrab(struct consdev *cp) +{ +} + +static void +gdb_cnungrab(struct consdev *cp) +{ +} + static int gdb_cngetc(struct consdev *cp) { Modified: stable/9/sys/ia64/ia64/ssc.c ============================================================================== --- stable/9/sys/ia64/ia64/ssc.c Sun May 13 17:01:32 2012 (r235404) +++ stable/9/sys/ia64/ia64/ssc.c Sun May 13 17:04:46 2012 (r235405) @@ -102,6 +102,16 @@ ssc_cnterm(struct consdev *cp) } static void +ssc_cngrab(struct consdev *cp) +{ +} + +static void +ssc_cnungrab(struct consdev *cp) +{ +} + +static void ssc_cnattach(void *arg) { struct tty *tp; Modified: stable/9/sys/kern/kern_cons.c ============================================================================== --- stable/9/sys/kern/kern_cons.c Sun May 13 17:01:32 2012 (r235404) +++ stable/9/sys/kern/kern_cons.c Sun May 13 17:04:46 2012 (r235405) @@ -344,6 +344,32 @@ SYSCTL_PROC(_kern, OID_AUTO, consmute, C 0, sizeof(cn_mute), sysctl_kern_consmute, "I", "State of the console muting"); +void +cngrab() +{ + struct cn_device *cnd; + struct consdev *cn; + + STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) { + cn = cnd->cnd_cn; + if (!kdb_active || !(cn->cn_flags & CN_FLAG_NODEBUG)) + cn->cn_ops->cn_grab(cn); + } +} + +void +cnungrab() +{ + struct cn_device *cnd; + struct consdev *cn; + + STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) { + cn = cnd->cnd_cn; + if (!kdb_active || !(cn->cn_flags & CN_FLAG_NODEBUG)) + cn->cn_ops->cn_ungrab(cn); + } +} + /* * Low level console routines. */ Modified: stable/9/sys/mips/adm5120/console.c ============================================================================== --- stable/9/sys/mips/adm5120/console.c Sun May 13 17:01:32 2012 (r235404) +++ stable/9/sys/mips/adm5120/console.c Sun May 13 17:04:46 2012 (r235405) @@ -49,6 +49,8 @@ static cn_init_t uart_cninit; static cn_term_t uart_cnterm; static cn_getc_t uart_cngetc; static cn_putc_t uart_cnputc; +static cn_grab_t uart_cngrab; +static cn_ungrab_t uart_cnungrab; static void uart_cnprobe(struct consdev *cp) @@ -90,4 +92,16 @@ uart_cnterm(struct consdev * cp) } +static void +uart_cngrab(struct consdev *cp) +{ + +} + +static void +uart_cnungrab(struct consdev *cp) +{ + +} + CONSOLE_DRIVER(uart); Modified: stable/9/sys/pc98/cbus/sio.c ============================================================================== --- stable/9/sys/pc98/cbus/sio.c Sun May 13 17:01:32 2012 (r235404) +++ stable/9/sys/pc98/cbus/sio.c Sun May 13 17:04:46 2012 (r235405) @@ -3460,6 +3460,8 @@ static cn_init_t sio_cninit; static cn_term_t sio_cnterm; static cn_getc_t sio_cngetc; static cn_putc_t sio_cnputc; +static cn_grab_t sio_cngrab; +static cn_ungrab_t sio_cnungrab; CONSOLE_DRIVER(sio); @@ -3679,6 +3681,16 @@ sio_cnterm(cp) comconsole = -1; } +static void +sio_cngrab(struct consdev *cp) +{ +} + +static void +sio_cnungrab(struct consdev *cp) +{ +} + static int sio_cngetc(struct consdev *cd) { Modified: stable/9/sys/powerpc/mambo/mambo_console.c ============================================================================== --- stable/9/sys/powerpc/mambo/mambo_console.c Sun May 13 17:01:32 2012 (r235404) +++ stable/9/sys/powerpc/mambo/mambo_console.c Sun May 13 17:04:46 2012 (r235405) @@ -69,6 +69,8 @@ static cn_init_t mambo_cninit; static cn_term_t mambo_cnterm; static cn_getc_t mambo_cngetc; static cn_putc_t mambo_cnputc; +static cn_grab_t mambo_cngrab; +static cn_ungrab_t mambo_cnungrab; CONSOLE_DRIVER(mambo); @@ -146,6 +148,16 @@ mambo_cnterm(struct consdev *cp) { } +static void +mambo_cngrab(struct consdev *cp) +{ +} + +static void +mambo_cnungrab(struct consdev *cp) +{ +} + static int mambo_cngetc(struct consdev *cp) { Modified: stable/9/sys/sys/cons.h ============================================================================== --- stable/9/sys/sys/cons.h Sun May 13 17:01:32 2012 (r235404) +++ stable/9/sys/sys/cons.h Sun May 13 17:04:46 2012 (r235405) @@ -44,6 +44,8 @@ struct tty; typedef void cn_probe_t(struct consdev *); typedef void cn_init_t(struct consdev *); typedef void cn_term_t(struct consdev *); +typedef void cn_grab_t(struct consdev *); +typedef void cn_ungrab_t(struct consdev *); typedef int cn_getc_t(struct consdev *); typedef void cn_putc_t(struct consdev *, int); @@ -58,6 +60,10 @@ struct consdev_ops { /* kernel getchar interface */ cn_putc_t *cn_putc; /* kernel putchar interface */ + cn_grab_t *cn_grab; + /* grab console for exclusive kernel use */ + cn_ungrab_t *cn_ungrab; + /* ungrab console */ }; struct consdev { @@ -99,6 +105,8 @@ extern struct tty *constty; /* Temporary .cn_term = name##_cnterm, \ .cn_getc = name##_cngetc, \ .cn_putc = name##_cnputc, \ + .cn_grab = name##_cngrab, \ + .cn_ungrab = name##_cnungrab, \ }; \ CONSOLE_DEVICE(name##_consdev, name##_consdev_ops, NULL) @@ -109,6 +117,8 @@ int cnadd(struct consdev *); void cnavailable(struct consdev *, int); void cnremove(struct consdev *); void cnselect(struct consdev *); +void cngrab(void); +void cnungrab(void); int cncheckc(void); int cngetc(void); void cnputc(int); From owner-svn-src-all@FreeBSD.ORG Sun May 13 17:05:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 844F1106564A; Sun, 13 May 2012 17:05:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 649688FC1D; Sun, 13 May 2012 17:05:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DH5tEl092222; Sun, 13 May 2012 17:05:55 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DH5tnv092218; Sun, 13 May 2012 17:05:55 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205131705.q4DH5tnv092218@svn.freebsd.org> From: Andriy Gapon Date: Sun, 13 May 2012 17:05:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235406 - in stable/9/sys: i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 17:05:55 -0000 Author: avg Date: Sun May 13 17:05:54 2012 New Revision: 235406 URL: http://svn.freebsd.org/changeset/base/235406 Log: MFC r228632: introduce cngrab/cnungrab stub calls in some places where they make sense Modified: stable/9/sys/kern/kern_cons.c stable/9/sys/kern/kern_shutdown.c stable/9/sys/kern/subr_kdb.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/kern/kern_cons.c ============================================================================== --- stable/9/sys/kern/kern_cons.c Sun May 13 17:04:46 2012 (r235405) +++ stable/9/sys/kern/kern_cons.c Sun May 13 17:05:54 2012 (r235406) @@ -427,8 +427,10 @@ cnputc(int c) if (console_pausing && c == '\n' && !kdb_active) { for (cp = console_pausestr; *cp != '\0'; cp++) cnputc(*cp); + cngrab(); if (cngetc() == '.') console_pausing = 0; + cnungrab(); cnputc('\r'); for (cp = console_pausestr; *cp != '\0'; cp++) cnputc(' '); Modified: stable/9/sys/kern/kern_shutdown.c ============================================================================== --- stable/9/sys/kern/kern_shutdown.c Sun May 13 17:04:46 2012 (r235405) +++ stable/9/sys/kern/kern_shutdown.c Sun May 13 17:05:54 2012 (r235406) @@ -440,6 +440,8 @@ kern_reboot(int howto) print_uptime(); + cngrab(); + /* * Ok, now do things that assume all filesystem activity has * been completed. @@ -610,6 +612,7 @@ panic(const char *fmt, ...) if (newpanic) { (void)vsnprintf(buf, sizeof(buf), fmt, ap); panicstr = buf; + cngrab(); printf("panic: %s\n", buf); } else { printf("panic: "); Modified: stable/9/sys/kern/subr_kdb.c ============================================================================== --- stable/9/sys/kern/subr_kdb.c Sun May 13 17:04:46 2012 (r235405) +++ stable/9/sys/kern/subr_kdb.c Sun May 13 17:05:54 2012 (r235406) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -617,6 +618,8 @@ kdb_trap(int type, int code, struct trap makectx(tf, &kdb_pcb); kdb_thr_select(curthread); + cngrab(); + for (;;) { handled = be->dbbe_trap(type, code); if (be == kdb_dbbe) @@ -627,6 +630,8 @@ kdb_trap(int type, int code, struct trap printf("Switching to %s back-end\n", be->dbbe_name); } + cnungrab(); + kdb_active--; #ifdef SMP From owner-svn-src-all@FreeBSD.ORG Sun May 13 17:10:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D97E01065672; Sun, 13 May 2012 17:10:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C49D08FC16; Sun, 13 May 2012 17:10:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DHAc0R092494; Sun, 13 May 2012 17:10:38 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DHAcCG092487; Sun, 13 May 2012 17:10:38 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205131710.q4DHAcCG092487@svn.freebsd.org> From: Andriy Gapon Date: Sun, 13 May 2012 17:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235407 - in stable/9/sys: conf geom/eli i386/conf kern libkern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 17:10:38 -0000 Author: avg Date: Sun May 13 17:10:38 2012 New Revision: 235407 URL: http://svn.freebsd.org/changeset/base/235407 Log: MFC r228633,228634,228638,228642,228643: introduce cngets, a method for kernel to read a string from console Deleted: stable/9/sys/libkern/gets.c Modified: stable/9/sys/conf/files stable/9/sys/geom/eli/g_eli.c stable/9/sys/kern/kern_cons.c stable/9/sys/kern/vfs_mountroot.c stable/9/sys/sys/cons.h stable/9/sys/sys/libkern.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Sun May 13 17:05:54 2012 (r235406) +++ stable/9/sys/conf/files Sun May 13 17:10:38 2012 (r235407) @@ -2541,7 +2541,6 @@ libkern/bcd.c standard libkern/bsearch.c standard libkern/crc32.c standard libkern/fnmatch.c standard -libkern/gets.c standard libkern/iconv.c optional libiconv libkern/iconv_converter_if.m optional libiconv libkern/iconv_ucs.c optional libiconv Modified: stable/9/sys/geom/eli/g_eli.c ============================================================================== --- stable/9/sys/geom/eli/g_eli.c Sun May 13 17:05:54 2012 (r235406) +++ stable/9/sys/geom/eli/g_eli.c Sun May 13 17:10:38 2012 (r235407) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -1089,7 +1090,7 @@ g_eli_taste(struct g_class *mp, struct g /* Ask for the passphrase if defined. */ if (md.md_iterations >= 0) { printf("Enter passphrase for %s: ", pp->name); - gets(passphrase, sizeof(passphrase), + cngets(passphrase, sizeof(passphrase), g_eli_visible_passphrase); } Modified: stable/9/sys/kern/kern_cons.c ============================================================================== --- stable/9/sys/kern/kern_cons.c Sun May 13 17:05:54 2012 (r235406) +++ stable/9/sys/kern/kern_cons.c Sun May 13 17:10:38 2012 (r235407) @@ -1,6 +1,9 @@ /*- * Copyright (c) 1988 University of Utah. * Copyright (c) 1991 The Regents of the University of California. + * Copyright (c) 1999 Michael Smith + * Copyright (c) 2005 Pawel Jakub Dawidek + * * All rights reserved. * * This code is derived from software contributed to Berkeley by @@ -408,6 +411,55 @@ cncheckc(void) } void +cngets(char *cp, size_t size, int visible) +{ + char *lp, *end; + int c; + + cngrab(); + + lp = cp; + end = cp + size - 1; + for (;;) { + c = cngetc() & 0177; + switch (c) { + case '\n': + case '\r': + cnputc(c); + *lp = '\0'; + cnungrab(); + return; + case '\b': + case '\177': + if (lp > cp) { + if (visible) { + cnputc(c); + cnputs(" \b"); + } + lp--; + } + continue; + case '\0': + continue; + default: + if (lp < end) { + switch (visible) { + case GETS_NOECHO: + break; + case GETS_ECHOPASS: + cnputc('*'); + break; + default: + cnputc(c); + break; + } + *lp++ = c; + } + } + } +} + +void cnputc(int c) { struct cn_device *cnd; Modified: stable/9/sys/kern/vfs_mountroot.c ============================================================================== --- stable/9/sys/kern/vfs_mountroot.c Sun May 13 17:05:54 2012 (r235406) +++ stable/9/sys/kern/vfs_mountroot.c Sun May 13 17:10:38 2012 (r235407) @@ -42,10 +42,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include -#include #include #include #include @@ -486,7 +486,7 @@ parse_dir_ask(char **conf) do { error = EINVAL; printf("\nmountroot> "); - gets(name, sizeof(name), GETS_ECHO); + cngets(name, sizeof(name), GETS_ECHO); if (name[0] == '\0') break; if (name[0] == '?' && name[1] == '\0') { Modified: stable/9/sys/sys/cons.h ============================================================================== --- stable/9/sys/sys/cons.h Sun May 13 17:05:54 2012 (r235406) +++ stable/9/sys/sys/cons.h Sun May 13 17:10:38 2012 (r235407) @@ -86,6 +86,11 @@ struct consdev { #define CN_FLAG_NODEBUG 0x00000001 /* Not supported with debugger. */ #define CN_FLAG_NOAVAIL 0x00000002 /* Temporarily not available. */ +/* Visibility of characters in cngets() */ +#define GETS_NOECHO 0 /* Disable echoing of characters. */ +#define GETS_ECHO 1 /* Enable echoing of characters. */ +#define GETS_ECHOPASS 2 /* Print a * for every character. */ + #ifdef _KERNEL extern struct msgbuf consmsgbuf; /* Message buffer for constty. */ @@ -121,6 +126,7 @@ void cngrab(void); void cnungrab(void); int cncheckc(void); int cngetc(void); +void cngets(char *, size_t, int); void cnputc(int); void cnputs(char *); int cnunavailable(void); Modified: stable/9/sys/sys/libkern.h ============================================================================== --- stable/9/sys/sys/libkern.h Sun May 13 17:05:54 2012 (r235406) +++ stable/9/sys/sys/libkern.h Sun May 13 17:10:38 2012 (r235407) @@ -90,7 +90,6 @@ int fls(int); int flsl(long); #endif int fnmatch(const char *, const char *, int); -void gets(char *, size_t, int); int locc(int, char *, u_int); void *memchr(const void *s, int c, size_t n); int memcmp(const void *b1, const void *b2, size_t len); @@ -188,9 +187,4 @@ strrchr(const char *p, int ch) #define FNM_IGNORECASE FNM_CASEFOLD #define FNM_FILE_NAME FNM_PATHNAME -/* Visibility of characters in gets() */ -#define GETS_NOECHO 0 /* Disable echoing of characters. */ -#define GETS_ECHO 1 /* Enable echoing of characters. */ -#define GETS_ECHOPASS 2 /* Print a * for every character. */ - #endif /* !_SYS_LIBKERN_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun May 13 17:11:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84F47106566B; Sun, 13 May 2012 17:11:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F1258FC15; Sun, 13 May 2012 17:11:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DHBoro092590; Sun, 13 May 2012 17:11:50 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DHBoOi092587; Sun, 13 May 2012 17:11:50 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205131711.q4DHBoOi092587@svn.freebsd.org> From: Andriy Gapon Date: Sun, 13 May 2012 17:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235408 - in stable/9/sys: dev/syscons i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 17:11:50 -0000 Author: avg Date: Sun May 13 17:11:49 2012 New Revision: 235408 URL: http://svn.freebsd.org/changeset/base/235408 Log: MFC r228644: syscons: provide a first iteration of cngrab/cnungrab implementation Modified: stable/9/sys/dev/syscons/syscons.c stable/9/sys/dev/syscons/syscons.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/dev/syscons/syscons.c ============================================================================== --- stable/9/sys/dev/syscons/syscons.c Sun May 13 17:10:38 2012 (r235407) +++ stable/9/sys/dev/syscons/syscons.c Sun May 13 17:11:49 2012 (r235408) @@ -1613,11 +1613,46 @@ sc_cnterm(struct consdev *cp) static void sc_cngrab(struct consdev *cp) { + scr_stat *scp; + + scp = sc_console->sc->cur_scp; + if (scp->sc->kbd == NULL) + return; + + if (scp->grabbed++ > 0) + return; + + /* + * Make sure the keyboard is accessible even when the kbd device + * driver is disabled. + */ + kbdd_enable(scp->sc->kbd); + + /* we shall always use the keyboard in the XLATE mode here */ + scp->kbd_prev_mode = scp->kbd_mode; + scp->kbd_mode = K_XLATE; + (void)kbdd_ioctl(scp->sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode); + + kbdd_poll(scp->sc->kbd, TRUE); } static void sc_cnungrab(struct consdev *cp) { + scr_stat *scp; + + scp = sc_console->sc->cur_scp; /* XXX */ + if (scp->sc->kbd == NULL) + return; + + if (--scp->grabbed > 0) + return; + + kbdd_poll(scp->sc->kbd, FALSE); + + scp->kbd_mode = scp->kbd_prev_mode; + (void)kbdd_ioctl(scp->sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode); + kbdd_disable(scp->sc->kbd); } static void @@ -1675,7 +1710,6 @@ sc_cngetc(struct consdev *cd) static int fkeycp; scr_stat *scp; const u_char *p; - int cur_mode; int s = spltty(); /* block sckbdevent and scrn_timer while we poll */ int c; @@ -1699,25 +1733,7 @@ sc_cngetc(struct consdev *cd) return -1; } - /* - * Make sure the keyboard is accessible even when the kbd device - * driver is disabled. - */ - kbdd_enable(scp->sc->kbd); - - /* we shall always use the keyboard in the XLATE mode here */ - cur_mode = scp->kbd_mode; - scp->kbd_mode = K_XLATE; - (void)kbdd_ioctl(scp->sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode); - - kbdd_poll(scp->sc->kbd, TRUE); c = scgetc(scp->sc, SCGETC_CN | SCGETC_NONBLOCK); - kbdd_poll(scp->sc->kbd, FALSE); - - scp->kbd_mode = cur_mode; - (void)kbdd_ioctl(scp->sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode); - kbdd_disable(scp->sc->kbd); - splx(s); switch (KEYFLAGS(c)) { case 0: /* normal char */ Modified: stable/9/sys/dev/syscons/syscons.h ============================================================================== --- stable/9/sys/dev/syscons/syscons.h Sun May 13 17:10:38 2012 (r235407) +++ stable/9/sys/dev/syscons/syscons.h Sun May 13 17:11:49 2012 (r235408) @@ -301,7 +301,9 @@ typedef struct scr_stat { void *ts; int status; /* status (bitfield) */ + int grabbed; int kbd_mode; /* keyboard I/O mode */ + int kbd_prev_mode; /* keyboard I/O mode */ int cursor_pos; /* cursor buffer position */ int cursor_oldpos; /* cursor old buffer position */ From owner-svn-src-all@FreeBSD.ORG Sun May 13 17:13:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFBB9106564A; Sun, 13 May 2012 17:13:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA18E8FC1B; Sun, 13 May 2012 17:13:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DHDLAX092693; Sun, 13 May 2012 17:13:21 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DHDL9d092691; Sun, 13 May 2012 17:13:21 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205131713.q4DHDL9d092691@svn.freebsd.org> From: Andriy Gapon Date: Sun, 13 May 2012 17:13:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235409 - in stable/9/sys: dev/syscons i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 17:13:21 -0000 Author: avg Date: Sun May 13 17:13:21 2012 New Revision: 235409 URL: http://svn.freebsd.org/changeset/base/235409 Log: MFC r228767: sc_cngrab: switch to console vty when possible Modified: stable/9/sys/dev/syscons/syscons.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/dev/syscons/syscons.c ============================================================================== --- stable/9/sys/dev/syscons/syscons.c Sun May 13 17:11:49 2012 (r235408) +++ stable/9/sys/dev/syscons/syscons.c Sun May 13 17:13:21 2012 (r235409) @@ -1615,7 +1615,14 @@ sc_cngrab(struct consdev *cp) { scr_stat *scp; + if (!cold && + sc_console->sc->cur_scp->index != sc_console->index && + sc_console->sc->cur_scp->smode.mode == VT_AUTO && + sc_console->smode.mode == VT_AUTO) + sc_switch_scr(sc_console->sc, sc_console->index); + scp = sc_console->sc->cur_scp; + if (scp->sc->kbd == NULL) return; From owner-svn-src-all@FreeBSD.ORG Sun May 13 17:14:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D0A1106564A; Sun, 13 May 2012 17:14:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F21848FC0C; Sun, 13 May 2012 17:14:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DHEQ04092776; Sun, 13 May 2012 17:14:26 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DHEQGK092774; Sun, 13 May 2012 17:14:26 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205131714.q4DHEQGK092774@svn.freebsd.org> From: Andriy Gapon Date: Sun, 13 May 2012 17:14:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235410 - in stable/9/sys: dev/usb i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 17:14:27 -0000 Author: avg Date: Sun May 13 17:14:26 2012 New Revision: 235410 URL: http://svn.freebsd.org/changeset/base/235410 Log: MFC r228760: adapt usb transfer code for SCHEDULER_STOPPED Modified: stable/9/sys/dev/usb/usb_transfer.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/9/sys/dev/usb/usb_transfer.c Sun May 13 17:13:21 2012 (r235409) +++ stable/9/sys/dev/usb/usb_transfer.c Sun May 13 17:14:26 2012 (r235410) @@ -2151,7 +2151,7 @@ usbd_callback_wrapper(struct usb_xfer_qu struct usb_xfer_root *info = xfer->xroot; USB_BUS_LOCK_ASSERT(info->bus, MA_OWNED); - if (!mtx_owned(info->xfer_mtx)) { + if (!mtx_owned(info->xfer_mtx) && !SCHEDULER_STOPPED()) { /* * Cases that end up here: * @@ -3124,14 +3124,14 @@ usbd_transfer_poll(struct usb_xfer **ppx /* make sure that the BUS mutex is not locked */ drop_bus = 0; - while (mtx_owned(&xroot->udev->bus->bus_mtx)) { + while (mtx_owned(&xroot->udev->bus->bus_mtx) && !SCHEDULER_STOPPED()) { mtx_unlock(&xroot->udev->bus->bus_mtx); drop_bus++; } /* make sure that the transfer mutex is not locked */ drop_xfer = 0; - while (mtx_owned(xroot->xfer_mtx)) { + while (mtx_owned(xroot->xfer_mtx) && !SCHEDULER_STOPPED()) { mtx_unlock(xroot->xfer_mtx); drop_xfer++; } From owner-svn-src-all@FreeBSD.ORG Sun May 13 17:15:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 023931065670; Sun, 13 May 2012 17:15:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF3E38FC21; Sun, 13 May 2012 17:15:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DHFUgg092867; Sun, 13 May 2012 17:15:30 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DHFUME092865; Sun, 13 May 2012 17:15:30 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205131715.q4DHFUME092865@svn.freebsd.org> From: Andriy Gapon Date: Sun, 13 May 2012 17:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235411 - in stable/9/sys: dev/usb/input i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 17:15:31 -0000 Author: avg Date: Sun May 13 17:15:30 2012 New Revision: 235411 URL: http://svn.freebsd.org/changeset/base/235411 Log: MFC r228765: ukbd: adjust for SCHEDULER_STOPPED() and overhaul locking code Modified: stable/9/sys/dev/usb/input/ukbd.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/9/sys/dev/usb/input/ukbd.c Sun May 13 17:14:26 2012 (r235410) +++ stable/9/sys/dev/usb/input/ukbd.c Sun May 13 17:15:30 2012 (r235411) @@ -198,7 +198,6 @@ struct ukbd_softc { int sc_mode; /* input mode (K_XLATE,K_RAW,K_CODE) */ int sc_state; /* shift/lock key state */ int sc_accents; /* accent key index (> 0) */ - int sc_poll_tick_last; int sc_led_size; int sc_kbd_size; @@ -227,7 +226,6 @@ struct ukbd_softc { uint8_t sc_id_events; uint8_t sc_kbd_id; - uint8_t sc_poll_detected; uint8_t sc_buffer[UKBD_BUFFER_SIZE]; }; @@ -247,6 +245,33 @@ struct ukbd_softc { SCAN_PREFIX_CTL | SCAN_PREFIX_SHIFT) #define SCAN_CHAR(c) ((c) & 0x7f) +#define UKBD_LOCK() mtx_lock(&Giant) +#define UKBD_UNLOCK() mtx_unlock(&Giant) + +#ifdef INVARIANTS + +/* + * Assert that the lock is held in all contexts + * where the code can be executed. + */ +#define UKBD_LOCK_ASSERT() mtx_assert(&Giant, MA_OWNED) + +/* + * Assert that the lock is held in the contexts + * where it really has to be so. + */ +#define UKBD_CTX_LOCK_ASSERT() \ + do { \ + if (!kdb_active && panicstr == NULL) \ + mtx_assert(&Giant, MA_OWNED); \ + } while (0) +#else + +#define UKBD_LOCK_ASSERT() (void)0 +#define UKBD_CTX_LOCK_ASSERT() (void)0 + +#endif + struct ukbd_mods { uint32_t mask, key; }; @@ -339,8 +364,6 @@ static int ukbd_ioctl(keyboard_t *, u_lo static int ukbd_enable(keyboard_t *); static int ukbd_disable(keyboard_t *); static void ukbd_interrupt(struct ukbd_softc *); -static int ukbd_is_polling(struct ukbd_softc *); -static int ukbd_polls_other_thread(struct ukbd_softc *); static void ukbd_event_keyinput(struct ukbd_softc *); static device_probe_t ukbd_probe; @@ -370,7 +393,8 @@ ukbd_start_timer(struct ukbd_softc *sc) static void ukbd_put_key(struct ukbd_softc *sc, uint32_t key) { - mtx_assert(&Giant, MA_OWNED); + + UKBD_CTX_LOCK_ASSERT(); DPRINTF("0x%02x (%d) %s\n", key, key, (key & KEY_RELEASE) ? "released" : "pressed"); @@ -388,52 +412,32 @@ ukbd_put_key(struct ukbd_softc *sc, uint } static void -ukbd_yield(void) -{ - struct thread *td = curthread; - uint32_t old_prio; - - DROP_GIANT(); - - thread_lock(td); - - /* get current priority */ - old_prio = td->td_base_pri; - - /* set new priority */ - sched_prio(td, td->td_user_pri); - - /* cause a task switch */ - mi_switch(SW_INVOL | SWT_RELINQUISH, NULL); - - /* restore priority */ - sched_prio(td, old_prio); - - thread_unlock(td); - - PICKUP_GIANT(); -} - -static void ukbd_do_poll(struct ukbd_softc *sc, uint8_t wait) { - DPRINTFN(2, "polling\n"); - /* update stats about last polling event */ - sc->sc_poll_tick_last = ticks; - sc->sc_poll_detected = 1; + UKBD_CTX_LOCK_ASSERT(); + KASSERT((sc->sc_flags & UKBD_FLAG_POLLING) != 0, + ("ukbd_do_poll called when not polling\n")); + DPRINTFN(2, "polling\n"); - if (kdb_active == 0) { + if (!kdb_active && !SCHEDULER_STOPPED()) { + /* + * In this context the kernel is polling for input, + * but the USB subsystem works in normal interrupt-driven + * mode, so we just wait on the USB threads to do the job. + * Note that we currently hold the Giant, but it's also used + * as the transfer mtx, so we must release it while waiting. + */ while (sc->sc_inputs == 0) { - - /* give USB threads a chance to run */ - ukbd_yield(); - - /* check if we should wait */ + /* + * Give USB threads a chance to run. Note that + * kern_yield performs DROP_GIANT + PICKUP_GIANT. + */ + kern_yield(PRI_UNCHANGED); if (!wait) break; } - return; /* Only poll if KDB is active */ + return; } while (sc->sc_inputs == 0) { @@ -441,7 +445,6 @@ ukbd_do_poll(struct ukbd_softc *sc, uint usbd_transfer_poll(sc->sc_xfer, UKBD_N_TRANSFER); /* Delay-optimised support for repetition of keys */ - if (ukbd_any_key_pressed(sc)) { /* a key is pressed - need timekeeping */ DELAY(1000); @@ -462,16 +465,16 @@ ukbd_get_key(struct ukbd_softc *sc, uint { int32_t c; - mtx_assert(&Giant, MA_OWNED); + UKBD_CTX_LOCK_ASSERT(); + KASSERT((!kdb_active && !SCHEDULER_STOPPED()) + || (sc->sc_flags & UKBD_FLAG_POLLING) != 0, + ("not polling in kdb or panic\n")); if (sc->sc_inputs == 0) { /* start transfer, if not already started */ usbd_transfer_start(sc->sc_xfer[UKBD_INTR_DT]); } - if (ukbd_polls_other_thread(sc)) - return (-1); - if (sc->sc_flags & UKBD_FLAG_POLLING) ukbd_do_poll(sc, wait); @@ -499,6 +502,8 @@ ukbd_interrupt(struct ukbd_softc *sc) uint8_t i; uint8_t j; + UKBD_CTX_LOCK_ASSERT(); + if (sc->sc_ndata.keycode[0] == KEY_ERROR) return; @@ -584,7 +589,9 @@ ukbd_event_keyinput(struct ukbd_softc *s { int c; - if (ukbd_is_polling(sc)) + UKBD_CTX_LOCK_ASSERT(); + + if ((sc->sc_flags & UKBD_FLAG_POLLING) != 0) return; if (sc->sc_inputs == 0) @@ -608,7 +615,7 @@ ukbd_timeout(void *arg) { struct ukbd_softc *sc = arg; - mtx_assert(&Giant, MA_OWNED); + UKBD_LOCK_ASSERT(); sc->sc_time_ms += 25; /* milliseconds */ @@ -656,6 +663,8 @@ ukbd_intr_callback(struct usb_xfer *xfer uint8_t id; int len; + UKBD_LOCK_ASSERT(); + usbd_xfer_status(xfer, &len, NULL, NULL, NULL); pc = usbd_xfer_get_frame(xfer, 0); @@ -842,6 +851,8 @@ ukbd_set_leds_callback(struct usb_xfer * uint8_t any; int len; + UKBD_LOCK_ASSERT(); + #ifdef USB_DEBUG if (ukbd_no_leds) return; @@ -972,6 +983,7 @@ ukbd_probe(device_t dev) int error; uint16_t d_len; + UKBD_LOCK_ASSERT(); DPRINTFN(11, "\n"); if (sw == NULL) { @@ -998,7 +1010,7 @@ ukbd_probe(device_t dev) if (error) return (ENXIO); - /* + /* * NOTE: we currently don't support USB mouse and USB keyboard * on the same USB endpoint. */ @@ -1165,6 +1177,8 @@ ukbd_attach(device_t dev) uint16_t n; uint16_t hid_len; + UKBD_LOCK_ASSERT(); + kbd_init_struct(kbd, UKBD_DRIVER_NAME, KB_OTHER, unit, 0, 0, 0); kbd->kb_data = (void *)sc; @@ -1241,14 +1255,10 @@ ukbd_attach(device_t dev) /* ignore if SETIDLE fails, hence it is not crucial */ usbd_req_set_idle(sc->sc_udev, NULL, sc->sc_iface_index, 0, 0); - mtx_lock(&Giant); - ukbd_ioctl(kbd, KDSETLED, (caddr_t)&sc->sc_state); KBD_INIT_DONE(kbd); - mtx_unlock(&Giant); - if (kbd_register(kbd) < 0) { goto detach; } @@ -1266,15 +1276,10 @@ ukbd_attach(device_t dev) if (bootverbose) { genkbd_diag(kbd, bootverbose); } - /* lock keyboard mutex */ - - mtx_lock(&Giant); /* start the keyboard */ - usbd_transfer_start(sc->sc_xfer[UKBD_INTR_DT]); - mtx_unlock(&Giant); return (0); /* success */ detach: @@ -1288,9 +1293,9 @@ ukbd_detach(device_t dev) struct ukbd_softc *sc = device_get_softc(dev); int error; - DPRINTF("\n"); + UKBD_LOCK_ASSERT(); - mtx_lock(&Giant); + DPRINTF("\n"); sc->sc_flags |= UKBD_FLAG_GONE; @@ -1318,8 +1323,6 @@ ukbd_detach(device_t dev) } sc->sc_kbd.kb_flags = 0; - mtx_unlock(&Giant); - usbd_transfer_unsetup(sc->sc_xfer, UKBD_N_TRANSFER); usb_callout_drain(&sc->sc_callout); @@ -1335,12 +1338,10 @@ ukbd_resume(device_t dev) { struct ukbd_softc *sc = device_get_softc(dev); - mtx_lock(&Giant); + UKBD_LOCK_ASSERT(); ukbd_clear_state(&sc->sc_kbd); - mtx_unlock(&Giant); - return (0); } @@ -1400,15 +1401,11 @@ ukbd_lock(keyboard_t *kbd, int lock) static int ukbd_enable(keyboard_t *kbd) { - if (!mtx_owned(&Giant)) { - /* XXX cludge */ - int retval; - mtx_lock(&Giant); - retval = ukbd_enable(kbd); - mtx_unlock(&Giant); - return (retval); - } + + UKBD_LOCK(); KBD_ACTIVATE(kbd); + UKBD_UNLOCK(); + return (0); } @@ -1416,44 +1413,24 @@ ukbd_enable(keyboard_t *kbd) static int ukbd_disable(keyboard_t *kbd) { - if (!mtx_owned(&Giant)) { - /* XXX cludge */ - int retval; - mtx_lock(&Giant); - retval = ukbd_disable(kbd); - mtx_unlock(&Giant); - return (retval); - } + + UKBD_LOCK(); KBD_DEACTIVATE(kbd); + UKBD_UNLOCK(); + return (0); } /* check if data is waiting */ +/* Currently unused. */ static int ukbd_check(keyboard_t *kbd) { struct ukbd_softc *sc = kbd->kb_data; - if (!KBD_IS_ACTIVE(kbd)) - return (0); + UKBD_CTX_LOCK_ASSERT(); - if (sc->sc_flags & UKBD_FLAG_POLLING) { - if (!mtx_owned(&Giant)) { - /* XXX cludge */ - int retval; - mtx_lock(&Giant); - retval = ukbd_check(kbd); - mtx_unlock(&Giant); - return (retval); - } - } else { - /* XXX the keyboard layer requires Giant */ - if (!mtx_owned(&Giant)) - return (0); - } - - /* check if key belongs to this thread */ - if (ukbd_polls_other_thread(sc)) + if (!KBD_IS_ACTIVE(kbd)) return (0); if (sc->sc_flags & UKBD_FLAG_POLLING) @@ -1472,30 +1449,13 @@ ukbd_check(keyboard_t *kbd) /* check if char is waiting */ static int -ukbd_check_char(keyboard_t *kbd) +ukbd_check_char_locked(keyboard_t *kbd) { struct ukbd_softc *sc = kbd->kb_data; - if (!KBD_IS_ACTIVE(kbd)) - return (0); + UKBD_CTX_LOCK_ASSERT(); - if (sc->sc_flags & UKBD_FLAG_POLLING) { - if (!mtx_owned(&Giant)) { - /* XXX cludge */ - int retval; - mtx_lock(&Giant); - retval = ukbd_check_char(kbd); - mtx_unlock(&Giant); - return (retval); - } - } else { - /* XXX the keyboard layer requires Giant */ - if (!mtx_owned(&Giant)) - return (0); - } - - /* check if key belongs to this thread */ - if (ukbd_polls_other_thread(sc)) + if (!KBD_IS_ACTIVE(kbd)) return (0); if ((sc->sc_composed_char > 0) && @@ -1505,39 +1465,34 @@ ukbd_check_char(keyboard_t *kbd) return (ukbd_check(kbd)); } +static int +ukbd_check_char(keyboard_t *kbd) +{ + int result; + + UKBD_LOCK(); + result = ukbd_check_char_locked(kbd); + UKBD_UNLOCK(); + + return (result); +} /* read one byte from the keyboard if it's allowed */ +/* Currently unused. */ static int ukbd_read(keyboard_t *kbd, int wait) { struct ukbd_softc *sc = kbd->kb_data; int32_t usbcode; - #ifdef UKBD_EMULATE_ATSCANCODE uint32_t keycode; uint32_t scancode; #endif - if (!KBD_IS_ACTIVE(kbd)) - return (-1); - if (sc->sc_flags & UKBD_FLAG_POLLING) { - if (!mtx_owned(&Giant)) { - /* XXX cludge */ - int retval; - mtx_lock(&Giant); - retval = ukbd_read(kbd, wait); - mtx_unlock(&Giant); - return (retval); - } - } else { - /* XXX the keyboard layer requires Giant */ - if (!mtx_owned(&Giant)) - return (-1); - } + UKBD_CTX_LOCK_ASSERT(); - /* check if key belongs to this thread */ - if (ukbd_polls_other_thread(sc)) + if (!KBD_IS_ACTIVE(kbd)) return (-1); #ifdef UKBD_EMULATE_ATSCANCODE @@ -1574,38 +1529,19 @@ ukbd_read(keyboard_t *kbd, int wait) /* read char from the keyboard */ static uint32_t -ukbd_read_char(keyboard_t *kbd, int wait) +ukbd_read_char_locked(keyboard_t *kbd, int wait) { struct ukbd_softc *sc = kbd->kb_data; uint32_t action; uint32_t keycode; int32_t usbcode; - #ifdef UKBD_EMULATE_ATSCANCODE uint32_t scancode; - #endif - if (!KBD_IS_ACTIVE(kbd)) - return (NOKEY); - - if (sc->sc_flags & UKBD_FLAG_POLLING) { - if (!mtx_owned(&Giant)) { - /* XXX cludge */ - int retval; - mtx_lock(&Giant); - retval = ukbd_read_char(kbd, wait); - mtx_unlock(&Giant); - return (retval); - } - } else { - /* XXX the keyboard layer requires Giant */ - if (!mtx_owned(&Giant)) - return (NOKEY); - } + UKBD_CTX_LOCK_ASSERT(); - /* check if key belongs to this thread */ - if (ukbd_polls_other_thread(sc)) + if (!KBD_IS_ACTIVE(kbd)) return (NOKEY); next_code: @@ -1782,39 +1718,32 @@ errkey: return (ERRKEY); } +/* Currently wait is always false. */ +static uint32_t +ukbd_read_char(keyboard_t *kbd, int wait) +{ + uint32_t keycode; + + UKBD_LOCK(); + keycode = ukbd_read_char_locked(kbd, wait); + UKBD_UNLOCK(); + + return (keycode); +} + /* some useful control functions */ static int -ukbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) +ukbd_ioctl_locked(keyboard_t *kbd, u_long cmd, caddr_t arg) { struct ukbd_softc *sc = kbd->kb_data; int i; - #if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD4) || defined(COMPAT_43) int ival; #endif - if (!mtx_owned(&Giant)) { - /* - * XXX big problem: If scroll lock is pressed and "printf()" - * is called, the CPU will get here, to un-scroll lock the - * keyboard. But if "printf()" acquires the "Giant" lock, - * there will be a locking order reversal problem, so the - * keyboard system must get out of "Giant" first, before the - * CPU can proceed here ... - */ - switch (cmd) { - case KDGKBMODE: - case KDSKBMODE: - /* workaround for Geli */ - mtx_lock(&Giant); - i = ukbd_ioctl(kbd, cmd, arg); - mtx_unlock(&Giant); - return (i); - default: - return (EINVAL); - } - } + + UKBD_LOCK_ASSERT(); switch (cmd) { case KDGKBMODE: /* get keyboard mode */ @@ -1839,7 +1768,7 @@ ukbd_ioctl(keyboard_t *kbd, u_long cmd, case K_RAW: case K_CODE: if (sc->sc_mode != *(int *)arg) { - if (ukbd_is_polling(sc) == 0) + if ((sc->sc_flags & UKBD_FLAG_POLLING) == 0) ukbd_clear_state(kbd); sc->sc_mode = *(int *)arg; } @@ -1943,19 +1872,44 @@ ukbd_ioctl(keyboard_t *kbd, u_long cmd, return (0); } +static int +ukbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) +{ + int result; + + /* + * XXX KDGKBSTATE, KDSKBSTATE and KDSETLED can be called from any + * context where printf(9) can be called, which among other things + * includes interrupt filters and threads with any kinds of locks + * already held. For this reason it would be dangerous to acquire + * the Giant here unconditionally. On the other hand we have to + * have it to handle the ioctl. + * So we make our best effort to auto-detect whether we can grab + * the Giant or not. Blame syscons(4) for this. + */ + switch (cmd) { + case KDGKBSTATE: + case KDSKBSTATE: + case KDSETLED: + if (!mtx_owned(&Giant) && !SCHEDULER_STOPPED()) + return (EDEADLK); /* best I could come up with */ + /* FALLTHROUGH */ + default: + UKBD_LOCK(); + result = ukbd_ioctl_locked(kbd, cmd, arg); + UKBD_UNLOCK(); + return (result); + } +} + + /* clear the internal state of the keyboard */ static void ukbd_clear_state(keyboard_t *kbd) { struct ukbd_softc *sc = kbd->kb_data; - if (!mtx_owned(&Giant)) { - /* XXX cludge */ - mtx_lock(&Giant); - ukbd_clear_state(kbd); - mtx_unlock(&Giant); - return; - } + UKBD_CTX_LOCK_ASSERT(); sc->sc_flags &= ~(UKBD_FLAG_COMPOSE | UKBD_FLAG_POLLING); sc->sc_state &= LOCK_MASK; /* preserve locking key state */ @@ -1986,43 +1940,11 @@ ukbd_set_state(keyboard_t *kbd, void *bu } static int -ukbd_is_polling(struct ukbd_softc *sc) -{ - int delta; - - if (sc->sc_flags & UKBD_FLAG_POLLING) - return (1); /* polling */ - - delta = ticks - sc->sc_poll_tick_last; - if ((delta < 0) || (delta >= hz)) { - sc->sc_poll_detected = 0; - return (0); /* not polling */ - } - - return (sc->sc_poll_detected); -} - -static int -ukbd_polls_other_thread(struct ukbd_softc *sc) -{ - return (ukbd_is_polling(sc) && - (sc->sc_poll_thread != curthread)); -} - -static int ukbd_poll(keyboard_t *kbd, int on) { struct ukbd_softc *sc = kbd->kb_data; - if (!mtx_owned(&Giant)) { - /* XXX cludge */ - int retval; - mtx_lock(&Giant); - retval = ukbd_poll(kbd, on); - mtx_unlock(&Giant); - return (retval); - } - + UKBD_LOCK(); if (on) { sc->sc_flags |= UKBD_FLAG_POLLING; sc->sc_poll_thread = curthread; @@ -2030,6 +1952,8 @@ ukbd_poll(keyboard_t *kbd, int on) sc->sc_flags &= ~UKBD_FLAG_POLLING; ukbd_start_timer(sc); /* start timer */ } + UKBD_UNLOCK(); + return (0); } @@ -2038,6 +1962,8 @@ ukbd_poll(keyboard_t *kbd, int on) static void ukbd_set_leds(struct ukbd_softc *sc, uint8_t leds) { + + UKBD_LOCK_ASSERT(); DPRINTF("leds=0x%02x\n", leds); sc->sc_leds = leds; From owner-svn-src-all@FreeBSD.ORG Sun May 13 17:17:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C518106566B; Sun, 13 May 2012 17:17:14 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B2FC8FC12; Sun, 13 May 2012 17:17:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DHHE1U092960; Sun, 13 May 2012 17:17:14 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DHHEkW092957; Sun, 13 May 2012 17:17:14 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205131717.q4DHHEkW092957@svn.freebsd.org> From: Michael Tuexen Date: Sun, 13 May 2012 17:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235412 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 17:17:14 -0000 Author: tuexen Date: Sun May 13 17:17:13 2012 New Revision: 235412 URL: http://svn.freebsd.org/changeset/base/235412 Log: Remove unused constants. MFC after: 3 days Modified: head/sys/netinet/sctp_constants.h head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Sun May 13 17:15:30 2012 (r235411) +++ head/sys/netinet/sctp_constants.h Sun May 13 17:17:13 2012 (r235412) @@ -756,34 +756,26 @@ __FBSDID("$FreeBSD$"); #define SCTP_NOTIFY_INTERFACE_DOWN 3 #define SCTP_NOTIFY_INTERFACE_UP 4 #define SCTP_NOTIFY_DG_FAIL 5 -#define SCTP_NOTIFY_STRDATA_ERR 6 +#define SCTP_NOTIFY_SPECIAL_SP_FAIL 6 #define SCTP_NOTIFY_ASSOC_LOC_ABORTED 7 -#define SCTP_NOTIFY_PEER_OPENED_STREAM 8 -#define SCTP_NOTIFY_STREAM_OPENED_OK 9 -#define SCTP_NOTIFY_ASSOC_RESTART 10 -#define SCTP_NOTIFY_HB_RESP 11 -#define SCTP_NOTIFY_ASCONF_SUCCESS 12 -#define SCTP_NOTIFY_ASCONF_FAILED 13 -#define SCTP_NOTIFY_PEER_SHUTDOWN 14 -#define SCTP_NOTIFY_ASCONF_ADD_IP 15 -#define SCTP_NOTIFY_ASCONF_DELETE_IP 16 -#define SCTP_NOTIFY_ASCONF_SET_PRIMARY 17 -#define SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION 18 -#define SCTP_NOTIFY_INTERFACE_CONFIRMED 20 -#define SCTP_NOTIFY_STR_RESET_RECV 21 -#define SCTP_NOTIFY_STR_RESET_SEND 22 -#define SCTP_NOTIFY_STR_RESET_FAILED_OUT 23 -#define SCTP_NOTIFY_STR_RESET_FAILED_IN 24 -#define SCTP_NOTIFY_AUTH_NEW_KEY 25 -#define SCTP_NOTIFY_AUTH_FREE_KEY 26 -#define SCTP_NOTIFY_SPECIAL_SP_FAIL 27 -#define SCTP_NOTIFY_NO_PEER_AUTH 28 -#define SCTP_NOTIFY_SENDER_DRY 29 -#define SCTP_NOTIFY_STR_RESET_DENIED_OUT 30 -#define SCTP_NOTIFY_STR_RESET_DENIED_IN 31 -#define SCTP_NOTIFY_ASSOC_REM_ABORTED 32 -#define SCTP_NOTIFY_MAX 32 - +#define SCTP_NOTIFY_ASSOC_REM_ABORTED 8 +#define SCTP_NOTIFY_ASSOC_RESTART 9 +#define SCTP_NOTIFY_PEER_SHUTDOWN 10 +#define SCTP_NOTIFY_ASCONF_ADD_IP 11 +#define SCTP_NOTIFY_ASCONF_DELETE_IP 12 +#define SCTP_NOTIFY_ASCONF_SET_PRIMARY 13 +#define SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION 14 +#define SCTP_NOTIFY_INTERFACE_CONFIRMED 15 +#define SCTP_NOTIFY_STR_RESET_RECV 16 +#define SCTP_NOTIFY_STR_RESET_SEND 17 +#define SCTP_NOTIFY_STR_RESET_FAILED_OUT 18 +#define SCTP_NOTIFY_STR_RESET_FAILED_IN 19 +#define SCTP_NOTIFY_STR_RESET_DENIED_OUT 20 +#define SCTP_NOTIFY_STR_RESET_DENIED_IN 21 +#define SCTP_NOTIFY_AUTH_NEW_KEY 22 +#define SCTP_NOTIFY_AUTH_FREE_KEY 23 +#define SCTP_NOTIFY_NO_PEER_AUTH 24 +#define SCTP_NOTIFY_SENDER_DRY 25 /* This is the value for messages that are NOT completely * copied down where we will start to split the message. Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun May 13 17:15:30 2012 (r235411) +++ head/sys/netinet/sctputil.c Sun May 13 17:17:13 2012 (r235412) @@ -3556,8 +3556,6 @@ sctp_ulp_notify(uint32_t notification, s sctp_notify_partial_delivery_indication(stcb, error, val, so_locked); break; } - case SCTP_NOTIFY_STRDATA_ERR: - break; case SCTP_NOTIFY_ASSOC_LOC_ABORTED: if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) || ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) { @@ -3574,10 +3572,6 @@ sctp_ulp_notify(uint32_t notification, s sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, 1, so_locked); } break; - case SCTP_NOTIFY_PEER_OPENED_STREAM: - break; - case SCTP_NOTIFY_STREAM_OPENED_OK: - break; case SCTP_NOTIFY_ASSOC_RESTART: sctp_notify_assoc_change(SCTP_RESTART, stcb, error, NULL, 0, so_locked); if (stcb->asoc.peer_supports_auth == 0) { @@ -3585,8 +3579,6 @@ sctp_ulp_notify(uint32_t notification, s NULL, so_locked); } break; - case SCTP_NOTIFY_HB_RESP: - break; case SCTP_NOTIFY_STR_RESET_SEND: sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_OUTGOING_SSN); break; @@ -3621,10 +3613,6 @@ sctp_ulp_notify(uint32_t notification, s sctp_notify_peer_addr_change(stcb, SCTP_ADDR_MADE_PRIM, data, error); break; - case SCTP_NOTIFY_ASCONF_SUCCESS: - break; - case SCTP_NOTIFY_ASCONF_FAILED: - break; case SCTP_NOTIFY_PEER_SHUTDOWN: sctp_notify_shutdown_event(stcb); break; From owner-svn-src-all@FreeBSD.ORG Sun May 13 17:32:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 257811065670; Sun, 13 May 2012 17:32:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1016C8FC14; Sun, 13 May 2012 17:32:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DHWCUm093477; Sun, 13 May 2012 17:32:12 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DHWCAd093475; Sun, 13 May 2012 17:32:12 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205131732.q4DHWCAd093475@svn.freebsd.org> From: Andriy Gapon Date: Sun, 13 May 2012 17:32:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235413 - in stable/9/sys: i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 17:32:13 -0000 Author: avg Date: Sun May 13 17:32:12 2012 New Revision: 235413 URL: http://svn.freebsd.org/changeset/base/235413 Log: MFC r229854: enable stop_scheduler_on_panic by default Modified: stable/9/sys/kern/kern_shutdown.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/kern/kern_shutdown.c ============================================================================== --- stable/9/sys/kern/kern_shutdown.c Sun May 13 17:17:13 2012 (r235412) +++ stable/9/sys/kern/kern_shutdown.c Sun May 13 17:32:12 2012 (r235413) @@ -121,7 +121,7 @@ SYSCTL_INT(_kern, OID_AUTO, sync_on_pani &sync_on_panic, 0, "Do a sync before rebooting from a panic"); TUNABLE_INT("kern.sync_on_panic", &sync_on_panic); -static int stop_scheduler_on_panic = 0; +static int stop_scheduler_on_panic = 1; SYSCTL_INT(_kern, OID_AUTO, stop_scheduler_on_panic, CTLFLAG_RW | CTLFLAG_TUN, &stop_scheduler_on_panic, 0, "stop scheduler upon entering panic"); TUNABLE_INT("kern.stop_scheduler_on_panic", &stop_scheduler_on_panic); From owner-svn-src-all@FreeBSD.ORG Sun May 13 17:36:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AD3A41065708; Sun, 13 May 2012 17:36:05 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 982FA8FC14; Sun, 13 May 2012 17:36:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DHa5uj093674; Sun, 13 May 2012 17:36:05 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DHa5Yw093668; Sun, 13 May 2012 17:36:05 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205131736.q4DHa5Yw093668@svn.freebsd.org> From: Michael Tuexen Date: Sun, 13 May 2012 17:36:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235414 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 17:36:05 -0000 Author: tuexen Date: Sun May 13 17:36:04 2012 New Revision: 235414 URL: http://svn.freebsd.org/changeset/base/235414 Log: Provide the error code in SCTP_PEER_ADDR_CHANGE notifications as specified in RFC 6458. MFC after: 3 days Modified: head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_timer.c head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Sun May 13 17:32:12 2012 (r235413) +++ head/sys/netinet/sctp_indata.c Sun May 13 17:36:04 2012 (r235414) @@ -4024,7 +4024,7 @@ sctp_express_handle_sack(struct sctp_tcb /* addr came good */ net->dest_state |= SCTP_ADDR_REACHABLE; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, - SCTP_RECEIVED_SACK, (void *)net, SCTP_SO_NOT_LOCKED); + 0, (void *)net, SCTP_SO_NOT_LOCKED); } if (net == stcb->asoc.primary_destination) { if (stcb->asoc.alternate) { @@ -4831,7 +4831,7 @@ sctp_handle_sack(struct mbuf *m, int off /* addr came good */ net->dest_state |= SCTP_ADDR_REACHABLE; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, - SCTP_RECEIVED_SACK, (void *)net, SCTP_SO_NOT_LOCKED); + 0, (void *)net, SCTP_SO_NOT_LOCKED); } if (net == stcb->asoc.primary_destination) { if (stcb->asoc.alternate) { Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun May 13 17:32:12 2012 (r235413) +++ head/sys/netinet/sctp_input.c Sun May 13 17:36:04 2012 (r235414) @@ -632,7 +632,7 @@ sctp_handle_heartbeat_ack(struct sctp_he if (!(r_net->dest_state & SCTP_ADDR_REACHABLE)) { r_net->dest_state |= SCTP_ADDR_REACHABLE; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, - SCTP_HEARTBEAT_SUCCESS, (void *)r_net, SCTP_SO_NOT_LOCKED); + 0, (void *)r_net, SCTP_SO_NOT_LOCKED); } if (r_net->dest_state & SCTP_ADDR_PF) { r_net->dest_state &= ~SCTP_ADDR_PF; Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun May 13 17:32:12 2012 (r235413) +++ head/sys/netinet/sctp_output.c Sun May 13 17:36:04 2012 (r235414) @@ -3815,8 +3815,7 @@ sctp_handle_no_route(struct sctp_tcb *st if ((net->dest_state & SCTP_ADDR_REACHABLE) && stcb) { SCTPDBG(SCTP_DEBUG_OUTPUT1, "no route takes interface %p down\n", net); sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, - stcb, - SCTP_FAILED_THRESHOLD, + stcb, 0, (void *)net, so_locked); net->dest_state &= ~SCTP_ADDR_REACHABLE; Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Sun May 13 17:32:12 2012 (r235413) +++ head/sys/netinet/sctp_timer.c Sun May 13 17:36:04 2012 (r235414) @@ -101,8 +101,7 @@ sctp_threshold_management(struct sctp_in net->dest_state &= ~SCTP_ADDR_REQ_PRIMARY; net->dest_state &= ~SCTP_ADDR_PF; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, - stcb, - SCTP_FAILED_THRESHOLD, + stcb, 0, (void *)net, SCTP_SO_NOT_LOCKED); } } else if ((net->pf_threshold < net->failure_threshold) && Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sun May 13 17:32:12 2012 (r235413) +++ head/sys/netinet/sctp_usrreq.c Sun May 13 17:36:04 2012 (r235414) @@ -270,7 +270,7 @@ sctp_notify(struct sctp_inpcb *inp, net->dest_state &= ~SCTP_ADDR_REACHABLE; net->dest_state &= ~SCTP_ADDR_PF; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, - stcb, SCTP_FAILED_THRESHOLD, + stcb, 0, (void *)net, SCTP_SO_NOT_LOCKED); } SCTP_TCB_UNLOCK(stcb); @@ -4826,12 +4826,12 @@ sctp_setopt(struct socket *so, int optna if (net->dest_state & SCTP_ADDR_REACHABLE) { if (net->error_count > paddrp->spp_pathmaxrxt) { net->dest_state &= ~SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED); } } else { if (net->error_count <= paddrp->spp_pathmaxrxt) { net->dest_state |= SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED); } } net->failure_threshold = paddrp->spp_pathmaxrxt; @@ -4869,12 +4869,12 @@ sctp_setopt(struct socket *so, int optna if (net->dest_state & SCTP_ADDR_REACHABLE) { if (net->error_count > paddrp->spp_pathmaxrxt) { net->dest_state &= ~SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED); } } else { if (net->error_count <= paddrp->spp_pathmaxrxt) { net->dest_state |= SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED); } } net->failure_threshold = paddrp->spp_pathmaxrxt; @@ -5680,12 +5680,12 @@ sctp_setopt(struct socket *so, int optna if (net->dest_state & SCTP_ADDR_REACHABLE) { if (net->failure_threshold > thlds->spt_pathmaxrxt) { net->dest_state &= ~SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED); } } else { if (net->failure_threshold <= thlds->spt_pathmaxrxt) { net->dest_state |= SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED); } } net->failure_threshold = thlds->spt_pathmaxrxt; @@ -5709,12 +5709,12 @@ sctp_setopt(struct socket *so, int optna if (net->dest_state & SCTP_ADDR_REACHABLE) { if (net->failure_threshold > thlds->spt_pathmaxrxt) { net->dest_state &= ~SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED); } } else { if (net->failure_threshold <= thlds->spt_pathmaxrxt) { net->dest_state |= SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED); } } net->failure_threshold = thlds->spt_pathmaxrxt; From owner-svn-src-all@FreeBSD.ORG Sun May 13 19:25:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5CDB4106564A; Sun, 13 May 2012 19:25:22 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4833F8FC0A; Sun, 13 May 2012 19:25:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DJPM4R097049; Sun, 13 May 2012 19:25:22 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DJPMMu097047; Sun, 13 May 2012 19:25:22 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205131925.q4DJPMMu097047@svn.freebsd.org> From: Michael Tuexen Date: Sun, 13 May 2012 19:25:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235415 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 19:25:22 -0000 Author: tuexen Date: Sun May 13 19:25:21 2012 New Revision: 235415 URL: http://svn.freebsd.org/changeset/base/235415 Log: Missed to commit this in r235414. MFC after: 3 days Modified: head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Sun May 13 17:36:04 2012 (r235414) +++ head/sys/netinet6/sctp6_usrreq.c Sun May 13 19:25:21 2012 (r235415) @@ -426,8 +426,7 @@ sctp6_notify(struct sctp_inpcb *inp, net->dest_state &= ~SCTP_ADDR_REACHABLE; net->dest_state &= ~SCTP_ADDR_PF; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, - stcb, SCTP_FAILED_THRESHOLD, - (void *)net, SCTP_SO_NOT_LOCKED); + stcb, 0, (void *)net, SCTP_SO_NOT_LOCKED); } SCTP_TCB_UNLOCK(stcb); } else if ((icmph->icmp6_code == ICMP_UNREACH_PROTOCOL) || From owner-svn-src-all@FreeBSD.ORG Sun May 13 19:32:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 966C9106566C; Sun, 13 May 2012 19:32:50 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FB718FC0A; Sun, 13 May 2012 19:32:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DJWoha097311; Sun, 13 May 2012 19:32:50 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DJWoTs097302; Sun, 13 May 2012 19:32:50 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205131932.q4DJWoTs097302@svn.freebsd.org> From: Michael Tuexen Date: Sun, 13 May 2012 19:32:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235416 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 19:32:50 -0000 Author: tuexen Date: Sun May 13 19:32:49 2012 New Revision: 235416 URL: http://svn.freebsd.org/changeset/base/235416 Log: Provide in the SCTP_SEND_FAILED and SCTP_SEND_FAILED_EVENT notifications the correct ssf_error or ssfe_error as required by RFC 6458. MFC after: 3 days Modified: head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_timer.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Sun May 13 19:25:21 2012 (r235415) +++ head/sys/netinet/sctp_constants.h Sun May 13 19:32:49 2012 (r235416) @@ -460,18 +460,6 @@ __FBSDID("$FreeBSD$"); #define SCTP_HAS_NAT_SUPPORT 0xc007 #define SCTP_NAT_VTAGS 0xc008 -/* Notification error codes */ -#define SCTP_NOTIFY_DATAGRAM_UNSENT 0x0001 -#define SCTP_NOTIFY_DATAGRAM_SENT 0x0002 -#define SCTP_FAILED_THRESHOLD 0x0004 -#define SCTP_HEARTBEAT_SUCCESS 0x0008 -#define SCTP_RESPONSE_TO_USER_REQ 0x0010 -#define SCTP_INTERNAL_ERROR 0x0020 -#define SCTP_SHUTDOWN_GUARD_EXPIRES 0x0040 -#define SCTP_RECEIVED_SACK 0x0080 -#define SCTP_PEER_FAULTY 0x0100 -#define SCTP_ICMP_REFUSED 0x0200 - /* bits for TOS field */ #define SCTP_ECT0_BIT 0x02 #define SCTP_ECT1_BIT 0x01 @@ -755,27 +743,28 @@ __FBSDID("$FreeBSD$"); #define SCTP_NOTIFY_ASSOC_DOWN 2 #define SCTP_NOTIFY_INTERFACE_DOWN 3 #define SCTP_NOTIFY_INTERFACE_UP 4 -#define SCTP_NOTIFY_DG_FAIL 5 -#define SCTP_NOTIFY_SPECIAL_SP_FAIL 6 -#define SCTP_NOTIFY_ASSOC_LOC_ABORTED 7 -#define SCTP_NOTIFY_ASSOC_REM_ABORTED 8 -#define SCTP_NOTIFY_ASSOC_RESTART 9 -#define SCTP_NOTIFY_PEER_SHUTDOWN 10 -#define SCTP_NOTIFY_ASCONF_ADD_IP 11 -#define SCTP_NOTIFY_ASCONF_DELETE_IP 12 -#define SCTP_NOTIFY_ASCONF_SET_PRIMARY 13 -#define SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION 14 -#define SCTP_NOTIFY_INTERFACE_CONFIRMED 15 -#define SCTP_NOTIFY_STR_RESET_RECV 16 -#define SCTP_NOTIFY_STR_RESET_SEND 17 -#define SCTP_NOTIFY_STR_RESET_FAILED_OUT 18 -#define SCTP_NOTIFY_STR_RESET_FAILED_IN 19 -#define SCTP_NOTIFY_STR_RESET_DENIED_OUT 20 -#define SCTP_NOTIFY_STR_RESET_DENIED_IN 21 -#define SCTP_NOTIFY_AUTH_NEW_KEY 22 -#define SCTP_NOTIFY_AUTH_FREE_KEY 23 -#define SCTP_NOTIFY_NO_PEER_AUTH 24 -#define SCTP_NOTIFY_SENDER_DRY 25 +#define SCTP_NOTIFY_SENT_DG_FAIL 5 +#define SCTP_NOTIFY_UNSENT_DG_FAIL 6 +#define SCTP_NOTIFY_SPECIAL_SP_FAIL 7 +#define SCTP_NOTIFY_ASSOC_LOC_ABORTED 8 +#define SCTP_NOTIFY_ASSOC_REM_ABORTED 9 +#define SCTP_NOTIFY_ASSOC_RESTART 10 +#define SCTP_NOTIFY_PEER_SHUTDOWN 11 +#define SCTP_NOTIFY_ASCONF_ADD_IP 12 +#define SCTP_NOTIFY_ASCONF_DELETE_IP 13 +#define SCTP_NOTIFY_ASCONF_SET_PRIMARY 14 +#define SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION 15 +#define SCTP_NOTIFY_INTERFACE_CONFIRMED 16 +#define SCTP_NOTIFY_STR_RESET_RECV 17 +#define SCTP_NOTIFY_STR_RESET_SEND 18 +#define SCTP_NOTIFY_STR_RESET_FAILED_OUT 19 +#define SCTP_NOTIFY_STR_RESET_FAILED_IN 20 +#define SCTP_NOTIFY_STR_RESET_DENIED_OUT 21 +#define SCTP_NOTIFY_STR_RESET_DENIED_IN 22 +#define SCTP_NOTIFY_AUTH_NEW_KEY 23 +#define SCTP_NOTIFY_AUTH_FREE_KEY 24 +#define SCTP_NOTIFY_NO_PEER_AUTH 25 +#define SCTP_NOTIFY_SENDER_DRY 26 /* This is the value for messages that are NOT completely * copied down where we will start to split the message. Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Sun May 13 19:25:21 2012 (r235415) +++ head/sys/netinet/sctp_indata.c Sun May 13 19:32:49 2012 (r235416) @@ -3194,8 +3194,7 @@ sctp_strike_gap_ack_chunks(struct sctp_t if (timevalcmp(&now, &tp1->rec.data.timetodrop, >)) { /* Yes so drop it */ if (tp1->data != NULL) { - (void)sctp_release_pr_sctp_chunk(stcb, tp1, - (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), + (void)sctp_release_pr_sctp_chunk(stcb, tp1, 1, SCTP_SO_NOT_LOCKED); } continue; @@ -3452,8 +3451,7 @@ sctp_strike_gap_ack_chunks(struct sctp_t if (tp1->snd_count > tp1->rec.data.timetodrop.tv_sec) { /* Yes, so drop it */ if (tp1->data != NULL) { - (void)sctp_release_pr_sctp_chunk(stcb, tp1, - (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), + (void)sctp_release_pr_sctp_chunk(stcb, tp1, 1, SCTP_SO_NOT_LOCKED); } /* Make sure to flag we had a FR */ @@ -3632,8 +3630,7 @@ sctp_try_advance_peer_ack_point(struct s /* Yes so drop it */ if (tp1->data) { (void)sctp_release_pr_sctp_chunk(stcb, tp1, - (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), - SCTP_SO_NOT_LOCKED); + 1, SCTP_SO_NOT_LOCKED); } } else { /* Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun May 13 19:25:21 2012 (r235415) +++ head/sys/netinet/sctp_input.c Sun May 13 19:32:49 2012 (r235416) @@ -300,8 +300,8 @@ sctp_process_init(struct sctp_init_chunk asoc->send_queue_cnt--; if (chk->data != NULL) { sctp_free_bufspace(stcb, asoc, chk, 1); - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_UNSENT, chk, SCTP_SO_NOT_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_UNSENT_DG_FAIL, stcb, + 0, chk, SCTP_SO_NOT_LOCKED); if (chk->data) { sctp_m_freem(chk->data); chk->data = NULL; @@ -318,8 +318,7 @@ sctp_process_init(struct sctp_init_chunk TAILQ_REMOVE(&outs->outqueue, sp, next); asoc->stream_queue_cnt--; sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, - stcb, SCTP_NOTIFY_DATAGRAM_UNSENT, - sp, SCTP_SO_NOT_LOCKED); + stcb, 0, sp, SCTP_SO_NOT_LOCKED); if (sp->data) { sctp_m_freem(sp->data); sp->data = NULL; @@ -1006,7 +1005,7 @@ sctp_handle_shutdown_ack(struct sctp_shu if (!TAILQ_EMPTY(&asoc->send_queue) || !TAILQ_EMPTY(&asoc->sent_queue) || !stcb->asoc.ss_functions.sctp_ss_is_empty(stcb, asoc)) { - sctp_report_all_outbound(stcb, 0, SCTP_SO_NOT_LOCKED); + sctp_report_all_outbound(stcb, 0, 0, SCTP_SO_NOT_LOCKED); } /* stop the timer */ sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_9); @@ -1889,7 +1888,7 @@ sctp_process_cookie_existing(struct mbuf /* send up all the data */ SCTP_TCB_SEND_LOCK(stcb); - sctp_report_all_outbound(stcb, 1, SCTP_SO_NOT_LOCKED); + sctp_report_all_outbound(stcb, 0, 1, SCTP_SO_NOT_LOCKED); for (i = 0; i < stcb->asoc.streamoutcnt; i++) { stcb->asoc.strmout[i].stream_no = i; stcb->asoc.strmout[i].next_sequence_sent = 0; @@ -3176,7 +3175,7 @@ sctp_handle_shutdown_complete(struct sct if (!TAILQ_EMPTY(&asoc->send_queue) || !TAILQ_EMPTY(&asoc->sent_queue) || !stcb->asoc.ss_functions.sctp_ss_is_empty(stcb, asoc)) { - sctp_report_all_outbound(stcb, 0, SCTP_SO_NOT_LOCKED); + sctp_report_all_outbound(stcb, 0, 0, SCTP_SO_NOT_LOCKED); } } /* stop the timer */ Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun May 13 19:25:21 2012 (r235415) +++ head/sys/netinet/sctp_output.c Sun May 13 19:32:49 2012 (r235416) @@ -6091,14 +6091,14 @@ sctp_prune_prsctp(struct sctp_tcb *stcb, * if the mbuf is here */ int ret_spc; - int cause; + uint8_t sent; if (chk->sent > SCTP_DATAGRAM_UNSENT) - cause = SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT; + sent = 1; else - cause = SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_UNSENT; + sent = 0; ret_spc = sctp_release_pr_sctp_chunk(stcb, chk, - cause, + sent, SCTP_SO_LOCKED); freed_spc += ret_spc; if (freed_spc >= dataout) { @@ -6121,8 +6121,7 @@ sctp_prune_prsctp(struct sctp_tcb *stcb, int ret_spc; ret_spc = sctp_release_pr_sctp_chunk(stcb, chk, - SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_UNSENT, - SCTP_SO_LOCKED); + 0, SCTP_SO_LOCKED); freed_spc += ret_spc; if (freed_spc >= dataout) { Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun May 13 19:25:21 2012 (r235415) +++ head/sys/netinet/sctp_pcb.c Sun May 13 19:32:49 2012 (r235416) @@ -4990,8 +4990,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, if (so) { /* Still an open socket - report */ sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_UNSENT, - (void *)sp, SCTP_SO_LOCKED); + 0, (void *)sp, SCTP_SO_LOCKED); } if (sp->data) { sctp_m_freem(sp->data); @@ -5051,8 +5050,8 @@ sctp_free_assoc(struct sctp_inpcb *inp, if (chk->data) { if (so) { /* Still a socket? */ - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_UNSENT, chk, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_UNSENT_DG_FAIL, stcb, + 0, chk, SCTP_SO_LOCKED); } if (chk->data) { sctp_m_freem(chk->data); @@ -5075,8 +5074,8 @@ sctp_free_assoc(struct sctp_inpcb *inp, if (chk->data) { if (so) { /* Still a socket? */ - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_SENT, chk, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_SENT_DG_FAIL, stcb, + 0, chk, SCTP_SO_LOCKED); } if (chk->data) { sctp_m_freem(chk->data); Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Sun May 13 19:25:21 2012 (r235415) +++ head/sys/netinet/sctp_timer.c Sun May 13 19:32:49 2012 (r235416) @@ -614,7 +614,7 @@ start_again: if (chk->data) { (void)sctp_release_pr_sctp_chunk(stcb, chk, - (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), + 1, SCTP_SO_NOT_LOCKED); cnt_abandoned++; } @@ -627,7 +627,7 @@ start_again: if (chk->data) { (void)sctp_release_pr_sctp_chunk(stcb, chk, - (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), + 1, SCTP_SO_NOT_LOCKED); cnt_abandoned++; } Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun May 13 19:25:21 2012 (r235415) +++ head/sys/netinet/sctputil.c Sun May 13 19:32:49 2012 (r235416) @@ -2810,7 +2810,7 @@ sctp_notify_peer_addr_change(struct sctp static void -sctp_notify_send_failed(struct sctp_tcb *stcb, uint32_t error, +sctp_notify_send_failed(struct sctp_tcb *stcb, uint8_t sent, uint32_t error, struct sctp_tmit_chunk *chk, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED @@ -2844,10 +2844,11 @@ sctp_notify_send_failed(struct sctp_tcb if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { ssfe = mtod(m_notify, struct sctp_send_failed_event *); ssfe->ssfe_type = SCTP_SEND_FAILED_EVENT; - if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) - ssfe->ssfe_flags = SCTP_DATA_UNSENT; - else + if (sent) { ssfe->ssfe_flags = SCTP_DATA_SENT; + } else { + ssfe->ssfe_flags = SCTP_DATA_UNSENT; + } ssfe->ssfe_length = length; ssfe->ssfe_error = error; /* not exactly what the user sent in, but should be close :) */ @@ -2862,10 +2863,11 @@ sctp_notify_send_failed(struct sctp_tcb } else { ssf = mtod(m_notify, struct sctp_send_failed *); ssf->ssf_type = SCTP_SEND_FAILED; - if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) - ssf->ssf_flags = SCTP_DATA_UNSENT; - else + if (sent) { ssf->ssf_flags = SCTP_DATA_SENT; + } else { + ssf->ssf_flags = SCTP_DATA_UNSENT; + } ssf->ssf_length = length; ssf->ssf_error = error; /* not exactly what the user sent in, but should be close :) */ @@ -2954,10 +2956,7 @@ sctp_notify_send_failed2(struct sctp_tcb if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { ssfe = mtod(m_notify, struct sctp_send_failed_event *); ssfe->ssfe_type = SCTP_SEND_FAILED; - if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) - ssfe->ssfe_flags = SCTP_DATA_UNSENT; - else - ssfe->ssfe_flags = SCTP_DATA_SENT; + ssfe->ssfe_flags = SCTP_DATA_UNSENT; ssfe->ssfe_length = length; ssfe->ssfe_error = error; /* not exactly what the user sent in, but should be close :) */ @@ -2976,10 +2975,7 @@ sctp_notify_send_failed2(struct sctp_tcb } else { ssf = mtod(m_notify, struct sctp_send_failed *); ssf->ssf_type = SCTP_SEND_FAILED; - if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) - ssf->ssf_flags = SCTP_DATA_UNSENT; - else - ssf->ssf_flags = SCTP_DATA_SENT; + ssf->ssf_flags = SCTP_DATA_UNSENT; ssf->ssf_length = length; ssf->ssf_error = error; /* not exactly what the user sent in, but should be close :) */ @@ -3543,8 +3539,12 @@ sctp_ulp_notify(uint32_t notification, s sctp_notify_send_failed2(stcb, error, (struct sctp_stream_queue_pending *)data, so_locked); break; - case SCTP_NOTIFY_DG_FAIL: - sctp_notify_send_failed(stcb, error, + case SCTP_NOTIFY_SENT_DG_FAIL: + sctp_notify_send_failed(stcb, 1, error, + (struct sctp_tmit_chunk *)data, so_locked); + break; + case SCTP_NOTIFY_UNSENT_DG_FAIL: + sctp_notify_send_failed(stcb, 0, error, (struct sctp_tmit_chunk *)data, so_locked); break; case SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION: @@ -3642,7 +3642,7 @@ sctp_ulp_notify(uint32_t notification, s } void -sctp_report_all_outbound(struct sctp_tcb *stcb, int holds_lock, int so_locked +sctp_report_all_outbound(struct sctp_tcb *stcb, uint16_t error, int holds_lock, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -3677,8 +3677,8 @@ sctp_report_all_outbound(struct sctp_tcb asoc->sent_queue_cnt--; if (chk->data != NULL) { sctp_free_bufspace(stcb, asoc, chk, 1); - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_SENT, chk, so_locked); + sctp_ulp_notify(SCTP_NOTIFY_SENT_DG_FAIL, stcb, + error, chk, so_locked); if (chk->data) { sctp_m_freem(chk->data); chk->data = NULL; @@ -3693,8 +3693,8 @@ sctp_report_all_outbound(struct sctp_tcb asoc->send_queue_cnt--; if (chk->data != NULL) { sctp_free_bufspace(stcb, asoc, chk, 1); - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_UNSENT, chk, so_locked); + sctp_ulp_notify(SCTP_NOTIFY_UNSENT_DG_FAIL, stcb, + error, chk, so_locked); if (chk->data) { sctp_m_freem(chk->data); chk->data = NULL; @@ -3714,7 +3714,7 @@ sctp_report_all_outbound(struct sctp_tcb sctp_free_spbufspace(stcb, asoc, sp); if (sp->data) { sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_UNSENT, (void *)sp, so_locked); + error, (void *)sp, so_locked); if (sp->data) { sctp_m_freem(sp->data); sp->data = NULL; @@ -3757,7 +3757,7 @@ sctp_abort_notification(struct sctp_tcb return; } /* Tell them we lost the asoc */ - sctp_report_all_outbound(stcb, 1, so_locked); + sctp_report_all_outbound(stcb, error, 1, so_locked); if (from_peer) { sctp_ulp_notify(SCTP_NOTIFY_ASSOC_REM_ABORTED, stcb, error, abort, so_locked); } else { @@ -4655,7 +4655,7 @@ sctp_free_bufspace(struct sctp_tcb *stcb int sctp_release_pr_sctp_chunk(struct sctp_tcb *stcb, struct sctp_tmit_chunk *tp1, - int reason, int so_locked + uint8_t sent, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -4682,7 +4682,11 @@ sctp_release_pr_sctp_chunk(struct sctp_t sctp_free_bufspace(stcb, &stcb->asoc, tp1, 1); stcb->asoc.peers_rwnd += tp1->send_size; stcb->asoc.peers_rwnd += SCTP_BASE_SYSCTL(sctp_peer_chunk_oh); - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, reason, tp1, so_locked); + if (sent) { + sctp_ulp_notify(SCTP_NOTIFY_SENT_DG_FAIL, stcb, 0, tp1, so_locked); + } else { + sctp_ulp_notify(SCTP_NOTIFY_UNSENT_DG_FAIL, stcb, 0, tp1, so_locked); + } if (tp1->data) { sctp_m_freem(tp1->data); tp1->data = NULL; @@ -4729,7 +4733,11 @@ sctp_release_pr_sctp_chunk(struct sctp_t chk = tp1; ret_sz += tp1->book_size; sctp_free_bufspace(stcb, &stcb->asoc, tp1, 1); - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, reason, tp1, so_locked); + if (sent) { + sctp_ulp_notify(SCTP_NOTIFY_SENT_DG_FAIL, stcb, 0, tp1, so_locked); + } else { + sctp_ulp_notify(SCTP_NOTIFY_UNSENT_DG_FAIL, stcb, 0, tp1, so_locked); + } if (tp1->data) { sctp_m_freem(tp1->data); tp1->data = NULL; Modified: head/sys/netinet/sctputil.h ============================================================================== --- head/sys/netinet/sctputil.h Sun May 13 19:25:21 2012 (r235415) +++ head/sys/netinet/sctputil.h Sun May 13 19:32:49 2012 (r235416) @@ -170,7 +170,7 @@ sctp_pull_off_control_to_new_inp(struct void sctp_stop_timers_for_shutdown(struct sctp_tcb *); void -sctp_report_all_outbound(struct sctp_tcb *, int, int +sctp_report_all_outbound(struct sctp_tcb *, uint16_t, int, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -244,7 +244,7 @@ void sctp_print_address_pkt(struct ip *, int sctp_release_pr_sctp_chunk(struct sctp_tcb *, struct sctp_tmit_chunk *, - int, int + uint8_t, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif From owner-svn-src-all@FreeBSD.ORG Sun May 13 20:28:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 242DE106566C; Sun, 13 May 2012 20:28:44 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E1608FC17; Sun, 13 May 2012 20:28:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DKShIF099109; Sun, 13 May 2012 20:28:43 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DKShXO099107; Sun, 13 May 2012 20:28:43 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201205132028.q4DKShXO099107@svn.freebsd.org> From: Rick Macklem Date: Sun, 13 May 2012 20:28:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235417 - in stable/8/sys: fs/nfsclient i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 20:28:44 -0000 Author: rmacklem Date: Sun May 13 20:28:43 2012 New Revision: 235417 URL: http://svn.freebsd.org/changeset/base/235417 Log: MFC: r234742 It was reported via email that some non-FreeBSD NFS servers do not include file attributes in the reply to an NFS create RPC under certain circumstances. This resulted in a vnode of type VNON that was not usable. This patch adds an NFS getattr RPC to nfs_create() for this case, to fix the problem. It was tested by the person that reported the problem and confirmed to fix this case for their server. Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvnops.c Sun May 13 19:32:49 2012 (r235416) +++ stable/8/sys/fs/nfsclient/nfs_clvnops.c Sun May 13 20:28:43 2012 (r235417) @@ -1494,7 +1494,10 @@ again: (void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1); if (!error) { newvp = NFSTOV(np); - if (attrflag) + if (attrflag == 0) + error = nfsrpc_getattr(newvp, cnp->cn_cred, + cnp->cn_thread, &nfsva, NULL); + if (error == 0) error = nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL, 0, 1); } From owner-svn-src-all@FreeBSD.ORG Sun May 13 22:27:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F709106567D; Sun, 13 May 2012 22:27:55 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40C648FC1E; Sun, 13 May 2012 22:27:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DMRtcT002860; Sun, 13 May 2012 22:27:55 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DMRtqZ002856; Sun, 13 May 2012 22:27:55 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205132227.q4DMRtqZ002856@svn.freebsd.org> From: Michael Tuexen Date: Sun, 13 May 2012 22:27:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235418 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 22:27:55 -0000 Author: tuexen Date: Sun May 13 22:27:54 2012 New Revision: 235418 URL: http://svn.freebsd.org/changeset/base/235418 Log: Support SCTP_REMOTE_ERROR notification. MFC after: 3 days Modified: head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_input.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Sun May 13 20:28:43 2012 (r235417) +++ head/sys/netinet/sctp_constants.h Sun May 13 22:27:54 2012 (r235418) @@ -765,6 +765,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_NOTIFY_AUTH_FREE_KEY 24 #define SCTP_NOTIFY_NO_PEER_AUTH 25 #define SCTP_NOTIFY_SENDER_DRY 26 +#define SCTP_NOTIFY_REMOTE_ERROR 27 /* This is the value for messages that are NOT completely * copied down where we will start to split the message. Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun May 13 20:28:43 2012 (r235417) +++ head/sys/netinet/sctp_input.c Sun May 13 22:27:54 2012 (r235418) @@ -1111,7 +1111,7 @@ sctp_handle_error(struct sctp_chunkhdr * { int chklen; struct sctp_paramhdr *phdr; - uint16_t error_type; + uint16_t error, error_type; uint16_t error_len; struct sctp_association *asoc; int adjust; @@ -1126,6 +1126,7 @@ sctp_handle_error(struct sctp_chunkhdr * phdr = (struct sctp_paramhdr *)((caddr_t)ch + sizeof(struct sctp_chunkhdr)); chklen = ntohs(ch->chunk_length) - sizeof(struct sctp_chunkhdr); + error = 0; while ((size_t)chklen >= sizeof(struct sctp_paramhdr)) { /* Process an Error Cause */ error_type = ntohs(phdr->param_type); @@ -1136,6 +1137,10 @@ sctp_handle_error(struct sctp_chunkhdr * chklen, error_len); return (0); } + if (error == 0) { + /* report the first error cause */ + error = error_type; + } switch (error_type) { case SCTP_CAUSE_INVALID_STREAM: case SCTP_CAUSE_MISSING_PARAM: @@ -1252,6 +1257,7 @@ sctp_handle_error(struct sctp_chunkhdr * chklen -= adjust; phdr = (struct sctp_paramhdr *)((caddr_t)phdr + adjust); } + sctp_ulp_notify(SCTP_NOTIFY_REMOTE_ERROR, stcb, error, ch, SCTP_SO_NOT_LOCKED); return (0); } Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun May 13 20:28:43 2012 (r235417) +++ head/sys/netinet/sctputil.c Sun May 13 22:27:54 2012 (r235418) @@ -3464,6 +3464,63 @@ sctp_notify_stream_reset(struct sctp_tcb } +static void +sctp_notify_remote_error(struct sctp_tcb *stcb, uint16_t error, struct sctp_error_chunk *chunk) +{ + struct mbuf *m_notify; + struct sctp_remote_error *sre; + struct sctp_queued_to_read *control; + size_t notif_len, chunk_len; + + if ((stcb == NULL) || + sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVPEERERR)) { + return; + } + if (chunk != NULL) { + chunk_len = htons(chunk->ch.chunk_length); + } else { + chunk_len = 0; + } + notif_len = sizeof(struct sctp_remote_error) + chunk_len; + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + /* Retry with smaller value. */ + notif_len = sizeof(struct sctp_remote_error); + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + return; + } + } + SCTP_BUF_NEXT(m_notify) = NULL; + sre = mtod(m_notify, struct sctp_remote_error *); + sre->sre_type = SCTP_REMOTE_ERROR; + sre->sre_flags = 0; + sre->sre_length = sizeof(struct sctp_remote_error); + sre->sre_error = error; + sre->sre_assoc_id = sctp_get_associd(stcb); + if (notif_len > sizeof(struct sctp_remote_error)) { + memcpy(sre->sre_data, chunk, chunk_len); + sre->sre_length += chunk_len; + } + SCTP_BUF_LEN(m_notify) = sre->sre_length; + control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination, + 0, 0, stcb->asoc.context, 0, 0, 0, + m_notify); + if (control != NULL) { + control->length = SCTP_BUF_LEN(m_notify); + /* not that we need this */ + control->tail_mbuf = m_notify; + control->spec_flags = M_NOTIFICATION; + sctp_add_to_readq(stcb->sctp_ep, stcb, + control, + &stcb->sctp_socket->so_rcv, 1, + SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); + } else { + sctp_m_freem(m_notify); + } +} + + void sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, uint32_t error, void *data, int so_locked @@ -3634,6 +3691,9 @@ sctp_ulp_notify(uint32_t notification, s case SCTP_NOTIFY_SENDER_DRY: sctp_notify_sender_dry_event(stcb, so_locked); break; + case SCTP_NOTIFY_REMOTE_ERROR: + sctp_notify_remote_error(stcb, error, data); + break; default: SCTPDBG(SCTP_DEBUG_UTIL1, "%s: unknown notification %xh (%u)\n", __FUNCTION__, notification, notification); From owner-svn-src-all@FreeBSD.ORG Sun May 13 23:27:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1ADC5106564A; Sun, 13 May 2012 23:27:07 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 057678FC12; Sun, 13 May 2012 23:27:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DNR6Pm004754; Sun, 13 May 2012 23:27:06 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4DNR6PU004752; Sun, 13 May 2012 23:27:06 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205132327.q4DNR6PU004752@svn.freebsd.org> From: Eitan Adler Date: Sun, 13 May 2012 23:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235419 - head/sys/geom/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 23:27:07 -0000 Author: eadler Date: Sun May 13 23:27:06 2012 New Revision: 235419 URL: http://svn.freebsd.org/changeset/base/235419 Log: Add missing period at the end of the error message Submitted by: pjd Approved by: cperciva (implicit) MFC after: 3 days X-MFC-With: r235201 Modified: head/sys/geom/eli/g_eli_integrity.c Modified: head/sys/geom/eli/g_eli_integrity.c ============================================================================== --- head/sys/geom/eli/g_eli_integrity.c Sun May 13 22:27:54 2012 (r235418) +++ head/sys/geom/eli/g_eli_integrity.c Sun May 13 23:27:06 2012 (r235419) @@ -206,7 +206,7 @@ g_eli_auth_read_done(struct cryptop *crp */ if (coroff != -1) { G_ELI_DEBUG(0, "%s: Failed to authenticate %jd " - "bytes of data at offset %jd", + "bytes of data at offset %jd.", sc->sc_name, (intmax_t)corsize, (intmax_t)coroff); coroff = -1; @@ -222,7 +222,7 @@ g_eli_auth_read_done(struct cryptop *crp /* Report previous corruption if there was one. */ if (coroff != -1) { G_ELI_DEBUG(0, "%s: Failed to authenticate %jd " - "bytes of data at offset %jd", + "bytes of data at offset %jd.", sc->sc_name, (intmax_t)corsize, (intmax_t)coroff); } } From owner-svn-src-all@FreeBSD.ORG Mon May 14 00:59:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B42C1065670; Mon, 14 May 2012 00:59:45 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 659F28FC0C; Mon, 14 May 2012 00:59:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4E0xjVw007615; Mon, 14 May 2012 00:59:45 GMT (envelope-from philip@svn.freebsd.org) Received: (from philip@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4E0xjuQ007613; Mon, 14 May 2012 00:59:45 GMT (envelope-from philip@svn.freebsd.org) Message-Id: <201205140059.q4E0xjuQ007613@svn.freebsd.org> From: Philip Paeps Date: Mon, 14 May 2012 00:59:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235420 - vendor/pciids/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 00:59:45 -0000 Author: philip Date: Mon May 14 00:59:44 2012 New Revision: 235420 URL: http://svn.freebsd.org/changeset/base/235420 Log: Import a recent snapshot of the PCI ID Repository. Modified: vendor/pciids/dist/pci.ids Modified: vendor/pciids/dist/pci.ids ============================================================================== --- vendor/pciids/dist/pci.ids Sun May 13 23:27:06 2012 (r235419) +++ vendor/pciids/dist/pci.ids Mon May 14 00:59:44 2012 (r235420) @@ -1,11 +1,11 @@ # # List of PCI ID's # -# Version: 2011.07.14 -# Date: 2011-07-14 03:15:06 +# Version: 2012.05.07 +# Date: 2012-05-07 03:15:01 # # Maintained by Martin Mares and other volunteers from the -# PCI ID Project at http://pciids.sf.net/. +# PCI ID Project at http://pci-ids.ucw.cz/. # # New data are always welcome, especially if they are accurate. If you have # anything to contribute, please follow the instructions at the web site. @@ -74,6 +74,7 @@ 02ac SpeedStream 1012 1012 PCMCIA 10/100 Ethernet Card [RTL81xx] 02e0 XFX Pine Group Inc +0303 Hewlett-Packard Company (Wrong ID) 0308 ZyXEL Communications Corporation 0315 SK-Electronics Co., Ltd. 0357 TTTech AG @@ -92,7 +93,7 @@ 8519 OV519 series 05e3 CyberDoor 0701 CBD516 -066f Sigmatel Inc. +066f SigmaTel 3410 SMTP3410 3500 SMTP3500 0675 Dynalink @@ -151,8 +152,6 @@ 0906 RCB24FXX 24-channel modular analog telphony card 0a06 RCB672FXX 672-channel modular analog telphony card 0b3d Brontes Technologies -0b49 ASCII Corporation - 064f Trance Vibrator 0ccd TerraTec Electronic GmbH 0038 Cinergy T^2 DVB-T Receiver 0e11 Compaq Computer Corporation @@ -376,6 +375,8 @@ 0059 MegaRAID SAS 8208ELP/8208ELP 005a SAS1066E PCI-Express Fusion-MPT SAS 005b MegaRAID SAS 2208 [Thunderbolt] + 1014 040b ServeRAID M5110 SAS/SATA Controller + 1014 0412 ServeRAID M5110e SAS/SATA Controller 1028 1f2d PERC H810 Adapter 1028 1f30 PERC H710 Embedded 1028 1f31 PERC H710P Adapter @@ -384,6 +385,7 @@ 1028 1f35 PERC H710 Adapter 1028 1f37 PERC H710 Mini (for blades) 1028 1f38 PERC H710 Mini (for monolithics) + 8086 3513 RMS25PB080 RAID Controller 005c SAS1064A PCI-X Fusion-MPT SAS 005d MegaRAID SAS-3 3108 [Invader] 005e SAS1066 PCI-X Fusion-MPT SAS @@ -417,13 +419,14 @@ 8086 1010 RAID Controller SRCSATA28E 8086 34cc Integrated RAID Controller SROMBSAS28E 8086 34cd Integrated RAID Controller SROMBSAS28E + 8086 3505 Integrated RAID Controller SROMBSASMP2 0062 SAS1078 PCI-Express Fusion-MPT SAS 1000 0062 SAS1078 PCI-Express Fusion-MPT SAS 0064 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] 0065 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] 006e SAS2308 PCI-Express Fusion-MPT SAS-2 0070 SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire] - 0071 MR SAS HBA + 0071 MR SAS HBA 2004 0072 SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] 1028 1f1c 6Gbps SAS HBA Adapter 1028 1f1d PERC H200 Adapter @@ -432,7 +435,7 @@ 1028 1f20 PERC H200 Embedded 1028 1f22 Internal Tape Adapter 8086 350f RMS2LL040 RAID Controller - 0073 MegaRAID SAS 9240 + 0073 MegaRAID SAS 2008 [Falcon] 1000 9240 MegaRAID SAS 9240-8i 1000 9241 MegaRAID SAS 9240-4i 1014 03b1 ServeRAID M1015 SAS/SATA Controller @@ -446,6 +449,8 @@ 1054 3035 LSI MegaRAID SAS 9240-8i 1137 0072 2004 iMR ROMB 1137 0073 2008 ROMB + 1137 00b0 UCSC RAID SAS 2008M-8i + 1137 00b1 UCSC RAID SAS 2008M-8i 15d9 0400 Supermicro SMC2008-iMR 1734 1177 RAID Ctrl SAS 6G 0/1 (D2607) 8086 350d RMS2AF040 RAID Controller @@ -462,6 +467,8 @@ 1000 9262 MegaRAID SAS 9262-8i 1000 9263 MegaRAID SAS 9261-8i 1000 9264 MegaRAID SAS 9264-8i + 1000 9267 MegaRAID SAS 9260CV-4i + 1000 9268 MegaRAID SAS 9260CV-8i 1000 9275 MegaRAID SAS 9280-8ex 1000 9276 MR9260-16i 1000 9280 MegaRAID SAS 9280-8e @@ -496,6 +503,7 @@ 0085 SAS2208 PCI-Express Fusion-MPT SAS-2 0086 SAS2308 PCI-Express Fusion-MPT SAS-2 0087 SAS2308 PCI-Express Fusion-MPT SAS-2 + 1590 0044 H220i 008f 53c875J 1092 8000 FirePort 40 SCSI Controller 1092 8760 FirePort 40 Dual SCSI Host Adapter @@ -531,7 +539,7 @@ 8086 3008 MegaRAID RAID Controller SRCS28X 8086 3431 MegaRAID RAID Controller Alief SROMBU42E 8086 3499 MegaRAID RAID Controller Harwich SROMBU42E - 0411 MegaRAID SAS + 0411 MegaRAID SAS 1068 1000 1001 MegaRAID SAS 8408E 1000 1002 MegaRAID SAS 8480E 1000 1003 MegaRAID SAS 8344ELP @@ -550,7 +558,7 @@ 8086 3500 SROMBSAS18E RAID Controller 8086 3501 SROMBSAS18E RAID Controller 8086 3504 SROMBSAS18E RAID Controller - 0413 MegaRAID SAS Verde ZCR + 0413 MegaRAID SAS 1068 [Verde ZCR] 1000 1005 MegaRAID SAS 8300XLP 0621 FC909 Fibre Channel Adapter 0622 FC929 Fibre Channel Adapter @@ -599,19 +607,22 @@ 0016 PCI-MFB Analogue I/O board 0017 PROTO-3 PCI Prototyping board 9100 INI-9100/9100W SCSI Host -1002 ATI Technologies Inc +# nee ATI Technologies Inc. +1002 Advanced Micro Devices [AMD] nee ATI 1314 Wrestler HDMI Audio [Radeon HD 6250/6310] + 174b 1001 Sapphire PURE Fusion Mini + 1714 BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series] 3150 M24 1P [Radeon Mobility X600] 103c 0934 nx8220 3151 M24 [FireMV 2400] - 3152 M22 [Radeon Mobility X300] + 3152 RV370 [Mobility Radeon X300] 3154 M24GL [Mobility FireGL V3200] 3171 M24 [FireMV 2400] (Secondary) 3e50 RV380 0x3e50 [Radeon X600] 3e54 RV380 0x3e54 [FireGL V3200] 3e70 RV380 [Radeon X600] (Secondary) - 4136 Radeon IGP 320 M - 4137 Radeon IGP330/340/350 + 4136 RS100 [Radeon IGP320(M)] + 4137 RS200 [Radeon IGP330/340/350] 4144 R300 AD [Radeon 9500 Pro] 4145 R300 AE [Radeon 9700 Pro] 4146 R300 AF [Radeon 9700 Pro] @@ -651,7 +662,7 @@ 4164 R300 AD [Radeon 9500 Pro] (Secondary) 4165 R300 AE [Radeon 9700 Pro] (Secondary) 4166 R300 AF [Radeon 9700 Pro] (Secondary) - 4168 Radeon R350 [Radeon 9800] (Secondary) + 4168 R350 [Radeon 9800] (Secondary) 4170 RV350 AP [Radeon 9600] (Secondary) 1002 0003 R9600 Pro secondary (Asus OEM for HP) 1002 4723 All-in-Wonder 2006 AGP Edition (Secondary) @@ -671,15 +682,15 @@ 1787 4003 Radeon 9600 XT (Secondary) 4173 RV350 AS [Radeon 9550] (Secondary) 1043 010d A9550GE/TD (Secondary) - 4237 Radeon 7000 IGP + 4237 RS250 [Radeon Mobility 7000 IGP] 4242 R200 BB [Radeon All in Wonder 8500DV] 1002 02aa Radeon 8500 AIW DV Edition 4243 R200 BC [Radeon All in Wonder 8500] - 4336 Radeon Mobility U1 + 4336 RS100 [Radeon IGP320M] 1002 4336 Pavilion ze4300 ATI Radeon Mobility U1 (IGP 320 M) 103c 0024 Pavilion ze4400 builtin Video 161f 2029 eMachines M5312 builtin Video - 4337 Radeon IGP 330M/340M/350M + 4337 RS200 [Radeon IGP330M/340M/350M] 1014 053a ThinkPad R40e 103c 0850 Radeon IGP 345M 4341 IXP150 AC'97 Audio Controller @@ -737,7 +748,7 @@ 103c 2a20 Pavilion t3030.de Desktop PC 103c 308b MX6125 1462 7217 Aspire L250 - 4378 SB400 AC'97 Modem Controller + 4378 IXP SB400 AC'97 Modem Controller 1025 0080 Aspire 5024WLMMi 103c 308b MX6125 1462 0131 MS-1013 Notebook @@ -759,7 +770,7 @@ 1458 b005 Gigabyte GA-MA69G-S3H Motherboard 1462 7327 K9AG Neo2 17f2 5999 KI690-AM2 Motherboard - 4381 SB600 Raid-5 SATA + 4381 SB400 SATA Controller (RAID 5 mode) 4382 SB600 AC97 Audio 4383 SBx00 Azalia (Intel HDA) 103c 1611 Pavilion DM1Z-3000 @@ -780,6 +791,8 @@ 1179 ff50 Satellite P305D-S8995E 1458 4385 GA-MA770-DS3rev2.0 Motherboard 1462 7368 K9AG Neo2 + 15d9 a811 H8DGU + 174b 1001 Sapphire PURE Fusion Mini 17f2 5000 KI690-AM2 Motherboard 4386 SB600 USB Controller (EHCI) 103c 280a DC5750 Microtower @@ -832,6 +845,7 @@ 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 174b 1001 Sapphire PURE Fusion Mini 4392 SB7x0/SB8x0/SB9x0 SATA Controller [Non-RAID5 mode] 4393 SB7x0/SB8x0/SB9x0 SATA Controller [RAID5 mode] 4394 SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] @@ -840,24 +854,33 @@ 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 15d9 a811 H8DGU + 174b 1001 Sapphire PURE Fusion Mini 4397 SB7x0/SB8x0/SB9x0 USB OHCI0 Controller 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 15d9 a811 H8DGU + 174b 1001 Sapphire PURE Fusion Mini 4398 SB7x0 USB OHCI1 Controller 1043 82ef M3A78-EH Motherboard + 15d9 a811 H8DGU 4399 SB7x0/SB8x0/SB9x0 USB OHCI2 Controller 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 174b 1001 Sapphire PURE Fusion Mini 439c SB7x0/SB8x0/SB9x0 IDE Controller 1043 82ef M3A78-EH Motherboard 439d SB7x0/SB8x0/SB9x0 LPC host controller 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO - 43a0 SB700/SB800 PCI to PCI bridge (PCIE port 0) - 43a1 SB700/SB800 PCI to PCI bridge (PCIE port 1) - 4437 Radeon Mobility 7000 IGP + 174b 1001 Sapphire PURE Fusion Mini + 43a0 SB700/SB800/SB900 PCI to PCI bridge (PCIE port 0) + 43a1 SB700/SB800/SB900 PCI to PCI bridge (PCIE port 1) + 43a2 SB900 PCI to PCI bridge (PCIE port 2) + 43a3 SB900 PCI to PCI bridge (PCIE port 3) + 4437 RS250 [Radeon Mobility 7000 IGP] 4554 210888ET [Mach64 ET] 4654 Mach64 VT 4742 3D Rage Pro AGP 1X/2X @@ -940,9 +963,9 @@ 1002 0084 Rage 3D Pro AGP 2x XPERT 98 1002 0087 Rage 3D IIC 1002 475a Rage IIC AGP - 4964 Radeon RV250 Id [Radeon 9000] - 4965 Radeon RV250 Ie [Radeon 9000] - 4966 Radeon RV250 If [Radeon 9000] + 4964 RV250 Id [Radeon 9000] + 4965 RV250 Ie [Radeon 9000] + 4966 R250 If [Radeon 9000] 10f1 0002 RV250 If [Tachyon G9000 PRO] 148c 2039 RV250 If [Radeon 9000 Pro "Evil Commando"] 1509 9a00 RV250 If [Radeon 9000 "AT009"] @@ -951,16 +974,16 @@ 174b 7192 RV250 If [Radeon 9000 "Atlantis"] 17af 2005 RV250 If [Excalibur Radeon 9000 Pro] 17af 2006 RV250 If [Excalibur Radeon 9000] - 4967 Radeon RV250 Ig [Radeon 9000] - 496e Radeon RV250 [Radeon 9000] (Secondary) + 4967 RV250 Ig [Radeon 9000] + 496e RV250 [Radeon 9000] (Secondary) 4a48 R420 JH [Radeon X800] 4a49 R420 JI [Radeon X800PRO] 4a4a R420 JJ [Radeon X800SE] 4a4b R420 JK [Radeon X800] 4a4c R420 JL [Radeon X800] 4a4d R420 JM [FireGL X3] - 4a4e M18 JN [Radeon Mobility 9800] - 4a4f Radeon X800 SE (R420) (AGP) + 4a4e R420 JN [Mobility Radeon 9800] + 4a4f R420 [Radeon X800 AGP] 4a50 R420 JP [Radeon X800XT] 4a54 R420 [Radeon X800 VE] 4a69 R420 [Radeon X800 PRO/GTO] (Secondary) @@ -968,9 +991,9 @@ 4a6b R420 [Radeon X800] (Secondary) 4a70 R420 [X800XT-PE] (Secondary) 4a74 R420 [Radeon X800 VE] (Secondary) - 4b48 Radeon X850 Consumer (R481) + 4b48 R481 [Radeon X850 PCIe] 4b49 R480 [Radeon X850XT] - 4b4a Radeon X850 SE (R480) (AGP) + 4b4a R480 [Radeon X850SE AGP] 4b4b R480 [Radeon X850Pro] 4b4c R481 [Radeon X850XT-PE] 4b69 R480 [Radeon X850XT] (Secondary) @@ -1014,7 +1037,7 @@ 1033 8112 Versa Note VXi 4c53 Rage Mobility L 4c54 264LT [Mach64 LT] - 4c57 Radeon Mobility M7 LW [Radeon Mobility 7500] + 4c57 RV200 [Mobility Radeon 7500] 1014 0517 ThinkPad T30 1014 0530 ThinkPad T42 2373-4WU 1028 00e6 Radeon Mobility M7 LW (Dell Inspiron 8100) @@ -1022,7 +1045,7 @@ 1043 1622 Mobility Radeon M7 (L3C/S) 144d c006 Radeon Mobility M7 LW in vpr Matrix 170B4 4c58 Radeon RV200 LX [Mobility FireGL 7800 M7] - 4c59 Radeon Mobility M6 LY + 4c59 RV100 LY [Mobility Radeon 7000] 0e11 b111 Evo N600c 1014 0235 ThinkPad A30/A30p (2652/2653) 1014 0239 ThinkPad X22/X23/X24 @@ -1030,7 +1053,7 @@ 104d 80e7 VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP 104d 8140 PCG-Z1SP laptop 1509 1930 Medion MD9703 - 4c5a Radeon Mobility M6 LZ + 4c5a RV100 LZ [Mobility Radeon 7000] 4c64 Radeon RV250 Ld [Radeon Mobility 9000 M9] 4c65 Radeon RV250 Le [Radeon Mobility 9000 M9] 4c66 Radeon RV250 [Mobility FireGL 9000] @@ -1062,10 +1085,10 @@ 144d c00c P35 notebook 1462 0311 MSI M510A 1734 1055 Amilo M1420W - 4e51 M10 NQ [Radeon Mobility 9600] + 4e51 RV350 NQ [Mobility Radeon 9600] 4e52 RV350 [Mobility Radeon 9600 M10] 144d c00c P35 notebook - 4e53 M10 NS [Radeon Mobility 9600] + 4e53 RV350 NS [Mobility Radeon 9600] 4e54 M10 NT [FireGL Mobility T2] 4e56 M11 NV [FireGL Mobility T2e] 4e64 Radeon R300 [Radeon 9700 Pro] (Secondary) @@ -1155,7 +1178,7 @@ 514f Radeon R200 QO [Radeon 8500LE] 5154 R200 QT [Radeon 8500] 5155 R200 QU [Radeon 9100] - 5157 Radeon RV200 QW [Radeon 7500] + 5157 RV200 QW [Radeon 7500] 1002 013a Radeon 7500 1002 0f2b ALL-IN-WONDER VE PCI 1002 103a Dell Optiplex GX260 @@ -1167,8 +1190,8 @@ 174b 7147 RV200 QW [Sapphire Radeon 7500LE] 174b 7161 Radeon RV200 QW [Radeon 7500 LE] 17af 0202 RV200 QW [Excalibur Radeon 7500LE] - 5158 Radeon RV200 QX [Radeon 7500] - 5159 Radeon RV100 QY [Radeon 7000/VE] + 5158 RV200 QX [Radeon 7500] + 5159 RV100 QY [Radeon 7000/VE] 1002 000a Radeon 7000/Radeon VE 1002 000b Radeon 7000 1002 0038 Radeon 7000/Radeon VE @@ -1193,7 +1216,7 @@ 174b 7c28 Sapphire Radeon VE 7000 DDR 1787 0202 RV100 QY [Excalibur Radeon 7000] 17ee 1001 Radeon 7000 64MB DDR + DVI - 515a Radeon RV100 QZ [Radeon 7000/VE] + 515a RV100 QZ [Radeon 7000/VE] 515e ES1000 1028 01bb PowerEdge 1955 Embedded ATI ES1000 1028 01df PowerEdge SC440 @@ -1263,19 +1286,19 @@ 5453 Rage 128 Pro Ultra TS 5454 Rage 128 Pro Ultra TT 5455 Rage 128 Pro Ultra TU - 5460 M22 [Mobility Radeon X300] + 5460 RV370 [Mobility Radeon X300] 1775 1100 CR11/VR11 Single Board Computer - 5461 M22 [Mobility Radeon X300] - 5462 M24 [Radeon Mobility X600] - 5464 M22 [FireGL GL] + 5461 RV370 [Mobility Radeon X300] + 5462 RV380 [Mobility Radeon X600] + 5464 RV370 [Mobility FireGL V3100] 5548 R423 UH [Radeon X800 (PCIE)] 5549 R423 UI [Radeon X800PRO (PCIE)] 554a R423 UJ [Radeon X800LE (PCIE)] 554b R423 UK [Radeon X800SE (PCIE)] - 554c Radeon X800 XTP (R430) (PCIE) + 554c R430 [Radeon X800XTP PCIe] 554d R430 [Radeon X800 XL] (PCIe) 1458 2124 GV-R80L256V-B (AGP) - 554e Radeon X800 SE (R430) (PCIE) + 554e R430 [Radeon X800 SE PCIe] 554f R430 [Radeon X800 (PCIE)] 5550 R423 [FireGL V7100] 5551 R423 [FireGL V5100 (PCIE)] @@ -1304,7 +1327,7 @@ 5831 RS300 Host Bridge 5832 RS300 Host Bridge 5833 Radeon 9100 IGP Host Bridge - 5834 Radeon 9100 IGP + 5834 RS300 [Radeon 9100 IGP] 5835 RS300M AGP [Radeon Mobility 9100IGP] 5838 Radeon 9100 IGP AGP Bridge 5854 Radeon Xpress Series (RS480) @@ -1384,12 +1407,14 @@ 5a10 RD890 Northbridge only dual slot (2x16) PCI-e GFX Hydra part 5a11 RD890 Northbridge only single slot PCI-e GFX Hydra part 5a12 RD890 Northbridge only dual slot (2x8) PCI-e GFX Hydra part + 15d9 a811 H8DGU 5a13 RD890 PCI to PCI bridge (external gfx0 port A) 5a14 RD890 PCI to PCI bridge (external gfx0 port B) 5a15 RD890 PCI to PCI bridge (PCI express gpp port A) 5a16 RD890 PCI to PCI bridge (PCI express gpp port B) 5a17 RD890 PCI to PCI bridge (PCI express gpp port C) 5a18 RD890 PCI to PCI bridge (PCI express gpp port D) + 15d9 a811 H8DGU 5a19 RD890 PCI to PCI bridge (PCI express gpp port E) 5a1a RD890 PCI to PCI bridge (PCI express gpp port F) 5a1b RD890 PCI to PCI bridge (PCI express gpp port G) @@ -1397,6 +1422,8 @@ 5a1d RD890 PCI to PCI bridge (external gfx1 port A) 5a1e RD890 PCI to PCI bridge (external gfx1 port B) 5a1f RD890 PCI to PCI bridge (NB-SB link) + 15d9 a811 H8DGU + 5a23 RD990 I/O Memory Management Unit (IOMMU) 5a33 Radeon Xpress 200 Host Bridge 5a34 RS480 PCI-X Root Port # Comes in pair with 5a3f @@ -1422,7 +1449,7 @@ 174b 0500 Radeon X300 (PCIE) 196d 1086 X300SE HM 5b62 RV380 [Radeon X600 (PCIE)] - 5b63 RV370 [Sapphire X550 Silent] + 5b63 RV370 [Radeon X550] 5b64 RV370 5B64 [FireGL V3100 (PCIE)] 5b65 RV370 5B65 [FireGL D1100 (PCIE)] 5b66 RV370X @@ -1455,7 +1482,7 @@ 5d4d R480 [Radeon X850XT Platinum (PCIE)] 5d4e Radeon X850 SE (R480) (PCIE) 5d4f R480 [Radeon X800 GTO (PCIE)] - 5d50 FireGL V7200 (R480) (PCIE) + 5d50 R480 [FireGL V7200 (PCIE)] 5d51 R480 GL 12P 5d52 R480 [Radeon X850XT (PCIE)] (Primary) 1002 0b12 PowerColor X850XT PCIe (Primary) @@ -1477,49 +1504,73 @@ 5e6d RV410 [Radeon X700 (PCIE)] (Secondary) 148c 2117 PowerColor Bravo X700 5f57 R423 [Radeon X800XT (PCIE)] - 6718 Cayman XT [AMD Radeon HD 6900 Series] - 6719 Cayman PRO [AMD Radeon 6900 Series] + 6707 Cayman LE GL [FirePro V5900] + 6718 Cayman XT [Radeon HD 6970] + 6719 Cayman PRO [Radeon HD 6950] 671d Antilles [AMD Radeon HD 6990] - 671f NI CAYMAN [Radeon HD 6900 Series] - 6720 Blackcomb [AMD Radeon HD 6900M Series] + 671f Cayman [Radeon HD 6900 Series] + 6720 Blackcomb [Radeon HD 6900M series] 6738 Barts XT [ATI Radeon HD 6800 Series] 6739 Barts PRO [ATI Radeon HD 6800 Series] 673e Barts LE [AMD Radeon HD 6700 Series] 6740 Whistler XT [AMD Radeon HD 6700M Series] - 6741 NI Whistler [AMD Radeon HD 6600M Series] + 6741 Whistler [AMD Radeon HD 6600M Series] 6742 Whistler LE [AMD Radeon HD 6625M Graphics] - 6743 NI WHISTLER [Radeon E6760] - 6750 Turks [AMD Radeon HD 6500 series] - 6758 Turks XT [AMD Radeon HD 6600 Series] - 6759 NI Turks [AMD Radeon HD 6500] - 6760 NI Seymour [AMD Radeon HD 6470M] - 6761 NI Seymour [AMD Radeon HD 6430M] - 6763 NI SEYMOUR [Radoen] E6460 - 6770 NI CAICOS [AMD Radeon HD 6400 Series] - 6779 NI Caicos [AMD RADEON HD 6450] + 6743 Whistler [Radeon E6760] + 6749 Turks [FirePro V4900] + 674a Turks [AMD FirePro V3900] + 6750 Turks [AMD Radeon HD 6570] + 6751 Turks [Radeon HD 7600A Series] + 6758 Turks [Radeon HD 6670] + 6759 Turks [Radeon HD 6570] + 675d Turks [Radeon HD 7500 Series] + 6760 Seymour [Radeon HD 6400M Series] + 1028 04cc Vostro 3350 + 6761 Seymour LP [Radeon HD 6430M] + 6763 Seymour [Radeon E6460] + 6770 Caicos [Radeon HD 6400 Series] + 6772 Caicos [Radeon HD 7400A Series] + 6778 Caicos [Radeon HD 7000 Series] + 6779 Caicos [Radeon HD 6450] 174b e164 Sapphire HD 6450 1GB DDR3 - 6858 SI LOMBOK [Radoen HD 6000 Series] - 6889 EG Cypress [FirePro V7800] + 677b Caicos [Radeon HD 7400 Series] + 6798 Tahiti XT [Radeon HD 7970] + 6799 New Zealand [Radeon HD 7990] + 679a Tahiti PRO [Radeon HD 7950] + 6800 WIMBLEDON XT [Radeon HD 7970M] + 6818 PITCAIRN [Radeon HD 7800] + 6819 PITCAIRN PRO [Radeon HD 7800 Series] + 683d Cape Verde [Radeon HD 7700 Series] + 683f Cape Verde PRO [Radeon HD 7700 Series] + 6840 Thames XT/GL [Radeon HD 7600M Series] + 6841 Thames [Radeon 7500M/7600M Series] + 6843 Thames [Radeon HD 7670M] + 6850 Lombok GL AIO [Radeon HD 7570] + 6858 Lombok [Radeon HD 7400 series] + 6889 Cypress [FirePro V7800] 688c Cypress [AMD FireStream 9370] 688d Cypress [AMD FireStream 9350] - 6898 Radeon HD 5870 (Cypress) + 6898 Cypress XT [Radeon HD 5870] 1462 8032 R5870 PM2D1G 6899 Cypress [Radeon HD 5800 Series] - 689b EG CYPRESS [Radeon HD 6800 Series] - 689c Hemlock [ATI Radeon HD 5900 Series] - 689e Radeon HD 5800 Series (Cypress LE) + 689b Cypress [Radeon HD 6800 Series] + 689c Hemlock [Radeon HD 5900 Series] + 689e Cypress LE [Radeon HD 5800 Series] 68a0 Broadway XT [Mobility Radeon HD 5800 Series] 103c 1520 Broadway XT [FirePro M7820] 68a1 Broadway PRO [Mobility Radeon HD 5800 Series] 68a8 Broadway [ATI Mobility Radeon HD 6800 Series] + 68a9 Juniper XT [FirePro 3D V5800] 68b8 Juniper [Radeon HD 5700 Series] - 68b9 Juniper [ATI Radeon HD 5600/5700] + 106b 00cf MacPro5,1 [Mac Pro 2.8GHz DDR3] + 68b9 Juniper [Radeon HD 5600/5700] 68ba Juniper XT [AMD Radeon HD 6000 Series] - 68be Juniper [Radeon HD 5750 Series] - 68bf Juniper LE [AMD Radeon HD 6700 Series] + 68be Juniper [Radeon HD 5700 Series] + 68bf Juniper LE [Radeon HD 6700 Series] 68c0 Madison [Mobility Radeon HD 5000 Series] 103c 1521 Madison XT [FirePro M5800] - 68c1 Madison [AMD Radeon HD 5000M Series] + 68c1 Madison [Radeon HD 5000M Series] + 1025 033d Mobility Radeon HD 5650 1025 0347 Aspire 7740G 103c 1521 Madison Pro [FirePro M5800] 68c7 Pinewood [Radeon HD 5570] @@ -1532,10 +1583,11 @@ 68e1 Manhattan [Mobility Radeon HD 5430 Series] 68e4 Robson CE [AMD Radeon HD 6300 Series] 68e5 Robson LE [AMD Radeon HD 6300M Series] - 68f1 Cadar [FirePro 2460] + 68f1 Cedar [FirePro 2460] 68f2 Cedar [FirePro 2270] 68f9 Cedar PRO [Radeon HD 5450] 1028 010e XPS 8300 + 68fa EG Cedar [Radeon HD 7300 Series] 700f PCI Bridge [IGP 320M] 7010 PCI Bridge [IGP 340M] 7100 R520 [Radeon X1800] @@ -1716,6 +1768,7 @@ 9480 M96 [Mobility Radeon HD 4650] 103c 3628 ATI Mobility Radeon HD 4650 [dv6-1190en] 9485 RV740 Pro [Radeon HD 4770] + 9488 RV730 XT [Mobility Radeon HD 4670] 9489 M96 XT [Mobility FireGL V5725] 9490 RV730XT [Radeon HD 4670] 174b e880 Radeon HD 4670 512MB DDR3 @@ -1744,10 +1797,10 @@ 94c9 Mobility Radeon HD 2400 1002 94c9 Radeon HD2400 94cb Radeon E2400 - 94cc RV 610LE PCI [Radeon HD 2400] - 9501 Radeon HD 3870 + 94cc RV610 LE [Radeon HD 2400 Pro PCI] + 9501 RV670 [Radeon HD 3870] 174b e620 Sapphire Radeon HD 3870 PCIe 2.0 - 9504 Mobility Radeon HD 3850 + 9504 RV670 [Mobility Radeon HD 3850] 9505 RV670PRO [Radeon HD 3850] 9507 RV670 [Radeon HD 3850] 9508 M88 XT Mobility Radeon HD 3870] @@ -1758,15 +1811,15 @@ 9540 RV710 [Radeon HD 4550] 954f RV710 [Radeon HD 4350] 1462 1618 R4350 MD512H (MS-V161) - 9552 M92 LP [Mobility Radeon HD 4300 Series] - 9553 M92 [Mobility Radeon HD 4500/5100 Series] + 9552 RV710 [Mobility Radeon HD 4300 Series] + 9553 RV710 [Mobility Radeon HD 4500/5100 Series] 1179 ff82 Satellite L505-13T GPU (Mobility Radeon HD 5145) - 9555 M93 [Mobility Radeon HD 4300/4500 Series] + 9555 RV710 [Mobility Radeon HD 4300/4500 Series] 103c 1411 ProBook 4720s GPU (Mobility Radeon HD 4350) - 9559 Mobility Radeon HD 3600 Series - 955f M92 [Mobility Radeon HD 4330] - 9581 M76 [Radeon Mobility HD 2600 Series] - 9583 M76XT [Mobility Radeon HD 2600 XT] + 9559 RV635 [Mobility Radeon HD 3600 Series] + 955f RV710 [Mobility Radeon HD 4330] + 9581 RV630 [Mobility Radeon HD 2600] + 9583 RV630 [Mobility Radeon HD 2600 XT] 9586 RV 630 XT AGP [Radeon HD 2600 XT AGP] 9587 RV630 PRO AGP [Radeon HD 2600 PRO AGP] 9588 RV630 [Radeon HD 2600XT] @@ -1774,18 +1827,18 @@ 9589 RV630 [Radeon HD 2600 Series] 958c RV630GL [FireGL v5600] 958d RV630 [FireGL V3600] - 9591 Mobility Radeon HD 3650 + 9591 RV635 [Mobility Radeon HD 3650] 1002 9591 Mobility Radeon HD 3650 - 9593 Radeon Mobility HD 3670 + 9593 RV635 [Mobility Radeon HD 3670] 9595 M86GL [Mobility FireGL V5700] 9596 RV635 PRO AGP [Radeon HD 3650] 1043 0028 EAH3650 SILENT/HTDI/512M/A - 9598 Mobility Radeon HD 3600 Series + 9598 RV630 [Radeon HD 3600 Series] 1002 9598 Mobility Radeon HD 3600 1043 01d6 EAH3650 Silent - 95c0 Mobility Radeon HD 3470 + 95c0 RV620 PRO [Radeon HD 3470] 1002 95c0 Mobility Radeon HD 3470 - 95c4 Mobility Radeon HD 3400 Series + 95c4 RV620 [Mobility Radeon HD 3400 Series] 1002 95c4 Mobility Radeon HD 3400 95c5 RV620 LE [Radeon HD 3450] 95c6 RV620 LE AGP [Radeon HD 3450] @@ -1795,53 +1848,66 @@ 95cd RV620 [FireMV 2450] 95ce RV620 [FirePro 2260] 95cf RV620 [FirePro 2260] - 960f RS780 Azalia controller - 9610 Radeon HD 3200 Graphics + 960f RS780 HDMI Audio [Radeon HD 3000-3300 Series] + 9610 RS780 [Radeon HD 3200] 1458 d000 GA-MA78GM-S2H Motherboard - 9611 Radeon 3100 Graphics - 9612 RS780M/RS780MN [Radeon HD 3200 Graphics] - 9613 RS780MC [Radeon HD 3100 Graphics] - 9614 Radeon HD 3300 Graphics - 9615 RS780E [AMD 780E] - 9616 760G [Radeon 3000] - 970f RS880 Audio Device [Radeon HD 4200] + 9611 RS780C [Radeon HD 3100] + 9612 RS780M/RS780MN [Mobility Radeon HD 3200 Graphics] + 9613 RS780MC [Mobility Radeon HD 3100 Graphics] + 9614 RS780D [Radeon HD 3300] + 9615 RS780E [Radeon HD 3200] + 9616 RS780L [Radeon HD 3000] + 9640 BeaverCreek [Radeon HD 6550D] + 9641 BeaverCreek [Mobility Radeon HD 6620G] + 964a BeaverCreek [Radeon HD 6530D] + 970f RS880 HDMI Audio [Radeon HD 4200 Series] 1043 83a2 M4A785TD Motherboard 1043 843e M5A88-V EVO 9710 RS880 [Radeon HD 4200] 1043 83a2 M4A785TD Motherboard - 9712 M880G [Mobility Radeon HD 4200] - 9713 M860G [Mobility Radeon 4100] + 9712 RS880M [Mobility Radeon HD 4200 Series] + 9713 RS880M [Mobility Radeon HD 4100] 9714 RS880 [Radeon HD 4290] 9715 RS880 [Radeon HD 4250] 1043 843e M5A88-V EVO - 9723 Radeon HD 5450 - 9802 AMD Radeon HD 6310 GraphicsATI +# Radeon HD 6250 too? + 9802 Wrestler [Radeon HD 6310] + 174b 1001 Sapphire PURE Fusion Mini + 9804 Wrestler [Radeon HD 6250] + 9806 Wrestler [Radeon HD 6320] + 9807 Wrestler [Radeon HD 6290] aa00 R600 Audio Device [Radeon HD 2900 Series] - aa08 RV630/M76 audio device [Radeon HD 2600 Series] - aa10 RV610 audio device [Radeon HD 2400 PRO] + aa08 RV630 audio device [Radeon HD 2600 Series] + aa10 RV610 HDMI Audio [Radeon HD 2350/2400 Series] 174b aa10 Sapphire HD 2400 PRO audio device 18bc aa10 GeCube Radeon HD 2400 PRO HDCP-capable digital-only audio device - aa18 Radeon HD 3870 Audio device - aa20 RV635 Audio device [Radeon HD 3600 Series] - aa28 RV620 Audio device [Radeon HD 34xx Series] - aa30 HD48x0 audio + aa18 RV670/680 HDMI Audio [Radeon HD 3690/3800 Series] + aa20 RV635 HDMI Audio [Radeon HD 3600 Series] + aa28 RV620 HDMI Audio [Radeon HD 3400 Series] + aa30 RV770 HDMI Audio [Radeon HD 4850/4870] 174b aa30 Sapphire HD 4850 512MB GDDR3 PCI-E Dual Slot Fansink - aa38 RV710/730 + aa38 RV710/730 HDMI Audio [Radeon HD 4000 series] 103c 3628 ATI RV710/730 [dv6-1190en] 174b aa38 R700 Audio Device [Radeon HD 4000 Series] aa50 Cypress HDMI Audio [Radeon HD 5800 Series] aa58 Juniper HDMI Audio [Radeon HD 5700 Series] - aa60 Redwood HDMI Audio [Radeon HD 5600 Series] +# 5500, 5600 and mobile 5700 series + aa60 Redwood HDMI Audio [Radeon HD 5000 Series] + 1025 033d Mobility Radeon HD 5650 1025 0347 Aspire 7740G - aa68 Manhattan HDMI Audio [Mobility Radeon HD 5000 Series] + aa68 Cedar HDMI Audio [Radeon HD 5400/6300 Series] 1028 aa68 XPS 8300 + aa80 Cayman/Antilles HDMI Audio [Radeon HD 6900 Series] aa88 Barts HDMI Audio [Radeon HD 6800 Series] - aa98 NI Caicos HDMI Audio [AMD RADEON HD 6450] +# 6500, 6600 and mobile 6700 series + aa90 Turks HDMI Audio [Radeon HD 6000 Series] + aa98 Caicos HDMI Audio [Radeon HD 6400 Series] 174b aa98 Sapphire HD 6450 1GB DDR3 + aaa0 Tahiti XT HDMI Audio [Radeon HD 7970 Series] ac00 Theater 600 Pro ac02 TV Wonder HD 600 PCIe ac12 Theater HD T507 (DVB-T) TV tuner/capture device - cab0 AGP Bridge [IGP 320M] + cab0 RS100 AGP Bridge [IGP 320M] cab2 RS200/RS200M AGP Bridge [IGP 340M] cab3 R200 AGP Bridge [Mobility Radeon 7000 IGP] cbb2 RS200/RS200M AGP Bridge [IGP 340M] @@ -2229,13 +2295,15 @@ 1014 0360 PCI-E Auxiliary Cache Adapter (57B7) 033d PCI-E IPR SAS Adapter (FPGA) 1014 033c PCIe2 1.8GB Cache 6Gb SAS RAID Adapter Tri-port (57B5) + 1014 0353 PCIe2 3.1GB Cache 6Gb SAS RAID Enclosure (57C3) + 1014 0354 PCIe2 6Gb SAS Adapter Dual-port (57C4) 1014 0356 PCIe2 1.8GB Cache 6Gb SAS RAID & SSD Adapter (574D) 1014 035f PCIe2 6Gb SAS Adapter Quad-port (57B2) 034a PCI-E IPR SAS Adapter (ASIC) 1014 033b PCIe2 6Gb SAS RAID Adapter Quad-port (57B4) 1014 0355 PCIe2 3.6GB Cache 6Gb SAS RAID Adapter Quad-port (57B1) 1014 0357 PCIe2 6Gb SAS Adapter Quad-port (57C6) - 1014 035d PCIe2 3.6GB Cache 6Gb SAS RAID & SSD Adapter (575D) + 1014 035d PCIe3 1.8GB Cache RAID SAS Adapter Quad-port 6GB (57C8) 1014 035e PCIe2 3.6GB Cache 6Gb SAS RAID Adapter Quad-port (57CE) 3022 QLA3022 Network Adapter 4022 QLA3022 Network Adapter @@ -2323,9 +2391,25 @@ 1302 Family 11h Processor DRAM Controller 1303 Family 11h Processor Miscellaneous Control 1304 Family 11h Processor Link Control + 1400 Family 15h (Models 10h-1fh) Processor Function 0 + 1401 Family 15h (Models 10h-1fh) Processor Function 1 + 1402 Family 15h (Models 10h-1fh) Processor Function 2 + 1403 Family 15h (Models 10h-1fh) Processor Function 3 + 1404 Family 15h (Models 10h-1fh) Processor Function 4 + 1405 Family 15h (Models 10h-1fh) Processor Function 5 + 1410 Family 15h (Models 10h-1fh) Processor Root Complex + 1412 Family 15h (Models 10h-1fh) Processor Root Port + 1413 Family 15h (Models 10h-1fh) Processor Root Port + 1414 Family 15h (Models 10h-1fh) Processor Root Port + 1415 Family 15h (Models 10h-1fh) Processor Root Port + 1416 Family 15h (Models 10h-1fh) Processor Root Port + 1417 Family 15h (Models 10h-1fh) Processor Root Port + 1418 Family 15h (Models 10h-1fh) Processor Root Port + 1419 Family 15h (Models 10h-1fh) I/O Memory Management Unit 1510 Family 14h Processor Root Complex - 1022 1510 Pavilion DM1Z-3000 Host bridge + 174b 1001 Sapphire PURE Fusion Mini 1512 Family 14h Processor Root Port + 174b 1001 Sapphire PURE Fusion Mini 1513 Family 14h Processor Root Port 1514 Family 14h Processor Root Port 1515 Family 14h Processor Root Port @@ -2420,7 +2504,7 @@ 7443 AMD-768 [Opus] ACPI 1043 8044 A7M-D Mainboard 7445 AMD-768 [Opus] Audio - 7446 AMD-768 [Opus] MC97 Modem (Smart Link HAMR5600 compatible) + 7446 AMD-768 [Opus] MC97 Modem 7448 AMD-768 [Opus] PCI 7449 AMD-768 [Opus] USB 7450 AMD-8131 PCI-X Bridge @@ -2470,8 +2554,8 @@ 1043 843e M5A88-V EVO 9602 RS780/RS880 PCI to PCI bridge (int gfx) 9603 RS780 PCI to PCI bridge (ext gfx port 0) - 9604 RS780 PCI to PCI bridge (PCIE port 0) - 9605 RS780 PCI to PCI bridge (PCIE port 1) + 9604 RS780/RS880 PCI to PCI bridge (PCIE port 0) + 9605 RS780/RS880 PCI to PCI bridge (PCIE port 1) 9606 RS780 PCI to PCI bridge (PCIE port 2) 9607 RS780 PCI to PCI bridge (PCIE port 3) 9608 RS780/RS880 PCI to PCI bridge (PCIE port 4) @@ -2593,6 +2677,8 @@ 5453 M5453 PCI AC-Link Controller Modem Device 7101 M7101 PCI PMU Power Management Controller 10b9 7101 M7101 PCI PMU Power Management Controller +# should be 1022:9602 + 9602 AMD RS780/RS880 PCI to PCI bridge (int gfx) 1028 Dell 0001 PowerEdge Expandable RAID Controller 2/Si 1028 0001 PowerEdge 2400 @@ -2647,7 +2733,7 @@ 00cf AIC-7899P U160/m 1028 0106 PowerEdge 4600 1028 0121 PowerEdge 2650 -102b Matrox Graphics, Inc. +102b Matrox Electronics Systems Ltd. # DJ: I've a suspicion that 0010 is a duplicate of 0d10. 0010 MGA-I [Impression?] 0100 MGA 1064SG [Mystique] @@ -2805,6 +2891,7 @@ 1028 028d PowerEdge T410 MGA G200eW WPCM450 1028 029c PowerEdge M710 MGA G200eW WPCM450 1028 02a4 PowerEdge T310 MGA G200eW WPCM450 + 15d9 a811 H8DGU 0533 MGA G200EH 103c 3381 iLO4 0534 G200eR2 @@ -2888,10 +2975,46 @@ 102b 0101 Millenium P690 PCI 102b 0140 Millenium P690 LP PCIe x1 102b 0180 Display Wall IP Decode 128 MB + 4164 Morphis QxT frame grabber + 43b4 Morphis Qxt encoding engine + 4510 Morphis COM port 4536 VIA Framegrabber - 4cdc Morphis Vision System Jpeg2000 - 4fc5 Morphis Vision System - 5e10 Morphis Vision System Aux/IO + 4686 Concord GX (customized Intel 82541) + 475b Solios eCL/XCL-B frame grabber + 475d Vio frame grabber family + 102b 4b90 Vio Duo frame grabber (single channel) + 102b 4b91 Vio Duo frame grabber + 102b 4b92 Vio Analog frame grabber + 102b 4b93 Vio SDI Frame Grabber + 102b 4b94 Vio DVI-A frame grabber + 475f Solios (single-Full) CL frame grabber + 102b 475f Solios eCL/XCL-F frame grabber + 102b 4d5f Solios eV-CL (single-Full) frame grabber + 102b 4e5f Solios eM-CL (single-Full) frame grabber + 47a1 Solios eA/XA frame grabber + 102b 4be0 Solios eA/XA (single) frame grabber + 102b 4be1 Solios eA/XA (dual) frame grabber + 102b 4be2 Solios eA/XA (quad) frame grabber + 47a2 Solios COM port + 47c1 Solios (dual-Base/single-Medium) CL frame grabber + 102b 0000 Solios frame grabber + 102b 4b80 Solios eCL/XCL (single-Medium) frame grabber + 102b 4b81 Solios eCL/XCL (dual-Base) frame grabber + 102b 4d80 Solios eV-CL (single-Medium) frame grabber + 102b 4d81 Solios eV-CL (dual-Base) frame grabber + 102b 4e80 Solios eM-CL (single-Medium) frame grabber + 102b 4e81 Solios eM-CL (dual-Base) frame grabber + 47c2 Solios COM port + 4949 Radient frame grabber family + 102b 0010 Radient eCL (Single-full) frame grabber + 102b 0020 Radient eCL (Dual-base) frame grabber + 102b 0030 Radient eCL (Dual-full) frame grabber + 102b 0040 Radient eCL (Quad-base) frame grabber + 102b 0050 Radient eCL (Golden) frame grabber + 4cdc Morphis JPEG2000 accelerator + 4f54 Morphis (e)Quad frame grabber + 4fc5 Morphis (e)Dual frame grabber + 5e10 Morphis aux I/O 6573 Shark 10/100 Multiport SwitchNIC 102c Chips and Technologies 00b8 F64310 @@ -2980,7 +3103,7 @@ 003e NAPCCARD Cardbus Controller 0046 PowerVR PCX2 [midas] 005a Vrc5074 [Nile 4] - 0063 Firewarden + 0063 uPD72862 [Firewarden] IEEE1394 OHCI 1.0 Link Controller 0067 PowerVR Neon 250 Chipset 1010 0020 PowerVR Neon 250 AGP 32Mb 1010 0080 PowerVR Neon 250 AGP 16Mb @@ -2996,23 +3119,27 @@ 009b Vrc5476 00a5 VRC4173 00a6 VRC5477 AC97 - 00cd IEEE 1394 [OrangeLink] Host Controller + 00cd uPD72870 [Firewarden] IEEE1394a OHCI 1.0 Link/3-port PHY Controller 12ee 8011 Root hub - 00ce IEEE 1394 Host Controller + 00ce uPD72871 [Firewarden] IEEE1394a OHCI 1.0 Link/1-port PHY Controller 00df Vr4131 00e0 USB 2.0 12ee 7001 Root hub 14c2 0205 PTI-205N USB 2.0 Host Controller 1799 0002 Root Hub 807d 1043 PCI-USB2 (EHCI subsystem) - 00e7 uPD72873 IEEE1394 OHCI 1.1 2-port Host Controller - 00f2 uPD72874 IEEE1394 OHCI 1.1 3-port PHY-Link Ctrlr + 00e7 uPD72873 [Firewarden] IEEE1394a OHCI 1.1 Link/2-port PHY Controller + 00f2 uPD72874 [Firewarden] IEEE1394a OHCI 1.1 Link/3-port PHY Controller 00f3 uPD6113x Multimedia Decoder/Processor [EMMA2] 010c VR7701 0125 uPD720400 PCI Express - PCI/PCI-X Bridge 013a Dual Tuner/MPEG Encoder 0194 uPD720200 USB 3.0 Host Controller + 1028 04b2 Vostro 3350 1043 8413 P8P67 Deluxe Motherboard + 1b96 0001 USB 3.0 PCIe Card + 01e7 uPD72873 [Firewarden] IEEE1394a OHCI 1.1 Link/2-port PHY Controller + 01f2 uPD72874 [Firewarden] IEEE1394a OHCI 1.1 Link/3-port PHY Controller 1034 Framatome Connectors USA Inc. 1035 Comp. & Comm. Research Lab 1036 Future Domain Corp. @@ -3020,15 +3147,15 @@ 1037 Hitachi Micro Systems 1038 AMP, Inc 1039 Silicon Integrated Systems [SiS] - 0001 Virtual PCI-to-PCI bridge (AGP) + 0001 AGP Port (virtual PCI-to-PCI bridge) 0002 SG86C202 - 0003 SiS AGP Port (virtual PCI-to-PCI bridge) + 0003 AGP Port (virtual PCI-to-PCI bridge) 0004 PCI-to-PCI bridge 0006 85C501/2/3 0008 SiS85C503/5513 (LPC Bridge) 0009 ACPI 000a PCI-to-PCI bridge - 0016 SiS961/2 SMBus Controller + 0016 SiS961/2/3 SMBus controller 0018 SiS85C503/5513 (LPC Bridge) 0180 RAID bus controller 180 SATA/PATA [SiS] 0181 SATA @@ -3074,6 +3201,7 @@ 0735 735 Host 0740 740 Host 0741 741/741GX/M741 Host + 1849 0741 K7S41/K7S41GX motherboard 0745 745 Host 0746 746 Host 0755 755 Host @@ -3087,9 +3215,9 @@ 1043 80a7 Motherboard P4S800D-X 1462 0900 MS-6701 motherboard 0961 SiS961 [MuTIOL Media IO] - 0962 SiS962 [MuTIOL Media IO] - 0963 SiS963 [MuTIOL Media IO] - 0964 SiS964 [MuTIOL Media IO] + 0962 SiS962 [MuTIOL Media IO] LPC Controller + 0963 SiS963 [MuTIOL Media IO] LPC Controller + 0964 SiS964 [MuTIOL Media IO] LPC Controller 0965 SiS965 [MuTIOL Media IO] 0966 SiS966 [MuTIOL Media IO] 0968 SiS968 [MuTIOL Media IO] @@ -3104,7 +3232,7 @@ 5315 550 PCI/AGP VGA Display Adapter 5401 486 PCI Chipset 5511 5511/5512 - 5513 5513 [IDE] + 5513 5513 IDE Controller 1019 0970 P6STP-FL motherboard 1039 5513 SiS5513 EIDE Controller (A,B step) 1043 8035 CUSI-FX motherboard @@ -3158,7 +3286,7 @@ 1734 1095 D2030-A1 7007 FireWire Controller 1462 701d MS-6701 - 7012 C-Media AC'97 Sound Controller + 7012 SiS7012 AC'97 Sound Controller 1039 7012 SiS 7012 onboard [Asus P4SC-EA] AC'97 Sound Controller 1043 818f A8S-X Motherboard 13f6 0300 CMI9739(A) on ECS K7SOM+ motherboard @@ -3262,6 +3390,7 @@ 1303 RMP-3 (Remote Management Processor) 1361 BCM4312 802.11a/b/g WLAN Controller 1371 Broadcom Corporation BCM4312 802.11a/b/g (rev 02) + 1717 Intel 82571EB dual 1 Gb Ethernet controller 2910 E2910A PCIBus Exerciser 2925 E2925A 32 Bit, 33 MHzPCI Exerciser & Analyzer 3080 Pavilion ze2028ea @@ -3289,6 +3418,12 @@ 103c 3249 Smart Array P812 103c 324a HP Smart Array 712m (Mezzanine RAID controller) 103c 324b Smart Array P711m (Mezzanine RAID controller) + 323b Smart Array Gen8 Controllers + 103c 3350 P222 + 103c 3351 P420 + 103c 3352 P421 + 103c 3354 P420i + 103c 3355 P220i 3300 Integrated Lights-Out Standard Virtual USB Controller 103c 3304 iLO2 103c 3305 iLO2 @@ -3343,7 +3478,7 @@ 4057 v8200 GeForce 3 8043 v8240 PAL 128M [P4T] Motherboard 8047 v8420 Deluxe [GeForce4 Ti4200] - 807b v9280/TD [Geforce4 TI4200 8X With TV-Out and DVI] + 807b v9280/TD [GeForce4 TI4200 8X With TV-Out and DVI] 8095 A7N8X Motherboard nForce2 AC97 Audio 80ac A7N8X Motherboard nForce2 AGP/Memory 80bb v9180 Magic/T [GeForce4 MX440 AGP 8x 64MB TV-out] @@ -3448,6 +3583,7 @@ 0008 STG 2000X 0009 STG 1764X 0010 STG4000 [3D Prophet Kyro Series] + 1681 c069 3D Prophet 4000XT 0201 STPC Vega Northbridge 0209 STPC Consumer/Industrial North- and Southbridge 020a STPC Atlas/ConsumerS/Consumer IIA Northbridge @@ -3506,21 +3642,28 @@ 1102 100f Graphics Blaster Extreme 3d3d 0100 Reference Permedia 2 3D 8000 PCILynx/PCILynx2 IEEE 1394 Link Layer Controller *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon May 14 01:01:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E3DB106566C; Mon, 14 May 2012 01:01:40 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F7938FC0A; Mon, 14 May 2012 01:01:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4E11e41007740; Mon, 14 May 2012 01:01:40 GMT (envelope-from philip@svn.freebsd.org) Received: (from philip@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4E11dN7007739; Mon, 14 May 2012 01:01:39 GMT (envelope-from philip@svn.freebsd.org) Message-Id: <201205140101.q4E11dN7007739@svn.freebsd.org> From: Philip Paeps Date: Mon, 14 May 2012 01:01:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235421 - vendor/pciids/pciids-20120507 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 01:01:40 -0000 Author: philip Date: Mon May 14 01:01:39 2012 New Revision: 235421 URL: http://svn.freebsd.org/changeset/base/235421 Log: Tag current snapshot of the PCI ID Repository. Added: vendor/pciids/pciids-20120507/ - copied from r235420, vendor/pciids/dist/ From owner-svn-src-all@FreeBSD.ORG Mon May 14 03:11:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA32E106567B; Mon, 14 May 2012 03:11:08 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89F118FC08; Mon, 14 May 2012 03:11:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4E3B8pF012136; Mon, 14 May 2012 03:11:08 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4E3B8DG012131; Mon, 14 May 2012 03:11:08 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201205140311.q4E3B8DG012131@svn.freebsd.org> From: Marius Strobl Date: Mon, 14 May 2012 03:11:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235422 - in stable/9/sys: dev/dc dev/fxp dev/usb/net dev/xl i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 03:11:08 -0000 Author: marius Date: Mon May 14 03:11:07 2012 New Revision: 235422 URL: http://svn.freebsd.org/changeset/base/235422 Log: MFC: r235255 - Change the module order of these MAC drivers to be last so they are deterministically handled after the corresponding PHY drivers when loaded as modules. Otherwise, when these MAC/PHY driver pairs are compiled into a single module probing the PHY driver may fail. This makes r151438 and r226154 actually work. [1] Reported and tested by: yongari (fxp(4)) - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Submitted by: jhb [1] Modified: stable/9/sys/dev/dc/if_dc.c stable/9/sys/dev/fxp/if_fxp.c stable/9/sys/dev/usb/net/if_rue.c stable/9/sys/dev/xl/if_xl.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/dev/dc/if_dc.c ============================================================================== --- stable/9/sys/dev/dc/if_dc.c Mon May 14 01:01:39 2012 (r235421) +++ stable/9/sys/dev/dc/if_dc.c Mon May 14 03:11:07 2012 (r235422) @@ -354,8 +354,9 @@ static driver_t dc_driver = { static devclass_t dc_devclass; -DRIVER_MODULE(dc, pci, dc_driver, dc_devclass, 0, 0); -DRIVER_MODULE(miibus, dc, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE_ORDERED(dc, pci, dc_driver, dc_devclass, NULL, NULL, + SI_ORDER_ANY); +DRIVER_MODULE(miibus, dc, miibus_driver, miibus_devclass, NULL, NULL); #define DC_SETBIT(sc, reg, x) \ CSR_WRITE_4(sc, reg, CSR_READ_4(sc, reg) | (x)) Modified: stable/9/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/9/sys/dev/fxp/if_fxp.c Mon May 14 01:01:39 2012 (r235421) +++ stable/9/sys/dev/fxp/if_fxp.c Mon May 14 03:11:07 2012 (r235422) @@ -290,7 +290,7 @@ static device_method_t fxp_methods[] = { DEVMETHOD(miibus_writereg, fxp_miibus_writereg), DEVMETHOD(miibus_statchg, fxp_miibus_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t fxp_driver = { @@ -301,8 +301,9 @@ static driver_t fxp_driver = { static devclass_t fxp_devclass; -DRIVER_MODULE(fxp, pci, fxp_driver, fxp_devclass, 0, 0); -DRIVER_MODULE(miibus, fxp, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE_ORDERED(fxp, pci, fxp_driver, fxp_devclass, NULL, NULL, + SI_ORDER_ANY); +DRIVER_MODULE(miibus, fxp, miibus_driver, miibus_devclass, NULL, NULL); static struct resource_spec fxp_res_spec_mem[] = { { SYS_RES_MEMORY, FXP_PCI_MMBA, RF_ACTIVE }, Modified: stable/9/sys/dev/usb/net/if_rue.c ============================================================================== --- stable/9/sys/dev/usb/net/if_rue.c Mon May 14 01:01:39 2012 (r235421) +++ stable/9/sys/dev/usb/net/if_rue.c Mon May 14 03:11:07 2012 (r235422) @@ -202,8 +202,9 @@ static driver_t rue_driver = { static devclass_t rue_devclass; -DRIVER_MODULE(rue, uhub, rue_driver, rue_devclass, NULL, 0); -DRIVER_MODULE(miibus, rue, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE_ORDERED(rue, uhub, rue_driver, rue_devclass, NULL, NULL, + SI_ORDER_ANY); +DRIVER_MODULE(miibus, rue, miibus_driver, miibus_devclass, NULL, NULL); MODULE_DEPEND(rue, uether, 1, 1, 1); MODULE_DEPEND(rue, usb, 1, 1, 1); MODULE_DEPEND(rue, ether, 1, 1, 1); Modified: stable/9/sys/dev/xl/if_xl.c ============================================================================== --- stable/9/sys/dev/xl/if_xl.c Mon May 14 01:01:39 2012 (r235421) +++ stable/9/sys/dev/xl/if_xl.c Mon May 14 03:11:07 2012 (r235422) @@ -327,8 +327,9 @@ static driver_t xl_driver = { static devclass_t xl_devclass; -DRIVER_MODULE(xl, pci, xl_driver, xl_devclass, 0, 0); -DRIVER_MODULE(miibus, xl, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE_ORDERED(xl, pci, xl_driver, xl_devclass, NULL, NULL, + SI_ORDER_ANY); +DRIVER_MODULE(miibus, xl, miibus_driver, miibus_devclass, NULL, NULL); static void xl_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error) From owner-svn-src-all@FreeBSD.ORG Mon May 14 04:21:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 008CF106566B; Mon, 14 May 2012 04:21:28 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C524C8FC0C; Mon, 14 May 2012 04:21:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4E4LRUJ014323; Mon, 14 May 2012 04:21:27 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4E4LRvu014321; Mon, 14 May 2012 04:21:27 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201205140421.q4E4LRvu014321@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 14 May 2012 04:21:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235423 - in stable/9/sys: dev/bce i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 04:21:28 -0000 Author: yongari Date: Mon May 14 04:21:27 2012 New Revision: 235423 URL: http://svn.freebsd.org/changeset/base/235423 Log: MFC r235119: Restore jumbo frame configuration which was broken in r218423. Submitted by: Andrey Zonov zonov dot org > (initial version) Tested by: Andrey Zonov zonov dot org > Modified: stable/9/sys/dev/bce/if_bce.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/dev/bce/if_bce.c ============================================================================== --- stable/9/sys/dev/bce/if_bce.c Mon May 14 03:11:07 2012 (r235422) +++ stable/9/sys/dev/bce/if_bce.c Mon May 14 04:21:27 2012 (r235423) @@ -6842,6 +6842,8 @@ bce_init_locked(struct bce_softc *sc) bcopy(IF_LLADDR(sc->bce_ifp), sc->eaddr, ETHER_ADDR_LEN); bce_set_mac_addr(sc); + if (bce_hdr_split == FALSE) + bce_get_rx_buffer_sizes(sc, ifp->if_mtu); /* * Calculate and program the hardware Ethernet MTU * size. Be generous on the receive if we have room @@ -7436,22 +7438,10 @@ bce_ioctl(struct ifnet *ifp, u_long comm BCE_LOCK(sc); ifp->if_mtu = ifr->ifr_mtu; - - if (bce_hdr_split == FALSE) { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - /* - * Because allocation size is used in RX - * buffer allocation, stop controller if - * it is already running. - */ - bce_stop(sc); - } - - bce_get_rx_buffer_sizes(sc, ifp->if_mtu); - + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; bce_init_locked(sc); } - BCE_UNLOCK(sc); break; From owner-svn-src-all@FreeBSD.ORG Mon May 14 04:24:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E39C4106566C; Mon, 14 May 2012 04:24:24 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CEA4E8FC16; Mon, 14 May 2012 04:24:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4E4OOSi014452; Mon, 14 May 2012 04:24:24 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4E4OO93014450; Mon, 14 May 2012 04:24:24 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201205140424.q4E4OO93014450@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 14 May 2012 04:24:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235424 - in stable/8/sys: dev/bce i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 04:24:25 -0000 Author: yongari Date: Mon May 14 04:24:24 2012 New Revision: 235424 URL: http://svn.freebsd.org/changeset/base/235424 Log: MFC r235119: Restore jumbo frame configuration which was broken in r218423. Submitted by: Andrey Zonov zonov dot org > (initial version) Tested by: Andrey Zonov zonov dot org > Modified: stable/8/sys/dev/bce/if_bce.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/dev/bce/if_bce.c ============================================================================== --- stable/8/sys/dev/bce/if_bce.c Mon May 14 04:21:27 2012 (r235423) +++ stable/8/sys/dev/bce/if_bce.c Mon May 14 04:24:24 2012 (r235424) @@ -6842,6 +6842,8 @@ bce_init_locked(struct bce_softc *sc) bcopy(IF_LLADDR(sc->bce_ifp), sc->eaddr, ETHER_ADDR_LEN); bce_set_mac_addr(sc); + if (bce_hdr_split == FALSE) + bce_get_rx_buffer_sizes(sc, ifp->if_mtu); /* * Calculate and program the hardware Ethernet MTU * size. Be generous on the receive if we have room @@ -7436,22 +7438,10 @@ bce_ioctl(struct ifnet *ifp, u_long comm BCE_LOCK(sc); ifp->if_mtu = ifr->ifr_mtu; - - if (bce_hdr_split == FALSE) { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - /* - * Because allocation size is used in RX - * buffer allocation, stop controller if - * it is already running. - */ - bce_stop(sc); - } - - bce_get_rx_buffer_sizes(sc, ifp->if_mtu); - + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; bce_init_locked(sc); } - BCE_UNLOCK(sc); break; From owner-svn-src-all@FreeBSD.ORG Mon May 14 05:10:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AACF8106566B; Mon, 14 May 2012 05:10:41 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 953DC8FC08; Mon, 14 May 2012 05:10:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4E5Afkw016039; Mon, 14 May 2012 05:10:41 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4E5AfoM016037; Mon, 14 May 2012 05:10:41 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201205140510.q4E5AfoM016037@svn.freebsd.org> From: Xin LI Date: Mon, 14 May 2012 05:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235425 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 05:10:41 -0000 Author: delphij Date: Mon May 14 05:10:41 2012 New Revision: 235425 URL: http://svn.freebsd.org/changeset/base/235425 Log: Sync DLTs with the latest pcap version. MFC after: 2 weeks Modified: head/sys/net/bpf.h Modified: head/sys/net/bpf.h ============================================================================== --- head/sys/net/bpf.h Mon May 14 04:24:24 2012 (r235424) +++ head/sys/net/bpf.h Mon May 14 05:10:41 2012 (r235425) @@ -279,6 +279,24 @@ struct bpf_zbuf_header { */ #define DLT_SYMANTEC_FIREWALL 99 +/* + * Values between 100 and 103 are used in capture file headers as + * link-layer header type LINKTYPE_ values corresponding to DLT_ types + * that differ between platforms; don't use those values for new DLT_ + * new types. + */ + +/* + * Values starting with 104 are used for newly-assigned link-layer + * header type values; for those link-layer header types, the DLT_ + * value returned by pcap_datalink() and passed to pcap_open_dead(), + * and the LINKTYPE_ value that appears in capture files, are the + * same. + * + * DLT_MATCHING_MIN is the lowest such value; DLT_MATCHING_MAX is + * the highest such value. + */ +#define DLT_MATCHING_MIN 104 /* * This value was defined by libpcap 0.5; platforms that have defined @@ -978,8 +996,110 @@ struct bpf_zbuf_header { * Raw IPv4/IPv6; different from DLT_RAW in that the DLT_ value specifies * whether it's v4 or v6. Requested by Darren Reed . */ -#define DLT_IPV4 228 -#define DLT_IPV6 229 +#define DLT_IPV4 228 +#define DLT_IPV6 229 + +/* + * IEEE 802.15.4, exactly as it appears in the spec (no padding, no + * nothing), and with no FCS at the end of the frame; requested by + * Jon Smirl . + */ +#define DLT_IEEE802_15_4_NOFCS 230 + +/* + * Raw D-Bus: + * + * http://www.freedesktop.org/wiki/Software/dbus + * + * messages: + * + * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages + * + * starting with the endianness flag, followed by the message type, etc., + * but without the authentication handshake before the message sequence: + * + * http://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol + * + * Requested by Martin Vidner . + */ +#define DLT_DBUS 231 + +/* + * Juniper-private data link type, as per request from + * Hannes Gredler . + */ +#define DLT_JUNIPER_VS 232 +#define DLT_JUNIPER_SRX_E2E 233 +#define DLT_JUNIPER_FIBRECHANNEL 234 + +/* + * DVB-CI (DVB Common Interface for communication between a PC Card + * module and a DVB receiver). See + * + * http://www.kaiser.cx/pcap-dvbci.html + * + * for the specification. + * + * Requested by Martin Kaiser . + */ +#define DLT_DVB_CI 235 + +/* + * Variant of 3GPP TS 27.010 multiplexing protocol (similar to, but + * *not* the same as, 27.010). Requested by Hans-Christoph Schemmel + * . + */ +#define DLT_MUX27010 236 + +/* + * STANAG 5066 D_PDUs. Requested by M. Baris Demiray + * . + */ +#define DLT_STANAG_5066_D_PDU 237 + +/* + * Juniper-private data link type, as per request from + * Hannes Gredler . + */ +#define DLT_JUNIPER_ATM_CEMIC 238 + +/* + * NetFilter LOG messages + * (payload of netlink NFNL_SUBSYS_ULOG/NFULNL_MSG_PACKET packets) + * + * Requested by Jakub Zawadzki + */ +#define DLT_NFLOG 239 + +/* + * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type + * for Ethernet packets with a 4-byte pseudo-header and always + * with the payload including the FCS, as supplied by their + * netANALYZER hardware and software. + * + * Requested by Holger P. Frommer + */ +#define DLT_NETANALYZER 240 + +/* + * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type + * for Ethernet packets with a 4-byte pseudo-header and FCS and + * with the Ethernet header preceded by 7 bytes of preamble and + * 1 byte of SFD, as supplied by their netANALYZER hardware and + * software. + * + * Requested by Holger P. Frommer + */ +#define DLT_NETANALYZER_TRANSPARENT 241 + +/* + * IP-over-Infiniband, as specified by RFC 4391. + * + * Requested by Petr Sumbera . + */ +#define DLT_IPOIB 242 + +#define DLT_MATCHING_MAX 242 /* highest value in the "matching" range */ /* * DLT and savefile link type values are split into a class and From owner-svn-src-all@FreeBSD.ORG Mon May 14 05:12:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8050E1065670; Mon, 14 May 2012 05:12:57 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 66E388FC1B; Mon, 14 May 2012 05:12:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4E5Cv9f016160; Mon, 14 May 2012 05:12:57 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4E5CvV9016150; Mon, 14 May 2012 05:12:57 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201205140512.q4E5CvV9016150@svn.freebsd.org> From: Xin LI Date: Mon, 14 May 2012 05:12:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235426 - in head: contrib/libpcap contrib/libpcap/bpf/net contrib/libpcap/packaging contrib/libpcap/pcap contrib/libpcap/test lib/libpcap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 05:12:57 -0000 Author: delphij Date: Mon May 14 05:12:56 2012 New Revision: 235426 URL: http://svn.freebsd.org/changeset/base/235426 Log: Merge from vendor branch: update libpcap to 1.2.1. MFC after: 2 weeks Added: head/contrib/libpcap/pcap-netfilter-linux.c - copied unchanged from r235294, vendor/libpcap/dist/pcap-netfilter-linux.c head/contrib/libpcap/pcap-netfilter-linux.h - copied unchanged from r235294, vendor/libpcap/dist/pcap-netfilter-linux.h head/contrib/libpcap/pcap-tstamp.manmisc.in - copied unchanged from r235294, vendor/libpcap/dist/pcap-tstamp.manmisc.in head/contrib/libpcap/pcap_list_tstamp_types.3pcap.in - copied unchanged from r235294, vendor/libpcap/dist/pcap_list_tstamp_types.3pcap.in head/contrib/libpcap/pcap_set_tstamp_type.3pcap.in - copied unchanged from r235294, vendor/libpcap/dist/pcap_set_tstamp_type.3pcap.in head/contrib/libpcap/pcap_tstamp_type_name_to_val.3pcap - copied unchanged from r235294, vendor/libpcap/dist/pcap_tstamp_type_name_to_val.3pcap head/contrib/libpcap/pcap_tstamp_type_val_to_name.3pcap - copied unchanged from r235294, vendor/libpcap/dist/pcap_tstamp_type_val_to_name.3pcap head/contrib/libpcap/test/ - copied from r235294, vendor/libpcap/dist/test/ Deleted: head/contrib/libpcap/filtertest.c head/contrib/libpcap/findalldevstest.c head/contrib/libpcap/opentest.c head/contrib/libpcap/pcap_free_datalinks.3pcap head/contrib/libpcap/pcap_freealldevs.3pcap head/contrib/libpcap/selpolltest.c Modified: head/contrib/libpcap/CHANGES head/contrib/libpcap/CREDITS head/contrib/libpcap/Makefile.in head/contrib/libpcap/README head/contrib/libpcap/VERSION head/contrib/libpcap/bpf/net/bpf_filter.c head/contrib/libpcap/config.h.in head/contrib/libpcap/configure head/contrib/libpcap/configure.in head/contrib/libpcap/ethertype.h head/contrib/libpcap/fad-getad.c head/contrib/libpcap/gencode.c head/contrib/libpcap/gencode.h head/contrib/libpcap/grammar.y head/contrib/libpcap/inet.c head/contrib/libpcap/packaging/pcap.spec.in head/contrib/libpcap/pcap-bpf.c head/contrib/libpcap/pcap-bt-linux.c head/contrib/libpcap/pcap-common.c head/contrib/libpcap/pcap-config.in head/contrib/libpcap/pcap-dag.c head/contrib/libpcap/pcap-dlpi.c head/contrib/libpcap/pcap-filter.manmisc head/contrib/libpcap/pcap-filter.manmisc.in head/contrib/libpcap/pcap-int.h head/contrib/libpcap/pcap-libdlpi.c head/contrib/libpcap/pcap-linktype.manmisc head/contrib/libpcap/pcap-linktype.manmisc.in head/contrib/libpcap/pcap-linux.c head/contrib/libpcap/pcap-savefile.manfile head/contrib/libpcap/pcap-stdinc.h head/contrib/libpcap/pcap-usb-linux.c head/contrib/libpcap/pcap-win32.c head/contrib/libpcap/pcap.3pcap head/contrib/libpcap/pcap.3pcap.in head/contrib/libpcap/pcap.c head/contrib/libpcap/pcap/bpf.h head/contrib/libpcap/pcap/pcap.h head/contrib/libpcap/pcap_activate.3pcap head/contrib/libpcap/pcap_can_set_rfmon.3pcap head/contrib/libpcap/pcap_compile.3pcap head/contrib/libpcap/pcap_compile.3pcap.in head/contrib/libpcap/pcap_datalink.3pcap head/contrib/libpcap/pcap_datalink.3pcap.in head/contrib/libpcap/pcap_datalink_name_to_val.3pcap head/contrib/libpcap/pcap_datalink_val_to_name.3pcap head/contrib/libpcap/pcap_dump_open.3pcap head/contrib/libpcap/pcap_fileno.3pcap head/contrib/libpcap/pcap_findalldevs.3pcap head/contrib/libpcap/pcap_get_selectable_fd.3pcap head/contrib/libpcap/pcap_list_datalinks.3pcap head/contrib/libpcap/pcap_list_datalinks.3pcap.in head/contrib/libpcap/pcap_loop.3pcap head/contrib/libpcap/pcap_major_version.3pcap head/contrib/libpcap/pcap_next_ex.3pcap head/contrib/libpcap/pcap_open_dead.3pcap head/contrib/libpcap/pcap_open_live.3pcap head/contrib/libpcap/pcap_open_offline.3pcap head/contrib/libpcap/pcap_set_datalink.3pcap head/contrib/libpcap/savefile.c head/contrib/libpcap/scanner.l head/contrib/libpcap/sf-pcap-ng.c head/contrib/libpcap/sf-pcap.c head/lib/libpcap/Makefile head/lib/libpcap/config.h Directory Properties: head/contrib/libpcap/ (props changed) Modified: head/contrib/libpcap/CHANGES ============================================================================== --- head/contrib/libpcap/CHANGES Mon May 14 05:10:41 2012 (r235425) +++ head/contrib/libpcap/CHANGES Mon May 14 05:12:56 2012 (r235426) @@ -1,3 +1,77 @@ +Friday December 9, 2011. guy@alum.mit.edu. +Summary for 1.2.1 libpcap release + Update README file. + Fix typoes in README.linux file. + Clean up some compiler warnings. + Fix Linux compile problems and tests for ethtool.h. + Treat Debian/kFreeBSD and GNU/Hurd as systems with GNU + toolchains. + Support 802.1 QinQ as a form of VLAN in filters. + Treat "carp" as equivalent to "vrrp" in filters. + Fix code generated for "ip6 protochain". + Add some new link-layer header types. + Support capturing NetFilter log messages on Linux. + Clean up some error messages. + Turn off monitor mode on exit for mac80211 interfaces on Linux. + Fix problems turning monitor mode on for non-mac80211 interfaces + on Linux. + Properly fail if /sys/class/net or /proc/net/dev exist but can't + be opened. + Fail if pcap_activate() is called on an already-activated + pcap_t, and add a test program for that. + Fix filtering in pcap-ng files. + Don't build for PowerPC on Mac OS X Lion. + Simplify handling of new DLT_/LINKTYPE_ values. + Expand pcap(3PCAP) man page. + +Sunday July 24, 2011. mcr@sandelman.ca. +Summary for 1.2 libpcap release + All of the changes listed below for 1.1.1 and 1.1.2. + Changes to error handling for pcap_findalldevs(). + Fix the calculation of the frame size in memory-mapped captures. + Add a link-layer header type for STANAG 5066 D_PDUs. + Add a link-layer type for a variant of 3GPP TS 27.010. + Noted real nature of LINKTYPE_ARCNET. + Add a link-layer type for DVB-CI. + Fix configure-script discovery of VLAN acceleration support. + see http://netoptimizer.blogspot.com/2010/09/tcpdump-vs-vlan-tags.html + Linux, HP-UX, AIX, NetBSD and OpenBSD compilation/conflict fixes. + Protect against including AIX 5.x's having been included. + Add DLT_DBUS, for raw D-Bus messages. + Treat either EPERM or EACCES as "no soup for you". + Changes to permissions on DLPI systems. + Add DLT_IEEE802_15_4_NOFCS for 802.15.4 interfaces. + +Fri. August 6, 2010. guy@alum.mit.edu. +Summary for 1.1.2 libpcap release + Return DLT_ values, not raw LINKTYPE_ values from + pcap_datalink() when reading pcap-ng files + Add support for "wlan ra" and "wlan ta", to check the RA and TA + of WLAN frames that have them + Don't crash if "wlan addr{1,2,3,4}" are used without 802.11 + headers + Do filtering on USB and Bluetooth capturing + On FreeBSD/SPARC64, use -fPIC - it's apparently necessary + Check for valid port numbers (fit in a 16-bit unsigned field) in + "port" filters + Reject attempts to put savefiles into non-blocking mode + Check for "no such device" for the "get the media types" ioctl + in *BSD + Improve error messages from bpf_open(), and let it do the error + handling + Return more specific errors from pcap_can_set_rfmon(); fix + documentation + Update description fetching code for FreeBSD, fix code for + OpenBSD + Ignore /sys/net/dev files if we get ENODEV for them, not just + ENXIO; fixes handling of bonding devices on Linux + Fix check for a constant 0 argument to BPF_DIV + Use the right version of ar when cross-building + Free any filter set on a savefile when the savefile is closed + Include the CFLAGS setting when configure was run in the + compiler flags + Add support for 802.15.4 interfaces on Linux + Thu. April 1, 2010. guy@alum.mit.edu. Summary for 1.1.1 libpcap release Update CHANGES to reflect more of the changes in 1.1.0. Modified: head/contrib/libpcap/CREDITS ============================================================================== --- head/contrib/libpcap/CREDITS Mon May 14 05:10:41 2012 (r235425) +++ head/contrib/libpcap/CREDITS Mon May 14 05:12:56 2012 (r235426) @@ -1,145 +1,154 @@ This file lists people who have contributed to libpcap: The current maintainers: - Bill Fenner - Fulvio Risso - Guy Harris - Hannes Gredler - Michael Richardson + Bill Fenner + Fulvio Risso + Guy Harris + Hannes Gredler + Michael Richardson Additional people who have contributed patches: - Alan Bawden - Albert Chin - Alexander 'Leo' Bergolth - Alexey Kuznetsov - Alon Bar-Lev - Andrew Brown - Antti Kantee - Arien Vijn - Arkadiusz Miskiewicz - Armando L. Caro Jr. - Assar Westerlund - Brian Ginsbach - Charles M. Hannum - Chris G. Demetriou - Chris Lightfoot - Chris Maynard - Chris Pepper - Christian Bell - Christian Peron - Daniele Orlandi - Darren Reed - David Kaelbling - David Young - Dean Gaudet - Don Ebright - Dug Song - Dustin Spicuzza - Eric Anderson - Erik de Castro Lopo - Felix Obenhuber - Florent Drouin - Franz Schaefer - Fulko Hew - Fumiyuki Shimizu - Gianluca Varenni - Gilbert Hoyek - Gisle Vanem - Graeme Hewson - Greg Stark - Greg Troxel - Gregor Maier - Guillaume Pelat - Hagen Paul Pfeifer - Hyung Sik Yoon - Igor Khristophorov - Jan-Philip Velders - Jason R. Thorpe - Javier Achirica - Jean Tourrilhes - Jean-Louis Charton - Jefferson Ogata - Jesper Peterson - Joerg Mayer - John Bankier - Jon Lindgren - Jon Smirl - Juergen Schoenwaelder - Jung-uk Kim - Kazushi Sugyo - Klaus Klein - Koryn Grant - Kris Katterjohn - Krzysztof Halasa - Lorenzo Cavallaro - Loris Degioanni - Love Hörnquist-Åstrand - Luis Martin Garcia - Maciej W. Rozycki - Marcus Felipe Pereira - Mark C. Brown - Mark Pizzolato - Markus Mayer - Martin Husemann - Márton Németh - Matthew Luckie - Max Laier - Mike Frysinger - Mike Kershaw - Mike Wiacek - Monroe Williams - N. Leiten - Nicolas Dade - Octavian Cerna - Olaf Kirch - Ollie Wild - Onno van der Linden - Paolo Abeni - Patrick Marie - Patrick McHardy - Paul Mundt - Pavel Kankovsky - Pawel Pokrywka - Peter Fales - Peter Jeremy - Peter Volkov - Phil Wood - Rafal Maszkowski - - Richard Stearn - Rick Jones - Robert Edmonds - Roberto Mariani - Romain Francoise - Sagun Shakya - Scott Barron - Scott Gifford - Sebastian Krahmer - Sebastien Roy - Sepherosa Ziehau - Shaun Clowes - Solomon Peachy - Stefan Hudson - Stephen Donnelly - Takashi Yamamoto - Tanaka Shin-ya - Tobias Poschwatta - Tony Li - Torsten Landschoff - Uns Lider - Uwe Girlich - Wesley Shields - Xianjie Zhang - Xin Li - Yen Yen Lim - Yvan Vanhullebus - Yoann Vandoorselaere + Alan Bawden + Albert Chin + Alexander 'Leo' Bergolth + Alexey Kuznetsov + Alon Bar-Lev + Andrew Brown + + Antti Kantee + Arien Vijn + Arkadiusz Miskiewicz + Armando L. Caro Jr. + Assar Westerlund + Brian Ginsbach + Charles M. Hannum + Chris G. Demetriou + Chris Lightfoot + Chris Maynard + Chris Pepper + Christian Bell + Christian Peron + Daniele Orlandi + Darren Reed + David Kaelbling + David Young + Dean Gaudet + Don Ebright + Dug Song + Dustin Spicuzza + Eric Anderson + Erik de Castro Lopo + Felix Obenhuber + Florent Drouin + Franz Schaefer + frederich + Fulko Hew + Fumiyuki Shimizu + Garrett Cooper + Gianluca Varenni + Gilbert Hoyek + Gisle Vanem + Graeme Hewson + Greg Stark + Greg Troxel + Gregor Maier + Guillaume Pelat + Hagen Paul Pfeifer + Henri Doreau + Hyung Sik Yoon + Igor Khristophorov + Jan-Philip Velders + Jason R. Thorpe + Javier Achirica + Jean Tourrilhes + Jean-Louis Charton + Jefferson Ogata + Jesper Dangaard Brouer + Jesper Peterson + Joerg Mayer + John Bankier + Jon Lindgren + Jon Smirl + Juergen Schoenwaelder + Julien Moutinho + Jung-uk Kim + Kazushi Sugyo + Klaus Klein + Koryn Grant + Kris Katterjohn + Krzysztof Halasa + Lorenzo Cavallaro + Loris Degioanni + Love Hörnquist-Åstrand + Luis MartinGarcia + Maciej W. Rozycki + Marcus Felipe Pereira + Mark C. Brown + Mark Pizzolato + Markus Mayer + Martin Husemann + Márton Németh + Matthew Luckie + Max Laier + Mike Frysinger + Mike Kershaw + Mike Wiacek + Miroslav Lichvar + Monroe Williams + + N. Leiten + Nicolas Dade + Octavian Cerna + Olaf Kirch + Ollie Wild + Onno van der Linden + Paolo Abeni + Patrick Marie + Patrick McHardy + Paul Mundt + Pavel Kankovsky + Pawel Pokrywka + Peter Fales + Peter Jeremy + Peter Volkov + Phil Wood + Rafal Maszkowski + + Richard Stearn + Rick Jones + Robert Edmonds + Roberto Mariani + Romain Francoise + Sagun Shakya + Scott Barron + Scott Gifford + Scott Mcmillan + Sebastian Krahmer + Sebastien Roy + Sepherosa Ziehau + Shaun Clowes + Solomon Peachy + Stefan Hudson + Stephen Donnelly + Takashi Yamamoto + Tanaka Shin-ya + Tobias Poschwatta + Tony Li + Torsten Landschoff + Uns Lider + Uwe Girlich + Wesley Shields + Xianjie Zhang + Xin Li + Yen Yen Lim + Yvan Vanhullebus + Yoann Vandoorselaere The original LBL crew: - Steve McCanne - Craig Leres - Van Jacobson + Steve McCanne + Craig Leres + Van Jacobson Past maintainers: - Jun-ichiro itojun Hagino + Jun-ichiro itojun Hagino Modified: head/contrib/libpcap/Makefile.in ============================================================================== --- head/contrib/libpcap/Makefile.in Mon May 14 05:10:41 2012 (r235425) +++ head/contrib/libpcap/Makefile.in Mon May 14 05:12:56 2012 (r235426) @@ -46,19 +46,21 @@ VPATH = @srcdir@ LD = /usr/bin/ld CC = @CC@ +AR = @AR@ CCOPT = @V_CCOPT@ INCLS = -I. @V_INCLS@ DEFS = @DEFS@ @V_DEFS@ ADDLOBJS = @ADDLOBJS@ ADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@ LIBS = @LIBS@ +CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ DYEXT = @DYEXT@ V_RPATH_OPT = @V_RPATH_OPT@ PROG=libpcap # Standard CFLAGS -CFLAGS = $(CCOPT) $(INCLS) $(DEFS) +FULL_CFLAGS = $(CCOPT) $(INCLS) $(DEFS) $(CFLAGS) INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -78,9 +80,9 @@ YACC = @V_YACC@ # problem if you don't own the file but can write to the directory. .c.o: @rm -f $@ - $(CC) $(CFLAGS) -c $(srcdir)/$*.c + $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c -PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ +PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@ FSRC = fad-@V_FINDALLDEVS@.c SSRC = @SSRC@ CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \ @@ -123,14 +125,29 @@ HDR = $(PUBHDR) \ sf-pcap-ng.h \ sunatmpos.h +TESTS = \ + filtertest \ + findalldevstest \ + nonblocktest \ + opentest \ + selpolltest + +TESTS_SRC = \ + tests/filtertest.c \ + tests/findalldevstest.c \ + tests/nonblocktest.c \ + tests/opentest.c \ + tests/reactivatetest.c \ + tests/selpolltest.c + GENHDR = \ scanner.h tokdefs.h version.h TAGFILES = \ $(SRC) $(HDR) -CLEANFILES = $(OBJ) libpcap.* filtertest findalldevstest selpolltest \ - opentest $(PROG)-`cat $(srcdir)/VERSION`.tar.gz $(GENSRC) $(GENHDR) \ +CLEANFILES = $(OBJ) libpcap.* $(TESTS) \ + $(PROG)-`cat $(srcdir)/VERSION`.tar.gz $(GENSRC) $(GENHDR) \ lex.yy.c pcap-config MAN1 = pcap-config.1 @@ -141,8 +158,10 @@ MAN3PCAP_EXPAND = \ pcap_datalink.3pcap.in \ pcap_dump_open.3pcap.in \ pcap_list_datalinks.3pcap.in \ + pcap_list_tstamp_types.3pcap.in \ pcap_open_dead.3pcap.in \ - pcap_open_offline.3pcap.in + pcap_open_offline.3pcap.in \ + pcap_set_tstamp_type.3pcap.in MAN3PCAP_NOEXPAND = \ pcap_activate.3pcap \ @@ -160,9 +179,7 @@ MAN3PCAP_NOEXPAND = \ pcap_file.3pcap \ pcap_fileno.3pcap \ pcap_findalldevs.3pcap \ - pcap_freealldevs.3pcap \ pcap_freecode.3pcap \ - pcap_free_datalinks.3pcap \ pcap_get_selectable_fd.3pcap \ pcap_geterr.3pcap \ pcap_inject.3pcap \ @@ -187,7 +204,9 @@ MAN3PCAP_NOEXPAND = \ pcap_snapshot.3pcap \ pcap_stats.3pcap \ pcap_statustostr.3pcap \ - pcap_strerror.3pcap + pcap_strerror.3pcap \ + pcap_tstamp_type_name_to_val.3pcap \ + pcap_tstamp_type_val_to_name.3pcap MAN3PCAP = $(MAN3PCAP_NOEXPAND) $(MAN3PCAP_EXPAND:.in=) @@ -196,9 +215,11 @@ MANFILE = \ MANMISC = \ pcap-filter.manmisc.in \ - pcap-linktype.manmisc.in + pcap-linktype.manmisc.in \ + pcap-tstamp.manmisc.in EXTRA_DIST = \ + $(TESTS_SRC) \ CHANGES \ ChmodBPF/ChmodBPF \ ChmodBPF/StartupParameters.plist \ @@ -237,8 +258,6 @@ EXTRA_DIST = \ fad-null.c \ fad-sita.c \ fad-win32.c \ - filtertest.c \ - findalldevstest.c \ grammar.y \ install-sh \ lbl/os-aix4.h \ @@ -263,7 +282,6 @@ EXTRA_DIST = \ msdos/pktdrvr.c \ msdos/pktdrvr.h \ msdos/readme.dos \ - opentest.c \ org.tcpdump.chmod_bpf.plist \ packaging/pcap.spec.in \ pcap-bpf.c \ @@ -282,6 +300,8 @@ EXTRA_DIST = \ pcap-libdlpi.c \ pcap-linux.c \ pcap-namedb.h \ + pcap-netfilter-linux.c \ + pcap-netfilter-linux.h \ pcap-nit.c \ pcap-null.c \ pcap-pf.c \ @@ -299,7 +319,6 @@ EXTRA_DIST = \ pcap-win32.c \ runlex.sh \ scanner.l \ - selpolltest.c \ Win32/Include/Gnuc.h \ Win32/Include/addrinfo.h \ Win32/Include/bittypes.h \ @@ -328,7 +347,7 @@ all: libpcap.a shared pcap-config libpcap.a: $(OBJ) @rm -f $@ - ar rc $@ $(OBJ) $(ADDLARCHIVEOBJS) + $(AR) rc $@ $(OBJ) $(ADDLARCHIVEOBJS) $(RANLIB) $@ shared: libpcap.$(DYEXT) @@ -401,7 +420,7 @@ libpcap.sl: $(OBJ) libpcap.shareda: $(OBJ) @rm -f $@ shr.o $(CC) @V_SHLIB_OPT@ -o shr.o $(OBJ) $(ADDLOBJS) $(LDFLAGS) $(LIBS) - ar rc $@ shr.o + $(AR) rc $@ shr.o # # For platforms that don't support shared libraries (or on which we @@ -414,7 +433,7 @@ scanner.c: $(srcdir)/scanner.l $(srcdir)/runlex.sh $(LEX) -o$@ $< scanner.o: scanner.c tokdefs.h - $(CC) $(CFLAGS) -c scanner.c + $(CC) $(FULL_CFLAGS) -c scanner.c pcap.o: version.h @@ -427,13 +446,13 @@ grammar.c: $(srcdir)/grammar.y grammar.o: grammar.c @rm -f $@ - $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c + $(CC) $(FULL_CFLAGS) -Dyylval=pcap_lval -c grammar.c version.o: version.c - $(CC) $(CFLAGS) -c version.c + $(CC) $(FULL_CFLAGS) -c version.c snprintf.o: $(srcdir)/missing/snprintf.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c version.c: $(srcdir)/VERSION @rm -f $@ @@ -467,35 +486,47 @@ bpf_filter.c: $(srcdir)/bpf/net/bpf_filt ln -s $(srcdir)/bpf/net/bpf_filter.c bpf_filter.c bpf_filter.o: bpf_filter.c - $(CC) $(CFLAGS) -c bpf_filter.c + $(CC) $(FULL_CFLAGS) -c bpf_filter.c # # Generate the pcap-config script. # -pcap-config: $(srcdir)/pcap-config.in +# Some Makes, e.g. AIX Make and Solaris Make, can't handle "--file=$@.tmp:$<"; +# for example, the Solaris 9 make man page says +# +# Because make assigns $< and $* as it would for implicit rules +# (according to the suffixes list and the directory contents), +# they may be unreliable when used within explicit target entries. +# +# and this is an explicit target entry. +# +# Therefore, instead of using $<, we explicitly put in $(srcdir)/pcap-config.in. +# +pcap-config: $(srcdir)/pcap-config.in ./config.status @rm -f $@ $@.tmp - sed -e 's|@includedir[@]|$(includedir)|g' \ - -e 's|@libdir[@]|$(libdir)|g' \ - -e 's|@LIBS[@]|$(LIBS)|g' \ - -e 's|@V_RPATH_OPT[@]|$(V_RPATH_OPT)|g' \ - $(srcdir)/pcap-config.in >$@.tmp + ./config.status --file=$@.tmp:$(srcdir)/pcap-config.in mv $@.tmp $@ chmod a+x $@ # # Test programs - not built by default, and not installed. # -filtertest: filtertest.c libpcap.a - $(CC) $(CFLAGS) -I. -L. -o filtertest $(srcdir)/filtertest.c libpcap.a $(LIBS) +tests: $(TESTS) + +filtertest: tests/filtertest.c libpcap.a + $(CC) $(FULL_CFLAGS) -I. -L. -o filtertest $(srcdir)/tests/filtertest.c libpcap.a $(LIBS) + +findalldevstest: tests/findalldevstest.c libpcap.a + $(CC) $(FULL_CFLAGS) -I. -L. -o findalldevstest $(srcdir)/tests/findalldevstest.c libpcap.a $(LIBS) -findalldevstest: findalldevstest.c libpcap.a - $(CC) $(CFLAGS) -I. -L. -o findalldevstest $(srcdir)/findalldevstest.c libpcap.a $(LIBS) +nonblocktest: tests/nonblocktest.c libpcap.a + $(CC) $(FULL_CFLAGS) -I. -L. -o nonblocktest $(srcdir)/tests/nonblocktest.c libpcap.a $(LIBS) -selpolltest: selpolltest.c libpcap.a - $(CC) $(CFLAGS) -I. -L. -o selpolltest $(srcdir)/selpolltest.c libpcap.a $(LIBS) +opentest: tests/opentest.c libpcap.a + $(CC) $(FULL_CFLAGS) -I. -L. -o opentest $(srcdir)/tests/opentest.c libpcap.a $(LIBS) -opentest: opentest.c libpcap.a - $(CC) $(CFLAGS) -I. -L. -o opentest $(srcdir)/opentest.c libpcap.a $(LIBS) +selpolltest: tests/selpolltest.c libpcap.a + $(CC) $(FULL_CFLAGS) -I. -L. -o selpolltest $(srcdir)/tests/selpolltest.c libpcap.a $(LIBS) install: install-shared install-archive pcap-config [ -d $(DESTDIR)$(libdir) ] || \ @@ -533,12 +564,21 @@ install: install-shared install-archive rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \ $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap + ln $(DESTDIR)$(mandir)/man3/pcap_findalldevs.3pcap \ + $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \ $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap ln $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \ $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap + ln $(DESTDIR)$(mandir)/man3/pcap_list_datalinks.3pcap \ + $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap + ln $(DESTDIR)$(mandir)/man3/pcap_list_tstamp_types.3pcap \ + $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap ln $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \ $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap @@ -622,8 +662,11 @@ uninstall: uninstall-shared rm -f $(DESTDIR)$(mandir)/man3/$$i; done rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap @@ -660,7 +703,7 @@ clean: distclean: clean rm -f Makefile config.cache config.log config.status \ - config.h gnuc.h os-proto.h bpf_filter.c pcap-config \ + config.h gnuc.h net os-proto.h bpf_filter.c pcap-config \ stamp-h stamp-h.in rm -f $(MAN3PCAP_EXPAND:.in=) $(MANFILE:.in=) $(MANMISC:.in=) rm -rf autom4te.cache Modified: head/contrib/libpcap/README ============================================================================== --- head/contrib/libpcap/README Mon May 14 05:10:41 2012 (r235425) +++ head/contrib/libpcap/README Mon May 14 05:12:56 2012 (r235426) @@ -63,13 +63,14 @@ added overhead (especially, for selectiv would translate BPF filters into a filter program that is compatible with the underlying kernel subsystem, but this is not yet implemented. -BPF is standard in 4.4BSD, BSD/OS, NetBSD, FreeBSD, and OpenBSD. DEC -OSF/1/Digital UNIX/Tru64 UNIX uses the packetfilter interface but has -been extended to accept BPF filters (which libpcap utilizes). Also, you -can add BPF filter support to Ultrix using the kernel source and/or -object patches available in: +BPF is standard in 4.4BSD, BSD/OS, NetBSD, FreeBSD, OpenBSD, DragonFly +BSD, and Mac OS X; an older, modified and undocumented version is +standard in AIX. {DEC OSF/1, Digital UNIX, Tru64 UNIX} uses the +packetfilter interface but has been extended to accept BPF filters +(which libpcap utilizes). Also, you can add BPF filter support to +Ultrix using the kernel source and/or object patches available in: - ftp://gatekeeper.dec.com/pub/DEC/net/bpfext42.tar.Z. + http://www.tcpdump.org/other/bpfext42.tar.Z Linux, in the 2.2 kernel and later kernels, has a "Socket Filter" mechanism that accepts BPF filters; see the README.linux file for Modified: head/contrib/libpcap/VERSION ============================================================================== --- head/contrib/libpcap/VERSION Mon May 14 05:10:41 2012 (r235425) +++ head/contrib/libpcap/VERSION Mon May 14 05:12:56 2012 (r235426) @@ -1 +1 @@ -1.1.1 +1.2.1 Modified: head/contrib/libpcap/bpf/net/bpf_filter.c ============================================================================== --- head/contrib/libpcap/bpf/net/bpf_filter.c Mon May 14 05:10:41 2012 (r235425) +++ head/contrib/libpcap/bpf/net/bpf_filter.c Mon May 14 05:12:56 2012 (r235426) @@ -619,7 +619,7 @@ bpf_validate(f, len) /* * Check for constant division by 0. */ - if (BPF_RVAL(p->code) == BPF_K && p->k == 0) + if (BPF_SRC(p->code) == BPF_K && p->k == 0) return 0; break; default: Modified: head/contrib/libpcap/config.h.in ============================================================================== --- head/contrib/libpcap/config.h.in Mon May 14 05:10:41 2012 (r235425) +++ head/contrib/libpcap/config.h.in Mon May 14 05:12:56 2012 (r235426) @@ -18,6 +18,9 @@ /* define if you have streams capable DAG API */ #undef HAVE_DAG_STREAMS_API +/* define if you have vdag_set_device_info() */ +#undef HAVE_DAG_VDAG + /* Define to 1 if you have the declaration of `ether_hostton', and to 0 if you don't. */ #undef HAVE_DECL_ETHER_HOSTTON @@ -52,12 +55,30 @@ /* if libnl exists */ #undef HAVE_LIBNL +/* if libnl exists and is version 2.x */ +#undef HAVE_LIBNL_2_x + /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_COMPILER_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_ETHTOOL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_IF_PACKET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_NET_TSTAMP_H + /* if tp_vlan_tci exists */ #undef HAVE_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_TYPES_H + /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_USBDEVICE_FS_H @@ -73,6 +94,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IF_ETHER_H +/* Define to 1 if you have the header file. */ +#undef HAVE_NETPACKET_IF_PACKET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETPACKET_PACKET_H + /* Define to 1 if you have the header file. */ #undef HAVE_NET_IF_MEDIA_H @@ -217,6 +244,9 @@ /* target host supports CAN sniffing */ #undef PCAP_SUPPORT_CAN +/* target host supports netfilter sniffing */ +#undef PCAP_SUPPORT_NETFILTER + /* target host supports USB sniffing */ #undef PCAP_SUPPORT_USB Modified: head/contrib/libpcap/configure ============================================================================== --- head/contrib/libpcap/configure Mon May 14 05:10:41 2012 (r235425) +++ head/contrib/libpcap/configure Mon May 14 05:12:56 2012 (r235426) @@ -679,6 +679,7 @@ HAVE_LINUX_TPACKET_AUXDATA V_LEX V_YACC RANLIB +AR V_CCOPT V_DEFS V_FINDALLDEVS @@ -696,6 +697,8 @@ MAN_FILE_FORMATS MAN_MISC_INFO PCAP_SUPPORT_USB USB_SRC +PCAP_SUPPORT_NETFILTER +NETFILTER_SRC PCAP_SUPPORT_BT BT_SRC PCAP_SUPPORT_CAN @@ -1293,6 +1296,7 @@ Optional Features: getaddrinfo available] --enable-optimizer-dbg build optimizer debugging code --enable-yydebug build parser debugging code + --disable-universal don't build universal on OS X --enable-bluetooth enable Bluetooth support [default=yes, if support available] --enable-can enable CAN support [default=yes, if support @@ -3229,7 +3233,24 @@ _ACEOF # or accepts command-line arguments like # those the GNU linker accepts. # - V_CCOPT="$V_CCOPT -fpic" + # Some instruction sets require -fPIC on some + # operating systems. Check for them. If you + # have a combination that requires it, add it + # here. + # + PIC_OPT=-fpic + case "$host_cpu" in + + sparc64*) + case "$host_os" in + + freebsd*) + PIC_OPT=-fPIC + ;; + esac + ;; + esac + V_CCOPT="$V_CCOPT $PIC_OPT" V_SONAME_OPT="-Wl,-soname," V_RPATH_OPT="-Wl,-rpath," ;; @@ -5425,24 +5446,29 @@ fi done -for ac_header in net/pfvar.h +for ac_header in linux/types.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -#include - +$ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext @@ -5462,19 +5488,94 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" + ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } + +fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -5484,29 +5585,33 @@ fi done -if test "$ac_cv_header_net_pfvar_h" = yes; then - # - # Check for various PF actions. - # - { echo "$as_me:$LINENO: checking whether net/pfvar.h defines PF_NAT through PF_NORDR" >&5 -echo $ECHO_N "checking whether net/pfvar.h defines PF_NAT through PF_NORDR... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF + + + +for ac_header in linux/if_packet.h netpacket/packet.h netpacket/if_packet.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon May 14 08:01:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93AB11065672; Mon, 14 May 2012 08:01:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A9778FC08; Mon, 14 May 2012 08:01:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4E81nQK021826; Mon, 14 May 2012 08:01:49 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4E81nbw021817; Mon, 14 May 2012 08:01:49 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201205140801.q4E81nbw021817@svn.freebsd.org> From: Xin LI Date: Mon, 14 May 2012 08:01:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235427 - in vendor/tcpdump/dist: . missing tests win32/Include win32/Include/Arpa win32/Include/Netinet win32/prj X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 08:01:49 -0000 Author: delphij Date: Mon May 14 08:01:48 2012 New Revision: 235427 URL: http://svn.freebsd.org/changeset/base/235427 Log: Vendor import of tcpdump 4.2.1. Added: vendor/tcpdump/dist/in_cksum.c (contents, props changed) vendor/tcpdump/dist/ppi.h (contents, props changed) vendor/tcpdump/dist/print-802_15_4.c (contents, props changed) vendor/tcpdump/dist/print-babel.c (contents, props changed) vendor/tcpdump/dist/print-carp.c (contents, props changed) vendor/tcpdump/dist/print-ppi.c (contents, props changed) vendor/tcpdump/dist/print-rpki-rtr.c (contents, props changed) vendor/tcpdump/dist/tests/02-sunrise-sunset-esp.pcap (contents, props changed) vendor/tcpdump/dist/tests/08-sunrise-sunset-aes.pcap (contents, props changed) vendor/tcpdump/dist/tests/08-sunrise-sunset-esp2.pcap (contents, props changed) vendor/tcpdump/dist/tests/QinQpacket.out vendor/tcpdump/dist/tests/QinQpacket.pcap (contents, props changed) vendor/tcpdump/dist/tests/QinQpacketv.out vendor/tcpdump/dist/tests/babel.pcap (contents, props changed) vendor/tcpdump/dist/tests/babel1.out vendor/tcpdump/dist/tests/babel1v.out vendor/tcpdump/dist/tests/eapon1.pcap (contents, props changed) vendor/tcpdump/dist/tests/empty.uu vendor/tcpdump/dist/tests/espudp1.pcap (contents, props changed) vendor/tcpdump/dist/tests/forces3vvv.out vendor/tcpdump/dist/tests/ikev2four.pcap (contents, props changed) vendor/tcpdump/dist/tests/ikev2pI2.pcap (contents, props changed) vendor/tcpdump/dist/tests/isakmp-delete-segfault.pcap (contents, props changed) vendor/tcpdump/dist/tests/isakmp-identification-segfault.pcap (contents, props changed) vendor/tcpdump/dist/tests/isakmp-pointer-loop.pcap (contents, props changed) vendor/tcpdump/dist/tests/isakmp4500.pcap (contents, props changed) vendor/tcpdump/dist/tests/lmp.pcap (contents, props changed) vendor/tcpdump/dist/tests/mpls-ldp-hello.pcap (contents, props changed) vendor/tcpdump/dist/tests/ospf-gmpls.pcap (contents, props changed) vendor/tcpdump/dist/tests/print-flags.pcap (contents, props changed) vendor/tcpdump/dist/tests/sflow_multiple_counter_30_pdus.out vendor/tcpdump/dist/tests/sflow_multiple_counter_30_pdus.pcap (contents, props changed) Deleted: vendor/tcpdump/dist/missing/addrsize.h vendor/tcpdump/dist/missing/bittypes.h vendor/tcpdump/dist/missing/resolv6.h vendor/tcpdump/dist/missing/resolv_ext.h vendor/tcpdump/dist/tests/02-sunrise-sunset-esp.puu vendor/tcpdump/dist/tests/08-sunrise-sunset-aes.puu vendor/tcpdump/dist/tests/08-sunrise-sunset-esp2.puu vendor/tcpdump/dist/tests/eapon1.puu vendor/tcpdump/dist/tests/eapon2.puu vendor/tcpdump/dist/tests/espudp1.puu vendor/tcpdump/dist/tests/forces2.pcap vendor/tcpdump/dist/tests/ikev2.puu vendor/tcpdump/dist/tests/ikev2four.puu vendor/tcpdump/dist/tests/ikev2pI2.puu vendor/tcpdump/dist/tests/isakmp-delete-segfault.puu vendor/tcpdump/dist/tests/isakmp-identification-segfault.puu vendor/tcpdump/dist/tests/isakmp-pointer-loop.puu vendor/tcpdump/dist/tests/isakmp4500.puu vendor/tcpdump/dist/tests/lmp.puu vendor/tcpdump/dist/tests/mpls-ldp-hello.puu vendor/tcpdump/dist/tests/ospf-gmpls.puu vendor/tcpdump/dist/tests/print-flags.puu vendor/tcpdump/dist/win32/Include/Arpa/tftp.h vendor/tcpdump/dist/win32/Include/Netinet/in_systm.h vendor/tcpdump/dist/win32/Include/Netinet/ip.h vendor/tcpdump/dist/win32/Include/inetprivate.h vendor/tcpdump/dist/win32/Include/telnet.h Modified: vendor/tcpdump/dist/CHANGES vendor/tcpdump/dist/CREDITS vendor/tcpdump/dist/Makefile.in vendor/tcpdump/dist/VERSION vendor/tcpdump/dist/acconfig.h vendor/tcpdump/dist/aclocal.m4 vendor/tcpdump/dist/addrtoname.c vendor/tcpdump/dist/addrtoname.h vendor/tcpdump/dist/bootp.h vendor/tcpdump/dist/config.h.in vendor/tcpdump/dist/configure vendor/tcpdump/dist/configure.in vendor/tcpdump/dist/cpack.c vendor/tcpdump/dist/cpack.h vendor/tcpdump/dist/ethertype.h vendor/tcpdump/dist/forces.h vendor/tcpdump/dist/ieee802_11_radio.h vendor/tcpdump/dist/interface.h vendor/tcpdump/dist/ip.h vendor/tcpdump/dist/ip6.h vendor/tcpdump/dist/ipproto.c vendor/tcpdump/dist/ipproto.h vendor/tcpdump/dist/netdissect.h vendor/tcpdump/dist/ospf.h vendor/tcpdump/dist/oui.c vendor/tcpdump/dist/oui.h vendor/tcpdump/dist/print-802_11.c vendor/tcpdump/dist/print-ap1394.c vendor/tcpdump/dist/print-arcnet.c vendor/tcpdump/dist/print-arp.c vendor/tcpdump/dist/print-atalk.c vendor/tcpdump/dist/print-atm.c vendor/tcpdump/dist/print-bgp.c vendor/tcpdump/dist/print-cdp.c vendor/tcpdump/dist/print-chdlc.c vendor/tcpdump/dist/print-dccp.c vendor/tcpdump/dist/print-dhcp6.c vendor/tcpdump/dist/print-eigrp.c vendor/tcpdump/dist/print-enc.c vendor/tcpdump/dist/print-ether.c vendor/tcpdump/dist/print-forces.c vendor/tcpdump/dist/print-fr.c vendor/tcpdump/dist/print-gre.c vendor/tcpdump/dist/print-icmp.c vendor/tcpdump/dist/print-icmp6.c vendor/tcpdump/dist/print-igmp.c vendor/tcpdump/dist/print-ip.c vendor/tcpdump/dist/print-ip6.c vendor/tcpdump/dist/print-ipnet.c vendor/tcpdump/dist/print-ipx.c vendor/tcpdump/dist/print-isoclns.c vendor/tcpdump/dist/print-juniper.c vendor/tcpdump/dist/print-lane.c vendor/tcpdump/dist/print-ldp.c vendor/tcpdump/dist/print-llc.c vendor/tcpdump/dist/print-lldp.c vendor/tcpdump/dist/print-lmp.c vendor/tcpdump/dist/print-lspping.c vendor/tcpdump/dist/print-mobile.c vendor/tcpdump/dist/print-mpls.c vendor/tcpdump/dist/print-null.c vendor/tcpdump/dist/print-ospf.c vendor/tcpdump/dist/print-pflog.c vendor/tcpdump/dist/print-pgm.c vendor/tcpdump/dist/print-pim.c vendor/tcpdump/dist/print-ppp.c vendor/tcpdump/dist/print-rrcp.c vendor/tcpdump/dist/print-rsvp.c vendor/tcpdump/dist/print-sctp.c vendor/tcpdump/dist/print-sflow.c vendor/tcpdump/dist/print-sl.c vendor/tcpdump/dist/print-sll.c vendor/tcpdump/dist/print-slow.c vendor/tcpdump/dist/print-sunrpc.c vendor/tcpdump/dist/print-symantec.c vendor/tcpdump/dist/print-tcp.c vendor/tcpdump/dist/print-tftp.c vendor/tcpdump/dist/print-udp.c vendor/tcpdump/dist/print-vrrp.c vendor/tcpdump/dist/tcp.h vendor/tcpdump/dist/tcpdump-stdinc.h vendor/tcpdump/dist/tcpdump.1.in vendor/tcpdump/dist/tcpdump.c vendor/tcpdump/dist/tests/TESTLIST vendor/tcpdump/dist/tests/TESTonce vendor/tcpdump/dist/tests/dio.out vendor/tcpdump/dist/tests/forces1.out vendor/tcpdump/dist/tests/forces1.pcap vendor/tcpdump/dist/tests/forces1vvv.out vendor/tcpdump/dist/tests/forces1vvvv.out vendor/tcpdump/dist/tests/ikev2fourv.out vendor/tcpdump/dist/tests/ikev2fourv4.out vendor/tcpdump/dist/tests/lmp.sh vendor/tcpdump/dist/tests/print-flags.sh vendor/tcpdump/dist/udp.h vendor/tcpdump/dist/win32/prj/GNUmakefile vendor/tcpdump/dist/win32/prj/WinDump.dsp Modified: vendor/tcpdump/dist/CHANGES ============================================================================== --- vendor/tcpdump/dist/CHANGES Mon May 14 05:12:56 2012 (r235426) +++ vendor/tcpdump/dist/CHANGES Mon May 14 08:01:48 2012 (r235427) @@ -1,3 +1,64 @@ +Friday December 9, 2011. guy@alum.mit.edu. + Summary for 4.2.1 tcpdump release + Only build the Babel printer if IPv6 is enabled. + Support Babel on port 6696 as well as 6697. + Include ppi.h in release tarball. + Include all the test files in the release tarball, and don't + "include" test files that no longer exist. + Don't assume we have - check for it. + Support "-T carp" as a way of dissecting IP protocol 112 as CARP + rather than VRRP. + Support Hilscher NetAnalyzer link-layer header format. + Constify some pointers and fix compiler warnings. + Get rid of never-true test. + Fix an unintended fall-through in a case statement in the ARP + printer. + Fix several cases where sizeof(sizeof(XXX)) was used when just + sizeof(XXX) was intended. + Make stricter sanity checks in the ES-IS printer. + Get rid of some GCCisms that caused builds to fai with compilers + that don't support them. + Fix typo in man page. + Added length checks to Babel printer. + +Sunday July 24, 2011. mcr@sandelman.ca. + Summary for 4.2.+ + merged 802.15.4 decoder from Dmitry Eremin-Solenikov + updates to forces for new port numbers + Use "-H", not "-h", for the 802.11s option. (-h always help) + Better ICMPv6 checksum handling. + add support for the RPKI/Router Protocol, per -ietf-sidr-rpki-rtr-12 + get rid of uuencoded pcap test files, git can do binary. + sFlow changes for 64-bit counters. + fixes for PPI packet header handling and printing. + Add DCB Exchange protocol (DCBX) version 1.01. + Babel dissector, from Juliusz Chroboczek and Grégoire Henry. + improvements to radiotap for rate values > 127. + Many improvements to ForCES decode, including fix SCTP TML port + updated RPL type code to RPL-17 draft + Improve printout of DHCPv6 options. + added support and test case for QinQ (802.1q VLAN) packets + Handle DLT_IEEE802_15_4_NOFCS like DLT_IEEE802_15_4. + Build fixes for Sparc and other machines with alignment restrictions. + Merged changes from Debian package. + PGM: Add ACK decoding and add PGMCC DATA and FEEDBACK options. + Build fixes for OSX (Snow Leopard and others) + Add support for IEEE 802.15.4 packets + +Tue. July 20, 2010. guy@alum.mit.edu. + Summary for 4.1.2 tcpdump release + If -U is specified, flush the file after creating it, so it's + not zero-length + Fix TCP flags output description, and some typoes, in the man + page + Add a -h flag, and only attempt to recognize 802.11s mesh + headers if it's set + When printing the link-layer type list, send *all* output to + stderr + Include the CFLAGS setting when configure was run in the + compiler flags + Thu. April 1, 2010. guy@alum.mit.edu. Summary for 4.1.1 tcpdump release Fix build on systems with PF, such as FreeBSD and OpenBSD. Modified: vendor/tcpdump/dist/CREDITS ============================================================================== --- vendor/tcpdump/dist/CREDITS Mon May 14 05:12:56 2012 (r235426) +++ vendor/tcpdump/dist/CREDITS Mon May 14 08:01:48 2012 (r235427) @@ -1,189 +1,203 @@ This file lists people who have contributed to tcpdump: The current maintainers: - Bill Fenner - David Young - Fulvio Risso - Guy Harris - Hannes Gredler - Michael Richardson + Bill Fenner + David Young + Fulvio Risso + Guy Harris + Hannes Gredler + Michael Richardson Additional people who have contributed patches: - Aaron Campbell - Alfredo Andres - Albert Chin - Ananth Suryanarayana - Andrea Bittau - Andrew Brown - Andrew Church - Andrew Hintz - Andrew Silent - Andrew Tridgell - Andy Heffernan - Arkadiusz Miskiewicz - Armando L. Caro Jr. - Arnaldo Carvalho de Melo - Ben Byer - Atsushi Onoe - Ben Smithurst - Bert Vermeulen - Bjoern A. Zeeb - Brent L. Bates - Brian Ginsbach - Bruce M. Simpson - Carles Kishimoto Bisbe - Charlie Lenahan - Charles M. Hannum - Chris Cogdon - Chris G. Demetriou - Christian Sievers - Chris Jepeway - Chris Larson - Craig Rodrigues - Crist J. Clark - Daniel Hagerty - Darren Reed - David Binderman - David Horn - David Smith - David Young - Don Ebright - Eddie Kohler - Elmar Kirchner - Fang Wang - Florent Drouin - Florian Forster - Francis Dupont - Francisco Matias Cuenca-Acuna - Francois-Xavier Le Bail - Frank Volf - Fulvio Risso - George Bakos - Gerald Combs - Gerrit Renker - Gert Doering - Greg Minshall - Greg Stark - Gilbert Ramirez Jr. - Gisle Vanem - Hannes Viertel - Hank Leininger - Harry Raaymakers - Heinz-Ado Arnolds - Hendrik Scholz - Ian McDonald - Ilpo Järvinen - Jacek Tobiasz - Jakob Schlyter - Jamal Hadi Salim - Jan Oravec - Jason R. Thorpe - Jefferson Ogata - Jeffrey Hutzelman - Jesper Peterson - Jim Hutchins - Jonathan Heusser - Tatuya Jinmei - João Medeiros - Joerg Mayer - Jørgen Thomsen - Julian Cowley - Kaarthik Sivakumar - Karl Norby - Kazushi Sugyo - Kelly Carmichael - Ken Hornstein - Kevin Steves - Klaus Klein - Kris Kennaway - Krzysztof Halasa - Larry Lile - Lennert Buytenhek - Loris Degioanni - Love Hörnquist-Åstrand - Lucas C. Villa Real - Luis Martin Garcia - Maciej W. Rozycki - Manu Pathak - Marc Binderberger - Marc A. Lehmann - Mark Ellzey Thomas - Marko Kiiskila - Markus Schöpflin - Marshall Rose - Martin Husemann - Max Laier - Michael A. Meffie III - Michael Madore - Michael Riepe - Michael Shalayeff - Michael Shields - Michael T. Stolarchuk - Michele "mydecay" Marchetto - Mike Frysinger - Monroe Williams - Motonori Shindo - Nathan J. Williams - Nathaniel Couper-Noles - Neil T. Spring - Niels Provos - Nickolai Zeldovich - Nicolas Ferrero - Noritoshi Demizu - Olaf Kirch - Onno van der Linden - Paolo Abeni - Pascal Hennequin - Pasvorn Boonmark - Paul Mundt - Paul S. Traina - Pavlin Radoslavov - Pekka Savola - Peter Fales - Peter Jeremy - - Peter Volkov - Phil Wood - Rafal Maszkowski - Randy Sofia - Raphael Raimbault - Rick Cheng - Rick Jones - Rick Watson - Rob Braun - Robert Edmonds - Roderick Schertler - Sagun Shakya - Sami Farin - Scott Rose - Sebastian Krahmer - Sebastien Raveau - Sebastien Vincent - Sepherosa Ziehau - Seth Webster - Shinsuke Suzuki - Steinar Haug - Swaminathan Chandrasekaran - Takashi Yamamoto - Terry Kennedy - Timo Koskiahde - Tony Li - Toshihiro Kanda - Uns Lider - Victor Oppleman - Wesley Griffin - Wesley Shields - Wilbert de Graaf - Will Drewry - William J. Hulley - Yen Yen Lim - Yoshifumi Nishida + A Costa + Aaron Campbell + Alfredo Andres + Albert Chin + Ananth Suryanarayana + Andrea Bittau + Andrew Brown + Andrew Church + Andrew Hintz + Andrew Nording + Andrew Tridgell + Andy Heffernan + Anton Bernal + Arkadiusz Miskiewicz + Armando L. Caro Jr. + Arnaldo Carvalho de Melo + Ben Byer + Atsushi Onoe + Ben Smithurst + Bert Vermeulen + Bjoern A. Zeeb + Brent L. Bates + Brian Ginsbach + Bruce M. Simpson + Carles Kishimoto Bisbe + Charlie Lenahan + Charles M. Hannum + Chris Cogdon + Chris G. Demetriou + Chris Jepeway + Chris Larson + Christian Sievers + Christophe Rhodes + Craig Rodrigues + Crist J. Clark + Daniel Hagerty + Darren Reed + David Binderman + David Horn + David Smith + David Young + Dmitry Eremin-Solenikov + Don Ebright + Eddie Kohler + Elmar Kirchner + Fang Wang + Florent Drouin + Florian Forster + Francis Dupont + Francisco Matias Cuenca-Acuna + Francois-Xavier Le Bail + Frank Volf + Fulvio Risso + George Bakos + Gerald Combs + Gerrit Renker + Gert Doering + Greg Minshall + Greg Stark + Grégoire Henry + Gilbert Ramirez Jr. + Gisle Vanem + Hannes Viertel + Hank Leininger + Harry Raaymakers + Heinz-Ado Arnolds + Hendrik Scholz + Ian McDonald + Ilpo Järvinen + Jacek Tobiasz + Jakob Schlyter + Jamal Hadi Salim + Jan Oravec + Jason R. Thorpe + Jefferson Ogata + Jeffrey Hutzelman + Jesper Peterson + Jim Hutchins + Jonathan Heusser + Tatuya Jinmei + João Medeiros + Joerg Mayer + Jørgen Thomsen + Julian Cowley + Juliusz Chroboczek + Kaarthik Sivakumar + Kaladhar Musunuru + Karl Norby + Kazushi Sugyo + Kelly Carmichael + Ken Hornstein + Kevin Steves + Klaus Klein + Kris Kennaway + Krzysztof Halasa + Larry Lile + Lennert Buytenhek + Loris Degioanni + Love Hörnquist-Åstrand + Lucas C. Villa Real + Luis MartinGarcia + Maciej W. Rozycki + Manu Pathak + Marc Binderberger + Marc A. Lehmann + Mark Ellzey Thomas + Marko Kiiskila + Markus Schöpflin + Marshall Rose + Martin Husemann + Max Laier + Michael A. Meffie III + Michael Madore + Michael Riepe + Michael Shalayeff + Michael Shields + Michael T. Stolarchuk + Michal Sekletar + Michele "mydecay" Marchetto + Mike Frysinger + Minto Jeyananth + Monroe Williams + Motonori Shindo + Nathan J. Williams + Nathaniel Couper-Noles + Neil T. Spring + Niels Provos + Nickolai Zeldovich + Nicolas Ferrero + Noritoshi Demizu + Olaf Kirch + Onno van der Linden + Paolo Abeni + Pascal Hennequin + Pasvorn Boonmark + Paul Ferrell + Paul Mundt + Paul S. Traina + Pavlin Radoslavov + Pawel Worach + Pekka Savola + Peter Fales + Peter Jeremy + + Peter Volkov + Phil Wood + Rafal Maszkowski + Randy Sofia + Raphael Raimbault + Rick Cheng + Rick Jones + Rick Watson + Rob Braun + Robert Edmonds + Roderick Schertler + Romain Francoise + Sagun Shakya + Sami Farin + Scott Mcmillan + Scott Rose + Sebastian Krahmer + Sebastien Raveau + Sebastien Vincent + Sepherosa Ziehau + Seth Webster + Shinsuke Suzuki + Steinar Haug + Swaminathan Chandrasekaran + Takashi Yamamoto + Terry Kennedy + Timo Koskiahde + Tony Li + Toshihiro Kanda + Uns Lider + Victor Oppleman + Weesan Lee + Wesley Griffin + Wesley Shields + Wilbert de Graaf + Will Drewry + William J. Hulley + Yen Yen Lim + Yoshifumi Nishida The original LBL crew: - Steve McCanne - Craig Leres - Van Jacobson + Steve McCanne + Craig Leres + Van Jacobson Past maintainers: - Jun-ichiro itojun Hagino + Jun-ichiro itojun Hagino Modified: vendor/tcpdump/dist/Makefile.in ============================================================================== --- vendor/tcpdump/dist/Makefile.in Mon May 14 05:12:56 2012 (r235426) +++ vendor/tcpdump/dist/Makefile.in Mon May 14 08:01:48 2012 (r235427) @@ -26,6 +26,7 @@ # Top level hierarchy prefix = @prefix@ exec_prefix = @exec_prefix@ +datarootdir = @datarootdir@ # Pathname of directory to install the binary sbindir = @sbindir@ # Pathname of directory to install the man page @@ -46,7 +47,8 @@ INCLS = -I. @V_INCLS@ DEFS = @DEFS@ @CPPFLAGS@ @V_DEFS@ # Standard CFLAGS -CFLAGS = $(CCOPT) $(DEFS) $(INCLS) +CFLAGS = @CFLAGS@ +FULL_CFLAGS = $(CCOPT) $(DEFS) $(INCLS) $(CFLAGS) # Standard LDFLAGS LDFLAGS = @LDFLAGS@ @@ -64,15 +66,15 @@ RANLIB = @RANLIB@ # problem if you don't own the file but can write to the directory. .c.o: @rm -f $@ - $(CC) $(CFLAGS) -c $(srcdir)/$*.c + $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c CSRC = addrtoname.c af.c checksum.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \ - nlpid.c l2vpn.c machdep.c parsenfsfh.c \ - print-802_11.c print-ap1394.c print-ah.c print-arcnet.c \ - print-aodv.c print-arp.c print-ascii.c print-atalk.c print-atm.c \ - print-beep.c print-bfd.c print-bgp.c print-bootp.c print-bt.c \ - print-cdp.c print-cfm.c print-chdlc.c print-cip.c print-cnfp.c \ - print-dccp.c print-decnet.c \ + nlpid.c l2vpn.c machdep.c parsenfsfh.c in_cksum.c \ + print-802_11.c print-802_15_4.c print-ap1394.c print-ah.c \ + print-arcnet.c print-aodv.c print-arp.c print-ascii.c print-atalk.c \ + print-atm.c print-beep.c print-bfd.c print-bgp.c \ + print-bootp.c print-bt.c print-carp.c print-cdp.c print-cfm.c \ + print-chdlc.c print-cip.c print-cnfp.c print-dccp.c print-decnet.c \ print-domain.c print-dtp.c print-dvmrp.c print-enc.c print-egp.c \ print-eap.c print-eigrp.c\ print-esp.c print-ether.c print-fddi.c print-fr.c \ @@ -83,8 +85,9 @@ CSRC = addrtoname.c af.c checksum.c cpac print-lmp.c print-lspping.c print-lwapp.c \ print-lwres.c print-mobile.c print-mpcp.c print-mpls.c print-msdp.c \ print-nfs.c print-ntp.c print-null.c print-olsr.c print-ospf.c \ - print-pgm.c print-pim.c print-ppp.c print-pppoe.c print-pptp.c \ - print-radius.c print-raw.c print-rip.c print-rrcp.c print-rsvp.c \ + print-pgm.c print-pim.c \ + print-ppi.c print-ppp.c print-pppoe.c print-pptp.c \ + print-radius.c print-raw.c print-rip.c print-rpki-rtr.c print-rrcp.c print-rsvp.c \ print-rx.c print-sctp.c print-sflow.c print-sip.c print-sl.c print-sll.c \ print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \ print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \ @@ -165,6 +168,7 @@ HDR = \ oui.h \ pcap-missing.h \ pmap_prot.h \ + ppi.h \ ppp.h \ route6d.h \ rpc_auth.h \ @@ -226,16 +230,12 @@ EXTRA_DIST = \ lbl/os-ultrix4.h \ makemib \ missing/addrinfo.h \ - missing/addrsize.h \ - missing/bittypes.h \ missing/dlnames.c \ missing/datalinks.c \ missing/getnameinfo.c \ missing/inet_aton.c \ missing/inet_ntop.c \ missing/inet_pton.c \ - missing/resolv6.h \ - missing/resolv_ext.h \ missing/snprintf.c \ missing/sockstorage.h \ missing/strdup.c \ @@ -245,6 +245,7 @@ EXTRA_DIST = \ mkdep \ packetdat.awk \ pcap_dump_ftell.c \ + print-babel.c \ print-dhcp6.c \ print-frag6.c \ print-icmp6.c \ @@ -262,12 +263,18 @@ EXTRA_DIST = \ stime.awk \ strcasecmp.c \ tcpdump.1.in \ - tests/02-sunrise-sunset-esp.puu \ - tests/08-sunrise-sunset-aes.puu \ - tests/08-sunrise-sunset-esp2.puu \ + tests/02-sunrise-sunset-esp.pcap \ + tests/08-sunrise-sunset-aes.pcap \ + tests/08-sunrise-sunset-esp2.pcap \ + tests/QinQpacket.out \ + tests/QinQpacket.pcap \ + tests/QinQpacketv.out \ tests/TESTLIST \ tests/TESTonce \ tests/TESTrun.sh \ + tests/babel.pcap \ + tests/babel1.out \ + tests/babel1v.out \ tests/bgp-infinite-loop.pcap \ tests/bgp_vpn_attrset.out \ tests/bgp_vpn_attrset.pcap \ @@ -279,8 +286,8 @@ EXTRA_DIST = \ tests/e1000g.pcap \ tests/eapon1.gdbinit \ tests/eapon1.out \ - tests/eapon1.puu \ - tests/eapon2.puu \ + tests/eapon1.pcap \ + tests/empty.uu \ tests/esp-secrets.txt \ tests/esp0.out \ tests/esp1.gdbinit \ @@ -292,61 +299,57 @@ EXTRA_DIST = \ tests/esp5.gdbinit \ tests/esp5.out \ tests/espudp1.out \ - tests/espudp1.puu \ + tests/espudp1.pcap \ tests/forces1.out \ tests/forces1.pcap \ tests/forces1vvv.out \ tests/forces1vvvv.out \ tests/forces2.out \ - tests/forces2.pcap \ tests/forces2v.out \ tests/forces2vv.out \ - tests/ikev2.puu \ + tests/forces3vvv.out \ tests/ikev2four.out \ - tests/ikev2four.puu \ + tests/ikev2four.pcap \ tests/ikev2fourv.out \ tests/ikev2fourv4.out \ tests/ikev2pI2-secrets.txt \ tests/ikev2pI2.out \ - tests/ikev2pI2.puu \ - tests/isakmp-delete-segfault.puu \ - tests/isakmp-identification-segfault.puu \ - tests/isakmp-pointer-loop.puu \ + tests/ikev2pI2.pcap \ + tests/isakmp-delete-segfault.pcap \ + tests/isakmp-identification-segfault.pcap \ + tests/isakmp-pointer-loop.pcap \ tests/isakmp1.out \ tests/isakmp2.out \ tests/isakmp3.out \ tests/isakmp4.out \ - tests/isakmp4500.puu \ + tests/isakmp4500.pcap \ tests/isis-infinite-loop.pcap \ tests/ldp-infinite-loop.pcap \ tests/lmp.out \ - tests/lmp.puu \ + tests/lmp.pcap \ tests/lmp.sh \ tests/lspping-fec-ldp.pcap \ tests/lspping-fec-rsvp.pcap \ tests/mpls-ldp-hello.out \ - tests/mpls-ldp-hello.puu \ + tests/mpls-ldp-hello.pcap \ tests/mpls-traceroute.pcap \ tests/ospf-gmpls.out \ - tests/ospf-gmpls.puu \ + tests/ospf-gmpls.pcap \ tests/print-A.out \ tests/print-AA.out \ tests/print-capX.out \ tests/print-capXX.out \ - tests/print-flags.puu \ + tests/print-flags.pcap \ tests/print-flags.sh \ tests/print-x.out \ tests/print-xx.out \ tests/rsvp-infinite-loop.pcap \ + tests/sflow_multiple_counter_30_pdus.out \ + tests/sflow_multiple_counter_30_pdus.pcap \ vfprintf.c \ - win32/Include/Arpa/tftp.h \ win32/Include/errno.h \ win32/Include/getopt.h \ - win32/Include/inetprivate.h \ - win32/Include/telnet.h \ win32/Include/w32_fzs.h \ - win32/Include/Netinet/in_systm.h \ - win32/Include/Netinet/ip.h \ win32/Src/getopt.c \ win32/prj/GNUmakefile \ win32/prj/WinDump.dsp \ @@ -356,7 +359,7 @@ all: $(PROG) $(PROG): $(OBJ) @V_PCAPDEP@ @rm -f $@ - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) + $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ) @rm -f $@ @@ -364,30 +367,30 @@ $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ) $(RANLIB) $@ datalinks.o: $(srcdir)/missing/datalinks.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c dlnames.o: $(srcdir)/missing/dlnames.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c getnameinfo.o: $(srcdir)/missing/getnameinfo.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c getaddrinfo.o: $(srcdir)/missing/getaddrinfo.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c inet_pton.o: $(srcdir)/missing/inet_pton.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c inet_ntop.o: $(srcdir)/missing/inet_ntop.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c inet_aton.o: $(srcdir)/missing/inet_aton.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c snprintf.o: $(srcdir)/missing/snprintf.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c strlcat.o: $(srcdir)/missing/strlcat.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c strlcpy.o: $(srcdir)/missing/strlcpy.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c strsep.o: $(srcdir)/missing/strsep.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c version.o: version.c - $(CC) $(CFLAGS) -c version.c + $(CC) $(FULL_CFLAGS) -c version.c version.c: $(srcdir)/VERSION @rm -f $@ @@ -423,9 +426,9 @@ clean: distclean: rm -f $(CLEANFILES) Makefile config.cache config.log config.status \ config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1 + rm -rf autom4te.cache check: tcpdump - uudecode --help || (echo "No uudecode program found, not running tests"; echo "apt-get/rpm install sharutils?"; exit 1) (cd tests && ./TESTrun.sh) tags: $(TAGFILES) Modified: vendor/tcpdump/dist/VERSION ============================================================================== --- vendor/tcpdump/dist/VERSION Mon May 14 05:12:56 2012 (r235426) +++ vendor/tcpdump/dist/VERSION Mon May 14 08:01:48 2012 (r235427) @@ -1 +1 @@ -4.1.1 +4.2.1 Modified: vendor/tcpdump/dist/acconfig.h ============================================================================== --- vendor/tcpdump/dist/acconfig.h Mon May 14 05:12:56 2012 (r235426) +++ vendor/tcpdump/dist/acconfig.h Mon May 14 08:01:48 2012 (r235427) @@ -8,12 +8,6 @@ /* Define if you enable support for the libsmi. */ #undef LIBSMI -/* define if you have struct __res_state_ext */ -#undef HAVE_RES_STATE_EXT - -/* define if your struct __res_state has the nsort member */ -#undef HAVE_NEW_RES_STATE - /* define if you have the addrinfo function. */ #undef HAVE_ADDRINFO @@ -23,15 +17,6 @@ /* define ifyou have the h_errno variable. */ #undef HAVE_H_ERRNO -/* define if IN6ADDRSZ is defined (XXX not used!) */ -#undef HAVE_IN6ADDRSZ - -/* define if INADDRSZ is defined (XXX not used!) */ -#undef HAVE_INADDRSZ - -/* define if RES_USE_INET6 is defined */ -#undef HAVE_RES_USE_INET6 - /* define if you have struct sockaddr_storage */ #undef HAVE_SOCKADDR_STORAGE @@ -68,9 +53,6 @@ /* define if you have getrpcbynumber() */ #undef HAVE_GETRPCBYNUMBER -/* AIX hack. */ -#undef _SUN - /* Workaround for missing 64-bit formats */ #undef PRId64 #undef PRIo64 Modified: vendor/tcpdump/dist/aclocal.m4 ============================================================================== --- vendor/tcpdump/dist/aclocal.m4 Mon May 14 05:12:56 2012 (r235426) +++ vendor/tcpdump/dist/aclocal.m4 Mon May 14 08:01:48 2012 (r235427) @@ -47,7 +47,7 @@ AC_DEFUN(AC_LBL_C_INIT_BEFORE_CC, $1="-O" $2="" if test "${srcdir}" != "." ; then - $2="-I\$(srcdir)" + $2="-I$srcdir" fi if test "${CFLAGS+set}" = set; then LBL_CFLAGS="$CFLAGS" @@ -309,14 +309,22 @@ AC_DEFUN(AC_LBL_LIBPCAP, # # Look for pcap-config. # - AC_PATH_PROG(PCAP_CONFIG, pcap-config) + AC_PATH_TOOL(PCAP_CONFIG, pcap-config) if test -n "$PCAP_CONFIG" ; then # # Found - use it to get the include flags for # libpcap and the flags to link with libpcap. # - $2="`\"$PCAP_CONFIG\" --cflags` $$2" - libpcap="`\"$PCAP_CONFIG\" --libs`" + # Please read section 11.6 "Shell Substitutions" + # in the autoconf manual before doing anything + # to this that involves quoting. Especially note + # the statement "There is just no portable way to use + # double-quoted strings inside double-quoted back-quoted + # expressions (pfew!)." + # + cflags=`"$PCAP_CONFIG" --cflags` + $2="$cflags $$2" + libpcap=`"$PCAP_CONFIG" --libs` else # # Not found; look for pcap. @@ -378,9 +386,17 @@ AC_DEFUN(AC_LBL_LIBPCAP, # The libpcap directory has a pcap-config script. # Use it to get any additioal libraries needed # to link with the libpcap archive library in - # that directory + # that directory. + # + # Please read section 11.6 "Shell Substitutions" + # in the autoconf manual before doing anything + # to this that involves quoting. Especially note + # the statement "There is just no portable way to use + # double-quoted strings inside double-quoted back-quoted + # expressions (pfew!)." # - libpcap="$libpcap `\"$PCAP_CONFIG\" --additional-libs --static`" + additional_libs=`"$PCAP_CONFIG" --additional-libs --static` + libpcap="$libpcap $additional_libs" fi fi LIBS="$libpcap $LIBS" @@ -418,6 +434,21 @@ AC_DEFUN(AC_LBL_LIBPCAP, fi dnl + dnl Check for "pcap_loop()", to make sure we found a working + dnl libpcap and have all the right other libraries with which + dnl to link. (Otherwise, the checks below will fail, not + dnl because the routines are missing from the library, but + dnl because we aren't linking properly with libpcap, and + dnl that will cause confusing errors at build time.) + dnl + AC_CHECK_FUNC(pcap_loop,, + [ + AC_MSG_ERROR( +[Report this to tcpdump-workers@lists.tcpdump.org, and include the +config.log file in your report]) + ]) + + dnl dnl Check for "pcap_list_datalinks()", "pcap_set_datalink()", dnl and "pcap_datalink_name_to_val()", and use substitute versions dnl if they're not present. @@ -1057,113 +1088,6 @@ AC_DEFUN(AC_STRUCT_SA_STORAGE, [ ]) dnl -dnl Checks for macro of IP address size -AC_DEFUN(AC_CHECK_ADDRSZ, [ - $1=yes -dnl check for INADDRSZ - AC_MSG_CHECKING(for INADDRSZ) - AC_CACHE_VAL(ac_cv_inaddrsz, - AC_TRY_COMPILE([ -# include ], - [int a = INADDRSZ], - ac_cv_inaddrsz=yes, - ac_cv_inaddrsz=no)) - AC_MSG_RESULT($ac_cv_inaddrsz) - if test $ac_cv_inaddrsz = yes; then - AC_DEFINE(HAVE_INADDRSZ) - else - $1=no - fi -dnl check for IN6ADDRSZ - AC_MSG_CHECKING(for IN6ADDRSZ) - AC_CACHE_VAL(ac_cv_in6addrsz, - AC_TRY_COMPILE([ -# include ], - [int a = IN6ADDRSZ], - ac_cv_in6addrsz=yes, - ac_cv_in6addrsz=no)) - AC_MSG_RESULT($ac_cv_in6addrsz) - if test $ac_cv_in6addrsz = yes; then - AC_DEFINE(HAVE_IN6ADDRSZ) - else - $1=no - fi -]) - -dnl -dnl check for RES_USE_INET6 -AC_DEFUN(AC_CHECK_RES_USE_INET6, [ - AC_MSG_CHECKING(for RES_USE_INET6) - AC_CACHE_VAL($1, - AC_TRY_COMPILE([ -# include -# include -# include ], - [int a = RES_USE_INET6], - $1=yes, - $1=no)) - AC_MSG_RESULT($$1) - if test $$1 = yes; then - AC_DEFINE(HAVE_RES_USE_INET6) - fi -]) - -dnl -dnl check for AAAA -AC_DEFUN(AC_CHECK_AAAA, [ - AC_MSG_CHECKING(for AAAA) - AC_CACHE_VAL($1, - AC_TRY_COMPILE([ -# include -# include ], - [int a = T_AAAA], - $1=yes, - $1=no)) - AC_MSG_RESULT($$1) - if test $$1 = yes; then - AC_DEFINE(HAVE_AAAA) - fi -]) - -dnl -dnl check for struct res_state_ext -AC_DEFUN(AC_STRUCT_RES_STATE_EXT, [ - AC_MSG_CHECKING(for res_state_ext) - AC_CACHE_VAL($1, - AC_TRY_COMPILE([ -# include -# include -# include -# include ], - [struct __res_state_ext e], - $1=yes, - $1=no)) - AC_MSG_RESULT($$1) - if test $$1 = yes; then - AC_DEFINE(HAVE_RES_STATE_EXT) - fi -]) - -dnl -dnl check for struct res_state_ext -AC_DEFUN(AC_STRUCT_RES_STATE, [ - AC_MSG_CHECKING(for nsort in res_state) - AC_CACHE_VAL($1, - AC_TRY_COMPILE([ -# include -# include -# include -# include ], - [struct __res_state e; e.nsort = 0], - $1=yes, - $1=no)) - AC_MSG_RESULT($$1) - if test $$1 = yes; then - AC_DEFINE(HAVE_NEW_RES_STATE) - fi -]) - -dnl dnl check for h_errno AC_DEFUN(AC_VAR_H_ERRNO, [ AC_MSG_CHECKING(for h_errno) @@ -1187,7 +1111,7 @@ dnl AC_DEFUN(AC_C___ATTRIBUTE__, [ AC_MSG_CHECKING(for __attribute__) AC_CACHE_VAL(ac_cv___attribute__, [ -AC_COMPILE_IFELSE( +AC_COMPILE_IFELSE([ AC_LANG_SOURCE([[ #include @@ -1204,7 +1128,7 @@ main(int argc, char **argv) { foo(); } - ]]), + ]])], ac_cv___attribute__=yes, ac_cv___attribute__=no)]) if test "$ac_cv___attribute__" = "yes"; then @@ -1225,7 +1149,7 @@ dnl AC_DEFUN(AC_C___ATTRIBUTE___FORMAT_FUNCTION_POINTER, [ AC_MSG_CHECKING([whether __attribute__((format)) can be applied to function pointers]) AC_CACHE_VAL(ac_cv___attribute___format_function_pointer, [ -AC_COMPILE_IFELSE( +AC_COMPILE_IFELSE([ AC_LANG_SOURCE([[ #include @@ -1237,7 +1161,7 @@ main(int argc, char **argv) { (*foo)("%s", "test"); } - ]]), + ]])], ac_cv___attribute___format_function_pointer=yes, ac_cv___attribute___format_function_pointer=no)]) if test "$ac_cv___attribute___format_function_pointer" = "yes"; then Modified: vendor/tcpdump/dist/addrtoname.c ============================================================================== --- vendor/tcpdump/dist/addrtoname.c Mon May 14 05:12:56 2012 (r235426) +++ vendor/tcpdump/dist/addrtoname.c Mon May 14 08:01:48 2012 (r235427) @@ -508,6 +508,34 @@ etheraddr_string(register const u_char * } const char * +le64addr_string(const u_char *ep) +{ + const unsigned int len = 8; + register u_int i; + register char *cp; + register struct enamemem *tp; + char buf[BUFSIZE]; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon May 14 08:02:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A968106566B; Mon, 14 May 2012 08:02:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C04D8FC16; Mon, 14 May 2012 08:02:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4E82XwA021886; Mon, 14 May 2012 08:02:33 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4E82XV5021885; Mon, 14 May 2012 08:02:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201205140802.q4E82XV5021885@svn.freebsd.org> From: Xin LI Date: Mon, 14 May 2012 08:02:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235428 - vendor/tcpdump/4.2.1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 08:02:33 -0000 Author: delphij Date: Mon May 14 08:02:32 2012 New Revision: 235428 URL: http://svn.freebsd.org/changeset/base/235428 Log: Tag for tcpdump 4.2.1. Added: vendor/tcpdump/4.2.1/ - copied from r235427, vendor/tcpdump/dist/ From owner-svn-src-all@FreeBSD.ORG Mon May 14 09:32:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8B22C106566C; Mon, 14 May 2012 09:32:11 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 741D68FC08; Mon, 14 May 2012 09:32:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4E9WBGL024852; Mon, 14 May 2012 09:32:11 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4E9WBEE024849; Mon, 14 May 2012 09:32:11 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201205140932.q4E9WBEE024849@svn.freebsd.org> From: Xin LI Date: Mon, 14 May 2012 09:32:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235429 - head/contrib/libpcap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 09:32:11 -0000 Author: delphij Date: Mon May 14 09:32:10 2012 New Revision: 235429 URL: http://svn.freebsd.org/changeset/base/235429 Log: Add 3 missing files that was generated but not included with the initial commit. Reported by: buganini via IRC MFC after: 2 weeks Added: head/contrib/libpcap/pcap-tstamp.manmisc head/contrib/libpcap/pcap_list_tstamp_types.3pcap head/contrib/libpcap/pcap_set_tstamp_type.3pcap Added: head/contrib/libpcap/pcap-tstamp.manmisc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libpcap/pcap-tstamp.manmisc Mon May 14 09:32:10 2012 (r235429) @@ -0,0 +1,132 @@ +.\" +.\" Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 1996, 1997 +.\" The Regents of the University of California. All rights reserved. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that: (1) source code distributions +.\" retain the above copyright notice and this paragraph in its entirety, (2) +.\" distributions including binary code include the above copyright notice and +.\" this paragraph in its entirety in the documentation or other materials +.\" provided with the distribution, and (3) all advertising materials mentioning +.\" features or use of this software display the following acknowledgement: +.\" ``This product includes software developed by the University of California, +.\" Lawrence Berkeley Laboratory and its contributors.'' Neither the name of +.\" the University nor the names of its contributors may be used to endorse +.\" or promote products derived from this software without specific prior +.\" written permission. +.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED +.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +.\" +.TH PCAP-TSTAMP 7 "22 August 2010" +.SH NAME +pcap-tstamp \- packet time stamps in libpcap +.SH DESCRIPTION +When capturing traffic, each packet is given a time stamp representing, +for incoming packets, the arrival time of the packet and, for outgoing +packets, the transmission time of the packet. This time is an +approximation of the arrival or transmission time. If it is supplied by +the operating system running on the host on which the capture is being +done, there are several reasons why it might not precisely represent the +arrival or transmission time: +.IP +if the time stamp is applied to the packet when the networking stack +receives the packet, the networking stack might not see the packet until +an interrupt is delivered for the packet or a timer event causes the +networking device driver to poll for packets, and the time stamp might +not be applied until the packet has had some processing done by other +code in the networking stack, so there might be a significant delay +between the time when the last bit of the packet is received by the +capture device and when the networking stack time-stamps the packet; +.IP +the timer used to generate the time stamps might have low resolution, +for example, it might be a timer updated once per host operating system +timer tick, with the host operating system timer ticking once every few +milliseconds; +.IP +a high-resolution timer might use a counter that runs at a rate +dependent on the processor clock speed, and that clock speed might be +adjusted upwards or downwards over time and the timer might not be able +to compensate for all those adjustments; +.IP +the host operating system's clock might be adjusted over time to match a +time standard to which the host is being synchronized, which might be +done by temporarily slowing down or speeding up the clock or by making a +single adjustment; +.IP +different CPU cores on a multi-core or multi-processor system might be +running at different speeds, or might not have time counters all +synchronized, so packets time-stamped by different cores might not have +consistent time stamps. +.LP +In addition, packets time-stamped by different cores might be +time-stamped in one order and added to the queue of packets for libpcap +to read in another order, so time stamps might not be monotonically +increasing. +.LP +Some capture devices on some platforms can provide time stamps for +packets; those time stamps are usually high-resolution time stamps, and +are usually applied to the packet when the first or last bit of the +packet arrives, and are thus more accurate than time stamps provided by +the host operating system. Those time stamps might not, however, be +synchronized with the host operating system's clock, so that, for +example, the time stamp of a packet might not correspond to the time +stamp of an event on the host triggered by the arrival of that packet. +.LP +Depending on the capture device and the software on the host, libpcap +might allow different types of time stamp to be used. The +.BR pcap_list_tstamp_types (3PCAP) +routine provides, for a packet capture handle created by +.BR pcap_create (3PCAP) +but not yet activated by +.BR pcap_activate (3PCAP), +a list of time stamp types supported by the capture device for that +handle. +The list might be empty, in which case no choice of time stamp type is +offered for that capture device. If the list is not empty, the +.BR pcap_set_tstamp_type (3PCAP) +routine can be used after a +.B pcap_create() +call and before a +.B pcap_activate() +call to specify the type of time stamp to be used on the device. +The time stamp types are listed here; the first value is the #define to +use in code, the second value is the value returned by +.B pcap_tstamp_type_val_to_name() +and accepted by +.BR pcap_tstamp_name_to_val() . +.RS 5 +.TP 5 +.BR PCAP_TSTAMP_HOST " - " host +Time stamp provided by the host on which the capture is being done. The +precision of this time stamp is unspecified; it might or might not be +synchronized with the host operating system's clock. +.TP 5 +.BR PCAP_TSTAMP_HOST_LOWPREC " - " host_lowprec +Time stamp provided by the host on which the capture is being done. +This is a low-precision time stamp, synchronized with the host operating +system's clock. +.TP 5 +.BR PCAP_TSTAMP_HOST_HIPREC " - " host_hiprec +Time stamp provided by the host on which the capture is being done. +This is a high-precision time stamp; it might or might not be +synchronized with the host operating system's clock. It might be more +expensive to fetch than +.BR PCAP_TSTAMP_HOST_LOWPREC . +.TP 5 +.BR PCAP_TSTAMP_ADAPTER " - " adapter +Time stamp provided by the network adapter on which the capture is being +done. This is a high-precision time stamp, synchronized with the host +operating system's clock. +.TP 5 +.BR PCAP_TSTAMP_ADAPTER_UNSYNCED " - " adapter_unsynced +Time stamp provided by the network adapter on which the capture is being +done. This is a high-precision time stamp; it is not synchronized with +the host operating system's clock. +.RE +.SH SEE ALSO +pcap_set_tstamp_type(3PCAP), +pcap_list_tstamp_types(3PCAP), +pcap_tstamp_type_val_to_name(3PCAP), +pcap_tstamp_name_to_val(3PCAP) Added: head/contrib/libpcap/pcap_list_tstamp_types.3pcap ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libpcap/pcap_list_tstamp_types.3pcap Mon May 14 09:32:10 2012 (r235429) @@ -0,0 +1,70 @@ +.\" +.\" Copyright (c) 1994, 1996, 1997 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that: (1) source code distributions +.\" retain the above copyright notice and this paragraph in its entirety, (2) +.\" distributions including binary code include the above copyright notice and +.\" this paragraph in its entirety in the documentation or other materials +.\" provided with the distribution, and (3) all advertising materials mentioning +.\" features or use of this software display the following acknowledgement: +.\" ``This product includes software developed by the University of California, +.\" Lawrence Berkeley Laboratory and its contributors.'' Neither the name of +.\" the University nor the names of its contributors may be used to endorse +.\" or promote products derived from this software without specific prior +.\" written permission. +.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED +.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +.\" +.TH PCAP_LIST_TSTAMP_TYPES 3PCAP "21 August 2010" +.SH NAME +pcap_list_tstamp_types, pcap_free_tstamp_types \- get a list of time +stamp types supported by a capture device, and free that list +.SH SYNOPSIS +.nf +.ft B +#include +.ft +.LP +.ft B +int pcap_list_tstamp_types(pcap_t *p, int **tstamp_typesp); +void pcap_free_tstamp_types(int *tstamp_types); +.ft +.fi +.SH DESCRIPTION +.B pcap_list_tstamp_types() +is used to get a list of the supported time stamp types of the interface +associated with the pcap descriptor. +.B pcap_list_tstamp_types() +allocates an array to hold the list and sets +.I *tstamp_typesp +to point to the array. +See +.BR pcap-tstamp (7) +for a list of all the time stamp types. +.PP +The caller is responsible for freeing the array with +.BR pcap_free_tstamp_types() , +which frees the list pointed to by +.IR tstamp_types . +.SH RETURN VALUE +.B pcap_list_tstamp_types() +returns the number of time stamp types in the array on success and +.B PCAP_ERROR +on failure. +A return value of zero means that you cannot specify a time stamp type; +you are limited to the capture device's default time stamp type. +If +.B PCAP_ERROR +is returned, +.B pcap_geterr() +or +.B pcap_perror() +may be called with +.I p +as an argument to fetch or display the error text. +.SH SEE ALSO +pcap(3PCAP), pcap_geterr(3PCAP), pcap_tstamp_type_val_to_name(3PCAP), +pcap-tstamp(7) Added: head/contrib/libpcap/pcap_set_tstamp_type.3pcap ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libpcap/pcap_set_tstamp_type.3pcap Mon May 14 09:32:10 2012 (r235429) @@ -0,0 +1,65 @@ +.\" +.\" Copyright (c) 1994, 1996, 1997 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that: (1) source code distributions +.\" retain the above copyright notice and this paragraph in its entirety, (2) +.\" distributions including binary code include the above copyright notice and +.\" this paragraph in its entirety in the documentation or other materials +.\" provided with the distribution, and (3) all advertising materials mentioning +.\" features or use of this software display the following acknowledgement: +.\" ``This product includes software developed by the University of California, +.\" Lawrence Berkeley Laboratory and its contributors.'' Neither the name of +.\" the University nor the names of its contributors may be used to endorse +.\" or promote products derived from this software without specific prior +.\" written permission. +.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED +.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +.\" +.TH PCAP_SET_TSTAMP_TYPE 3PCAP "21 August 2010" +.SH NAME +pcap_set_tstamp_type \- set the time stamp type to be used by a +capture device +.SH SYNOPSIS +.nf +.ft B +#include +.ft +.LP +.ft B +int pcap_set_tstamp_type(pcap_t *p, int tstamp_type); +.ft +.fi +.SH DESCRIPTION +.B pcap_set_tstamp_type() +sets the the type of time stamp desired for packets captured on the pcap +descriptor to the type specified by +.IR tstamp_type . +It must be called on a pcap descriptor created by +.B pcap_create() +that has not yet been activated by +.BR pcap_activate() . +.B pcap_list_tstamp_types() +will give a list of the time stamp types supported by a given capture +device. +See +.BR pcap-tstamp (7) +for a list of all the time stamp types. +.SH RETURN VALUE +.B pcap_set_tstamp_type() +returns 0 on success if the specified time stamp type is expected to be +supported by the capture device, +.B PCAP_WARNING_TSTAMP_TYPE_NOTSUP +on success if the specified time stamp type is not supported by the +capture device, +.B PCAP_ERROR_ACTIVATED +if called on a capture handle that has been activated, and +.B PCAP_ERROR_CANTSET_TSTAMP_TYPE +if the capture device doesn't support setting the time stamp type. +.SH SEE ALSO +pcap(3PCAP), +pcap_list_tstamp_types(3PCAP), +pcap_tstamp_type_name_to_val(3PCAP), +pcap-tstamp(7) From owner-svn-src-all@FreeBSD.ORG Mon May 14 09:48:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B0C71106572E; Mon, 14 May 2012 09:48:39 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9AF9E8FC16; Mon, 14 May 2012 09:48:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4E9mdd8025391; Mon, 14 May 2012 09:48:39 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4E9mdW5025389; Mon, 14 May 2012 09:48:39 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205140948.q4E9mdW5025389@svn.freebsd.org> From: Michael Tuexen Date: Mon, 14 May 2012 09:48:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235430 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 09:48:39 -0000 Author: tuexen Date: Mon May 14 09:48:39 2012 New Revision: 235430 URL: http://svn.freebsd.org/changeset/base/235430 Log: MFC r235280: Remove a constant which is only used on non-FreeBSD platform. (The actual code for the socket option handling has been #ifdefed out forever...) Modified: stable/9/sys/netinet/sctp.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp.h ============================================================================== --- stable/9/sys/netinet/sctp.h Mon May 14 09:32:10 2012 (r235429) +++ stable/9/sys/netinet/sctp.h Mon May 14 09:48:39 2012 (r235430) @@ -265,8 +265,6 @@ struct sctp_paramhdr { #define SCTP_PEELOFF 0x0000800a /* the real worker for sctp_getaddrlen() */ #define SCTP_GET_ADDR_LEN 0x0000800b -/* temporary workaround for Apple listen() issue, no args used */ -#define SCTP_LISTEN_FIX 0x0000800c /* Debug things that need to be purged */ #define SCTP_SET_INITIAL_DBG_SEQ 0x00009f00 From owner-svn-src-all@FreeBSD.ORG Mon May 14 09:51:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84B2B106566C; Mon, 14 May 2012 09:51:44 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E95B8FC17; Mon, 14 May 2012 09:51:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4E9piEB025533; Mon, 14 May 2012 09:51:44 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4E9piUf025531; Mon, 14 May 2012 09:51:44 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205140951.q4E9piUf025531@svn.freebsd.org> From: Michael Tuexen Date: Mon, 14 May 2012 09:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235431 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 09:51:44 -0000 Author: tuexen Date: Mon May 14 09:51:43 2012 New Revision: 235431 URL: http://svn.freebsd.org/changeset/base/235431 Log: MFC r235282: Only provide the supported features in the SCTP_ASSOC_CHANGE notif if the state is SCTP_COMM_UP or SCTP_RESTART. While there, do some cleanups. Modified: stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Mon May 14 09:48:39 2012 (r235430) +++ stable/9/sys/netinet/sctputil.c Mon May 14 09:51:43 2012 (r235431) @@ -2592,8 +2592,8 @@ sctp_pad_lastmbuf(struct mbuf *m, int pa } static void -sctp_notify_assoc_change(uint32_t event, struct sctp_tcb *stcb, - uint32_t error, int so_locked +sctp_notify_assoc_change(uint16_t state, struct sctp_tcb *stcb, + uint16_t error, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -2602,6 +2602,7 @@ sctp_notify_assoc_change(uint32_t event, struct mbuf *m_notify; struct sctp_assoc_change *sac; struct sctp_queued_to_read *control; + size_t len; unsigned int i; #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) @@ -2615,7 +2616,7 @@ sctp_notify_assoc_change(uint32_t event, */ if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && - ((event == SCTP_COMM_LOST) || (event == SCTP_CANT_STR_ASSOC))) { + ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC))) { if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_WAIT) { SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNREFUSED); stcb->sctp_socket->so_error = ECONNREFUSED; @@ -2651,7 +2652,11 @@ sctp_notify_assoc_change(uint32_t event, /* event not enabled */ return; } - m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_assoc_change), 0, M_DONTWAIT, 1, MT_DATA); + len = sizeof(struct sctp_assoc_change); + if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { + len += SCTP_ASSOC_SUPPORTS_MAX; + } + m_notify = sctp_get_mbuf_for_msg(len, 0, M_DONTWAIT, 1, MT_DATA); if (m_notify == NULL) /* no space left */ return; @@ -2661,27 +2666,29 @@ sctp_notify_assoc_change(uint32_t event, sac->sac_type = SCTP_ASSOC_CHANGE; sac->sac_flags = 0; sac->sac_length = sizeof(struct sctp_assoc_change); - sac->sac_state = event; + sac->sac_state = state; sac->sac_error = error; /* XXX verify these stream counts */ sac->sac_outbound_streams = stcb->asoc.streamoutcnt; sac->sac_inbound_streams = stcb->asoc.streamincnt; sac->sac_assoc_id = sctp_get_associd(stcb); - i = 0; - if (stcb->asoc.peer_supports_prsctp) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; - } - if (stcb->asoc.peer_supports_auth) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; - } - if (stcb->asoc.peer_supports_asconf) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; - } - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; - if (stcb->asoc.peer_supports_strreset) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; + if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { + i = 0; + if (stcb->asoc.peer_supports_prsctp) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; + } + if (stcb->asoc.peer_supports_auth) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; + } + if (stcb->asoc.peer_supports_asconf) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; + } + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; + if (stcb->asoc.peer_supports_strreset) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; + } + sac->sac_length += i; } - sac->sac_length += i; SCTP_BUF_LEN(m_notify) = sac->sac_length; SCTP_BUF_NEXT(m_notify) = NULL; control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination, @@ -2700,7 +2707,7 @@ sctp_notify_assoc_change(uint32_t event, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, so_locked); - if (event == SCTP_COMM_LOST) { + if (state == SCTP_COMM_LOST) { /* Wake up any sleeper */ #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); From owner-svn-src-all@FreeBSD.ORG Mon May 14 09:53:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF9711065674; Mon, 14 May 2012 09:53:54 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF6F28FC19; Mon, 14 May 2012 09:53:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4E9rsWW025671; Mon, 14 May 2012 09:53:54 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4E9rsbB025667; Mon, 14 May 2012 09:53:54 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201205140953.q4E9rsbB025667@svn.freebsd.org> From: Gabor Kovesdan Date: Mon, 14 May 2012 09:53:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235432 - head/usr.bin/sort X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 09:53:55 -0000 Author: gabor Date: Mon May 14 09:53:54 2012 New Revision: 235432 URL: http://svn.freebsd.org/changeset/base/235432 Log: - Fix build with clang Modified: head/usr.bin/sort/file.c head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/file.c ============================================================================== --- head/usr.bin/sort/file.c Mon May 14 09:51:43 2012 (r235431) +++ head/usr.bin/sort/file.c Mon May 14 09:53:54 2012 (r235432) @@ -598,7 +598,7 @@ openfile(const char *fn, const char *mod snprintf(cmd, cmdsz - 1, "%s > %s", compress_program, fn); else - err(2, getstr(7)); + err(2, "%s", getstr(7)); if ((file = popen(cmd, mode)) == NULL) err(2, NULL); @@ -939,7 +939,7 @@ file_header_init(struct file_header **fh (*fh)->fr = file_reader_init(fn); if ((*fh)->fr == NULL) { perror(fn); - err(2, getstr(8)); + err(2, "%s", getstr(8)); } line = file_reader_readline((*fh)->fr); if (line == NULL) { @@ -1276,7 +1276,7 @@ sort_list_to_file(struct sort_list *list sort_opts_vals.sort_method = SORT_RADIXSORT; } else if (sort_opts_vals.sort_method == SORT_RADIXSORT) - err(2, getstr(9)); + err(2, "%s", getstr(9)); /* * to handle stable sort and the unique cases in the @@ -1292,7 +1292,7 @@ sort_list_to_file(struct sort_list *list sort_opts_vals.sort_method = SORT_MERGESORT; break; default: - errx(2, getstr(10)); + errx(2, "%s", getstr(10)); }; } Modified: head/usr.bin/sort/sort.c ============================================================================== --- head/usr.bin/sort/sort.c Mon May 14 09:51:43 2012 (r235431) +++ head/usr.bin/sort/sort.c Mon May 14 09:53:54 2012 (r235432) @@ -74,9 +74,9 @@ MD5_CTX md5_ctx; * is found. */ const char *nlsstr[] = { "", -/* 1*/"you cannot use -%c and -%c together", +/* 1*/"mutually exclusive flags", /* 2*/"extra argument not allowed with -c", -/* 3*/"Unknown feature: %s", +/* 3*/"Unknown feature", /* 4*/"Wrong memory buffer specification", /* 5*/"0 field in key specs", /* 6*/"0 column in key specs", @@ -396,7 +396,7 @@ parse_memory_buffer_value(const char *va membuf = strtoll(value, &endptr, 10); if (errno != 0) { - warn(getstr(4)); + warn("%s",getstr(4)); membuf = available_free_memory; } else { switch (*endptr){ @@ -445,12 +445,10 @@ parse_memory_buffer_value(const char *va * Signal handler that clears the temporary files. */ static void -sig_handler(int sig, siginfo_t *siginfo, void *context) +sig_handler(int sig __unused, siginfo_t *siginfo __unused, + void *context __unused) { - sig = sig; - siginfo = siginfo; - context = context; clear_tmp_files(); exit(-1); } @@ -512,7 +510,7 @@ static void unknown(const char *what) { - errx(2, getstr(3), what); + errx(2, "%s: %s", getstr(3), what); } /* @@ -533,14 +531,13 @@ check_mutually_exclusive_flags(char c, b if (mec != c) { if (mef_flags[i]) { if (found_this) - errx(1, getstr(1), c, mec); + errx(1, "%c:%c: %s", c, mec, getstr(1)); found_others = true; fo_index = i; } } else { if (found_others) - errx(1, getstr(1), c, - mutually_exclusive_flags[fo_index]); + errx(1, "%c:%c: %s", c, mutually_exclusive_flags[fo_index], getstr(1)); mef_flags[i] = true; found_this = true; } @@ -661,7 +658,7 @@ parse_pos(const char *s, struct key_spec if (errno != 0) errx(2, "%s: -k", strerror(errno)); if (ks->f2 == 0) { - warn(getstr(5)); + warn("%s",getstr(5)); goto end; } } else { @@ -670,7 +667,7 @@ parse_pos(const char *s, struct key_spec if (errno != 0) errx(2, "%s: -k", strerror(errno)); if (ks->f1 == 0) { - warn(getstr(5)); + warn("%s",getstr(5)); goto end; } } @@ -693,7 +690,7 @@ parse_pos(const char *s, struct key_spec if (errno != 0) errx(2, "%s: -k", strerror(errno)); if (ks->c1 == 0) { - warn(getstr(6)); + warn("%s",getstr(6)); goto end; } } @@ -814,7 +811,7 @@ parse_pos_obs(const char *s, int *nf, in errno = 0; *nf = (size_t) strtoul(f, NULL, 10); if (errno != 0) - errx(2, getstr(11)); + errx(2, "%s", getstr(11)); if (pmatch[2].rm_eo > pmatch[2].rm_so) { len = pmatch[2].rm_eo - pmatch[2].rm_so - 1; @@ -826,7 +823,7 @@ parse_pos_obs(const char *s, int *nf, in errno = 0; *nc = (size_t) strtoul(c, NULL, 10); if (errno != 0) - errx(2, getstr(11)); + errx(2, "%s", getstr(11)); } if (pmatch[3].rm_eo > pmatch[3].rm_so) { @@ -1054,7 +1051,7 @@ main(int argc, char **argv) case 'o': outfile = sort_realloc(outfile, sizeof(char) * (strlen(optarg) + 1)); - strlcpy(outfile, optarg, (strlen(optarg) + 1)); + strlcpy(outfile, optarg, strlen(outfile)); break; case 's': sort_opts_vals.sflag = true; @@ -1183,7 +1180,7 @@ main(int argc, char **argv) #endif if (sort_opts_vals.cflag && sort_opts_vals.mflag) - errx(1, getstr(1), 'm', 'c'); + errx(1, "%c:%c: %s", 'm', 'c', getstr(1)); #ifndef WITHOUT_NLS catclose(catalog); From owner-svn-src-all@FreeBSD.ORG Mon May 14 09:54:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0C85106564A; Mon, 14 May 2012 09:54:16 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A9E68FC15; Mon, 14 May 2012 09:54:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4E9sGOw025724; Mon, 14 May 2012 09:54:16 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4E9sGfo025722; Mon, 14 May 2012 09:54:16 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205140954.q4E9sGfo025722@svn.freebsd.org> From: Michael Tuexen Date: Mon, 14 May 2012 09:54:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235433 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 09:54:16 -0000 Author: tuexen Date: Mon May 14 09:54:16 2012 New Revision: 235433 URL: http://svn.freebsd.org/changeset/base/235433 Log: MFC r235283: Fix a bug in the handling of association reset request. Modified: stable/9/sys/netinet/sctp_input.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Mon May 14 09:53:54 2012 (r235432) +++ stable/9/sys/netinet/sctp_input.c Mon May 14 09:54:16 2012 (r235433) @@ -3773,46 +3773,40 @@ sctp_handle_str_reset_request_tsn(struct seq = ntohl(req->request_seq); if (asoc->str_reset_seq_in == seq) { + asoc->last_reset_action[1] = stcb->asoc.last_reset_action[0]; if (!(asoc->local_strreset_support & SCTP_ENABLE_CHANGE_ASSOC_REQ)) { - stcb->asoc.last_reset_action[1] = stcb->asoc.last_reset_action[0]; - stcb->asoc.last_reset_action[0] = SCTP_STREAM_RESET_RESULT_PERFORMED; - asoc->last_reset_action[0] = SCTP_STREAM_RESET_RESULT_DENIED; - } else + } else { fwdtsn.ch.chunk_length = htons(sizeof(struct sctp_forward_tsn_chunk)); - fwdtsn.ch.chunk_type = SCTP_FORWARD_CUM_TSN; - fwdtsn.ch.chunk_flags = 0; - fwdtsn.new_cumulative_tsn = htonl(stcb->asoc.highest_tsn_inside_map + 1); - sctp_handle_forward_tsn(stcb, &fwdtsn, &abort_flag, NULL, 0); - if (abort_flag) { - return (1); - } - asoc->highest_tsn_inside_map += SCTP_STREAM_RESET_TSN_DELTA; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { - sctp_log_map(0, 10, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); - } - asoc->tsn_last_delivered = asoc->cumulative_tsn = asoc->highest_tsn_inside_map; - asoc->mapping_array_base_tsn = asoc->highest_tsn_inside_map + 1; - memset(asoc->mapping_array, 0, asoc->mapping_array_size); - asoc->highest_tsn_inside_nr_map = asoc->highest_tsn_inside_map; - memset(asoc->nr_mapping_array, 0, asoc->mapping_array_size); - atomic_add_int(&asoc->sending_seq, 1); - /* save off historical data for retrans */ - asoc->last_sending_seq[1] = asoc->last_sending_seq[0]; - asoc->last_sending_seq[0] = asoc->sending_seq; - asoc->last_base_tsnsent[1] = asoc->last_base_tsnsent[0]; - asoc->last_base_tsnsent[0] = asoc->mapping_array_base_tsn; - - sctp_add_stream_reset_result_tsn(chk, - ntohl(req->request_seq), - SCTP_STREAM_RESET_RESULT_PERFORMED, - asoc->sending_seq, - asoc->mapping_array_base_tsn); - sctp_reset_out_streams(stcb, 0, (uint16_t *) NULL); - sctp_reset_in_stream(stcb, 0, (uint16_t *) NULL); - asoc->last_reset_action[1] = asoc->last_reset_action[0]; - asoc->last_reset_action[0] = SCTP_STREAM_RESET_RESULT_PERFORMED; - sctp_notify_stream_reset_tsn(stcb, asoc->sending_seq, (asoc->mapping_array_base_tsn + 1), 0); + fwdtsn.ch.chunk_type = SCTP_FORWARD_CUM_TSN; + fwdtsn.ch.chunk_flags = 0; + fwdtsn.new_cumulative_tsn = htonl(stcb->asoc.highest_tsn_inside_map + 1); + sctp_handle_forward_tsn(stcb, &fwdtsn, &abort_flag, NULL, 0); + if (abort_flag) { + return (1); + } + asoc->highest_tsn_inside_map += SCTP_STREAM_RESET_TSN_DELTA; + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { + sctp_log_map(0, 10, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); + } + asoc->tsn_last_delivered = asoc->cumulative_tsn = asoc->highest_tsn_inside_map; + asoc->mapping_array_base_tsn = asoc->highest_tsn_inside_map + 1; + memset(asoc->mapping_array, 0, asoc->mapping_array_size); + asoc->highest_tsn_inside_nr_map = asoc->highest_tsn_inside_map; + memset(asoc->nr_mapping_array, 0, asoc->mapping_array_size); + atomic_add_int(&asoc->sending_seq, 1); + /* save off historical data for retrans */ + asoc->last_sending_seq[1] = asoc->last_sending_seq[0]; + asoc->last_sending_seq[0] = asoc->sending_seq; + asoc->last_base_tsnsent[1] = asoc->last_base_tsnsent[0]; + asoc->last_base_tsnsent[0] = asoc->mapping_array_base_tsn; + sctp_reset_out_streams(stcb, 0, (uint16_t *) NULL); + sctp_reset_in_stream(stcb, 0, (uint16_t *) NULL); + asoc->last_reset_action[0] = SCTP_STREAM_RESET_RESULT_PERFORMED; + sctp_notify_stream_reset_tsn(stcb, asoc->sending_seq, (asoc->mapping_array_base_tsn + 1), 0); + } + sctp_add_stream_reset_result_tsn(chk, seq, asoc->last_reset_action[0], + asoc->last_sending_seq[0], asoc->last_base_tsnsent[0]); asoc->str_reset_seq_in++; } else if (asoc->str_reset_seq_in - 1 == seq) { sctp_add_stream_reset_result_tsn(chk, seq, asoc->last_reset_action[0], From owner-svn-src-all@FreeBSD.ORG Mon May 14 09:55:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 081FC106566B; Mon, 14 May 2012 09:55:24 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD23C8FC1C; Mon, 14 May 2012 09:55:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4E9tNeG025820; Mon, 14 May 2012 09:55:23 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4E9tNoW025817; Mon, 14 May 2012 09:55:23 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201205140955.q4E9tNoW025817@svn.freebsd.org> From: Gabor Kovesdan Date: Mon, 14 May 2012 09:55:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235434 - head/usr.bin/sort/nls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 09:55:24 -0000 Author: gabor Date: Mon May 14 09:55:23 2012 New Revision: 235434 URL: http://svn.freebsd.org/changeset/base/235434 Log: - Update catalogs Modified: head/usr.bin/sort/nls/C.msg head/usr.bin/sort/nls/hu_HU.ISO8859-2.msg Modified: head/usr.bin/sort/nls/C.msg ============================================================================== --- head/usr.bin/sort/nls/C.msg Mon May 14 09:54:16 2012 (r235433) +++ head/usr.bin/sort/nls/C.msg Mon May 14 09:55:23 2012 (r235434) @@ -2,9 +2,15 @@ $ $FreeBSD$ $ $set 1 $quote " -1 "you cannot use -%c and -%c together" +1 "mutually exclusive flags" 2 "extra argument not allowed with -c" -3 "Unknown feature: %s\n" +3 "Unknown feature" 4 "Wrong memory buffer specification" -5 "0 field in key specs\n" -6 "0 column in key specs\n" +5 "0 field in key specs" +6 "0 column in key specs" +7 "Wrong file mode" +8 "Cannot open file for reading" +9 "Radix sort cannot be used with these sort options" +10 "The chosen sort method cannot be used with stable and/or unique sort" +11 "Invalid key position" +12 "Usage: %s [-bcCdfigMmnrsuz] [-kPOS1[,POS2] ... ] [+POS1 [-POS2]] [-S memsize] [-T tmpdir] [-t separator] [-o outfile] [--batch-size size] [--files0-from file] [--heapsort] [--mergesort] [--radixsort] [--qsort] [--nthreads thread_no] [--human-numeric-sort] [--version-sort] [--random-sort [--random-source file]] [--compress-program program] [file ...]\n" Modified: head/usr.bin/sort/nls/hu_HU.ISO8859-2.msg ============================================================================== --- head/usr.bin/sort/nls/hu_HU.ISO8859-2.msg Mon May 14 09:54:16 2012 (r235433) +++ head/usr.bin/sort/nls/hu_HU.ISO8859-2.msg Mon May 14 09:55:23 2012 (r235434) @@ -2,9 +2,15 @@ $ $FreeBSD$ $ $set 1 $quote " -1 "a -%c s -%c opcik nem hasznlhatk egytt" +1 "egymst kizr opcik" 2 "extra argumentum a -%c opcival" -3 "Ismeretlen funkci: %s\n" +3 "Ismeretlen funkci\n" 4 "Rossz memria puffer rtk" 5 "0 mez a kulcsspecifikciban\n" 6 "0 oszlop a kulcsspecifikciban\n" +7 "Helytelen fjl md" +8 "A fjl nem nyithat meg olvassra" +9 "A radix rendezs nem hasznlhat a megadott rendezsi opcikkal" +10 "A vlasztott rendezsi md nem hasznlhat a --stable s --unique opcikkal" +11 "rvnytelen kulcs pozci" +12 "Hasznlat: %s [-bcCdfigMmnrsuz] [-kPOS1[,POS2] ... ] [+POS1 [-POS2]] [-S memriamret] [-T ideiglenes_knyvtr] [-t elvlaszt] [-o kimeneti_fjl] [--batch-size mret] [--files0-from fjl] [--heapsort] [--mergesort] [--radixsort] [--qsort] [--nthreads szlak_szma] [--human-numeric-sort] [--version-sort] [--random-sort [--random-source fjl]] [--compress-program program] [fjl ...]\n" From owner-svn-src-all@FreeBSD.ORG Mon May 14 10:06:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E872106566C; Mon, 14 May 2012 10:06:50 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8B988FC1F; Mon, 14 May 2012 10:06:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EA6nXB026305; Mon, 14 May 2012 10:06:49 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EA6nDM026299; Mon, 14 May 2012 10:06:49 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201205141006.q4EA6nDM026299@svn.freebsd.org> From: Gabor Kovesdan Date: Mon, 14 May 2012 10:06:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235435 - head/usr.bin/sort X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 10:06:50 -0000 Author: gabor Date: Mon May 14 10:06:49 2012 New Revision: 235435 URL: http://svn.freebsd.org/changeset/base/235435 Log: - Eliminate initializations if global variables. Compilers are not required to optimize these so it may result in larger binary size. Pointed out by: kib Modified: head/usr.bin/sort/bwstring.c head/usr.bin/sort/coll.c head/usr.bin/sort/file.c head/usr.bin/sort/radixsort.c head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/bwstring.c ============================================================================== --- head/usr.bin/sort/bwstring.c Mon May 14 09:55:23 2012 (r235434) +++ head/usr.bin/sort/bwstring.c Mon May 14 10:06:49 2012 (r235435) @@ -41,10 +41,10 @@ __FBSDID("$FreeBSD$"); #include "bwstring.h" #include "sort.h" -bool byte_sort = false; +bool byte_sort; -static wchar_t **wmonths = NULL; -static unsigned char **cmonths = NULL; +static wchar_t **wmonths; +static unsigned char **cmonths; /* initialise months */ Modified: head/usr.bin/sort/coll.c ============================================================================== --- head/usr.bin/sort/coll.c Mon May 14 09:55:23 2012 (r235434) +++ head/usr.bin/sort/coll.c Mon May 14 10:06:49 2012 (r235435) @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include "coll.h" #include "vsort.h" -struct key_specs *keys = NULL; +struct key_specs *keys; size_t keys_num = 0; wchar_t symbol_decimal_point = L'.'; Modified: head/usr.bin/sort/file.c ============================================================================== --- head/usr.bin/sort/file.c Mon May 14 09:55:23 2012 (r235434) +++ head/usr.bin/sort/file.c Mon May 14 10:06:49 2012 (r235435) @@ -54,7 +54,7 @@ unsigned long long free_memory = 1000000 unsigned long long available_free_memory = 1000000; const char *tmpdir = "/var/tmp"; -const char* compress_program = NULL; +const char *compress_program; size_t max_open_files = 16; Modified: head/usr.bin/sort/radixsort.c ============================================================================== --- head/usr.bin/sort/radixsort.c Mon May 14 09:55:23 2012 (r235434) +++ head/usr.bin/sort/radixsort.c Mon May 14 10:06:49 2012 (r235435) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #define SMALL_NODE(sl) ((sl)->tosort_num < 5) /* are we sorting in reverse order ? */ -static bool reverse_sort = false; +static bool reverse_sort; /* sort sub-levels array size */ static const size_t slsz = 256 * sizeof(struct sort_level*); @@ -77,14 +77,14 @@ struct level_stack { struct sort_level *sl; }; -static struct level_stack *g_ls = NULL; +static struct level_stack *g_ls; #if defined(SORT_THREADS) /* stack guarding mutex */ static pthread_mutex_t g_ls_mutex; /* counter: how many items are left */ -static size_t sort_left = 0; +static size_t sort_left; /* guarding mutex */ static pthread_mutex_t sort_left_mutex; Modified: head/usr.bin/sort/sort.c ============================================================================== --- head/usr.bin/sort/sort.c Mon May 14 09:55:23 2012 (r235434) +++ head/usr.bin/sort/sort.c Mon May 14 10:06:49 2012 (r235435) @@ -62,10 +62,10 @@ nl_catd catalog; #define DEFAULT_RANDOM_SORT_SEED_FILE ("/dev/random") #define MAX_DEFAULT_RANDOM_SEED_DATA_SIZE (1024) -static bool need_random = false; -static const char* random_source = DEFAULT_RANDOM_SORT_SEED_FILE; -static const void* random_seed = NULL; -static size_t random_seed_size = 0; +static bool need_random; +static const char *random_source = DEFAULT_RANDOM_SORT_SEED_FILE; +static const void *random_seed; +static size_t random_seed_size; MD5_CTX md5_ctx; @@ -98,26 +98,26 @@ const char *nlsstr[] = { "", struct sort_opts sort_opts_vals; -bool debug_sort = false; -bool need_hint = false; +bool debug_sort; +bool need_hint; #if defined(SORT_THREADS) size_t ncpu = 1; size_t nthreads = 1; #endif -static bool gnusort_numeric_compatibility = false; +static bool gnusort_numeric_compatibility; static struct sort_mods default_sort_mods_object; struct sort_mods * const default_sort_mods = &default_sort_mods_object; -static bool print_symbols_on_debug = false; +static bool print_symbols_on_debug; /* * Arguments from file (when file0-from option is used: */ static int argc_from_file0 = -1; -static char **argv_from_file0 = NULL; +static char **argv_from_file0; /* * Placeholder symbols for options which have no single-character equivalent From owner-svn-src-all@FreeBSD.ORG Mon May 14 10:12:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E65A5106566B; Mon, 14 May 2012 10:12:03 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0B9B8FC16; Mon, 14 May 2012 10:12:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EAC3BH026514; Mon, 14 May 2012 10:12:03 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EAC3gh026512; Mon, 14 May 2012 10:12:03 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205141012.q4EAC3gh026512@svn.freebsd.org> From: Michael Tuexen Date: Mon, 14 May 2012 10:12:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235436 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 10:12:04 -0000 Author: tuexen Date: Mon May 14 10:12:03 2012 New Revision: 235436 URL: http://svn.freebsd.org/changeset/base/235436 Log: MFC r235280: Remove a constant which is only used on non-FreeBSD platform. (The actual code for the socket option handling has been #ifdefed out forever...) Modified: stable/8/sys/netinet/sctp.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/netinet/sctp.h ============================================================================== --- stable/8/sys/netinet/sctp.h Mon May 14 10:06:49 2012 (r235435) +++ stable/8/sys/netinet/sctp.h Mon May 14 10:12:03 2012 (r235436) @@ -265,8 +265,6 @@ struct sctp_paramhdr { #define SCTP_PEELOFF 0x0000800a /* the real worker for sctp_getaddrlen() */ #define SCTP_GET_ADDR_LEN 0x0000800b -/* temporary workaround for Apple listen() issue, no args used */ -#define SCTP_LISTEN_FIX 0x0000800c /* Debug things that need to be purged */ #define SCTP_SET_INITIAL_DBG_SEQ 0x00009f00 From owner-svn-src-all@FreeBSD.ORG Mon May 14 10:14:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D8461106566C; Mon, 14 May 2012 10:14:43 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2FEC8FC08; Mon, 14 May 2012 10:14:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EAEhJw026643; Mon, 14 May 2012 10:14:43 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EAEhmf026641; Mon, 14 May 2012 10:14:43 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205141014.q4EAEhmf026641@svn.freebsd.org> From: Michael Tuexen Date: Mon, 14 May 2012 10:14:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235437 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 10:14:44 -0000 Author: tuexen Date: Mon May 14 10:14:43 2012 New Revision: 235437 URL: http://svn.freebsd.org/changeset/base/235437 Log: MFC r235282: Only provide the supported features in the SCTP_ASSOC_CHANGE notif if the state is SCTP_COMM_UP or SCTP_RESTART. While there, do some cleanups. Modified: stable/8/sys/netinet/sctputil.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Mon May 14 10:12:03 2012 (r235436) +++ stable/8/sys/netinet/sctputil.c Mon May 14 10:14:43 2012 (r235437) @@ -2592,8 +2592,8 @@ sctp_pad_lastmbuf(struct mbuf *m, int pa } static void -sctp_notify_assoc_change(uint32_t event, struct sctp_tcb *stcb, - uint32_t error, int so_locked +sctp_notify_assoc_change(uint16_t state, struct sctp_tcb *stcb, + uint16_t error, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -2602,6 +2602,7 @@ sctp_notify_assoc_change(uint32_t event, struct mbuf *m_notify; struct sctp_assoc_change *sac; struct sctp_queued_to_read *control; + size_t len; unsigned int i; #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) @@ -2615,7 +2616,7 @@ sctp_notify_assoc_change(uint32_t event, */ if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && - ((event == SCTP_COMM_LOST) || (event == SCTP_CANT_STR_ASSOC))) { + ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC))) { if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_WAIT) { SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNREFUSED); stcb->sctp_socket->so_error = ECONNREFUSED; @@ -2651,7 +2652,11 @@ sctp_notify_assoc_change(uint32_t event, /* event not enabled */ return; } - m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_assoc_change), 0, M_DONTWAIT, 1, MT_DATA); + len = sizeof(struct sctp_assoc_change); + if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { + len += SCTP_ASSOC_SUPPORTS_MAX; + } + m_notify = sctp_get_mbuf_for_msg(len, 0, M_DONTWAIT, 1, MT_DATA); if (m_notify == NULL) /* no space left */ return; @@ -2661,27 +2666,29 @@ sctp_notify_assoc_change(uint32_t event, sac->sac_type = SCTP_ASSOC_CHANGE; sac->sac_flags = 0; sac->sac_length = sizeof(struct sctp_assoc_change); - sac->sac_state = event; + sac->sac_state = state; sac->sac_error = error; /* XXX verify these stream counts */ sac->sac_outbound_streams = stcb->asoc.streamoutcnt; sac->sac_inbound_streams = stcb->asoc.streamincnt; sac->sac_assoc_id = sctp_get_associd(stcb); - i = 0; - if (stcb->asoc.peer_supports_prsctp) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; - } - if (stcb->asoc.peer_supports_auth) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; - } - if (stcb->asoc.peer_supports_asconf) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; - } - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; - if (stcb->asoc.peer_supports_strreset) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; + if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { + i = 0; + if (stcb->asoc.peer_supports_prsctp) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; + } + if (stcb->asoc.peer_supports_auth) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; + } + if (stcb->asoc.peer_supports_asconf) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; + } + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; + if (stcb->asoc.peer_supports_strreset) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; + } + sac->sac_length += i; } - sac->sac_length += i; SCTP_BUF_LEN(m_notify) = sac->sac_length; SCTP_BUF_NEXT(m_notify) = NULL; control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination, @@ -2700,7 +2707,7 @@ sctp_notify_assoc_change(uint32_t event, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, so_locked); - if (event == SCTP_COMM_LOST) { + if (state == SCTP_COMM_LOST) { /* Wake up any sleeper */ #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); From owner-svn-src-all@FreeBSD.ORG Mon May 14 10:18:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D07FF106564A; Mon, 14 May 2012 10:18:31 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAF6E8FC0C; Mon, 14 May 2012 10:18:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EAIVhi026811; Mon, 14 May 2012 10:18:31 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EAIVfE026809; Mon, 14 May 2012 10:18:31 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205141018.q4EAIVfE026809@svn.freebsd.org> From: Michael Tuexen Date: Mon, 14 May 2012 10:18:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235438 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 10:18:31 -0000 Author: tuexen Date: Mon May 14 10:18:31 2012 New Revision: 235438 URL: http://svn.freebsd.org/changeset/base/235438 Log: MFC r235283: Fix a bug in the handling of association reset request. Modified: stable/8/sys/netinet/sctp_input.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Mon May 14 10:14:43 2012 (r235437) +++ stable/8/sys/netinet/sctp_input.c Mon May 14 10:18:31 2012 (r235438) @@ -3773,46 +3773,40 @@ sctp_handle_str_reset_request_tsn(struct seq = ntohl(req->request_seq); if (asoc->str_reset_seq_in == seq) { + asoc->last_reset_action[1] = stcb->asoc.last_reset_action[0]; if (!(asoc->local_strreset_support & SCTP_ENABLE_CHANGE_ASSOC_REQ)) { - stcb->asoc.last_reset_action[1] = stcb->asoc.last_reset_action[0]; - stcb->asoc.last_reset_action[0] = SCTP_STREAM_RESET_RESULT_PERFORMED; - asoc->last_reset_action[0] = SCTP_STREAM_RESET_RESULT_DENIED; - } else + } else { fwdtsn.ch.chunk_length = htons(sizeof(struct sctp_forward_tsn_chunk)); - fwdtsn.ch.chunk_type = SCTP_FORWARD_CUM_TSN; - fwdtsn.ch.chunk_flags = 0; - fwdtsn.new_cumulative_tsn = htonl(stcb->asoc.highest_tsn_inside_map + 1); - sctp_handle_forward_tsn(stcb, &fwdtsn, &abort_flag, NULL, 0); - if (abort_flag) { - return (1); - } - asoc->highest_tsn_inside_map += SCTP_STREAM_RESET_TSN_DELTA; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { - sctp_log_map(0, 10, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); - } - asoc->tsn_last_delivered = asoc->cumulative_tsn = asoc->highest_tsn_inside_map; - asoc->mapping_array_base_tsn = asoc->highest_tsn_inside_map + 1; - memset(asoc->mapping_array, 0, asoc->mapping_array_size); - asoc->highest_tsn_inside_nr_map = asoc->highest_tsn_inside_map; - memset(asoc->nr_mapping_array, 0, asoc->mapping_array_size); - atomic_add_int(&asoc->sending_seq, 1); - /* save off historical data for retrans */ - asoc->last_sending_seq[1] = asoc->last_sending_seq[0]; - asoc->last_sending_seq[0] = asoc->sending_seq; - asoc->last_base_tsnsent[1] = asoc->last_base_tsnsent[0]; - asoc->last_base_tsnsent[0] = asoc->mapping_array_base_tsn; - - sctp_add_stream_reset_result_tsn(chk, - ntohl(req->request_seq), - SCTP_STREAM_RESET_RESULT_PERFORMED, - asoc->sending_seq, - asoc->mapping_array_base_tsn); - sctp_reset_out_streams(stcb, 0, (uint16_t *) NULL); - sctp_reset_in_stream(stcb, 0, (uint16_t *) NULL); - asoc->last_reset_action[1] = asoc->last_reset_action[0]; - asoc->last_reset_action[0] = SCTP_STREAM_RESET_RESULT_PERFORMED; - sctp_notify_stream_reset_tsn(stcb, asoc->sending_seq, (asoc->mapping_array_base_tsn + 1), 0); + fwdtsn.ch.chunk_type = SCTP_FORWARD_CUM_TSN; + fwdtsn.ch.chunk_flags = 0; + fwdtsn.new_cumulative_tsn = htonl(stcb->asoc.highest_tsn_inside_map + 1); + sctp_handle_forward_tsn(stcb, &fwdtsn, &abort_flag, NULL, 0); + if (abort_flag) { + return (1); + } + asoc->highest_tsn_inside_map += SCTP_STREAM_RESET_TSN_DELTA; + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { + sctp_log_map(0, 10, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); + } + asoc->tsn_last_delivered = asoc->cumulative_tsn = asoc->highest_tsn_inside_map; + asoc->mapping_array_base_tsn = asoc->highest_tsn_inside_map + 1; + memset(asoc->mapping_array, 0, asoc->mapping_array_size); + asoc->highest_tsn_inside_nr_map = asoc->highest_tsn_inside_map; + memset(asoc->nr_mapping_array, 0, asoc->mapping_array_size); + atomic_add_int(&asoc->sending_seq, 1); + /* save off historical data for retrans */ + asoc->last_sending_seq[1] = asoc->last_sending_seq[0]; + asoc->last_sending_seq[0] = asoc->sending_seq; + asoc->last_base_tsnsent[1] = asoc->last_base_tsnsent[0]; + asoc->last_base_tsnsent[0] = asoc->mapping_array_base_tsn; + sctp_reset_out_streams(stcb, 0, (uint16_t *) NULL); + sctp_reset_in_stream(stcb, 0, (uint16_t *) NULL); + asoc->last_reset_action[0] = SCTP_STREAM_RESET_RESULT_PERFORMED; + sctp_notify_stream_reset_tsn(stcb, asoc->sending_seq, (asoc->mapping_array_base_tsn + 1), 0); + } + sctp_add_stream_reset_result_tsn(chk, seq, asoc->last_reset_action[0], + asoc->last_sending_seq[0], asoc->last_base_tsnsent[0]); asoc->str_reset_seq_in++; } else if (asoc->str_reset_seq_in - 1 == seq) { sctp_add_stream_reset_result_tsn(chk, seq, asoc->last_reset_action[0], From owner-svn-src-all@FreeBSD.ORG Mon May 14 13:49:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 99816106564A; Mon, 14 May 2012 13:49:06 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 828908FC0A; Mon, 14 May 2012 13:49:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EDn6V6035747; Mon, 14 May 2012 13:49:06 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EDn6ZJ035745; Mon, 14 May 2012 13:49:06 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201205141349.q4EDn6ZJ035745@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 14 May 2012 13:49:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235440 - stable/9/sys/ddb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 13:49:06 -0000 Author: pluknet Date: Mon May 14 13:49:06 2012 New Revision: 235440 URL: http://svn.freebsd.org/changeset/base/235440 Log: MFC r228687: Use FOREACH_PROC_IN_SYSTEM instead of using its unrolled form. Modified: stable/9/sys/ddb/db_ps.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ddb/db_ps.c ============================================================================== --- stable/9/sys/ddb/db_ps.c Mon May 14 12:13:50 2012 (r235439) +++ stable/9/sys/ddb/db_ps.c Mon May 14 13:49:06 2012 (r235440) @@ -447,7 +447,7 @@ db_findstack_cmd(db_expr_t addr, boolean return; } - for (p = LIST_FIRST(&allproc); p != NULL; p = LIST_NEXT(p, p_list)) { + FOREACH_PROC_IN_SYSTEM(p) { FOREACH_THREAD_IN_PROC(p, td) { if (td->td_kstack <= saddr && saddr < td->td_kstack + PAGE_SIZE * td->td_kstack_pages) { From owner-svn-src-all@FreeBSD.ORG Mon May 14 14:33:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 249691065742; Mon, 14 May 2012 14:33:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E8608FC0C; Mon, 14 May 2012 14:33:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EEX8Dr037110; Mon, 14 May 2012 14:33:08 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EEX8m0037108; Mon, 14 May 2012 14:33:08 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205141433.q4EEX8m0037108@svn.freebsd.org> From: Glen Barber Date: Mon, 14 May 2012 14:33:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235441 - head/share/man/man8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 14:33:09 -0000 Author: gjb (doc committer) Date: Mon May 14 14:33:08 2012 New Revision: 235441 URL: http://svn.freebsd.org/changeset/base/235441 Log: Fix an mdoc(7) formatting nit. Modified: head/share/man/man8/rc.8 Modified: head/share/man/man8/rc.8 ============================================================================== --- head/share/man/man8/rc.8 Mon May 14 13:49:06 2012 (r235440) +++ head/share/man/man8/rc.8 Mon May 14 14:33:08 2012 (r235441) @@ -452,7 +452,7 @@ before starting the daemon. Following tradition, all startup files reside in .Pa /etc . .Sh FILES -.Bl -tag -compact +.Bl -tag -compact -width Pa .It Pa /etc/rc .It Pa /etc/rc.conf .It Pa /etc/rc.conf.local From owner-svn-src-all@FreeBSD.ORG Mon May 14 15:05:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ADDCA1065673; Mon, 14 May 2012 15:05:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 942968FC17; Mon, 14 May 2012 15:05:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EF5JjI038218; Mon, 14 May 2012 15:05:19 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EF5JNh038203; Mon, 14 May 2012 15:05:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205141505.q4EF5JNh038203@svn.freebsd.org> From: John Baldwin Date: Mon, 14 May 2012 15:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235442 - in stable/8/sys: amd64/amd64 amd64/ia32 arm/arm i386/conf i386/i386 ia64/ia64 kern pc98/pc98 powerpc/aim powerpc/booke sparc64/sparc64 sun4v/sun4v sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 15:05:19 -0000 Author: jhb Date: Mon May 14 15:05:18 2012 New Revision: 235442 URL: http://svn.freebsd.org/changeset/base/235442 Log: MFC 209613: Move prototypes for kern_sigtimedwait() and kern_sigprocmask() to where all other kern_ prototypes live. Modified: stable/8/sys/amd64/amd64/machdep.c stable/8/sys/amd64/ia32/ia32_signal.c stable/8/sys/arm/arm/machdep.c stable/8/sys/i386/i386/machdep.c stable/8/sys/ia64/ia64/machdep.c stable/8/sys/kern/kern_context.c stable/8/sys/kern/subr_trap.c stable/8/sys/pc98/pc98/machdep.c stable/8/sys/powerpc/aim/machdep.c stable/8/sys/powerpc/booke/machdep.c stable/8/sys/sparc64/sparc64/machdep.c stable/8/sys/sun4v/sun4v/machdep.c stable/8/sys/sys/signalvar.h stable/8/sys/sys/syscallsubr.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/amd64/amd64/machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/machdep.c Mon May 14 14:33:08 2012 (r235441) +++ stable/8/sys/amd64/amd64/machdep.c Mon May 14 15:05:18 2012 (r235442) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/8/sys/amd64/ia32/ia32_signal.c ============================================================================== --- stable/8/sys/amd64/ia32/ia32_signal.c Mon May 14 14:33:08 2012 (r235441) +++ stable/8/sys/amd64/ia32/ia32_signal.c Mon May 14 15:05:18 2012 (r235442) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/8/sys/arm/arm/machdep.c ============================================================================== --- stable/8/sys/arm/arm/machdep.c Mon May 14 14:33:08 2012 (r235441) +++ stable/8/sys/arm/arm/machdep.c Mon May 14 15:05:18 2012 (r235442) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/8/sys/i386/i386/machdep.c ============================================================================== --- stable/8/sys/i386/i386/machdep.c Mon May 14 14:33:08 2012 (r235441) +++ stable/8/sys/i386/i386/machdep.c Mon May 14 15:05:18 2012 (r235442) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/8/sys/ia64/ia64/machdep.c ============================================================================== --- stable/8/sys/ia64/ia64/machdep.c Mon May 14 14:33:08 2012 (r235441) +++ stable/8/sys/ia64/ia64/machdep.c Mon May 14 15:05:18 2012 (r235442) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/8/sys/kern/kern_context.c ============================================================================== --- stable/8/sys/kern/kern_context.c Mon May 14 14:33:08 2012 (r235441) +++ stable/8/sys/kern/kern_context.c Mon May 14 15:05:18 2012 (r235442) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/8/sys/kern/subr_trap.c ============================================================================== --- stable/8/sys/kern/subr_trap.c Mon May 14 14:33:08 2012 (r235441) +++ stable/8/sys/kern/subr_trap.c Mon May 14 15:05:18 2012 (r235442) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/8/sys/pc98/pc98/machdep.c ============================================================================== --- stable/8/sys/pc98/pc98/machdep.c Mon May 14 14:33:08 2012 (r235441) +++ stable/8/sys/pc98/pc98/machdep.c Mon May 14 15:05:18 2012 (r235442) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/8/sys/powerpc/aim/machdep.c ============================================================================== --- stable/8/sys/powerpc/aim/machdep.c Mon May 14 14:33:08 2012 (r235441) +++ stable/8/sys/powerpc/aim/machdep.c Mon May 14 15:05:18 2012 (r235442) @@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/8/sys/powerpc/booke/machdep.c ============================================================================== --- stable/8/sys/powerpc/booke/machdep.c Mon May 14 14:33:08 2012 (r235441) +++ stable/8/sys/powerpc/booke/machdep.c Mon May 14 15:05:18 2012 (r235442) @@ -103,6 +103,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/8/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/machdep.c Mon May 14 14:33:08 2012 (r235441) +++ stable/8/sys/sparc64/sparc64/machdep.c Mon May 14 15:05:18 2012 (r235442) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/8/sys/sun4v/sun4v/machdep.c ============================================================================== --- stable/8/sys/sun4v/sun4v/machdep.c Mon May 14 14:33:08 2012 (r235441) +++ stable/8/sys/sun4v/sun4v/machdep.c Mon May 14 15:05:18 2012 (r235442) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/8/sys/sys/signalvar.h ============================================================================== --- stable/8/sys/sys/signalvar.h Mon May 14 14:33:08 2012 (r235441) +++ stable/8/sys/sys/signalvar.h Mon May 14 15:05:18 2012 (r235442) @@ -358,10 +358,7 @@ void sigqueue_flush(struct sigqueue *que void sigqueue_delete_proc(struct proc *p, int sig); void sigqueue_delete(struct sigqueue *queue, int sig); void sigqueue_take(ksiginfo_t *ksi); -int kern_sigtimedwait(struct thread *, sigset_t, - ksiginfo_t *, struct timespec *); -int kern_sigprocmask(struct thread *td, int how, - sigset_t *set, sigset_t *oset, int flags); + /* * Machine-dependent functions: */ Modified: stable/8/sys/sys/syscallsubr.h ============================================================================== --- stable/8/sys/sys/syscallsubr.h Mon May 14 14:33:08 2012 (r235441) +++ stable/8/sys/sys/syscallsubr.h Mon May 14 15:05:18 2012 (r235442) @@ -49,6 +49,7 @@ struct stat; struct kevent; struct kevent_copyops; struct kld_file_stat; +struct ksiginfo; struct sendfile_args; struct thr_param; @@ -198,7 +199,11 @@ int kern_shmctl(struct thread *td, int s int kern_sigaction(struct thread *td, int sig, struct sigaction *act, struct sigaction *oact, int flags); int kern_sigaltstack(struct thread *td, stack_t *ss, stack_t *oss); +int kern_sigprocmask(struct thread *td, int how, + sigset_t *set, sigset_t *oset, int flags); int kern_sigsuspend(struct thread *td, sigset_t mask); +int kern_sigtimedwait(struct thread *td, sigset_t waitset, + struct ksiginfo *ksi, struct timespec *timeout); int kern_stat(struct thread *td, char *path, enum uio_seg pathseg, struct stat *sbp); int kern_statat(struct thread *td, int flag, int fd, char *path, From owner-svn-src-all@FreeBSD.ORG Mon May 14 15:06:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A351B1065687; Mon, 14 May 2012 15:06:05 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 734578FC0C; Mon, 14 May 2012 15:06:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EF65ZY038279; Mon, 14 May 2012 15:06:05 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EF65CV038276; Mon, 14 May 2012 15:06:05 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205141506.q4EF65CV038276@svn.freebsd.org> From: Josh Paetzel Date: Mon, 14 May 2012 15:06:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235443 - stable/9/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 15:06:05 -0000 Author: jpaetzel Date: Mon May 14 15:06:04 2012 New Revision: 235443 URL: http://svn.freebsd.org/changeset/base/235443 Log: MFC: 234985 Fix parsing values which contain multiple "=" signs. Submitted by: glarkin Sponsored by: iXsystems Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-parse.sh Directory Properties: stable/9/usr.sbin/pc-sysinstall/ (props changed) Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-parse.sh ============================================================================== --- stable/9/usr.sbin/pc-sysinstall/backend/functions-parse.sh Mon May 14 15:05:18 2012 (r235442) +++ stable/9/usr.sbin/pc-sysinstall/backend/functions-parse.sh Mon May 14 15:06:04 2012 (r235443) @@ -33,7 +33,7 @@ get_value_from_string() { if [ -n "${1}" ] then - export VAL="`echo ${1} | cut -d '=' -f 2-15`" + export VAL="`echo ${1} | cut -d '=' -f 2-`" else echo "Error: Did we forgot to supply a string to parse?" exit 1 @@ -45,7 +45,7 @@ get_value_from_cfg_with_spaces() { if [ -n "${1}" ] then - export VAL=`grep "^${1}=" ${CFGF} | head -n 1 | cut -d '=' -f 2-15` + export VAL=`grep "^${1}=" ${CFGF} | head -n 1 | cut -d '=' -f 2-` else exit_err "Error: Did we forgot to supply a setting to grab?" fi @@ -57,7 +57,7 @@ get_value_from_cfg() { if [ -n "${1}" ] then - export VAL=`grep "^${1}=" ${CFGF} | head -n 1 | cut -d '=' -f 2-15 | tr -d ' '` + export VAL=`grep "^${1}=" ${CFGF} | head -n 1 | cut -d '=' -f 2- | tr -d ' '` else exit_err "Error: Did we forgot to supply a setting to grab?" fi @@ -71,7 +71,7 @@ if_check_value_exists() then # Get the first occurance of the setting from the config, strip out whitespace - VAL=`grep "^${1}" ${CFGF} | head -n 1 | cut -d '=' -f 2 | tr -d ' '` + VAL=`grep "^${1}" ${CFGF} | head -n 1 | cut -d '=' -f 2- | tr -d ' '` if [ -z "${VAL}" ] then # This value doesn't exist, lets return @@ -104,7 +104,7 @@ check_value() if [ -n "${1}" -a -n "${2}" ] then # Get the first occurance of the setting from the config, strip out whitespace - VAL=`grep "^${1}" ${CFGF} | head -n 1 | cut -d '=' -f 2 | tr -d ' '` + VAL=`grep "^${1}" ${CFGF} | head -n 1 | cut -d '=' -f 2- | tr -d ' '` VALID="1" for i in ${2} do @@ -133,7 +133,7 @@ file_sanity_check() grep -q "^${i}=" $CFGF 2>/dev/null if [ $? -eq 0 ] then - LN=`grep "^${i}=" ${CFGF} | head -n 1 | cut -d '=' -f 2 | tr -d ' '` + LN=`grep "^${i}=" ${CFGF} | head -n 1 | cut -d '=' -f 2- | tr -d ' '` if [ -z "${LN}" ] then echo "Error: Config fails sanity test! ${i}= is empty" From owner-svn-src-all@FreeBSD.ORG Mon May 14 15:08:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D4D3106566B; Mon, 14 May 2012 15:08:46 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 460768FC08; Mon, 14 May 2012 15:08:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EF8khL038435; Mon, 14 May 2012 15:08:46 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EF8koF038433; Mon, 14 May 2012 15:08:46 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205141508.q4EF8koF038433@svn.freebsd.org> From: Josh Paetzel Date: Mon, 14 May 2012 15:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235444 - stable/9/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 15:08:46 -0000 Author: jpaetzel Date: Mon May 14 15:08:45 2012 New Revision: 235444 URL: http://svn.freebsd.org/changeset/base/235444 Log: MFC 234987: Add the ability to configure multiple interfaces Submitted by: glarkin Obtained from: PC-BSD Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-networking.sh Directory Properties: stable/9/usr.sbin/pc-sysinstall/ (props changed) Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-networking.sh ============================================================================== --- stable/9/usr.sbin/pc-sysinstall/backend/functions-networking.sh Mon May 14 15:06:04 2012 (r235443) +++ stable/9/usr.sbin/pc-sysinstall/backend/functions-networking.sh Mon May 14 15:08:45 2012 (r235444) @@ -192,7 +192,7 @@ save_manual_nic() # Get the target nic NIC="$1" - get_value_from_cfg netSaveIP + get_value_from_cfg netSaveIP_${NIC} NETIP="${VAL}" if [ "$NETIP" = "DHCP" ] @@ -212,7 +212,7 @@ save_manual_nic() IFARGS="inet ${NETIP}" # Check if we have a netmask to set - get_value_from_cfg netSaveMask + get_value_from_cfg netSaveMask_${NIC} NETMASK="${VAL}" if [ -n "${NETMASK}" ] then @@ -220,7 +220,7 @@ save_manual_nic() fi fi - get_value_from_cfg netSaveIPv6 + get_value_from_cfg netSaveIPv6_${NIC} NETIP6="${VAL}" if [ -n "${NETIP6}" ] then @@ -239,6 +239,12 @@ save_manual_nic() echo "ifconfig_${NIC}_ipv6=\"${IF6ARGS}\"" >>${FSMNT}/etc/rc.conf fi +}; + +# Function which saves a manual gateway router setup to the installed system +save_manual_router() +{ + # Check if we have a default router to set get_value_from_cfg netSaveDefaultRouter NETROUTE="${VAL}" @@ -253,19 +259,30 @@ save_manual_nic() echo "ipv6_defaultrouter=\"${NETROUTE}\"" >>${FSMNT}/etc/rc.conf fi +}; + +save_manual_nameserver() +{ # Check if we have a nameserver to enable : > ${FSMNT}/etc/resolv.conf - get_value_from_cfg netSaveNameServer - NAMESERVER="${VAL}" - if [ -n "${NAMESERVER}" ] - then - echo "nameserver ${NAMESERVER}" >>${FSMNT}/etc/resolv.conf - fi - get_value_from_cfg netSaveIPv6NameServer - NAMESERVER="${VAL}" - if [ -n "${NAMESERVER}" ] - then - echo "nameserver ${NAMESERVER}" >>${FSMNT}/etc/resolv.conf + get_value_from_cfg_with_spaces netSaveNameServer + NAMESERVERLIST="${VAL}" + if [ ! -z "${NAMESERVERLIST}" ] + then + for NAMESERVER in ${NAMESERVERLIST} + do + echo "nameserver ${NAMESERVER}" >>${FSMNT}/etc/resolv.conf + done + fi + + get_value_from_cfg_with_spaces netSaveIPv6NameServer + NAMESERVERLIST="${VAL}" + if [ ! -z "${NAMESERVERLIST}" ] + then + for NAMESERVER in ${NAMESERVERLIST} + do + echo "nameserver ${NAMESERVER}" >>${FSMNT}/etc/resolv.conf + done fi }; @@ -454,25 +471,30 @@ save_networking_install() { # Check if we have any networking requested to save - get_value_from_cfg netSaveDev + get_value_from_cfg_with_spaces netSaveDev if [ -z "${VAL}" ] then return 0 fi - NETDEV="${VAL}" - if [ "$NETDEV" = "AUTO-DHCP" ] + NETDEVLIST="${VAL}" + if [ "$NETDEVLIST" = "AUTO-DHCP" ] then save_auto_dhcp - elif [ "$NETDEV" = "IPv6-SLAAC" ] + elif [ "$NETDEVLIST" = "IPv6-SLAAC" ] then save_auto_slaac - elif [ "$NETDEV" = "AUTO-DHCP-SLAAC" ] + elif [ "$NETDEVLIST" = "AUTO-DHCP-SLAAC" ] then save_auto_dhcp save_auto_slaac else - save_manual_nic ${NETDEV} + for NETDEV in ${NETDEVLIST} + do + save_manual_nic ${NETDEV} + done + save_manual_router + save_manual_nameserver fi }; From owner-svn-src-all@FreeBSD.ORG Mon May 14 15:13:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D079106564A; Mon, 14 May 2012 15:13:15 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1694E8FC14; Mon, 14 May 2012 15:13:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EFDE3X038634; Mon, 14 May 2012 15:13:14 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EFDEhx038631; Mon, 14 May 2012 15:13:14 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205141513.q4EFDEhx038631@svn.freebsd.org> From: Josh Paetzel Date: Mon, 14 May 2012 15:13:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235445 - stable/9/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 15:13:15 -0000 Author: jpaetzel Date: Mon May 14 15:13:14 2012 New Revision: 235445 URL: http://svn.freebsd.org/changeset/base/235445 Log: MFC 234990: Fix some issues creaing zpool mirror / raidz1(2)(3) devices. Fix issues stamping boot on other ZFS drives, now you can boot after removing mirror drive. Submitted by: kmoore Obtained from: PC-BSD Sponsored by: iXsystems Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh stable/9/usr.sbin/pc-sysinstall/backend/functions-newfs.sh Directory Properties: stable/9/usr.sbin/pc-sysinstall/ (props changed) Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh ============================================================================== --- stable/9/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon May 14 15:08:45 2012 (r235444) +++ stable/9/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon May 14 15:13:14 2012 (r235445) @@ -50,41 +50,39 @@ get_fs_line_xvars() ACTIVEDEV="${1}" LINE="${2}" - echo $LINE | cut -d ' ' -f 4 | grep -q ' (' 2>/dev/null + echo $LINE | cut -d ' ' -f 4 | grep -q '(' 2>/dev/null + if [ $? -ne 0 ] ; then return ; fi + + # See if we are looking for ZFS specific options + echo $LINE | grep -q '^ZFS' 2>/dev/null if [ $? -eq 0 ] ; then + ZTYPE="NONE" + ZFSVARS="`echo $LINE | cut -d ' ' -f 4-20 |cut -d '(' -f 2- | cut -d ')' -f 1 | xargs`" - # See if we are looking for ZFS specific options - echo $LINE | grep -q '^ZFS' 2>/dev/null + echo $ZFSVARS | grep -qE "^(disk|file|mirror|raidz(1|2|3)?|spare|log|cache):" 2>/dev/null if [ $? -eq 0 ] ; then - ZTYPE="NONE" - ZFSVARS="`echo $LINE | cut -d ' ' -f 4 |cut -d '(' -f 2- | cut -d ')' -f 1 | xargs`" - - echo $ZFSVARS | grep -qE "^(disk|file|mirror|raidz(1|2|3)?|spare|log|cache):" 2>/dev/null - if [ $? -eq 0 ] ; then ZTYPE=`echo $ZFSVARS | cut -f1 -d:` ZFSVARS=`echo $ZFSVARS | sed "s|$ZTYPE: ||g" | sed "s|$ZTYPE:||g"` - fi - - # Return the ZFS options - if [ "${ZTYPE}" = "NONE" ] ; then - VAR="${ACTIVEDEV} ${ZFSVARS}" - else - VAR="${ZTYPE} ${ACTIVEDEV} ${ZFSVARS}" - fi - export VAR - return - fi # End of ZFS block + fi - # See if we are looking for UFS specific newfs options - echo $LINE | grep -q '^UFS' 2>/dev/null - if [ $? -eq 0 ] ; then - FSVARS="`echo $LINE | cut -d '(' -f 2- | cut -d ')' -f 1 | xargs`" - VAR="${FSVARS}" - export VAR - return + # Return the ZFS options + if [ "${ZTYPE}" = "NONE" ] ; then + VAR="${ACTIVEDEV} ${ZFSVARS}" + else + VAR="${ZTYPE} ${ACTIVEDEV} ${ZFSVARS}" fi + export VAR + return + fi # End of ZFS block - fi # End of xtra-options block + # See if we are looking for UFS specific newfs options + echo $LINE | grep -q '^UFS' 2>/dev/null + if [ $? -eq 0 ] ; then + FSVARS="`echo $LINE | cut -d '(' -f 2- | cut -d ')' -f 1 | xargs`" + VAR="${FSVARS}" + export VAR + return + fi # If we got here, set VAR to empty and export export VAR="" @@ -96,8 +94,10 @@ setup_zfs_mirror_parts() { _nZFS="" + ZTYPE="`echo ${1} | awk '{print $1}'`" + # Using mirroring, setup boot partitions on each disk - _mirrline="`echo ${1} | sed 's|mirror ||g'`" + _mirrline="`echo ${1} | sed 's|mirror ||g' | sed 's|raidz1 ||g' | sed 's|raidz2 ||g' | sed 's|raidz3 ||g' | sed 's|raidz ||g'`" for _zvars in $_mirrline do echo "Looping through _zvars: $_zvars" >>${LOGOUT} @@ -107,15 +107,16 @@ setup_zfs_mirror_parts() is_disk "$_zvars" >/dev/null 2>/dev/null if [ $? -eq 0 ] ; then - echo "Setting up ZFS mirror disk $_zvars" >>${LOGOUT} + echo "Setting up ZFS disk $_zvars" >>${LOGOUT} init_gpt_full_disk "$_zvars" >/dev/null 2>/dev/null - rc_halt "gpart add -t freebsd-zfs ${_zvars}" >/dev/null 2>/dev/null + rc_halt "gpart add -a 4k -t freebsd-zfs ${_zvars}" >/dev/null 2>/dev/null + rc_halt "gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${_zvars}" >/dev/null 2>/dev/null _nZFS="$_nZFS ${_zvars}p2" else _nZFS="$_nZFS ${_zvars}" fi done - echo "mirror $2 `echo $_nZFS | tr -s ' '`" + echo "$ZTYPE $2 `echo $_nZFS | tr -s ' '`" } ; # Function which creates a unique label name for the specified mount @@ -290,15 +291,15 @@ setup_gpart_partitions() else get_fs_line_xvars "${_wSlice}${PARTLETTER}" "${STRING}" fi - XTRAOPTS="${VAR}" + XTRAOPTS="$VAR" # Check if using zfs mirror - echo ${XTRAOPTS} | grep -q "mirror" 2>/dev/null + echo ${XTRAOPTS} | grep -q -e "mirror" -e "raidz" if [ $? -eq 0 -a "$FS" = "ZFS" ] ; then if [ "${_pType}" = "gpt" -o "${_pType}" = "gptslice" ] ; then XTRAOPTS=$(setup_zfs_mirror_parts "$XTRAOPTS" "${_pDisk}p${CURPART}") else - XTRAOPTS=$(setup_zfs_mirror_parts "$XTRAOPTS" "${_wSlice}") + XTRAOPTS=$(setup_zfs_mirror_parts "$XTRAOPTS" "${_wSlice}${PARTLETTER}") fi fi Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-newfs.sh ============================================================================== --- stable/9/usr.sbin/pc-sysinstall/backend/functions-newfs.sh Mon May 14 15:08:45 2012 (r235444) +++ stable/9/usr.sbin/pc-sysinstall/backend/functions-newfs.sh Mon May 14 15:13:14 2012 (r235445) @@ -44,6 +44,23 @@ setup_zfs_filesystem() sleep 5 sync + # Check if we have multiple zfs mounts specified + for i in `echo ${PARTMNT} | sed 's|,| |g'` + do + # Check if we ended up with needing a zfs bootable partition + if [ "${i}" = "/" -o "${i}" = "/boot" ] + then + if [ "$HAVEBOOT" = "YES" ] ; then continue ; fi + if [ "${PARTGEOM}" = "MBR" ] ; then + # Lets stamp the proper ZFS boot loader + echo_log "Setting up ZFS boot loader support" + rc_halt "dd if=/boot/zfsboot of=${ROOTSLICE} count=1" + rc_halt "dd if=/boot/zfsboot of=${PART}${EXT} skip=1 seek=1024" + fi + fi + done + + # Check if we have some custom zpool arguments and use them if so if [ ! -z "${ZPOOLOPTS}" ] ; then rc_halt "zpool create -m none -f ${ZPOOLNAME} ${ZPOOLOPTS}" @@ -55,23 +72,13 @@ setup_zfs_filesystem() # Disable atime for this zfs partition, speed increase rc_nohalt "zfs set atime=off ${ZPOOLNAME}" - # Check if we have multiple zfs mounts specified + # Check if we need to set a bootable zpool for i in `echo ${PARTMNT} | sed 's|,| |g'` do - # Check if we ended up with needing a zfs bootable partition - if [ "${i}" = "/" -o "${i}" = "/boot" ] - then + if [ "${i}" = "/" -o "${i}" = "/boot" ] ; then if [ "$HAVEBOOT" = "YES" ] ; then continue ; fi - if [ "${PARTGEOM}" = "MBR" ] - then - # Lets stamp the proper ZFS boot loader - echo_log "Setting up ZFS boot loader support" - rc_halt "zpool set bootfs=${ZPOOLNAME} ${ZPOOLNAME}" - rc_halt "zpool export ${ZPOOLNAME}" - rc_halt "dd if=/boot/zfsboot of=${ROOTSLICE} count=1" - rc_halt "dd if=/boot/zfsboot of=${PART}${EXT} skip=1 seek=1024" - rc_halt "zpool import ${ZPOOLNAME}" - fi + echo_log "Stamping zpool as bootfs" + rc_halt "zpool set bootfs=${ZPOOLNAME} ${ZPOOLNAME}" fi done @@ -90,11 +97,6 @@ setup_filesystems() for PART in `ls ${PARTDIR}` do PARTDEV="`echo $PART | sed 's|-|/|g'`" - if [ ! -e "${PARTDEV}" ] - then - exit_err "ERROR: The partition ${PARTDEV} does not exist. Failure in bsdlabel?" - fi - PARTFS="`cat ${PARTDIR}/${PART} | cut -d '#' -f 1`" PARTMNT="`cat ${PARTDIR}/${PART} | cut -d '#' -f 2`" PARTENC="`cat ${PARTDIR}/${PART} | cut -d '#' -f 3`" @@ -103,6 +105,10 @@ setup_filesystems() PARTXTRAOPTS="`cat ${PARTDIR}/${PART} | cut -d '#' -f 6`" PARTIMAGE="`cat ${PARTDIR}/${PART} | cut -d '#' -f 7`" + if [ ! -e "${PARTDEV}" ] ; then + exit_err "ERROR: The partition ${PARTDEV} does not exist. Failure in bsdlabel?" + fi + # Make sure journaling isn't enabled on this device if [ -e "${PARTDEV}.journal" ] then From owner-svn-src-all@FreeBSD.ORG Mon May 14 15:15:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2686D106566B; Mon, 14 May 2012 15:15:14 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 101D78FC15; Mon, 14 May 2012 15:15:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EFFDxt038755; Mon, 14 May 2012 15:15:13 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EFFDvJ038753; Mon, 14 May 2012 15:15:13 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205141515.q4EFFDvJ038753@svn.freebsd.org> From: Josh Paetzel Date: Mon, 14 May 2012 15:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235446 - stable/9/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 15:15:14 -0000 Author: jpaetzel Date: Mon May 14 15:15:13 2012 New Revision: 235446 URL: http://svn.freebsd.org/changeset/base/235446 Log: MFC: 235005 Use a unique zpool name during install, in the case of having another PC-BSD / FreeBSD zpool on the system for another install. Submitted by: kmoore Obtained from: PC-BSD Sponsored by: iXsystems Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions.sh Directory Properties: stable/9/usr.sbin/pc-sysinstall/ (props changed) Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions.sh ============================================================================== --- stable/9/usr.sbin/pc-sysinstall/backend/functions.sh Mon May 14 15:13:14 2012 (r235445) +++ stable/9/usr.sbin/pc-sysinstall/backend/functions.sh Mon May 14 15:15:13 2012 (r235446) @@ -216,7 +216,7 @@ fetch_file() fetch -s "${FETCHFILE}" >${SIZEFILE} SIZE="`cat ${SIZEFILE}`" - SIZE="`expr ${SIZE} / 1024`" + SIZE=$((SIZE/1024)) echo "FETCH: ${FETCHFILE}" echo "FETCH: ${FETCHOUTFILE}" >>${LOGOUT} @@ -276,11 +276,22 @@ get_zpool_name() else # Need to generate a zpool name for this device NUM=`ls ${TMPDIR}/.zpools/ | wc -l | sed 's| ||g'` - NEWNAME="${BASENAME}${NUM}" + + # Is it used in another zpool? + while + z=1 + do + NEWNAME="${BASENAME}${NUM}" + zpool import | grep -q "${NEWNAME}" + if [ $? -ne 0 ] ; then break ; fi + NUM=$((NUM+1)) + done + + # Now save the new tank name mkdir -p ${TMPDIR}/.zpools/`dirname $DEVICE` echo "$NEWNAME" >${TMPDIR}/.zpools/${DEVICE} echo "${NEWNAME}" - return + return 0 fi }; From owner-svn-src-all@FreeBSD.ORG Mon May 14 15:18:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1E43A1065670; Mon, 14 May 2012 15:18:48 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06F008FC08; Mon, 14 May 2012 15:18:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EFIlt1038911; Mon, 14 May 2012 15:18:47 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EFIlhs038908; Mon, 14 May 2012 15:18:47 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205141518.q4EFIlhs038908@svn.freebsd.org> From: Josh Paetzel Date: Mon, 14 May 2012 15:18:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235447 - stable/9/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 15:18:48 -0000 Author: jpaetzel Date: Mon May 14 15:18:47 2012 New Revision: 235447 URL: http://svn.freebsd.org/changeset/base/235447 Log: MFC: 235006 Add powerpc / powerpc64 support to pc-sysinstall. This patch will autodetect if on powerpc and use the APM gpart GEOM class automaticaly. At this time support for full disk installation is the only supported scheme. Submitted by: kmoore Obtained from: PC-BSD Sponsored by: iXsystems Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh Directory Properties: stable/9/usr.sbin/pc-sysinstall/ (props changed) Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh ============================================================================== --- stable/9/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon May 14 15:15:13 2012 (r235446) +++ stable/9/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon May 14 15:18:47 2012 (r235447) @@ -177,6 +177,8 @@ setup_gpart_partitions() # Lets read in the config file now and setup our partitions if [ "${_pType}" = "gpt" ] ; then CURPART="2" + elif [ "${_pType}" = "apm" ] ; then + CURPART="3" else PARTLETTER="a" CURPART="1" @@ -255,6 +257,9 @@ setup_gpart_partitions() if [ "${CURPART}" = "2" -a "$_pType" = "gpt" ] ; then export FOUNDROOT="0" fi + if [ "${CURPART}" = "3" -a "$_pType" = "apm" ] ; then + export FOUNDROOT="0" + fi if [ "${CURPART}" = "1" -a "$_pType" = "mbr" ] ; then export FOUNDROOT="0" fi @@ -269,6 +274,9 @@ setup_gpart_partitions() if [ "${CURPART}" != "2" -a "${_pType}" = "gpt" ] ; then exit_err "/boot partition must be first partition" fi + if [ "${CURPART}" != "3" -a "${_pType}" = "apm" ] ; then + exit_err "/boot partition must be first partition" + fi if [ "${CURPART}" != "1" -a "${_pType}" = "mbr" ] ; then exit_err "/boot partition must be first partition" fi @@ -288,6 +296,8 @@ setup_gpart_partitions() # Get any extra options for this fs / line if [ "${_pType}" = "gpt" ] ; then get_fs_line_xvars "${_pDisk}p${CURPART}" "${STRING}" + elif [ "${_pType}" = "apm" ] ; then + get_fs_line_xvars "${_pDisk}s${CURPART}" "${STRING}" else get_fs_line_xvars "${_wSlice}${PARTLETTER}" "${STRING}" fi @@ -298,6 +308,8 @@ setup_gpart_partitions() if [ $? -eq 0 -a "$FS" = "ZFS" ] ; then if [ "${_pType}" = "gpt" -o "${_pType}" = "gptslice" ] ; then XTRAOPTS=$(setup_zfs_mirror_parts "$XTRAOPTS" "${_pDisk}p${CURPART}") + elif [ "${_pType}" = "apm" ] ; then + XTRAOPTS=$(setup_zfs_mirror_parts "$XTRAOPTS" "${_pDisk}s${CURPART}") else XTRAOPTS=$(setup_zfs_mirror_parts "$XTRAOPTS" "${_wSlice}${PARTLETTER}") fi @@ -323,6 +335,9 @@ setup_gpart_partitions() elif [ "${_pType}" = "gptslice" ]; then sleep 2 rc_halt "gpart add ${SOUT} -t ${PARTYPE} ${_wSlice}" + elif [ "${_pType}" = "apm" ]; then + sleep 2 + rc_halt "gpart add ${SOUT} -t ${PARTYPE} ${_pDisk}" else sleep 2 rc_halt "gpart add ${SOUT} -t ${PARTYPE} -i ${CURPART} ${_wSlice}" @@ -352,6 +367,18 @@ setup_gpart_partitions() if [ -n "${ENCPASS}" ] ; then echo "${ENCPASS}" >${PARTDIR}-enc/${_dFile}p${CURPART}-encpass fi + elif [ "${_pType}" = "apm" ] ; then + _dFile="`echo $_pDisk | sed 's|/|-|g'`" + echo "${FS}#${MNT}#${ENC}#${PLABEL}#GPT#${XTRAOPTS}" >${PARTDIR}/${_dFile}s${CURPART} + + # Clear out any headers + sleep 2 + dd if=/dev/zero of=${_pDisk}s${CURPART} count=2048 2>/dev/null + + # If we have a enc password, save it as well + if [ -n "${ENCPASS}" ] ; then + echo "${ENCPASS}" >${PARTDIR}-enc/${_dFile}s${CURPART}-encpass + fi else # MBR Partition or GPT slice _dFile="`echo $_wSlice | sed 's|/|-|g'`" @@ -368,9 +395,10 @@ setup_gpart_partitions() # Increment our parts counter - if [ "$_pType" = "gpt" ] ; then + if [ "$_pType" = "gpt" -o "$_pType" = "apm" ] ; then CURPART=$((CURPART+1)) - # If this is a gpt partition, we can continue and skip the MBR part letter stuff + # If this is a gpt/apm partition, + # we can continue and skip the MBR part letter stuff continue else CURPART=$((CURPART+1)) @@ -437,6 +465,9 @@ populate_disk_label() if [ "$type" = "mbr" ] ; then wrkslice="${diskid}s${slicenum}" fi + if [ "$type" = "apm" ] ; then + wrkslice="${diskid}s${slicenum}" + fi if [ "$type" = "gpt" -o "$type" = "gptslice" ] ; then wrkslice="${diskid}p${slicenum}" fi @@ -474,6 +505,9 @@ setup_disk_label() if [ "$type" = "gpt" -a ! -e "${disk}p${pnum}" ] ; then exit_err "ERROR: The partition ${i} doesn't exist! gpart failure!" fi + if [ "$type" = "apm" -a ! -e "${disk}s${pnum}" ] ; then + exit_err "ERROR: The partition ${i} doesn't exist! gpart failure!" + fi if [ "$type" = "gptslice" -a ! -e "${disk}p${pnum}" ] ; then exit_err "ERROR: The partition ${i} doesn't exist! gpart failure!" fi Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh ============================================================================== --- stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon May 14 15:15:13 2012 (r235446) +++ stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon May 14 15:18:47 2012 (r235447) @@ -464,6 +464,12 @@ setup_disk_slice() # Found our flag to commit this disk setup / lets do sanity check and do it if [ ! -z "${DISK}" -a ! -z "${PTYPE}" ] then + # Make sure we are only installing ppc to full disk + if [ `uname -m` = "powerpc" -o `uname -m` = "powerpc64" ]; then + if [ "$PTYPE" != "all" ] ; then + exit_err "powerpc can only be installed to a full disk" + fi + fi case ${PTYPE} in all) @@ -488,6 +494,12 @@ setup_disk_slice() tmpSLICE="${DISK}p1" fi + if [ `uname -m` = "powerpc" -o `uname -m` = "powerpc64" ] + then + PSCHEME="APM" + tmpSLICE="${DISK}s1" + fi + run_gpart_full "${DISK}" "${BMANAGER}" "${PSCHEME}" ;; @@ -597,6 +609,30 @@ clear_backup_gpt_table() rc_nohalt "dd if=/dev/zero of=${1} bs=1m oseek=`diskinfo ${1} | awk '{print int($3 / (1024*1024)) - 4;}'`" } ; +# Function which runs gpart and creates a single large APM partition scheme +init_apm_full_disk() +{ + _intDISK=$1 + + # Set our sysctl so we can overwrite any geom using drives + sysctl kern.geom.debugflags=16 >>${LOGOUT} 2>>${LOGOUT} + + # Stop any journaling + stop_gjournal "${_intDISK}" + + # Remove any existing partitions + delete_all_gpart "${_intDISK}" + + sleep 2 + + echo_log "Running gpart on ${_intDISK}" + rc_halt "gpart create -s APM ${_intDISK}" + rc_halt "gpart add -s 800k -t freebsd-boot ${_intDISK}" + + echo_log "Stamping boot sector on ${_intDISK}" + rc_halt "gpart bootcode -p /boot/boot1.hfs -i 1 ${_intDISK}" + +} # Function which runs gpart and creates a single large GPT partition scheme init_gpt_full_disk() @@ -670,7 +706,10 @@ run_gpart_full() BOOT=$2 SCHEME=$3 - if [ "$SCHEME" = "MBR" ] ; then + if [ "$SCHEME" = "APM" ] ; then + init_apm_full_disk "$DISK" + slice=`echo "${DISK}:1:apm" | sed 's|/|-|g'` + elif [ "$SCHEME" = "MBR" ] ; then init_mbr_full_disk "$DISK" "$BOOT" slice=`echo "${DISK}:1:mbr" | sed 's|/|-|g'` else From owner-svn-src-all@FreeBSD.ORG Mon May 14 15:20:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06AA41065674; Mon, 14 May 2012 15:20:40 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E4AC88FC12; Mon, 14 May 2012 15:20:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EFKdLN039027; Mon, 14 May 2012 15:20:39 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EFKdPT039025; Mon, 14 May 2012 15:20:39 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205141520.q4EFKdPT039025@svn.freebsd.org> From: Josh Paetzel Date: Mon, 14 May 2012 15:20:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235448 - stable/9/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 15:20:40 -0000 Author: jpaetzel Date: Mon May 14 15:20:39 2012 New Revision: 235448 URL: http://svn.freebsd.org/changeset/base/235448 Log: MFC: 235008 Add bootcamp bootloader stamp. Submitted by: kmoore Obtained from: PC-BSD Sponsored by: iXsystems Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh Directory Properties: stable/9/usr.sbin/pc-sysinstall/ (props changed) Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh ============================================================================== --- stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon May 14 15:18:47 2012 (r235447) +++ stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon May 14 15:20:39 2012 (r235448) @@ -766,6 +766,10 @@ run_gpart_gpt_part() # Init the MBR partition rc_halt "gpart create -s BSD ${DISK}p${slicenum}" + # Stamp the bootloader + sleep 4 + rc_halt "gpart bootcode -b /boot/boot ${DISK}p${slicenum}" + # Set the slice to the format we'll be using for gpart later slice=`echo "${1}:${3}:gptslice" | sed 's|/|-|g'` From owner-svn-src-all@FreeBSD.ORG Mon May 14 15:46:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A19C0106564A; Mon, 14 May 2012 15:46:37 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B9B88FC0A; Mon, 14 May 2012 15:46:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EFkb3u039950; Mon, 14 May 2012 15:46:37 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EFkbdo039948; Mon, 14 May 2012 15:46:37 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201205141546.q4EFkbdo039948@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 14 May 2012 15:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235449 - in stable/9/sys: i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 15:46:37 -0000 Author: jh Date: Mon May 14 15:46:37 2012 New Revision: 235449 URL: http://svn.freebsd.org/changeset/base/235449 Log: MFC r234489: The value of flags matching VNOVAL can't be supported. Return EOPNOTSUPP from setfflags() in this case. This fixes the return value of chflags(path, -1). Modified: stable/9/sys/kern/vfs_syscalls.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/kern/vfs_syscalls.c ============================================================================== --- stable/9/sys/kern/vfs_syscalls.c Mon May 14 15:20:39 2012 (r235448) +++ stable/9/sys/kern/vfs_syscalls.c Mon May 14 15:46:37 2012 (r235449) @@ -2743,6 +2743,10 @@ setfflags(td, vp, flags) struct mount *mp; struct vattr vattr; + /* We can't support the value matching VNOVAL. */ + if (flags == VNOVAL) + return (EOPNOTSUPP); + /* * Prevent non-root users from setting flags on devices. When * a device is reused, users can retain ownership of the device From owner-svn-src-all@FreeBSD.ORG Mon May 14 16:25:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F18A1106566C; Mon, 14 May 2012 16:25:17 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC0D68FC14; Mon, 14 May 2012 16:25:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EGPHbD041196; Mon, 14 May 2012 16:25:17 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EGPHsU041190; Mon, 14 May 2012 16:25:17 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201205141625.q4EGPHsU041190@svn.freebsd.org> From: Joel Dahl Date: Mon, 14 May 2012 16:25:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235450 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 16:25:18 -0000 Author: joel (doc committer) Date: Mon May 14 16:25:17 2012 New Revision: 235450 URL: http://svn.freebsd.org/changeset/base/235450 Log: mdoc: Avoid playing tricks with Ns: If Nm is present in the SYNOPSIS section, it will be output on its own line. Ns cancels this effect however. This change is also consistent with the rest of our manual pages. Modified: head/share/man/man4/divert.4 head/share/man/man4/gre.4 head/share/man/man4/ipfirewall.4 head/share/man/man4/send.4 head/share/man/man4/siftr.4 Modified: head/share/man/man4/divert.4 ============================================================================== --- head/share/man/man4/divert.4 Mon May 14 15:46:37 2012 (r235449) +++ head/share/man/man4/divert.4 Mon May 14 16:25:17 2012 (r235450) @@ -21,7 +21,7 @@ kernel configuration file: .Ed .Pp Alternatively, to load -.Ns Nm +the driver as a module at boot time, add the following lines into the .Xr loader.conf 5 file: Modified: head/share/man/man4/gre.4 ============================================================================== --- head/share/man/man4/gre.4 Mon May 14 15:46:37 2012 (r235449) +++ head/share/man/man4/gre.4 Mon May 14 16:25:17 2012 (r235450) @@ -37,16 +37,14 @@ .Nd encapsulating network device .Sh SYNOPSIS To compile the -.Ns Nm -device into the kernel, place the following line in the kernel +driver into the kernel, place the following line in the kernel configuration file: .Bd -ragged -offset indent .Cd "device gre" .Ed .Pp Alternatively, to load the -.Ns Nm -device as a module at boot time, place the following line in +driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent if_gre_load="YES" Modified: head/share/man/man4/ipfirewall.4 ============================================================================== --- head/share/man/man4/ipfirewall.4 Mon May 14 15:46:37 2012 (r235449) +++ head/share/man/man4/ipfirewall.4 Mon May 14 16:25:17 2012 (r235450) @@ -9,15 +9,14 @@ .Nd IP packet filter and traffic accounting .Sh SYNOPSIS To compile -.Ns Nm +the driver into the kernel, place the following option in the kernel configuration file: .Bd -ragged -offset indent .Cd "options IPFIREWALL" .Ed .Pp -Other kernel options related to -.Ns Nm +Other related kernel options which may also be useful are: .Bd -ragged -offset indent .Cd "options IPFIREWALL_DEFAULT_TO_ACCEPT" @@ -27,7 +26,7 @@ which may also be useful are: .Ed .Pp To load -.Ns Nm +the driver as a module at boot time, add the following line into the .Xr loader.conf 5 file: Modified: head/share/man/man4/send.4 ============================================================================== --- head/share/man/man4/send.4 Mon May 14 15:46:37 2012 (r235449) +++ head/share/man/man4/send.4 Mon May 14 16:25:17 2012 (r235450) @@ -38,10 +38,7 @@ .Ft int .Fn socket PF_INET6 SOCK_RAW IPPROTO_SEND .Pp -To enable -.Ns Nm -support, load the kernel side SeND as a module. -To load it at boot time, add the following line to +To load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent send_load="YES" Modified: head/share/man/man4/siftr.4 ============================================================================== --- head/share/man/man4/siftr.4 Mon May 14 15:46:37 2012 (r235449) +++ head/share/man/man4/siftr.4 Mon May 14 16:25:17 2012 (r235450) @@ -38,14 +38,14 @@ .Nd Statistical Information For TCP Research .Sh SYNOPSIS To load -.Ns Nm +the driver as a module at run-time, run the following command as root: .Bd -literal -offset indent kldload siftr .Ed .Pp Alternatively, to load -.Ns Nm +the driver as a module at boot time, add the following line into the .Xr loader.conf 5 file: @@ -53,13 +53,16 @@ file: siftr_load="YES" .Ed .Sh DESCRIPTION +The .Nm -.Ns ( Em S Ns tatistical +.Po +.Em S Ns tatistical .Em I Ns nformation .Em F Ns or .Em T Ns CP -.Em R Ns esearch ) -is a kernel module that logs a range of statistics on active TCP connections to +.Em R Ns esearch +.Pc +kernel module logs a range of statistics on active TCP connections to a log file. It provides the ability to make highly granular measurements of TCP connection state, aimed at system administrators, developers and researchers. From owner-svn-src-all@FreeBSD.ORG Mon May 14 17:00:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 86BCA106566B; Mon, 14 May 2012 17:00:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7172F8FC08; Mon, 14 May 2012 17:00:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EH0XF4042470; Mon, 14 May 2012 17:00:33 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EH0Xwq042468; Mon, 14 May 2012 17:00:33 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201205141700.q4EH0Xwq042468@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 14 May 2012 17:00:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235451 - head/sys/dev/usb/input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 17:00:33 -0000 Author: hselasky Date: Mon May 14 17:00:32 2012 New Revision: 235451 URL: http://svn.freebsd.org/changeset/base/235451 Log: Move reset of USB mouse parameters from the USB mouse attach to the USB mouse device open. Protect against multi character device open. Some other nits. MFC after: 1 week Modified: head/sys/dev/usb/input/ums.c Modified: head/sys/dev/usb/input/ums.c ============================================================================== --- head/sys/dev/usb/input/ums.c Mon May 14 16:25:17 2012 (r235450) +++ head/sys/dev/usb/input/ums.c Mon May 14 17:00:32 2012 (r235451) @@ -134,6 +134,7 @@ struct ums_softc { struct usb_xfer *sc_xfer[UMS_N_TRANSFER]; int sc_pollrate; + int sc_fflags; uint8_t sc_buttons; uint8_t sc_iid; @@ -677,32 +678,13 @@ ums_attach(device_t dev) DPRINTF("size=%d, id=%d\n", isize, sc->sc_iid); #endif - if (sc->sc_buttons > MOUSE_MSC_MAXBUTTON) - sc->sc_hw.buttons = MOUSE_MSC_MAXBUTTON; - else - sc->sc_hw.buttons = sc->sc_buttons; - - sc->sc_hw.iftype = MOUSE_IF_USB; - sc->sc_hw.type = MOUSE_MOUSE; - sc->sc_hw.model = MOUSE_MODEL_GENERIC; - sc->sc_hw.hwid = 0; - - sc->sc_mode.protocol = MOUSE_PROTO_MSC; - sc->sc_mode.rate = -1; - sc->sc_mode.resolution = MOUSE_RES_UNKNOWN; - sc->sc_mode.accelfactor = 0; - sc->sc_mode.level = 0; - sc->sc_mode.packetsize = MOUSE_MSC_PACKETSIZE; - sc->sc_mode.syncmask[0] = MOUSE_MSC_SYNCMASK; - sc->sc_mode.syncmask[1] = MOUSE_MSC_SYNC; - err = usb_fifo_attach(uaa->device, sc, &sc->sc_mtx, &ums_fifo_methods, &sc->sc_fifo, device_get_unit(dev), -1, uaa->info.bIfaceIndex, UID_ROOT, GID_OPERATOR, 0644); - if (err) { + if (err) goto detach; - } + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "parseinfo", CTLTYPE_STRING|CTLFLAG_RD, @@ -825,7 +807,7 @@ ums_put_queue(struct ums_softc *sc, int3 static void ums_reset_buf(struct ums_softc *sc) { - /* reset read queue */ + /* reset read queue, must be called locked */ usb_fifo_reset(sc->sc_fifo.fp[USB_FIFO_RX]); } @@ -836,7 +818,33 @@ ums_open(struct usb_fifo *fifo, int ffla DPRINTFN(2, "\n"); - if (fflags & FREAD) { + /* check for duplicate open, should not happen */ + if (sc->sc_fflags & fflags) + return (EBUSY); + + /* check for first open */ + if (sc->sc_fflags == 0) { + + /* reset all USB mouse parameters */ + + if (sc->sc_buttons > MOUSE_MSC_MAXBUTTON) + sc->sc_hw.buttons = MOUSE_MSC_MAXBUTTON; + else + sc->sc_hw.buttons = sc->sc_buttons; + + sc->sc_hw.iftype = MOUSE_IF_USB; + sc->sc_hw.type = MOUSE_MOUSE; + sc->sc_hw.model = MOUSE_MODEL_GENERIC; + sc->sc_hw.hwid = 0; + + sc->sc_mode.protocol = MOUSE_PROTO_MSC; + sc->sc_mode.rate = -1; + sc->sc_mode.resolution = MOUSE_RES_UNKNOWN; + sc->sc_mode.accelfactor = 0; + sc->sc_mode.level = 0; + sc->sc_mode.packetsize = MOUSE_MSC_PACKETSIZE; + sc->sc_mode.syncmask[0] = MOUSE_MSC_SYNCMASK; + sc->sc_mode.syncmask[1] = MOUSE_MSC_SYNC; /* reset status */ @@ -847,21 +855,31 @@ ums_open(struct usb_fifo *fifo, int ffla sc->sc_status.dy = 0; sc->sc_status.dz = 0; /* sc->sc_status.dt = 0; */ + } + if (fflags & FREAD) { + /* allocate RX buffer */ if (usb_fifo_alloc_buffer(fifo, UMS_BUF_SIZE, UMS_IFQ_MAXLEN)) { return (ENOMEM); } } + + sc->sc_fflags |= fflags & (FREAD | FWRITE); return (0); } static void ums_close(struct usb_fifo *fifo, int fflags) { - if (fflags & FREAD) { + struct ums_softc *sc = usb_fifo_softc(fifo); + + DPRINTFN(2, "\n"); + + if (fflags & FREAD) usb_fifo_free_buffer(fifo); - } + + sc->sc_fflags &= ~(fflags & (FREAD | FWRITE)); } static int @@ -891,7 +909,7 @@ ums_ioctl(struct usb_fifo *fifo, u_long /* don't change the current setting */ } else if ((mode.level < 0) || (mode.level > 1)) { error = EINVAL; - goto done; + break; } else { sc->sc_mode.level = mode.level; } @@ -928,7 +946,7 @@ ums_ioctl(struct usb_fifo *fifo, u_long case MOUSE_SETLEVEL: if (*(int *)addr < 0 || *(int *)addr > 1) { error = EINVAL; - goto done; + break; } sc->sc_mode.level = *(int *)addr; @@ -975,9 +993,9 @@ ums_ioctl(struct usb_fifo *fifo, u_long } default: error = ENOTTY; + break; } -done: mtx_unlock(&sc->sc_mtx); return (error); } From owner-svn-src-all@FreeBSD.ORG Mon May 14 18:03:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EBB0D1065677; Mon, 14 May 2012 18:03:59 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6C458FC12; Mon, 14 May 2012 18:03:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EI3xf3044697; Mon, 14 May 2012 18:03:59 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EI3x7S044695; Mon, 14 May 2012 18:03:59 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205141803.q4EI3x7S044695@svn.freebsd.org> From: Josh Paetzel Date: Mon, 14 May 2012 18:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235452 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 18:04:00 -0000 Author: jpaetzel Date: Mon May 14 18:03:59 2012 New Revision: 235452 URL: http://svn.freebsd.org/changeset/base/235452 Log: Set the MBR partition to active when doing a full disk MBR. Submitted by: kmoore Obtained from: PC-BSD Sponsored by: iXsystems MFC after: 3 days Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon May 14 17:00:32 2012 (r235451) +++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon May 14 18:03:59 2012 (r235452) @@ -689,6 +689,9 @@ init_mbr_full_disk() echo_log "Cleaning up ${_intDISK}s1" rc_halt "dd if=/dev/zero of=${_intDISK}s1 count=1024" + # Make the partition active + rc_halt "gpart set -a active -i 1 ${_intDISK}" + if [ "$_intBOOT" = "bsd" ] ; then echo_log "Stamping boot0 on ${_intDISK}" rc_halt "gpart bootcode -b /boot/boot0 ${_intDISK}" From owner-svn-src-all@FreeBSD.ORG Mon May 14 18:06:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4740A1065675; Mon, 14 May 2012 18:06:52 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3298A8FC08; Mon, 14 May 2012 18:06:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EI6qrO044839; Mon, 14 May 2012 18:06:52 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EI6qCr044837; Mon, 14 May 2012 18:06:52 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205141806.q4EI6qCr044837@svn.freebsd.org> From: Josh Paetzel Date: Mon, 14 May 2012 18:06:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235453 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 18:06:52 -0000 Author: jpaetzel Date: Mon May 14 18:06:51 2012 New Revision: 235453 URL: http://svn.freebsd.org/changeset/base/235453 Log: Style fixes. Submitted by: kmoore Obtained from: PC-BSD MFC after: 3 days Sponsored by: iXsystems Modified: head/usr.sbin/pc-sysinstall/backend/functions.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions.sh Mon May 14 18:03:59 2012 (r235452) +++ head/usr.sbin/pc-sysinstall/backend/functions.sh Mon May 14 18:06:51 2012 (r235453) @@ -208,15 +208,11 @@ fetch_file() FETCHOUTFILE="$2" EXITFAILED="$3" - SIZEFILE="${TMPDIR}/.fetchSize" EXITFILE="${TMPDIR}/.fetchExit" - rm ${SIZEFILE} 2>/dev/null >/dev/null rm ${FETCHOUTFILE} 2>/dev/null >/dev/null - fetch -s "${FETCHFILE}" >${SIZEFILE} - SIZE="`cat ${SIZEFILE}`" - SIZE=$((SIZE/1024)) + SIZE=$(( `fetch -s "${FETCHFILE}"` / 1024 )) echo "FETCH: ${FETCHFILE}" echo "FETCH: ${FETCHOUTFILE}" >>${LOGOUT} @@ -278,12 +274,10 @@ get_zpool_name() NUM=`ls ${TMPDIR}/.zpools/ | wc -l | sed 's| ||g'` # Is it used in another zpool? - while - z=1 + while : do NEWNAME="${BASENAME}${NUM}" - zpool import | grep -q "${NEWNAME}" - if [ $? -ne 0 ] ; then break ; fi + zpool import | grep -qw "${NEWNAME}" && break NUM=$((NUM+1)) done From owner-svn-src-all@FreeBSD.ORG Mon May 14 21:58:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E4C41065742; Mon, 14 May 2012 21:58:23 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78FB28FC16; Mon, 14 May 2012 21:58:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4ELwNhm053020; Mon, 14 May 2012 21:58:23 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4ELwN6s053018; Mon, 14 May 2012 21:58:23 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201205142158.q4ELwN6s053018@svn.freebsd.org> From: "George V. Neville-Neil" Date: Mon, 14 May 2012 21:58:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235454 - head/cddl/contrib/dtracetoolkit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 21:58:23 -0000 Author: gnn Date: Mon May 14 21:58:22 2012 New Revision: 235454 URL: http://svn.freebsd.org/changeset/base/235454 Log: Fix opensnoop for FreeBSD by removing probes with 64 at the end as these are unnecessary. Reference sh in the correct location (/bin/sh) Modified: head/cddl/contrib/dtracetoolkit/opensnoop Modified: head/cddl/contrib/dtracetoolkit/opensnoop ============================================================================== --- head/cddl/contrib/dtracetoolkit/opensnoop Mon May 14 18:06:51 2012 (r235453) +++ head/cddl/contrib/dtracetoolkit/opensnoop Mon May 14 21:58:22 2012 (r235454) @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#!/bin/sh # # opensnoop - snoop file opens as they occur. # Written using DTrace (Solaris 10 3/05). @@ -189,7 +189,7 @@ fi /* * Print open event */ - syscall::open:entry, syscall::open64:entry + syscall::open:entry { /* save pathname */ self->pathp = arg0; @@ -203,7 +203,7 @@ fi /* OPT_file is checked on return to ensure pathp is mapped */ } - syscall::open:return, syscall::open64:return + syscall::open:return /self->ok && (! OPT_failonly || (int)arg0 < 0) && ((OPT_file == 0) || (OPT_file == 1 && PATHNAME == copyinstr(self->pathp)))/ { @@ -235,7 +235,7 @@ fi /* * Cleanup */ - syscall::open:return, syscall::open64:return + syscall::open:return /self->ok/ { self->pathp = 0; From owner-svn-src-all@FreeBSD.ORG Mon May 14 21:59:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 61925106564A; Mon, 14 May 2012 21:59:48 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D6198FC08; Mon, 14 May 2012 21:59:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4ELxmS2053114; Mon, 14 May 2012 21:59:48 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4ELxmEQ053112; Mon, 14 May 2012 21:59:48 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201205142159.q4ELxmEQ053112@svn.freebsd.org> From: "George V. Neville-Neil" Date: Mon, 14 May 2012 21:59:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235455 - head/cddl/contrib/dtracetoolkit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 21:59:48 -0000 Author: gnn Date: Mon May 14 21:59:47 2012 New Revision: 235455 URL: http://svn.freebsd.org/changeset/base/235455 Log: Fix execsnoop by changing exece and exec to be FreeBSD's execve. Reference sh in the correct location (/bin/sh) Modified: head/cddl/contrib/dtracetoolkit/execsnoop Modified: head/cddl/contrib/dtracetoolkit/execsnoop ============================================================================== --- head/cddl/contrib/dtracetoolkit/execsnoop Mon May 14 21:58:22 2012 (r235454) +++ head/cddl/contrib/dtracetoolkit/execsnoop Mon May 14 21:59:47 2012 (r235455) @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#!/bin/sh # # execsnoop - snoop process execution as it occurs. # Written using DTrace (Solaris 10 3/05). @@ -155,7 +155,7 @@ fi /* * Print exec event */ - syscall::exec:return, syscall::exece:return + syscall::execve:return /(FILTER == 0) || (OPT_cmd == 1 && COMMAND == execname)/ { /* print optional fields */ From owner-svn-src-all@FreeBSD.ORG Mon May 14 22:00:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CC2F01065688; Mon, 14 May 2012 22:00:24 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B747E8FC08; Mon, 14 May 2012 22:00:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EM0Omw053198; Mon, 14 May 2012 22:00:24 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EM0OHO053196; Mon, 14 May 2012 22:00:24 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201205142200.q4EM0OHO053196@svn.freebsd.org> From: "George V. Neville-Neil" Date: Mon, 14 May 2012 22:00:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235456 - head/cddl/contrib/dtracetoolkit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 22:00:24 -0000 Author: gnn Date: Mon May 14 22:00:24 2012 New Revision: 235456 URL: http://svn.freebsd.org/changeset/base/235456 Log: Move sh to the correct location for FreeBS (/bin/sh) Modified: head/cddl/contrib/dtracetoolkit/procsystime Modified: head/cddl/contrib/dtracetoolkit/procsystime ============================================================================== --- head/cddl/contrib/dtracetoolkit/procsystime Mon May 14 21:59:47 2012 (r235455) +++ head/cddl/contrib/dtracetoolkit/procsystime Mon May 14 22:00:24 2012 (r235456) @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#!/bin/sh # # procsystime - print process system call time details. # Written using DTrace (Solaris 10 3/05). From owner-svn-src-all@FreeBSD.ORG Mon May 14 22:02:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D300E1065670; Mon, 14 May 2012 22:02:01 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE5028FC1C; Mon, 14 May 2012 22:02:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4EM21A8053292; Mon, 14 May 2012 22:02:01 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4EM21O5053290; Mon, 14 May 2012 22:02:01 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201205142202.q4EM21O5053290@svn.freebsd.org> From: "George V. Neville-Neil" Date: Mon, 14 May 2012 22:02:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235457 - head/cddl/contrib/dtracetoolkit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 22:02:01 -0000 Author: gnn Date: Mon May 14 22:02:01 2012 New Revision: 235457 URL: http://svn.freebsd.org/changeset/base/235457 Log: Move sh to the correct path for FreeBSD. Modified: head/cddl/contrib/dtracetoolkit/dtruss Modified: head/cddl/contrib/dtracetoolkit/dtruss ============================================================================== --- head/cddl/contrib/dtracetoolkit/dtruss Mon May 14 22:00:24 2012 (r235456) +++ head/cddl/contrib/dtracetoolkit/dtruss Mon May 14 22:02:01 2012 (r235457) @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#!/bin/sh # # dtruss - print process system call time details. # Written using DTrace (Solaris 10 3/05). From owner-svn-src-all@FreeBSD.ORG Tue May 15 01:30:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88B12106566B; Tue, 15 May 2012 01:30:26 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 712C88FC12; Tue, 15 May 2012 01:30:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4F1UQpB060845; Tue, 15 May 2012 01:30:26 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4F1UQ7n060836; Tue, 15 May 2012 01:30:26 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201205150130.q4F1UQ7n060836@svn.freebsd.org> From: Ryan Stone Date: Tue, 15 May 2012 01:30:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235459 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 01:30:26 -0000 Author: rstone Date: Tue May 15 01:30:25 2012 New Revision: 235459 URL: http://svn.freebsd.org/changeset/base/235459 Log: Implement the DTrace sched provider. This implementation aims to be compatible with the sched provider implemented by Solaris and its open- source derivatives. Full documentation of the sched provider can be found on Oracle's DTrace wiki pages. Note that for compatibility with scripts originally written for Solaris, serveral probes are defined that will never fire. These probes are defined to fire when Solaris-specific features perform certain actions. As these features are not present in FreeBSD, the probes can never fire. Also, I have added a two probes that are not defined in Solaris, lend-pri and load-change. These probes have been added to make it possible to collect schedgraph data with DTrace. Finally, a few probes are defined in Solaris to take a cpuinfo_t * argument. As it was not immediately clear to me how to translate that to FreeBSD, currently those probes are passed NULL in place of a cpuinfo_t *. Sponsored by: Sandvine Incorporated MFC after: 2 weeks Modified: head/sys/kern/kern_clock.c head/sys/kern/kern_synch.c head/sys/kern/kern_thread.c head/sys/kern/sched_4bsd.c head/sys/kern/sched_ule.c head/sys/kern/subr_sleepqueue.c head/sys/kern/subr_turnstile.c head/sys/sys/sdt.h Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Tue May 15 00:42:12 2012 (r235458) +++ head/sys/kern/kern_clock.c Tue May 15 01:30:25 2012 (r235459) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include "opt_kdb.h" #include "opt_device_polling.h" #include "opt_hwpmc_hooks.h" +#include "opt_kdtrace.h" #include "opt_ntp.h" #include "opt_watchdog.h" @@ -56,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -88,6 +90,9 @@ SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_ /* Spin-lock protecting profiling statistics. */ static struct mtx time_lock; +SDT_PROVIDER_DECLARE(sched); +SDT_PROBE_DEFINE2(sched, , , tick, tick, "struct thread *", "struct proc *"); + static int sysctl_kern_cp_time(SYSCTL_HANDLER_ARGS) { @@ -760,6 +765,7 @@ statclock_cnt(int cnt, int usermode) ru->ru_maxrss = rss; KTR_POINT2(KTR_SCHED, "thread", sched_tdname(td), "statclock", "prio:%d", td->td_priority, "stathz:%d", (stathz)?stathz:hz); + SDT_PROBE2(sched, , , tick, td, td->td_proc); thread_lock_flags(td, MTX_QUIET); for ( ; cnt > 0; cnt--) sched_clock(td); Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Tue May 15 00:42:12 2012 (r235458) +++ head/sys/kern/kern_synch.c Tue May 15 01:30:25 2012 (r235459) @@ -37,6 +37,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kdtrace.h" #include "opt_ktrace.h" #include "opt_sched.h" @@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -105,6 +107,20 @@ SYSCTL_INT(_kern, OID_AUTO, fscale, CTLF static void loadav(void *arg); +SDT_PROVIDER_DECLARE(sched); +SDT_PROBE_DEFINE(sched, , , preempt, preempt); + +/* + * These probes reference Solaris features that are not implemented in FreeBSD. + * Create the probes anyway for compatibility with existing D scripts; they'll + * just never fire. + */ +SDT_PROBE_DEFINE(sched, , , cpucaps_sleep, cpucaps-sleep); +SDT_PROBE_DEFINE(sched, , , cpucaps_wakeup, cpucaps-wakeup); +SDT_PROBE_DEFINE(sched, , , schedctl_nopreempt, schedctl-nopreempt); +SDT_PROBE_DEFINE(sched, , , schedctl_preempt, schedctl-preempt); +SDT_PROBE_DEFINE(sched, , , schedctl_yield, schedctl-yield); + void sleepinit(void) { @@ -462,6 +478,7 @@ mi_switch(int flags, struct thread *newt "prio:%d", td->td_priority, "wmesg:\"%s\"", td->td_wmesg, "lockname:\"%s\"", td->td_lockname); #endif + SDT_PROBE0(sched, , , preempt); #ifdef XEN PT_UPDATES_FLUSH(); #endif Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Tue May 15 00:42:12 2012 (r235458) +++ head/sys/kern/kern_thread.c Tue May 15 01:30:25 2012 (r235459) @@ -27,6 +27,7 @@ */ #include "opt_witness.h" +#include "opt_kdtrace.h" #include "opt_hwpmc_hooks.h" #include @@ -39,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -59,6 +61,10 @@ __FBSDID("$FreeBSD$"); #include #include +SDT_PROVIDER_DECLARE(proc); +SDT_PROBE_DEFINE(proc, , , lwp_exit, lwp-exit); + + /* * thread related storage. */ Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Tue May 15 00:42:12 2012 (r235458) +++ head/sys/kern/sched_4bsd.c Tue May 15 01:30:25 2012 (r235459) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -244,12 +245,31 @@ SYSCTL_INT(_kern_sched, OID_AUTO, follow "allow threads to share a quantum"); #endif +SDT_PROVIDER_DEFINE(sched); + +SDT_PROBE_DEFINE3(sched, , , change_pri, change-pri, "struct thread *", + "struct proc *", "uint8_t"); +SDT_PROBE_DEFINE3(sched, , , dequeue, dequeue, "struct thread *", + "struct proc *", "void *"); +SDT_PROBE_DEFINE4(sched, , , enqueue, enqueue, "struct thread *", + "struct proc *", "void *", "int"); +SDT_PROBE_DEFINE4(sched, , , lend_pri, lend-pri, "struct thread *", + "struct proc *", "uint8_t", "struct thread *"); +SDT_PROBE_DEFINE2(sched, , , load_change, load-change, "int", "int"); +SDT_PROBE_DEFINE2(sched, , , off_cpu, off-cpu, "struct thread *", + "struct proc *"); +SDT_PROBE_DEFINE(sched, , , on_cpu, on-cpu); +SDT_PROBE_DEFINE(sched, , , remain_cpu, remain-cpu); +SDT_PROBE_DEFINE2(sched, , , surrender, surrender, "struct thread *", + "struct proc *"); + static __inline void sched_load_add(void) { sched_tdcnt++; KTR_COUNTER0(KTR_SCHED, "load", "global load", sched_tdcnt); + SDT_PROBE2(sched, , , load_change, NOCPU, sched_tdcnt); } static __inline void @@ -258,6 +278,7 @@ sched_load_rem(void) sched_tdcnt--; KTR_COUNTER0(KTR_SCHED, "load", "global load", sched_tdcnt); + SDT_PROBE2(sched, , , load_change, NOCPU, sched_tdcnt); } /* * Arrange to reschedule if necessary, taking the priorities and @@ -795,10 +816,13 @@ sched_priority(struct thread *td, u_char KTR_POINT3(KTR_SCHED, "thread", sched_tdname(td), "priority change", "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED, sched_tdname(curthread)); + SDT_PROBE3(sched, , , change_pri, td, td->td_proc, prio); if (td != curthread && prio > td->td_priority) { KTR_POINT3(KTR_SCHED, "thread", sched_tdname(curthread), "lend prio", "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED, sched_tdname(td)); + SDT_PROBE4(sched, , , lend_pri, td, td->td_proc, prio, + curthread); } THREAD_LOCK_ASSERT(td, MA_OWNED); if (td->td_priority == prio) @@ -987,6 +1011,9 @@ sched_switch(struct thread *td, struct t if (PMC_PROC_IS_USING_PMCS(td->td_proc)) PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_OUT); #endif + + SDT_PROBE2(sched, , , off_cpu, td, td->td_proc); + /* I feel sleepy */ lock_profile_release_lock(&sched_lock.lock_object); #ifdef KDTRACE_HOOKS @@ -1018,11 +1045,14 @@ sched_switch(struct thread *td, struct t * needed to, or the thread_wait() or wait() will * need to reap it. */ + + SDT_PROBE0(sched, , , on_cpu); #ifdef HWPMC_HOOKS if (PMC_PROC_IS_USING_PMCS(td->td_proc)) PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_IN); #endif - } + } else + SDT_PROBE0(sched, , , remain_cpu); #ifdef SMP if (td->td_flags & TDF_IDLETD) @@ -1223,6 +1253,8 @@ sched_add(struct thread *td, int flags) sched_tdname(curthread)); KTR_POINT1(KTR_SCHED, "thread", sched_tdname(curthread), "wokeup", KTR_ATTR_LINKED, sched_tdname(td)); + SDT_PROBE4(sched, , , enqueue, td, td->td_proc, NULL, + flags & SRQ_PREEMPTED); /* @@ -1315,6 +1347,8 @@ sched_add(struct thread *td, int flags) sched_tdname(curthread)); KTR_POINT1(KTR_SCHED, "thread", sched_tdname(curthread), "wokeup", KTR_ATTR_LINKED, sched_tdname(td)); + STD_PROBE4(sched, , , enqueue, td, td->td_proc, NULL, + flags & SRQ_PREEMPTED); /* * Now that the thread is moving to the run-queue, set the lock @@ -1362,6 +1396,7 @@ sched_rem(struct thread *td) KTR_STATE2(KTR_SCHED, "thread", sched_tdname(td), "runq rem", "prio:%d", td->td_priority, KTR_ATTR_LINKED, sched_tdname(curthread)); + SDT_PROBE3(sched, , , dequeue, td, td->td_proc, NULL); if ((td->td_flags & TDF_NOLOAD) == 0) sched_load_rem(); @@ -1425,6 +1460,8 @@ sched_choose(void) void sched_preempt(struct thread *td) { + + SDT_PROBE2(sched, , , surrender, td, td->td_proc); thread_lock(td); if (td->td_critnest > 1) td->td_owepreempt = 1; Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Tue May 15 00:42:12 2012 (r235458) +++ head/sys/kern/sched_ule.c Tue May 15 01:30:25 2012 (r235459) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -327,6 +328,24 @@ static void sched_initticks(void *dummy) SYSINIT(sched_initticks, SI_SUB_CLOCKS, SI_ORDER_THIRD, sched_initticks, NULL); +SDT_PROVIDER_DEFINE(sched); + +SDT_PROBE_DEFINE3(sched, , , change_pri, change-pri, "struct thread *", + "struct proc *", "uint8_t"); +SDT_PROBE_DEFINE3(sched, , , dequeue, dequeue, "struct thread *", + "struct proc *", "void *"); +SDT_PROBE_DEFINE4(sched, , , enqueue, enqueue, "struct thread *", + "struct proc *", "void *", "int"); +SDT_PROBE_DEFINE4(sched, , , lend_pri, lend-pri, "struct thread *", + "struct proc *", "uint8_t", "struct thread *"); +SDT_PROBE_DEFINE2(sched, , , load_change, load-change, "int", "int"); +SDT_PROBE_DEFINE2(sched, , , off_cpu, off-cpu, "struct thread *", + "struct proc *"); +SDT_PROBE_DEFINE(sched, , , on_cpu, on-cpu); +SDT_PROBE_DEFINE(sched, , , remain_cpu, remain-cpu); +SDT_PROBE_DEFINE2(sched, , , surrender, surrender, "struct thread *", + "struct proc *"); + /* * Print the threads waiting on a run-queue. */ @@ -509,6 +528,7 @@ tdq_load_add(struct tdq *tdq, struct thr if ((td->td_flags & TDF_NOLOAD) == 0) tdq->tdq_sysload++; KTR_COUNTER0(KTR_SCHED, "load", tdq->tdq_loadname, tdq->tdq_load); + SDT_PROBE2(sched, , , load_change, (int)TDQ_ID(tdq), tdq->tdq_load); } /* @@ -528,6 +548,7 @@ tdq_load_rem(struct tdq *tdq, struct thr if ((td->td_flags & TDF_NOLOAD) == 0) tdq->tdq_sysload--; KTR_COUNTER0(KTR_SCHED, "load", tdq->tdq_loadname, tdq->tdq_load); + SDT_PROBE2(sched, , , load_change, (int)TDQ_ID(tdq), tdq->tdq_load); } /* @@ -1625,10 +1646,13 @@ sched_thread_priority(struct thread *td, KTR_POINT3(KTR_SCHED, "thread", sched_tdname(td), "prio", "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED, sched_tdname(curthread)); + SDT_PROBE3(sched, , , change_pri, td, td->td_proc, prio); if (td != curthread && prio > td->td_priority) { KTR_POINT3(KTR_SCHED, "thread", sched_tdname(curthread), "lend prio", "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED, sched_tdname(td)); + SDT_PROBE4(sched, , , lend_pri, td, td->td_proc, prio, + curthread); } ts = td->td_sched; THREAD_LOCK_ASSERT(td, MA_OWNED); @@ -1879,6 +1903,7 @@ sched_switch(struct thread *td, struct t if (PMC_PROC_IS_USING_PMCS(td->td_proc)) PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_OUT); #endif + SDT_PROBE2(sched, , , off_cpu, td, td->td_proc); lock_profile_release_lock(&TDQ_LOCKPTR(tdq)->lock_object); TDQ_LOCKPTR(tdq)->mtx_lock = (uintptr_t)newtd; sched_pctcpu_update(newtd->td_sched, 0); @@ -1903,12 +1928,16 @@ sched_switch(struct thread *td, struct t tdq = TDQ_CPU(cpuid); lock_profile_obtain_lock_success( &TDQ_LOCKPTR(tdq)->lock_object, 0, 0, __FILE__, __LINE__); + + SDT_PROBE0(sched, , , on_cpu); #ifdef HWPMC_HOOKS if (PMC_PROC_IS_USING_PMCS(td->td_proc)) PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_IN); #endif - } else + } else { thread_unblock_switch(td, mtx); + SDT_PROBE0(sched, , , remain_cpu); + } /* * Assert that all went well and return. */ @@ -2102,6 +2131,8 @@ sched_preempt(struct thread *td) { struct tdq *tdq; + SDT_PROBE2(sched, , , surrender, td, td->td_proc); + thread_lock(td); tdq = TDQ_SELF(); TDQ_LOCK_ASSERT(tdq, MA_OWNED); @@ -2330,6 +2361,8 @@ sched_add(struct thread *td, int flags) sched_tdname(curthread)); KTR_POINT1(KTR_SCHED, "thread", sched_tdname(curthread), "wokeup", KTR_ATTR_LINKED, sched_tdname(td)); + SDT_PROBE4(sched, , , enqueue, td, td->td_proc, NULL, + flags & SRQ_PREEMPTED); THREAD_LOCK_ASSERT(td, MA_OWNED); /* * Recalculate the priority before we select the target cpu or @@ -2375,6 +2408,7 @@ sched_rem(struct thread *td) KTR_STATE1(KTR_SCHED, "thread", sched_tdname(td), "runq rem", "prio:%d", td->td_priority); + SDT_PROBE3(sched, , , dequeue, td, td->td_proc, NULL); tdq = TDQ_CPU(td->td_sched->ts_cpu); TDQ_LOCK_ASSERT(tdq, MA_OWNED); MPASS(td->td_lock == TDQ_LOCKPTR(tdq)); Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Tue May 15 00:42:12 2012 (r235458) +++ head/sys/kern/subr_sleepqueue.c Tue May 15 01:30:25 2012 (r235459) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include "opt_sleepqueue_profiling.h" #include "opt_ddb.h" +#include "opt_kdtrace.h" #include "opt_sched.h" #include @@ -75,6 +76,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -166,6 +168,9 @@ static int sleepq_resume_thread(struct s static void sleepq_switch(void *wchan, int pri); static void sleepq_timeout(void *arg); +SDT_PROBE_DECLARE(sched, , , sleep); +SDT_PROBE_DECLARE(sched, , , wakeup); + /* * Early initialization of sleep queues that is called from the sleepinit() * SYSINIT. @@ -534,6 +539,7 @@ sleepq_switch(void *wchan, int pri) MPASS(td->td_sleepqueue == NULL); sched_sleep(td, pri); thread_lock_set(td, &sc->sc_lock); + SDT_PROBE0(sched, , , sleep); TD_SET_SLEEPING(td); mi_switch(SW_VOL | SWT_SLEEPQ, NULL); KASSERT(TD_IS_RUNNING(td), ("running but not TDS_RUNNING")); @@ -715,6 +721,8 @@ sleepq_resume_thread(struct sleepqueue * sc = SC_LOOKUP(sq->sq_wchan); mtx_assert(&sc->sc_lock, MA_OWNED); + SDT_PROBE2(sched, , , wakeup, td, td->td_proc); + /* Remove the thread from the queue. */ sq->sq_blockedcnt[td->td_sqqueue]--; TAILQ_REMOVE(&sq->sq_blocked[td->td_sqqueue], td, td_slpq); Modified: head/sys/kern/subr_turnstile.c ============================================================================== --- head/sys/kern/subr_turnstile.c Tue May 15 00:42:12 2012 (r235458) +++ head/sys/kern/subr_turnstile.c Tue May 15 01:30:25 2012 (r235459) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" +#include "opt_kdtrace.h" #include "opt_turnstile_profiling.h" #include "opt_sched.h" @@ -73,6 +74,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -167,6 +169,11 @@ static void turnstile_dtor(void *mem, in static int turnstile_init(void *mem, int size, int flags); static void turnstile_fini(void *mem, int size); +SDT_PROVIDER_DECLARE(sched); +SDT_PROBE_DEFINE(sched, , , sleep, sleep); +SDT_PROBE_DEFINE2(sched, , , wakeup, wakeup, "struct thread *", + "struct proc *"); + /* * Walks the chain of turnstiles and their owners to propagate the priority * of the thread being blocked to all the threads holding locks that have to @@ -740,6 +747,8 @@ turnstile_wait(struct turnstile *ts, str CTR4(KTR_LOCK, "%s: td %d blocked on [%p] %s", __func__, td->td_tid, lock, lock->lo_name); + SDT_PROBE0(sched, , , sleep); + THREAD_LOCKPTR_ASSERT(td, &ts->ts_lock); mi_switch(SW_VOL | SWT_TURNSTILE, NULL); @@ -916,6 +925,7 @@ turnstile_unpend(struct turnstile *ts, i while (!TAILQ_EMPTY(&pending_threads)) { td = TAILQ_FIRST(&pending_threads); TAILQ_REMOVE(&pending_threads, td, td_lockq); + SDT_PROBE2(sched, , , wakeup, td, td->td_proc); thread_lock(td); THREAD_LOCKPTR_ASSERT(td, &ts->ts_lock); MPASS(td->td_proc->p_magic == P_MAGIC); Modified: head/sys/sys/sdt.h ============================================================================== --- head/sys/sys/sdt.h Tue May 15 00:42:12 2012 (r235458) +++ head/sys/sys/sdt.h Tue May 15 01:30:25 2012 (r235459) @@ -92,6 +92,7 @@ #define SDT_PROBE_DEFINE4(prov, mod, func, name, sname, arg0, arg1, arg2, arg3) #define SDT_PROBE_DEFINE5(prov, mod, func, name, sname, arg0, arg1, arg2, arg3, arg4) +#define SDT_PROBE0(prov, mod, func, name) #define SDT_PROBE1(prov, mod, func, name, arg0) #define SDT_PROBE2(prov, mod, func, name, arg0, arg1) #define SDT_PROBE3(prov, mod, func, name, arg0, arg1, arg2) @@ -231,6 +232,8 @@ struct sdt_provider { SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4) +#define SDT_PROBE0(prov, mod, func, name) \ + SDT_PROBE(prov, mod, func, name, 0, 0, 0, 0, 0) #define SDT_PROBE1(prov, mod, func, name, arg0) \ SDT_PROBE(prov, mod, func, name, arg0, 0, 0, 0, 0) #define SDT_PROBE2(prov, mod, func, name, arg0, arg1) \ From owner-svn-src-all@FreeBSD.ORG Tue May 15 04:55:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F09B91065678; Tue, 15 May 2012 04:55:15 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C27F18FC0C; Tue, 15 May 2012 04:55:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4F4tF06068095; Tue, 15 May 2012 04:55:15 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4F4tF6E068093; Tue, 15 May 2012 04:55:15 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205150455.q4F4tF6E068093@svn.freebsd.org> From: Adrian Chadd Date: Tue, 15 May 2012 04:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235461 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 04:55:16 -0000 Author: adrian Date: Tue May 15 04:55:15 2012 New Revision: 235461 URL: http://svn.freebsd.org/changeset/base/235461 Log: Handle non-xretry errors the same as xretry errors for now. Although I _should_ handle the other errors in various ways (specifically errors like FILT), treating them as having transmitted successfully is completely wrong. Here, they'd be counted as successful and the BAW would be advanced.. but the RX side wouldn't have received them. The specific errors I've been seeing here are HAL_TXERR_FILT. This patch does fix the issue - I've tested it using -i 0.001 pings (enough to start aggregation) and now the behaviour is correct: * The RX side never sees a "moved window" error, and * The TX side sends BARs as needed, with the RX side correctly handling them. PR: kern/167902 Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Tue May 15 03:21:36 2012 (r235460) +++ head/sys/dev/ath/if_ath_tx.c Tue May 15 04:55:15 2012 (r235461) @@ -3597,9 +3597,16 @@ ath_tx_aggr_comp_aggr(struct ath_softc * pktlen = bf_first->bf_state.bfs_pktlen; /* - * handle errors first + * Handle errors first! + * + * Here, handle _any_ error as a "exceeded retries" error. + * Later on (when filtered frames are to be specially handled) + * it'll have to be expanded. */ +#if 0 if (ts.ts_status & HAL_TXERR_XRETRY) { +#endif + if (ts.ts_status != 0) { ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); ath_tx_comp_aggr_error(sc, bf_first, atid); return; @@ -3839,7 +3846,10 @@ ath_tx_aggr_comp_unaggr(struct ath_softc * Don't bother with the retry check if all frames * are being failed (eg during queue deletion.) */ +#if 0 if (fail == 0 && ts->ts_status & HAL_TXERR_XRETRY) { +#endif + if (fail == 0 && ts->ts_status != 0) { ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: retry_unaggr\n", __func__); From owner-svn-src-all@FreeBSD.ORG Tue May 15 09:09:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 637F91065672; Tue, 15 May 2012 09:09:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D2978FC08; Tue, 15 May 2012 09:09:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4F99FQV077499; Tue, 15 May 2012 09:09:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4F99FaH077497; Tue, 15 May 2012 09:09:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205150909.q4F99FaH077497@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 15 May 2012 09:09:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235466 - stable/9/lib/libc/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 09:09:15 -0000 Author: kib Date: Tue May 15 09:09:14 2012 New Revision: 235466 URL: http://svn.freebsd.org/changeset/base/235466 Log: MFC r235143: Plug a leak. Modified: stable/9/lib/libc/rpc/auth_unix.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/rpc/auth_unix.c ============================================================================== --- stable/9/lib/libc/rpc/auth_unix.c Tue May 15 09:01:00 2012 (r235465) +++ stable/9/lib/libc/rpc/auth_unix.c Tue May 15 09:09:14 2012 (r235466) @@ -185,6 +185,7 @@ authunix_create(machname, uid, gid, len, AUTH * authunix_create_default() { + AUTH *auth; int ngids; long ngids_max; char machname[MAXHOSTNAMELEN + 1]; @@ -207,8 +208,10 @@ authunix_create_default() if (ngids > NGRPS) ngids = NGRPS; /* XXX: interface problem; those should all have been unsigned */ - return (authunix_create(machname, (int)uid, (int)gid, ngids, - (int *)gids)); + auth = authunix_create(machname, (int)uid, (int)gid, ngids, + (int *)gids); + free(gids); + return (auth); } /* From owner-svn-src-all@FreeBSD.ORG Tue May 15 09:37:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6ACE5106566B; Tue, 15 May 2012 09:37:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5518E8FC14; Tue, 15 May 2012 09:37:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4F9bN0t078570; Tue, 15 May 2012 09:37:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4F9bNWi078568; Tue, 15 May 2012 09:37:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205150937.q4F9bNWi078568@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 15 May 2012 09:37:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235468 - stable/8/lib/libc/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 09:37:23 -0000 Author: kib Date: Tue May 15 09:37:22 2012 New Revision: 235468 URL: http://svn.freebsd.org/changeset/base/235468 Log: MFC r235143: Plug a leak. Modified: stable/8/lib/libc/rpc/auth_unix.c Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/rpc/auth_unix.c ============================================================================== --- stable/8/lib/libc/rpc/auth_unix.c Tue May 15 09:28:25 2012 (r235467) +++ stable/8/lib/libc/rpc/auth_unix.c Tue May 15 09:37:22 2012 (r235468) @@ -185,6 +185,7 @@ authunix_create(machname, uid, gid, len, AUTH * authunix_create_default() { + AUTH *auth; int ngids; long ngids_max; char machname[MAXHOSTNAMELEN + 1]; @@ -207,8 +208,10 @@ authunix_create_default() if (ngids > NGRPS) ngids = NGRPS; /* XXX: interface problem; those should all have been unsigned */ - return (authunix_create(machname, (int)uid, (int)gid, ngids, - (int *)gids)); + auth = authunix_create(machname, (int)uid, (int)gid, ngids, + (int *)gids); + free(gids); + return (auth); } /* From owner-svn-src-all@FreeBSD.ORG Tue May 15 09:55:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C01FD106564A; Tue, 15 May 2012 09:55:15 +0000 (UTC) (envelope-from gber@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB4B28FC1A; Tue, 15 May 2012 09:55:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4F9tFvb079474; Tue, 15 May 2012 09:55:15 GMT (envelope-from gber@svn.freebsd.org) Received: (from gber@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4F9tFTo079472; Tue, 15 May 2012 09:55:15 GMT (envelope-from gber@svn.freebsd.org) Message-Id: <201205150955.q4F9tFTo079472@svn.freebsd.org> From: Grzegorz Bernacki Date: Tue, 15 May 2012 09:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235469 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 09:55:15 -0000 Author: gber Date: Tue May 15 09:55:15 2012 New Revision: 235469 URL: http://svn.freebsd.org/changeset/base/235469 Log: Do not call bremfree for managed buffers. Calling bremfree for these buffers results in panic: "bremfree: buffer %p not on a queue." Approved by: kib Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Tue May 15 09:37:22 2012 (r235468) +++ head/sys/kern/vfs_bio.c Tue May 15 09:55:15 2012 (r235469) @@ -2640,8 +2640,8 @@ loop: if (bp != NULL) { int lockflags; /* - * Buffer is in-core. If the buffer is not busy, it must - * be on a queue. + * Buffer is in-core. If the buffer is not busy nor managed, + * it must be on a queue. */ lockflags = LK_EXCLUSIVE | LK_SLEEPFAIL | LK_INTERLOCK; @@ -2671,9 +2671,13 @@ loop: bp->b_flags &= ~B_CACHE; else if ((bp->b_flags & (B_VMIO | B_INVAL)) == 0) bp->b_flags |= B_CACHE; - BO_LOCK(bo); - bremfree(bp); - BO_UNLOCK(bo); + if (bp->b_flags & B_MANAGED) + MPASS(bp->b_qindex == QUEUE_NONE); + else { + BO_LOCK(bo); + bremfree(bp); + BO_UNLOCK(bo); + } /* * check for size inconsistancies for non-VMIO case. From owner-svn-src-all@FreeBSD.ORG Tue May 15 10:58:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A97EA106566C; Tue, 15 May 2012 10:58:17 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9518F8FC0A; Tue, 15 May 2012 10:58:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4FAwHJ3084579; Tue, 15 May 2012 10:58:17 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4FAwHZm084577; Tue, 15 May 2012 10:58:17 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201205151058.q4FAwHZm084577@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 15 May 2012 10:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235471 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 10:58:17 -0000 Author: pluknet Date: Tue May 15 10:58:17 2012 New Revision: 235471 URL: http://svn.freebsd.org/changeset/base/235471 Log: Fix typo in function name SDT_PROBE4 and unbreak 4BSD UP. Modified: head/sys/kern/sched_4bsd.c Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Tue May 15 10:09:31 2012 (r235470) +++ head/sys/kern/sched_4bsd.c Tue May 15 10:58:17 2012 (r235471) @@ -1347,7 +1347,7 @@ sched_add(struct thread *td, int flags) sched_tdname(curthread)); KTR_POINT1(KTR_SCHED, "thread", sched_tdname(curthread), "wokeup", KTR_ATTR_LINKED, sched_tdname(td)); - STD_PROBE4(sched, , , enqueue, td, td->td_proc, NULL, + SDT_PROBE4(sched, , , enqueue, td, td->td_proc, NULL, flags & SRQ_PREEMPTED); /* From owner-svn-src-all@FreeBSD.ORG Tue May 15 13:23:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 77CFB106566B; Tue, 15 May 2012 13:23:45 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6231A8FC14; Tue, 15 May 2012 13:23:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4FDNjIw089640; Tue, 15 May 2012 13:23:45 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4FDNjeT089637; Tue, 15 May 2012 13:23:45 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205151323.q4FDNjeT089637@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 15 May 2012 13:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235474 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 13:23:45 -0000 Author: bz Date: Tue May 15 13:23:44 2012 New Revision: 235474 URL: http://svn.freebsd.org/changeset/base/235474 Log: Switch to a standard 2 clause BSD license (from bsd-style-copyright). Approved by: Myricom Inc. (gallatin) Approved by: Intel Corporation (jfv) Modified: head/sys/netinet/tcp_lro.c head/sys/netinet/tcp_lro.h Modified: head/sys/netinet/tcp_lro.c ============================================================================== --- head/sys/netinet/tcp_lro.c Tue May 15 12:50:49 2012 (r235473) +++ head/sys/netinet/tcp_lro.c Tue May 15 13:23:44 2012 (r235474) @@ -1,37 +1,31 @@ -/****************************************************************************** - -Copyright (c) 2007, Myricom Inc. -Copyright (c) 2008, Intel Corporation. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Neither the name of the Myricom Inc, nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - 3. Neither the name of the Intel Corporation, nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -$FreeBSD$ -***************************************************************************/ +/*- + * Copyright (c) 2007, Myricom Inc. + * Copyright (c) 2008, Intel Corporation. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 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$ + */ #include #include Modified: head/sys/netinet/tcp_lro.h ============================================================================== --- head/sys/netinet/tcp_lro.h Tue May 15 12:50:49 2012 (r235473) +++ head/sys/netinet/tcp_lro.h Tue May 15 13:23:44 2012 (r235474) @@ -1,39 +1,32 @@ -/******************************************************************************* +/*- + * Copyright (c) 2006, Myricom Inc. + * Copyright (c) 2008, Intel Corporation. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 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$ + */ -Copyright (c) 2006, Myricom Inc. -Copyright (c) 2008, Intel Corporation. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Neither the name of the Myricom Inc, nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - 2. Neither the name of the Intel Corporation, nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - - -$FreeBSD$ - -***************************************************************************/ #ifndef _TCP_LRO_H_ #define _TCP_LRO_H_ From owner-svn-src-all@FreeBSD.ORG Tue May 15 17:07:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6ADCC1065673; Tue, 15 May 2012 17:07:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 559E38FC1E; Tue, 15 May 2012 17:07:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4FH7Uth096836; Tue, 15 May 2012 17:07:30 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4FH7UDU096834; Tue, 15 May 2012 17:07:30 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205151707.q4FH7UDU096834@svn.freebsd.org> From: Andriy Gapon Date: Tue, 15 May 2012 17:07:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235478 - head/cddl/contrib/opensolaris/cmd/zpool X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 17:07:30 -0000 Author: avg Date: Tue May 15 17:07:29 2012 New Revision: 235478 URL: http://svn.freebsd.org/changeset/base/235478 Log: zpool_do_import: use /dev instead of /dev/dsk as a default This affects behavior of zpool import without -d option. Reported by: Bruce Cran Submitted by: Fabian Keil MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Tue May 15 16:17:30 2012 (r235477) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Tue May 15 17:07:29 2012 (r235478) @@ -1909,7 +1909,7 @@ zpool_do_import(int argc, char **argv) if (searchdirs == NULL) { searchdirs = safe_malloc(sizeof (char *)); - searchdirs[0] = "/dev/dsk"; + searchdirs[0] = "/dev"; nsearch = 1; } From owner-svn-src-all@FreeBSD.ORG Tue May 15 17:11:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEFA4106566B; Tue, 15 May 2012 17:11:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8F508FC1B; Tue, 15 May 2012 17:11:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4FHB0vw096982; Tue, 15 May 2012 17:11:00 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4FHB03W096980; Tue, 15 May 2012 17:11:00 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205151711.q4FHB03W096980@svn.freebsd.org> From: Andriy Gapon Date: Tue, 15 May 2012 17:11:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235479 - head/cddl/contrib/opensolaris/lib/libzfs/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 17:11:01 -0000 Author: avg Date: Tue May 15 17:11:00 2012 New Revision: 235479 URL: http://svn.freebsd.org/changeset/base/235479 Log: zpool_find_import_impl: another /dev/dsk -> /dev fix This seems to fix zdb -e behavior. PR: bin/155104 Submitted by: swell.k@gmail.com MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Tue May 15 17:07:29 2012 (r235478) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Tue May 15 17:11:00 2012 (r235479) @@ -1145,7 +1145,7 @@ zpool_find_import_impl(libzfs_handle_t * char *end, **dir = iarg->path; size_t pathleft; nvlist_t *ret = NULL; - static char *default_dir = "/dev/dsk"; + static char *default_dir = "/dev"; pool_list_t pools = { 0 }; pool_entry_t *pe, *penext; vdev_entry_t *ve, *venext; From owner-svn-src-all@FreeBSD.ORG Tue May 15 17:21:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D83AE1065675; Tue, 15 May 2012 17:21:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B77B68FC0A; Tue, 15 May 2012 17:21:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4FHLlno097461; Tue, 15 May 2012 17:21:47 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4FHLlgq097452; Tue, 15 May 2012 17:21:47 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205151721.q4FHLlgq097452@svn.freebsd.org> From: Andriy Gapon Date: Tue, 15 May 2012 17:21:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235480 - in stable/9/sys: dev/usb geom geom/mountver i386/conf kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 17:21:47 -0000 Author: avg Date: Tue May 15 17:21:46 2012 New Revision: 235480 URL: http://svn.freebsd.org/changeset/base/235480 Log: MFC r230643: stop_scheduler -> td_stopsched Modified: stable/9/sys/dev/usb/usb_transfer.c stable/9/sys/geom/geom_bsd.c stable/9/sys/geom/geom_mbr.c stable/9/sys/geom/geom_pc98.c stable/9/sys/geom/mountver/g_mountver.c stable/9/sys/kern/kern_shutdown.c stable/9/sys/sys/proc.h stable/9/sys/sys/systm.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/9/sys/dev/usb/usb_transfer.c Tue May 15 17:11:00 2012 (r235479) +++ stable/9/sys/dev/usb/usb_transfer.c Tue May 15 17:21:46 2012 (r235480) @@ -42,6 +42,7 @@ #include #include #include +#include #include #include Modified: stable/9/sys/geom/geom_bsd.c ============================================================================== --- stable/9/sys/geom/geom_bsd.c Tue May 15 17:11:00 2012 (r235479) +++ stable/9/sys/geom/geom_bsd.c Tue May 15 17:21:46 2012 (r235480) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/9/sys/geom/geom_mbr.c ============================================================================== --- stable/9/sys/geom/geom_mbr.c Tue May 15 17:11:00 2012 (r235479) +++ stable/9/sys/geom/geom_mbr.c Tue May 15 17:21:46 2012 (r235480) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/9/sys/geom/geom_pc98.c ============================================================================== --- stable/9/sys/geom/geom_pc98.c Tue May 15 17:11:00 2012 (r235479) +++ stable/9/sys/geom/geom_pc98.c Tue May 15 17:21:46 2012 (r235480) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/9/sys/geom/mountver/g_mountver.c ============================================================================== --- stable/9/sys/geom/mountver/g_mountver.c Tue May 15 17:11:00 2012 (r235479) +++ stable/9/sys/geom/mountver/g_mountver.c Tue May 15 17:21:46 2012 (r235480) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/9/sys/kern/kern_shutdown.c ============================================================================== --- stable/9/sys/kern/kern_shutdown.c Tue May 15 17:11:00 2012 (r235479) +++ stable/9/sys/kern/kern_shutdown.c Tue May 15 17:21:46 2012 (r235480) @@ -142,7 +142,6 @@ SYSCTL_INT(_kern_shutdown, OID_AUTO, sho */ const char *panicstr; -int stop_scheduler; /* system stopped CPUs for panic */ int dumping; /* system is dumping */ int rebooting; /* system is rebooting */ static struct dumperinfo dumper; /* our selected dumper */ @@ -594,7 +593,7 @@ panic(const char *fmt, ...) * stop_scheduler_on_panic is true, then stop_scheduler will * always be set. Even if panic has been entered from kdb. */ - stop_scheduler = 1; + td->td_stopsched = 1; } #endif Modified: stable/9/sys/sys/proc.h ============================================================================== --- stable/9/sys/sys/proc.h Tue May 15 17:11:00 2012 (r235479) +++ stable/9/sys/sys/proc.h Tue May 15 17:21:46 2012 (r235480) @@ -235,6 +235,7 @@ struct thread { short td_locks; /* (k) Count of non-spin locks. */ short td_rw_rlocks; /* (k) Count of rwlock read locks. */ short td_lk_slocks; /* (k) Count of lockmgr shared locks. */ + short td_stopsched; /* (k) Scheduler stopped. */ struct turnstile *td_blocked; /* (t) Lock thread is blocked on. */ const char *td_lockname; /* (t) Name of lock blocked on. */ LIST_HEAD(, turnstile) td_contested; /* (q) Contested locks. */ Modified: stable/9/sys/sys/systm.h ============================================================================== --- stable/9/sys/sys/systm.h Tue May 15 17:11:00 2012 (r235479) +++ stable/9/sys/sys/systm.h Tue May 15 17:21:46 2012 (r235480) @@ -47,7 +47,6 @@ extern int cold; /* nonzero if we are doing a cold boot */ extern int rebooting; /* kern_reboot() has been called. */ -extern int stop_scheduler; /* only one thread runs after panic */ extern const char *panicstr; /* panic message */ extern char version[]; /* system version */ extern char copyright[]; /* system copyright */ @@ -115,7 +114,7 @@ enum VM_GUEST { VM_GUEST_NO = 0, VM_GUES * Otherwise, the kernel will deadlock since the scheduler isn't * going to run the thread that holds any lock we need. */ -#define SCHEDULER_STOPPED() __predict_false(stop_scheduler) +#define SCHEDULER_STOPPED() __predict_false(curthread->td_stopsched) /* * XXX the hints declarations are even more misplaced than most declarations From owner-svn-src-all@FreeBSD.ORG Tue May 15 18:28:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0E2C1065673; Tue, 15 May 2012 18:28:01 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 13EB88FC0C; Tue, 15 May 2012 18:28:00 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4FIRlos049476; Tue, 15 May 2012 21:27:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q4FIRlBa038050; Tue, 15 May 2012 21:27:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4FIRlTi038049; Tue, 15 May 2012 21:27:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 15 May 2012 21:27:47 +0300 From: Konstantin Belousov To: Andriy Gapon Message-ID: <20120515182747.GD2358@deviant.kiev.zoral.com.ua> References: <201205151721.q4FHLlgq097452@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8w3uRX/HFJGApMzv" Content-Disposition: inline In-Reply-To: <201205151721.q4FHLlgq097452@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r235480 - in stable/9/sys: dev/usb geom geom/mountver i386/conf kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 18:28:01 -0000 --8w3uRX/HFJGApMzv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 15, 2012 at 05:21:47PM +0000, Andriy Gapon wrote: > Author: avg > Date: Tue May 15 17:21:46 2012 > New Revision: 235480 > URL: http://svn.freebsd.org/changeset/base/235480 >=20 > Log: > MFC r230643: stop_scheduler -> td_stopsched > Modified: stable/9/sys/sys/proc.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/9/sys/sys/proc.h Tue May 15 17:11:00 2012 (r235479) > +++ stable/9/sys/sys/proc.h Tue May 15 17:21:46 2012 (r235480) > @@ -235,6 +235,7 @@ struct thread { > short td_locks; /* (k) Count of non-spin locks. */ > short td_rw_rlocks; /* (k) Count of rwlock read locks. */ > short td_lk_slocks; /* (k) Count of lockmgr shared locks. */ > + short td_stopsched; /* (k) Scheduler stopped. */ > struct turnstile *td_blocked; /* (t) Lock thread is blocked on. */ > const char *td_lockname; /* (t) Name of lock blocked on. */ > LIST_HEAD(, turnstile) td_contested; /* (q) Contested locks. */ >=20 Did you verified that there is a gap between td_lk_slocks and td_blocked an all tier-1 architectures large enough to adopt td_stopsched without changing the layout of struct thread after the new member ? If not, this breaks KBI. --8w3uRX/HFJGApMzv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+yoCIACgkQC3+MBN1Mb4jRtgCgh0qMHEc1PgHHB/P5tTb+i5aj AIUAoOyGgjvsGSMppqmFoqnjC6g/fGXV =TfIt -----END PGP SIGNATURE----- --8w3uRX/HFJGApMzv-- From owner-svn-src-all@FreeBSD.ORG Tue May 15 20:08:49 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C462106564A; Tue, 15 May 2012 20:08:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id D2DAA8FC08; Tue, 15 May 2012 20:08:44 +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 XAA13866; Tue, 15 May 2012 23:08:40 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SUO2x-000Ki2-UP; Tue, 15 May 2012 23:08:39 +0300 Message-ID: <4FB2B7C5.2080604@FreeBSD.org> Date: Tue, 15 May 2012 23:08:37 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: Konstantin Belousov References: <201205151721.q4FHLlgq097452@svn.freebsd.org> <20120515182747.GD2358@deviant.kiev.zoral.com.ua> In-Reply-To: <20120515182747.GD2358@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-9@FreeBSD.org Subject: Re: svn commit: r235480 - in stable/9/sys: dev/usb geom geom/mountver i386/conf kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 20:08:49 -0000 on 15/05/2012 21:27 Konstantin Belousov said the following: > On Tue, May 15, 2012 at 05:21:47PM +0000, Andriy Gapon wrote: >> Author: avg Date: Tue May 15 17:21:46 2012 New Revision: 235480 URL: >> http://svn.freebsd.org/changeset/base/235480 >> >> Log: MFC r230643: stop_scheduler -> td_stopsched Modified: >> stable/9/sys/sys/proc.h >> ============================================================================== >> >> --- stable/9/sys/sys/proc.h Tue May 15 17:11:00 2012 (r235479) >> +++ stable/9/sys/sys/proc.h Tue May 15 17:21:46 2012 (r235480) @@ -235,6 >> +235,7 @@ struct thread { short td_locks; /* (k) Count of non-spin >> locks. */ short td_rw_rlocks; /* (k) Count of rwlock read locks. */ >> short td_lk_slocks; /* (k) Count of lockmgr shared locks. */ + short >> td_stopsched; /* (k) Scheduler stopped. */ struct turnstile *td_blocked; >> /* (t) Lock thread is blocked on. */ const char *td_lockname; /* (t) Name >> of lock blocked on. */ LIST_HEAD(, turnstile) td_contested; /* (q) >> Contested locks. */ >> > Did you verified that there is a gap between td_lk_slocks and td_blocked an > all tier-1 architectures large enough to adopt td_stopsched without > changing the layout of struct thread after the new member ? I haven't verified that. but I presumed that the gap was either 2 bytes on 32-bit architectures or 6 bytes on 64-bit ones. What is the proper and doable way of verifying this? > If not, this breaks KBI. I can just revert the commit to not risk an obscure breakage. What would you suggest? Thank you for spotting this. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Tue May 15 20:15:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 119D01065741; Tue, 15 May 2012 20:15:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0D218FC1B; Tue, 15 May 2012 20:15:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4FKFHZ0003644; Tue, 15 May 2012 20:15:17 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4FKFHob003642; Tue, 15 May 2012 20:15:17 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205152015.q4FKFHob003642@svn.freebsd.org> From: Eitan Adler Date: Tue, 15 May 2012 20:15:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235481 - head/share/examples/csh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 20:15:18 -0000 Author: eadler Date: Tue May 15 20:15:17 2012 New Revision: 235481 URL: http://svn.freebsd.org/changeset/base/235481 Log: Rework sample code which sets SSH_AUTH_SOCK to the user's ssh-agent socket path if running PR: 167932 Submitted by: madpilot (pr) Submitted by: wblock (final patch) Reviewed by: If someone else reviewed your modification. Approved by: cperciva (implicit) MFC after: 3 days Modified: head/share/examples/csh/dot.cshrc Modified: head/share/examples/csh/dot.cshrc ============================================================================== --- head/share/examples/csh/dot.cshrc Tue May 15 17:21:46 2012 (r235480) +++ head/share/examples/csh/dot.cshrc Tue May 15 20:15:17 2012 (r235481) @@ -5,7 +5,7 @@ # Sets SSH_AUTH_SOCK to the user's ssh-agent socket path if running if (${?SSH_AUTH_SOCK} != "1") then - setenv SSH_AUTH_SOCK `sockstat | grep "${USER}" | cut -d ' ' -f 6` + setenv SSH_AUTH_SOCK `sockstat | grep "^${USER} " | awk '/ssh-agent/ { print $6 }'` endif # Change only root's prompt From owner-svn-src-all@FreeBSD.ORG Tue May 15 20:38:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A8821065673; Tue, 15 May 2012 20:38:46 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 1A4D38FC0C; Tue, 15 May 2012 20:38:45 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4FKcWVF075839; Tue, 15 May 2012 23:38:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q4FKcW8T038632; Tue, 15 May 2012 23:38:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4FKcWkM038631; Tue, 15 May 2012 23:38:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 15 May 2012 23:38:32 +0300 From: Konstantin Belousov To: Andriy Gapon Message-ID: <20120515203832.GE2358@deviant.kiev.zoral.com.ua> References: <201205151721.q4FHLlgq097452@svn.freebsd.org> <20120515182747.GD2358@deviant.kiev.zoral.com.ua> <4FB2B7C5.2080604@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="r7U+bLA8boMOj+mD" Content-Disposition: inline In-Reply-To: <4FB2B7C5.2080604@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r235480 - in stable/9/sys: dev/usb geom geom/mountver i386/conf kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 20:38:46 -0000 --r7U+bLA8boMOj+mD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 15, 2012 at 11:08:37PM +0300, Andriy Gapon wrote: > on 15/05/2012 21:27 Konstantin Belousov said the following: > > On Tue, May 15, 2012 at 05:21:47PM +0000, Andriy Gapon wrote: > >> Author: avg Date: Tue May 15 17:21:46 2012 New Revision: 235480 URL: > >> http://svn.freebsd.org/changeset/base/235480 > >>=20 > >> Log: MFC r230643: stop_scheduler -> td_stopsched Modified: > >> stable/9/sys/sys/proc.h=20 > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > >> > >>=20 > --- stable/9/sys/sys/proc.h Tue May 15 17:11:00 2012 (r235479) > >> +++ stable/9/sys/sys/proc.h Tue May 15 17:21:46 2012 (r235480) @@ -235= ,6 > >> +235,7 @@ struct thread { short td_locks; /* (k) Count of non-spin > >> locks. */ short td_rw_rlocks; /* (k) Count of rwlock read locks. */= =20 > >> short td_lk_slocks; /* (k) Count of lockmgr shared locks. */ + short > >> td_stopsched; /* (k) Scheduler stopped. */ struct turnstile *td_blocke= d; > >> /* (t) Lock thread is blocked on. */ const char *td_lockname; /* (t) N= ame > >> of lock blocked on. */ LIST_HEAD(, turnstile) td_contested; /* (q) > >> Contested locks. */ > >>=20 > > Did you verified that there is a gap between td_lk_slocks and td_blocke= d an > > all tier-1 architectures large enough to adopt td_stopsched without=20 > > changing the layout of struct thread after the new member ? >=20 > I haven't verified that. but I presumed that the gap was either 2 bytes on > 32-bit architectures or 6 bytes on 64-bit ones. > What is the proper and doable way of verifying this? I think that p sizeof(struct thread) from gdb on previous and current version of the kernel would be a good indicator. If sizes differ, it is bad. To be completely sure, calculate offset of the next member in the structure: in gdb, p &(((struct thread *)0)->td_blocked) for previous and current kernels. >=20 > > If not, this breaks KBI. >=20 > I can just revert the commit to not risk an obscure breakage. > What would you suggest? Move the new member to the end of the struct thread, and do explicit zeroing on the thread allocation, if commit changed the layout. >=20 > Thank you for spotting this. > --=20 > Andriy Gapon --r7U+bLA8boMOj+mD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+yvsgACgkQC3+MBN1Mb4iMlwCeLxPP12Ha0t2J92rRBHKMLlNd bxkAoIpLVqddzFQZsD/Hpph/I6qZxwKy =NBWx -----END PGP SIGNATURE----- --r7U+bLA8boMOj+mD-- From owner-svn-src-all@FreeBSD.ORG Tue May 15 20:47:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20C50106566B; Tue, 15 May 2012 20:47:01 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E62638FC08; Tue, 15 May 2012 20:47:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4FKl0fk004851; Tue, 15 May 2012 20:47:00 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4FKl0RJ004850; Tue, 15 May 2012 20:47:00 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205152047.q4FKl0RJ004850@svn.freebsd.org> From: Josh Paetzel Date: Tue, 15 May 2012 20:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235482 - stable/9/sys/contrib/xz-embedded X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 20:47:01 -0000 Author: jpaetzel Date: Tue May 15 20:47:00 2012 New Revision: 235482 URL: http://svn.freebsd.org/changeset/base/235482 Log: MFC 229211: Initial copy of xz-embedded to sys/contrib/. The upcoming geom_compress module (a read-only gzip/ulzma translation layer, similar to what geom_uzip does) will leverage parts of this. Added: stable/9/sys/contrib/xz-embedded/ - copied from r229211, head/sys/contrib/xz-embedded/ Modified: Directory Properties: stable/9/sys/ (props changed) From owner-svn-src-all@FreeBSD.ORG Tue May 15 20:48:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 709381065670; Tue, 15 May 2012 20:48:10 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58DC98FC0C; Tue, 15 May 2012 20:48:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4FKmAHq004941; Tue, 15 May 2012 20:48:10 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4FKmAEN004937; Tue, 15 May 2012 20:48:10 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205152048.q4FKmAEN004937@svn.freebsd.org> From: Josh Paetzel Date: Tue, 15 May 2012 20:48:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235483 - in stable/9/sys: conf contrib/xz-embedded/freebsd contrib/xz-embedded/linux/include/linux contrib/xz-embedded/linux/lib/xz X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 20:48:10 -0000 Author: jpaetzel Date: Tue May 15 20:48:09 2012 New Revision: 235483 URL: http://svn.freebsd.org/changeset/base/235483 Log: MFC 229533: Update contrib/xz-embedded to build with new GEOM_UNCOMPRESS module. Added: stable/9/sys/contrib/xz-embedded/freebsd/ - copied from r229533, head/sys/contrib/xz-embedded/freebsd/ Modified: stable/9/sys/conf/files stable/9/sys/contrib/xz-embedded/linux/include/linux/xz.h stable/9/sys/contrib/xz-embedded/linux/lib/xz/xz_private.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Tue May 15 20:47:00 2012 (r235482) +++ stable/9/sys/conf/files Tue May 15 20:48:09 2012 (r235483) @@ -2264,6 +2264,21 @@ geom/raid3/g_raid3.c optional geom_raid geom/raid3/g_raid3_ctl.c optional geom_raid3 geom/shsec/g_shsec.c optional geom_shsec geom/stripe/g_stripe.c optional geom_stripe +contrib/xz-embedded/freebsd/xz_malloc.c \ + optional xz_embedded \ + compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" +contrib/xz-embedded/linux/lib/xz/xz_crc32.c \ + optional xz_embedded \ + compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" +contrib/xz-embedded/linux/lib/xz/xz_dec_bcj.c \ + optional xz_embedded \ + compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" +contrib/xz-embedded/linux/lib/xz/xz_dec_lzma2.c \ + optional xz_embedded \ + compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" +contrib/xz-embedded/linux/lib/xz/xz_dec_stream.c \ + optional xz_embedded \ + compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" geom/uzip/g_uzip.c optional geom_uzip geom/virstor/binstream.c optional geom_virstor geom/virstor/g_virstor.c optional geom_virstor Modified: stable/9/sys/contrib/xz-embedded/linux/include/linux/xz.h ============================================================================== --- stable/9/sys/contrib/xz-embedded/linux/include/linux/xz.h Tue May 15 20:47:00 2012 (r235482) +++ stable/9/sys/contrib/xz-embedded/linux/include/linux/xz.h Tue May 15 20:48:09 2012 (r235483) @@ -15,9 +15,14 @@ # include # include #else +#ifdef __FreeBSD__ +# include +# include +#else # include # include #endif +#endif #ifdef __cplusplus extern "C" { Modified: stable/9/sys/contrib/xz-embedded/linux/lib/xz/xz_private.h ============================================================================== --- stable/9/sys/contrib/xz-embedded/linux/lib/xz/xz_private.h Tue May 15 20:47:00 2012 (r235482) +++ stable/9/sys/contrib/xz-embedded/linux/lib/xz/xz_private.h Tue May 15 20:48:09 2012 (r235483) @@ -47,7 +47,7 @@ * macros and functions. This makes it easier to adapt the code into * different environments and avoids clutter in the Linux kernel tree. */ -# include "xz_config.h" +# include #endif /* If no specific decoding mode is requested, enable support for all modes. */ From owner-svn-src-all@FreeBSD.ORG Tue May 15 20:49:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23513106566B; Tue, 15 May 2012 20:49:26 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0529E8FC0A; Tue, 15 May 2012 20:49:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4FKnPNw005034; Tue, 15 May 2012 20:49:25 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4FKnPkN005031; Tue, 15 May 2012 20:49:25 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205152049.q4FKnPkN005031@svn.freebsd.org> From: Josh Paetzel Date: Tue, 15 May 2012 20:49:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235484 - in stable/9/sys: conf geom/uncompress modules/geom/geom_uncompress X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 20:49:26 -0000 Author: jpaetzel Date: Tue May 15 20:49:25 2012 New Revision: 235484 URL: http://svn.freebsd.org/changeset/base/235484 Log: MFC 229537 GEOM_UNCOMPRESS module, can be used with uzip images and with new ulzma images. Added: stable/9/sys/geom/uncompress/ - copied from r229537, head/sys/geom/uncompress/ stable/9/sys/modules/geom/geom_uncompress/ - copied from r229537, head/sys/modules/geom/geom_uncompress/ Modified: stable/9/sys/conf/files stable/9/sys/conf/options Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Tue May 15 20:48:09 2012 (r235483) +++ stable/9/sys/conf/files Tue May 15 20:49:25 2012 (r235484) @@ -2264,20 +2264,21 @@ geom/raid3/g_raid3.c optional geom_raid geom/raid3/g_raid3_ctl.c optional geom_raid3 geom/shsec/g_shsec.c optional geom_shsec geom/stripe/g_stripe.c optional geom_stripe +geom/uncompress/g_uncompress.c optional geom_uncompress contrib/xz-embedded/freebsd/xz_malloc.c \ - optional xz_embedded \ + optional xz_embedded | geom_uncompress \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" contrib/xz-embedded/linux/lib/xz/xz_crc32.c \ - optional xz_embedded \ + optional xz_embedded | geom_uncompress \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" contrib/xz-embedded/linux/lib/xz/xz_dec_bcj.c \ - optional xz_embedded \ + optional xz_embedded | geom_uncompress \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" contrib/xz-embedded/linux/lib/xz/xz_dec_lzma2.c \ - optional xz_embedded \ + optional xz_embedded | geom_uncompress \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" contrib/xz-embedded/linux/lib/xz/xz_dec_stream.c \ - optional xz_embedded \ + optional xz_embedded | geom_uncompress \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" geom/uzip/g_uzip.c optional geom_uzip geom/virstor/binstream.c optional geom_virstor @@ -2648,7 +2649,7 @@ net/slcompress.c optional netgraph_vjc net/vnet.c optional vimage net/zlib.c optional crypto | geom_uzip | ipsec | \ mxge | netgraph_deflate | \ - ddb_ctf | gzio + ddb_ctf | gzio | geom_uncompress net80211/ieee80211.c optional wlan net80211/ieee80211_acl.c optional wlan wlan_acl net80211/ieee80211_action.c optional wlan Modified: stable/9/sys/conf/options ============================================================================== --- stable/9/sys/conf/options Tue May 15 20:48:09 2012 (r235483) +++ stable/9/sys/conf/options Tue May 15 20:49:25 2012 (r235484) @@ -111,6 +111,7 @@ GEOM_RAID3 opt_geom.h GEOM_SHSEC opt_geom.h GEOM_STRIPE opt_geom.h GEOM_SUNLABEL opt_geom.h +GEOM_UNCOMPRESS opt_geom.h GEOM_UZIP opt_geom.h GEOM_VIRSTOR opt_geom.h GEOM_VOL opt_geom.h From owner-svn-src-all@FreeBSD.ORG Tue May 15 20:53:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 04E91106564A; Tue, 15 May 2012 20:53:56 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id A2A178FC0A; Tue, 15 May 2012 20:53:54 +0000 (UTC) Received: by laai10 with SMTP id i10so19399laa.13 for ; Tue, 15 May 2012 13:53:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=/aKU4eYaAISkq8X0F004AI3rIXlGSqLzO4RrH2wj+e4=; b=f3grAxSaeLCL0gl4JK1D5/6YlNvJUrf20en5e9bHtQIK6IoRgR6D6u5Mi+04leKPqP 0Uruk6vkQ6Pr+Xpa1oiy75imsPNgzgbFu9yzD3TzJPevHz/adWAKqtssclNKyKv9FMaf b0Pxd+ig9SKF9tOwzOSPCuL1sX24dFi9UIt6NcFQ2mQ66eYrr6jx7zT1Rf2oPS7RCxzS qMVh4wQfVteh+c9ayPC/XhVE/9cRtkSNvbBXNCOWmwfLLX8hbAfW/2W43ySv//cQEJq1 ezVwH1RuYPZomN7hFZu6SRF7dtL3ZA7UxNRHU8lxo5oNIbcktOxzgvbFedCWAhGW/DVL 5utA== MIME-Version: 1.0 Received: by 10.112.82.165 with SMTP id j5mr185921lby.50.1337115228242; Tue, 15 May 2012 13:53:48 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.27.65 with HTTP; Tue, 15 May 2012 13:53:48 -0700 (PDT) In-Reply-To: <20120515203832.GE2358@deviant.kiev.zoral.com.ua> References: <201205151721.q4FHLlgq097452@svn.freebsd.org> <20120515182747.GD2358@deviant.kiev.zoral.com.ua> <4FB2B7C5.2080604@FreeBSD.org> <20120515203832.GE2358@deviant.kiev.zoral.com.ua> Date: Tue, 15 May 2012 21:53:48 +0100 X-Google-Sender-Auth: y8hQw4h8ssx8ZC6NGYFIRQjQlhg Message-ID: From: Attilio Rao To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org, Andriy Gapon Subject: Re: svn commit: r235480 - in stable/9/sys: dev/usb geom geom/mountver i386/conf kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 20:53:56 -0000 2012/5/15 Konstantin Belousov : > On Tue, May 15, 2012 at 11:08:37PM +0300, Andriy Gapon wrote: >> on 15/05/2012 21:27 Konstantin Belousov said the following: >> > On Tue, May 15, 2012 at 05:21:47PM +0000, Andriy Gapon wrote: >> >> Author: avg Date: Tue May 15 17:21:46 2012 New Revision: 235480 URL: >> >> http://svn.freebsd.org/changeset/base/235480 >> >> >> >> Log: MFC r230643: stop_scheduler -> td_stopsched Modified: >> >> stable/9/sys/sys/proc.h >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >> >> >> >> >> --- stable/9/sys/sys/proc.h =C2=A0 Tue May 15 17:11:00 2012 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(r235479) >> >> +++ stable/9/sys/sys/proc.h =C2=A0 =C2=A0 =C2=A0 =C2=A0Tue May 15 17:= 21:46 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r235480) @@ -235,6 >> >> +235,7 @@ struct thread { short =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0td_locks; =C2=A0 =C2=A0 =C2=A0 /* (k) Count of non-spin >> >> locks. */ short =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0td_rw_rlocks= ; =C2=A0 /* (k) Count of rwlock read locks. */ >> >> short =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0td_lk_slocks; = =C2=A0 /* (k) Count of lockmgr shared locks. */ + =C2=A0 =C2=A0 =C2=A0short >> >> td_stopsched; =C2=A0 =C2=A0 =C2=A0/* (k) Scheduler stopped. */ struct= turnstile *td_blocked; >> >> /* (t) Lock thread is blocked on. */ const char =C2=A0 =C2=A0*td_lock= name; =C2=A0 /* (t) Name >> >> of lock blocked on. */ LIST_HEAD(, turnstile) td_contested; =C2=A0 = =C2=A0 =C2=A0 =C2=A0/* (q) >> >> Contested locks. */ >> >> >> > Did you verified that there is a gap between td_lk_slocks and td_block= ed an >> > all tier-1 architectures large enough to adopt td_stopsched without >> > changing the layout of struct thread after the new member ? >> >> I haven't verified that. but I presumed that the gap was either 2 bytes = on >> 32-bit architectures or 6 bytes on 64-bit ones. >> What is the proper and doable way of verifying this? > I think that p sizeof(struct thread) from gdb on previous and current > version of the kernel would be a good indicator. If sizes differ, it is > bad. > > To be completely sure, calculate offset of the next member in the structu= re: > in gdb, > p &(((struct thread *)0)->td_blocked) > for previous and current kernels. > >> >> > If not, this breaks KBI. >> >> I can just revert the commit to not risk an obscure breakage. >> What would you suggest? > Move the new member to the end of the struct thread, and do explicit > zeroing on the thread allocation, if commit changed the layout. That member position is strategic. It is left as close as possible to the recurse flags because they will very likely be already cached when td_schedstop is hit, which means td_schedstop will be already cached likely and this will avoid to pollute an extra cache line. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Tue May 15 21:06:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 91E511065673; Tue, 15 May 2012 21:06:25 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 637878FC15; Tue, 15 May 2012 21:06:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4FL6Pbl005693; Tue, 15 May 2012 21:06:25 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4FL6POO005692; Tue, 15 May 2012 21:06:25 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205152106.q4FL6POO005692@svn.freebsd.org> From: Josh Paetzel Date: Tue, 15 May 2012 21:06:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235485 - stable/9/usr.bin/mkulzma X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 21:06:25 -0000 Author: jpaetzel Date: Tue May 15 21:06:24 2012 New Revision: 235485 URL: http://svn.freebsd.org/changeset/base/235485 Log: MFC 229538: mkulzma used to create lzma compressed images, just like mkuzip do. Added: stable/9/usr.bin/mkulzma/ - copied from r229538, head/usr.bin/mkulzma/ Modified: Directory Properties: stable/9/usr.bin/ (props changed) From owner-svn-src-all@FreeBSD.ORG Tue May 15 22:44:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ACBC2106564A; Tue, 15 May 2012 22:44:55 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97FF48FC14; Tue, 15 May 2012 22:44:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4FMitTu009120; Tue, 15 May 2012 22:44:55 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4FMit9c009118; Tue, 15 May 2012 22:44:55 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201205152244.q4FMit9c009118@svn.freebsd.org> From: Marius Strobl Date: Tue, 15 May 2012 22:44:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235486 - head/contrib/compiler-rt/lib/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 22:44:55 -0000 Author: marius Date: Tue May 15 22:44:55 2012 New Revision: 235486 URL: http://svn.freebsd.org/changeset/base/235486 Log: Forced commit to denote that the claim in r235388, that libcompiler_rt when used as a replacement for libgcc on sparc64 would cause a 60% decrease in performance is wrong. Actually, the performance loss is only marginal and the huge difference seen was caused by a pilot error comparing libgcc builds using MALLOC_PRODUCTION with libcompiler_rt builds that did not. Modified: head/contrib/compiler-rt/lib/sparc64/divmod.m4 Modified: head/contrib/compiler-rt/lib/sparc64/divmod.m4 ============================================================================== From owner-svn-src-all@FreeBSD.ORG Tue May 15 22:47:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3B4B91065675; Tue, 15 May 2012 22:47:35 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 264488FC0A; Tue, 15 May 2012 22:47:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4FMlZF9009247; Tue, 15 May 2012 22:47:35 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4FMlYaT009244; Tue, 15 May 2012 22:47:34 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201205152247.q4FMlYaT009244@svn.freebsd.org> From: Marius Strobl Date: Tue, 15 May 2012 22:47:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235487 - in head: gnu/lib/libgcc lib/libcompiler_rt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 22:47:35 -0000 Author: marius Date: Tue May 15 22:47:34 2012 New Revision: 235487 URL: http://svn.freebsd.org/changeset/base/235487 Log: Switch sparc64 to using libcompiler_rt; since r230021 we have a workaround in place allowing it to be used there and since r235388 (see also r235486) we also have usable div/mod optimizations like libgcc has. Modified: head/gnu/lib/libgcc/Makefile head/lib/libcompiler_rt/Makefile Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Tue May 15 22:44:55 2012 (r235486) +++ head/gnu/lib/libgcc/Makefile Tue May 15 22:47:34 2012 (r235487) @@ -15,7 +15,7 @@ MK_SSP= no .include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt" -.if ${TARGET_CPUARCH} == "sparc64" || ${TARGET_CPUARCH} == "mips" +.if ${TARGET_CPUARCH} == "mips" LIB= gcc .endif Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Tue May 15 22:44:55 2012 (r235486) +++ head/lib/libcompiler_rt/Makefile Tue May 15 22:47:34 2012 (r235487) @@ -176,7 +176,7 @@ SRCS+= ${file}.c . endif .endfor -.if ${MACHINE_CPUARCH} != "sparc64" && ${MACHINE_CPUARCH} != "mips" +.if ${MACHINE_CPUARCH} != "mips" . if ${MK_INSTALLLIB} != "no" SYMLINKS+=libcompiler_rt.a ${LIBDIR}/libgcc.a . endif From owner-svn-src-all@FreeBSD.ORG Tue May 15 22:50:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80501106566B; Tue, 15 May 2012 22:50:48 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BF6A8FC08; Tue, 15 May 2012 22:50:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4FMomR3009390; Tue, 15 May 2012 22:50:48 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4FMomAX009388; Tue, 15 May 2012 22:50:48 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201205152250.q4FMomAX009388@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 15 May 2012 22:50:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235488 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 22:50:48 -0000 Author: jilles Date: Tue May 15 22:50:47 2012 New Revision: 235488 URL: http://svn.freebsd.org/changeset/base/235488 Log: sh: Remove an unused header. The read builtin no longer does things with termios. Modified: head/bin/sh/miscbltin.c Modified: head/bin/sh/miscbltin.c ============================================================================== --- head/bin/sh/miscbltin.c Tue May 15 22:47:34 2012 (r235487) +++ head/bin/sh/miscbltin.c Tue May 15 22:50:47 2012 (r235488) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "shell.h" #include "options.h" From owner-svn-src-all@FreeBSD.ORG Tue May 15 23:31:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7545D106566C; Tue, 15 May 2012 23:31:33 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60B5B8FC15; Tue, 15 May 2012 23:31:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4FNVXcq011531; Tue, 15 May 2012 23:31:33 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4FNVXJI011529; Tue, 15 May 2012 23:31:33 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201205152331.q4FNVXJI011529@svn.freebsd.org> From: Scott Long Date: Tue, 15 May 2012 23:31:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235490 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 23:31:33 -0000 Author: scottl Date: Tue May 15 23:31:31 2012 New Revision: 235490 URL: http://svn.freebsd.org/changeset/base/235490 Log: Release Jim Harris and Sean Bruno from mentorship. Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Tue May 15 22:55:23 2012 (r235489) +++ svnadmin/conf/mentors Tue May 15 23:31:31 2012 (r235490) @@ -19,7 +19,6 @@ eadler cperciva eri mlaier Co-mentor: thompsa jceel wkoszek Co-mentor: cognet jhibbits nwhitehorn -jimharris scottl Co-mentor: sbruno jinmei gnn jlh kib jonathan rwatson @@ -32,7 +31,6 @@ nork imp pfg jhb ray adrian rdivacky rpaulo -sbruno scottl snb dwmalone sson gnn versus gavin Co-mentor: fjoe From owner-svn-src-all@FreeBSD.ORG Tue May 15 23:39:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D32A106564A; Tue, 15 May 2012 23:39:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 375428FC12; Tue, 15 May 2012 23:39:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4FNdcD2011844; Tue, 15 May 2012 23:39:38 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4FNdbEO011838; Tue, 15 May 2012 23:39:37 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205152339.q4FNdbEO011838@svn.freebsd.org> From: Adrian Chadd Date: Tue, 15 May 2012 23:39:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235491 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 23:39:38 -0000 Author: adrian Date: Tue May 15 23:39:37 2012 New Revision: 235491 URL: http://svn.freebsd.org/changeset/base/235491 Log: Migrate ath_debug and sc_debug from an int to a uint64_t / QUAD; add some more BAR debugging logic. * Change the definition of ath_debug and ath_softc.sc_debug from int to uint64_t; * Change the relevant sysctls; * Add a new BAR TX debugging field; * Use this in if_ath_tx. This has been tested by using the sysctl program, which happily allows for fields > 32 bits to be configured. Modified: head/sys/dev/ath/if_ath_debug.c head/sys/dev/ath/if_ath_debug.h head/sys/dev/ath/if_ath_sysctl.c head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath_debug.c ============================================================================== --- head/sys/dev/ath/if_ath_debug.c Tue May 15 23:31:31 2012 (r235490) +++ head/sys/dev/ath/if_ath_debug.c Tue May 15 23:39:37 2012 (r235491) @@ -89,12 +89,12 @@ __FBSDID("$FreeBSD$"); #ifdef ATH_DEBUG #include -int ath_debug = 0; +uint64_t ath_debug = 0; SYSCTL_DECL(_hw_ath); -SYSCTL_INT(_hw_ath, OID_AUTO, debug, CTLFLAG_RW, &ath_debug, +SYSCTL_QUAD(_hw_ath, OID_AUTO, debug, CTLFLAG_RW, &ath_debug, 0, "control debugging printfs"); -TUNABLE_INT("hw.ath.debug", &ath_debug); +TUNABLE_QUAD("hw.ath.debug", &ath_debug); void ath_printrxbuf(struct ath_softc *sc, const struct ath_buf *bf, Modified: head/sys/dev/ath/if_ath_debug.h ============================================================================== --- head/sys/dev/ath/if_ath_debug.h Tue May 15 23:31:31 2012 (r235490) +++ head/sys/dev/ath/if_ath_debug.h Tue May 15 23:39:37 2012 (r235491) @@ -34,39 +34,40 @@ #ifdef ATH_DEBUG enum { - ATH_DEBUG_XMIT = 0x00000001, /* basic xmit operation */ - ATH_DEBUG_XMIT_DESC = 0x00000002, /* xmit descriptors */ - ATH_DEBUG_RECV = 0x00000004, /* basic recv operation */ - ATH_DEBUG_RECV_DESC = 0x00000008, /* recv descriptors */ - ATH_DEBUG_RATE = 0x00000010, /* rate control */ - ATH_DEBUG_RESET = 0x00000020, /* reset processing */ - ATH_DEBUG_MODE = 0x00000040, /* mode init/setup */ - ATH_DEBUG_BEACON = 0x00000080, /* beacon handling */ - ATH_DEBUG_WATCHDOG = 0x00000100, /* watchdog timeout */ - ATH_DEBUG_INTR = 0x00001000, /* ISR */ - ATH_DEBUG_TX_PROC = 0x00002000, /* tx ISR proc */ - ATH_DEBUG_RX_PROC = 0x00004000, /* rx ISR proc */ - ATH_DEBUG_BEACON_PROC = 0x00008000, /* beacon ISR proc */ - ATH_DEBUG_CALIBRATE = 0x00010000, /* periodic calibration */ - ATH_DEBUG_KEYCACHE = 0x00020000, /* key cache management */ - ATH_DEBUG_STATE = 0x00040000, /* 802.11 state transitions */ - ATH_DEBUG_NODE = 0x00080000, /* node management */ - ATH_DEBUG_LED = 0x00100000, /* led management */ - ATH_DEBUG_FF = 0x00200000, /* fast frames */ - ATH_DEBUG_DFS = 0x00400000, /* DFS processing */ - ATH_DEBUG_TDMA = 0x00800000, /* TDMA processing */ - ATH_DEBUG_TDMA_TIMER = 0x01000000, /* TDMA timer processing */ - ATH_DEBUG_REGDOMAIN = 0x02000000, /* regulatory processing */ - ATH_DEBUG_SW_TX = 0x04000000, /* per-packet software TX */ - ATH_DEBUG_SW_TX_BAW = 0x08000000, /* BAW handling */ - ATH_DEBUG_SW_TX_CTRL = 0x10000000, /* queue control */ - ATH_DEBUG_SW_TX_AGGR = 0x20000000, /* aggregate TX */ - ATH_DEBUG_SW_TX_RETRIES = 0x40000000, /* software TX retries */ - ATH_DEBUG_FATAL = 0x80000000, /* fatal errors */ - ATH_DEBUG_ANY = 0xffffffff + ATH_DEBUG_XMIT = 0x000000001ULL, /* basic xmit operation */ + ATH_DEBUG_XMIT_DESC = 0x000000002ULL, /* xmit descriptors */ + ATH_DEBUG_RECV = 0x000000004ULL, /* basic recv operation */ + ATH_DEBUG_RECV_DESC = 0x000000008ULL, /* recv descriptors */ + ATH_DEBUG_RATE = 0x000000010ULL, /* rate control */ + ATH_DEBUG_RESET = 0x000000020ULL, /* reset processing */ + ATH_DEBUG_MODE = 0x000000040ULL, /* mode init/setup */ + ATH_DEBUG_BEACON = 0x000000080ULL, /* beacon handling */ + ATH_DEBUG_WATCHDOG = 0x000000100ULL, /* watchdog timeout */ + ATH_DEBUG_INTR = 0x000001000ULL, /* ISR */ + ATH_DEBUG_TX_PROC = 0x000002000ULL, /* tx ISR proc */ + ATH_DEBUG_RX_PROC = 0x000004000ULL, /* rx ISR proc */ + ATH_DEBUG_BEACON_PROC = 0x000008000ULL, /* beacon ISR proc */ + ATH_DEBUG_CALIBRATE = 0x000010000ULL, /* periodic calibration */ + ATH_DEBUG_KEYCACHE = 0x000020000ULL, /* key cache management */ + ATH_DEBUG_STATE = 0x000040000ULL, /* 802.11 state transitions */ + ATH_DEBUG_NODE = 0x000080000ULL, /* node management */ + ATH_DEBUG_LED = 0x000100000ULL, /* led management */ + ATH_DEBUG_FF = 0x000200000ULL, /* fast frames */ + ATH_DEBUG_DFS = 0x000400000ULL, /* DFS processing */ + ATH_DEBUG_TDMA = 0x000800000ULL, /* TDMA processing */ + ATH_DEBUG_TDMA_TIMER = 0x001000000ULL, /* TDMA timer processing */ + ATH_DEBUG_REGDOMAIN = 0x002000000ULL, /* regulatory processing */ + ATH_DEBUG_SW_TX = 0x004000000ULL, /* per-packet software TX */ + ATH_DEBUG_SW_TX_BAW = 0x008000000ULL, /* BAW handling */ + ATH_DEBUG_SW_TX_CTRL = 0x010000000ULL, /* queue control */ + ATH_DEBUG_SW_TX_AGGR = 0x020000000ULL, /* aggregate TX */ + ATH_DEBUG_SW_TX_RETRIES = 0x040000000ULL, /* software TX retries */ + ATH_DEBUG_FATAL = 0x080000000ULL, /* fatal errors */ + ATH_DEBUG_SW_TX_BAR = 0x100000000ULL, /* BAR TX */ + ATH_DEBUG_ANY = 0xffffffffffffffffULL }; -extern int ath_debug; +extern uint64_t ath_debug; #define IFF_DUMPPKTS(sc, m) \ ((sc->sc_debug & (m)) || \ Modified: head/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- head/sys/dev/ath/if_ath_sysctl.c Tue May 15 23:31:31 2012 (r235490) +++ head/sys/dev/ath/if_ath_sysctl.c Tue May 15 23:39:37 2012 (r235491) @@ -501,8 +501,8 @@ ath_sysctlattach(struct ath_softc *sc) "regdomain", CTLFLAG_RD, &sc->sc_eerd, 0, "EEPROM regdomain code"); #ifdef ATH_DEBUG - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "debug", CTLFLAG_RW, &sc->sc_debug, 0, + SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "debug", CTLFLAG_RW, &sc->sc_debug, "control debugging printfs"); #endif SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Tue May 15 23:31:31 2012 (r235490) +++ head/sys/dev/ath/if_ath_tx.c Tue May 15 23:39:37 2012 (r235491) @@ -2673,7 +2673,7 @@ ath_tx_tid_bar_suspend(struct ath_softc { ATH_TXQ_LOCK_ASSERT(sc->sc_ac2q[tid->ac]); - DPRINTF(sc, ATH_DEBUG_SW_TX_BAW, + DPRINTF(sc, ATH_DEBUG_SW_TX_BAR, "%s: tid=%p, called\n", __func__, tid); @@ -2704,7 +2704,7 @@ ath_tx_tid_bar_unsuspend(struct ath_soft { ATH_TXQ_LOCK_ASSERT(sc->sc_ac2q[tid->ac]); - DPRINTF(sc, ATH_DEBUG_SW_TX_BAW, + DPRINTF(sc, ATH_DEBUG_SW_TX_BAR, "%s: tid=%p, called\n", __func__, tid); @@ -2732,6 +2732,9 @@ ath_tx_tid_bar_tx_ready(struct ath_softc if (tid->bar_wait == 0 || tid->hwq_depth > 0) return (0); + DPRINTF(sc, ATH_DEBUG_SW_TX_BAR, "%s: tid=%p (%d), bar ready\n", + __func__, tid, tid->tid); + return (1); } @@ -2754,7 +2757,7 @@ ath_tx_tid_bar_tx(struct ath_softc *sc, ATH_TXQ_LOCK_ASSERT(sc->sc_ac2q[tid->ac]); - DPRINTF(sc, ATH_DEBUG_SW_TX_BAW, + DPRINTF(sc, ATH_DEBUG_SW_TX_BAR, "%s: tid=%p, called\n", __func__, tid); @@ -2776,7 +2779,7 @@ ath_tx_tid_bar_tx(struct ath_softc *sc, /* Don't do anything if we still have pending frames */ if (tid->hwq_depth > 0) { - DPRINTF(sc, ATH_DEBUG_SW_TX_BAW, + DPRINTF(sc, ATH_DEBUG_SW_TX_BAR, "%s: tid=%p, hwq_depth=%d, waiting\n", __func__, tid, @@ -2793,7 +2796,7 @@ ath_tx_tid_bar_tx(struct ath_softc *sc, * * XXX verify this is _actually_ the valid value to begin at! */ - DPRINTF(sc, ATH_DEBUG_SW_TX_BAW, + DPRINTF(sc, ATH_DEBUG_SW_TX_BAR, "%s: tid=%p, new BAW left edge=%d\n", __func__, tid, @@ -2865,10 +2868,11 @@ ath_tx_tid_drain(struct ath_softc *sc, s SEQNO(bf->bf_state.bfs_seqno), bf->bf_state.bfs_retries); device_printf(sc->sc_dev, - "%s: node %p: bf=%p: tid txq_depth=%d hwq_depth=%d\n", + "%s: node %p: bf=%p: tid txq_depth=%d hwq_depth=%d, bar_wait=%d\n", __func__, ni, bf, tid->axq_depth, - tid->hwq_depth); + tid->hwq_depth, + tid->bar_wait); device_printf(sc->sc_dev, "%s: node %p: bf=%p: tid %d: txq_depth=%d, " "txq_aggr_depth=%d, sched=%d, paused=%d, " @@ -4440,8 +4444,11 @@ ath_bar_response(struct ieee80211_node * struct ath_tid *atid = &an->an_tid[tid]; int attempts = tap->txa_attempts; - DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL, - "%s: called; status=%d\n", __func__, status); + DPRINTF(sc, ATH_DEBUG_SW_TX_BAR, + "%s: called; status=%d, attempts=%d\n", + __func__, + status, + attempts); /* Note: This may update the BAW details */ sc->sc_bar_response(ni, tap, status); Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Tue May 15 23:31:31 2012 (r235490) +++ head/sys/dev/ath/if_athvar.h Tue May 15 23:39:37 2012 (r235491) @@ -351,7 +351,7 @@ struct ath_softc { struct ath_stats sc_stats; /* interface statistics */ struct ath_tx_aggr_stats sc_aggr_stats; struct ath_intr_stats sc_intr_stats; - int sc_debug; + uint64_t sc_debug; int sc_nvaps; /* # vaps */ int sc_nstavaps; /* # station vaps */ int sc_nmeshvaps; /* # mbss vaps */ From owner-svn-src-all@FreeBSD.ORG Wed May 16 00:01:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 19C5B106566C; Wed, 16 May 2012 00:01:40 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03F628FC08; Wed, 16 May 2012 00:01:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4G01dYR012660; Wed, 16 May 2012 00:01:39 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4G01dHR012658; Wed, 16 May 2012 00:01:39 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201205160001.q4G01dHR012658@svn.freebsd.org> From: Jim Harris Date: Wed, 16 May 2012 00:01:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235492 - stable/7/sys/dev/isci/scil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 00:01:40 -0000 Author: jimharris Date: Wed May 16 00:01:39 2012 New Revision: 235492 URL: http://svn.freebsd.org/changeset/base/235492 Log: MFC r235043: Fix off-by-one error in sati_inquiry_block_device_translate_data(). Bug would result in INQUIRY VPD 0x81 to SATA devices to return only 63 bytes of data instead of 64 during SCSI/ATA translation. Sponsored by: Intel Modified: stable/7/sys/dev/isci/scil/sati_inquiry.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/isci/scil/sati_inquiry.c ============================================================================== --- stable/7/sys/dev/isci/scil/sati_inquiry.c Tue May 15 23:39:37 2012 (r235491) +++ stable/7/sys/dev/isci/scil/sati_inquiry.c Wed May 16 00:01:39 2012 (r235492) @@ -359,7 +359,7 @@ void sati_inquiry_block_device_translate ); //bytes 8-63 are reserved - for(offset = 8; offset < 63; offset++) + for(offset = 8; offset < 64; offset++) { sati_set_data_byte(sequence, scsi_io, offset, 0x00); } From owner-svn-src-all@FreeBSD.ORG Wed May 16 00:03:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FE431065670; Wed, 16 May 2012 00:03:58 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A3358FC08; Wed, 16 May 2012 00:03:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4G03wLc012801; Wed, 16 May 2012 00:03:58 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4G03wZK012799; Wed, 16 May 2012 00:03:58 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201205160003.q4G03wZK012799@svn.freebsd.org> From: Jim Harris Date: Wed, 16 May 2012 00:03:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235493 - stable/8/sys/dev/isci/scil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 00:03:58 -0000 Author: jimharris Date: Wed May 16 00:03:58 2012 New Revision: 235493 URL: http://svn.freebsd.org/changeset/base/235493 Log: MFC r235043: Fix off-by-one error in sati_inquiry_block_device_translate_data(). Bug would result in INQUIRY VPD 0x81 to SATA devices to return only 63 bytes of data instead of 64 during SCSI/ATA translation. Sponsored by: Intel Modified: stable/8/sys/dev/isci/scil/sati_inquiry.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/isci/scil/sati_inquiry.c ============================================================================== --- stable/8/sys/dev/isci/scil/sati_inquiry.c Wed May 16 00:01:39 2012 (r235492) +++ stable/8/sys/dev/isci/scil/sati_inquiry.c Wed May 16 00:03:58 2012 (r235493) @@ -359,7 +359,7 @@ void sati_inquiry_block_device_translate ); //bytes 8-63 are reserved - for(offset = 8; offset < 63; offset++) + for(offset = 8; offset < 64; offset++) { sati_set_data_byte(sequence, scsi_io, offset, 0x00); } From owner-svn-src-all@FreeBSD.ORG Wed May 16 00:10:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 82AA3106564A; Wed, 16 May 2012 00:10:43 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CD808FC1A; Wed, 16 May 2012 00:10:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4G0AhAI013077; Wed, 16 May 2012 00:10:43 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4G0Ah89013074; Wed, 16 May 2012 00:10:43 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201205160010.q4G0Ah89013074@svn.freebsd.org> From: Jim Harris Date: Wed, 16 May 2012 00:10:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235494 - stable/9/sys/dev/isci/scil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 00:10:43 -0000 Author: jimharris Date: Wed May 16 00:10:42 2012 New Revision: 235494 URL: http://svn.freebsd.org/changeset/base/235494 Log: MFC r235043: Fix off-by-one error in sati_inquiry_block_device_translate_data(). Bug would result in INQUIRY VPD 0x81 to SATA devices to return only 63 bytes of data instead of 64 during SCSI/ATA translation. Sponsored by: Intel Modified: stable/9/sys/dev/isci/scil/sati_inquiry.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/isci/scil/sati_inquiry.c ============================================================================== --- stable/9/sys/dev/isci/scil/sati_inquiry.c Wed May 16 00:03:58 2012 (r235493) +++ stable/9/sys/dev/isci/scil/sati_inquiry.c Wed May 16 00:10:42 2012 (r235494) @@ -359,7 +359,7 @@ void sati_inquiry_block_device_translate ); //bytes 8-63 are reserved - for(offset = 8; offset < 63; offset++) + for(offset = 8; offset < 64; offset++) { sati_set_data_byte(sequence, scsi_io, offset, 0x00); } From owner-svn-src-all@FreeBSD.ORG Wed May 16 00:23:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 28D9C106564A; Wed, 16 May 2012 00:23:24 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) by mx1.freebsd.org (Postfix) with ESMTP id C9D488FC12; Wed, 16 May 2012 00:23:23 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id E91EC25D3A05; Wed, 16 May 2012 00:23:16 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 1467EBE60CF; Wed, 16 May 2012 00:23:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 6w87z8DYOPew; Wed, 16 May 2012 00:23:15 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 14A0BBE60CE; Wed, 16 May 2012 00:23:14 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201205152015.q4FKFHob003642@svn.freebsd.org> Date: Wed, 16 May 2012 00:23:14 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <14EB5CAF-03DF-4D64-9707-A8129F02DB23@lists.zabbadoz.net> References: <201205152015.q4FKFHob003642@svn.freebsd.org> To: Eitan Adler X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r235481 - head/share/examples/csh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 00:23:24 -0000 On 15. May 2012, at 20:15 , Eitan Adler wrote: > Author: eadler > Date: Tue May 15 20:15:17 2012 > New Revision: 235481 > URL: http://svn.freebsd.org/changeset/base/235481 >=20 > Log: > Rework sample code which sets SSH_AUTH_SOCK to the user's ssh-agent > socket path if running >=20 > PR: 167932 > Submitted by: madpilot (pr) > Submitted by: wblock (final patch) > Reviewed by: If someone else reviewed your modification. > Approved by: cperciva (implicit) > MFC after: 3 days >=20 > Modified: > head/share/examples/csh/dot.cshrc >=20 > Modified: head/share/examples/csh/dot.cshrc > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/share/examples/csh/dot.cshrc Tue May 15 17:21:46 2012 = (r235480) > +++ head/share/examples/csh/dot.cshrc Tue May 15 20:15:17 2012 = (r235481) > @@ -5,7 +5,7 @@ >=20 > # Sets SSH_AUTH_SOCK to the user's ssh-agent socket path if running > if (${?SSH_AUTH_SOCK} !=3D "1") then > - setenv SSH_AUTH_SOCK `sockstat | grep "${USER}" | cut -d ' ' -f = 6`=20 > + setenv SSH_AUTH_SOCK `sockstat | grep "^${USER} " | awk = '/ssh-agent/ { print $6 }'` Wow; how would that handle the 6 different agents I am running? Can you please get rid of that extra call for grep and move it into the = awk regex? Would sockstat -u be good enough to limit the output passed through the = pipe? > endif >=20 > # Change only root's prompt --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Wed May 16 00:31:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74EB41065676 for ; Wed, 16 May 2012 00:31:41 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id E87B38FC17 for ; Wed, 16 May 2012 00:31:40 +0000 (UTC) Received: by werg1 with SMTP id g1so118593wer.13 for ; Tue, 15 May 2012 17:31:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=43PKJKV6e9ieLdvkbbEORAOqNYl/GTCJpw+mt3QqI0w=; b=YA2j8md1sA28ZokQPoBcDSg1Hlwffcf1uc7yDAjz1fGrwbqhdBrMSBVcYJQCQ9lddW LU5ZSg83kxhUzGi10Abn1NTFuSF2ONpEo4dQOKhbrVD/JnCFnQMUI6B02fRq2bT4d6GU gMy/9UYXPVoaCuBMQns9y7l1MVvvAOC4pCmJo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=43PKJKV6e9ieLdvkbbEORAOqNYl/GTCJpw+mt3QqI0w=; b=hgUxj9C/v5BVZCBiHQqrR031LxVJvVwLMES9ISZZ4zJeQAAfRpArVAdnUE86WAvpm8 vEzU41XcY1tElUEAMekxKqhL0I67uHgTVVo2DTOPNWePsDWBS95+duTqCVUblSjz2nJu F4Rb+14Uh3FsXBed0VFuuQ/C2IAMQZrAqmF894NR5Vfoo6M+3fUiKXuANGcbpSPf4INC S9gHTAKDq3h8kla7Gi/3Y/l3UGzT3Ii9OG71qEVxaDYq4UlohdVGQyDlX7+ERgZhrMZa YvDnylsoIxVfel4/rfMYCg6nVJMVjdzOZlh3yLcHAJ+sRx0WqXlFtlvlzRyJnlH18THL htHQ== Received: by 10.180.86.194 with SMTP id r2mr2460333wiz.15.1337128299461; Tue, 15 May 2012 17:31:39 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.223.120.6 with HTTP; Tue, 15 May 2012 17:31:08 -0700 (PDT) In-Reply-To: <14EB5CAF-03DF-4D64-9707-A8129F02DB23@lists.zabbadoz.net> References: <201205152015.q4FKFHob003642@svn.freebsd.org> <14EB5CAF-03DF-4D64-9707-A8129F02DB23@lists.zabbadoz.net> From: Eitan Adler Date: Tue, 15 May 2012 20:31:08 -0400 X-Google-Sender-Auth: BwaTYyMKdGoaAEKWjnFwz_uMpMg Message-ID: To: "Bjoern A. Zeeb" Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQlbUWQSSpYlLKQYHK7RA4Qn2wCB8qwNUN/j1cK/JJ986StHDmEjegvIwhB7C7Lff5Yblehr Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r235481 - head/share/examples/csh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 00:31:41 -0000 On 15 May 2012 20:23, Bjoern A. Zeeb wrote: > Wow; how would that handle the 6 different agents I am running? This is an example meant for new users. Since you are running into a non-usual case you would obviously have to change it to suit your needs. > Can you please get rid of that extra call for grep and move it into the awk regex? This is relatively clear, but I don't have any objection to moving the ${USER} into awk. > Would sockstat -u be good enough to limit the output passed through the pipe? I don't think so. -- Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-all@FreeBSD.ORG Wed May 16 00:36:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A299106564A; Wed, 16 May 2012 00:36:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A5DD8FC08; Wed, 16 May 2012 00:36:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4G0aqm9014093; Wed, 16 May 2012 00:36:52 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4G0aq0b014090; Wed, 16 May 2012 00:36:52 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205160036.q4G0aq0b014090@svn.freebsd.org> From: Eitan Adler Date: Wed, 16 May 2012 00:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235496 - in stable/7: sbin/geom/class/eli sys/geom/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 00:36:52 -0000 Author: eadler Date: Wed May 16 00:36:51 2012 New Revision: 235496 URL: http://svn.freebsd.org/changeset/base/235496 Log: MFC r235201 r235419: Add missing period at the end of the error message Approved by: cperciva (implicit) Modified: stable/7/sbin/geom/class/eli/geli.8 stable/7/sys/geom/eli/g_eli_integrity.c Directory Properties: stable/7/sbin/geom/ (props changed) stable/7/sys/ (props changed) Modified: stable/7/sbin/geom/class/eli/geli.8 ============================================================================== --- stable/7/sbin/geom/class/eli/geli.8 Wed May 16 00:29:26 2012 (r235495) +++ stable/7/sbin/geom/class/eli/geli.8 Wed May 16 00:36:51 2012 (r235496) @@ -649,6 +649,9 @@ will not protect your data against repla It is recommended to write the whole provider before the first use, in order to make sure that all sectors and their corresponding checksums are properly initialized into a consistent state. +One can safely ignore data authentication errors that occur immediately +after the first time a provider is attached and before it is +initialized in this way. .Sh SEE ALSO .Xr crypto 4 , .Xr gbde 4 , Modified: stable/7/sys/geom/eli/g_eli_integrity.c ============================================================================== --- stable/7/sys/geom/eli/g_eli_integrity.c Wed May 16 00:29:26 2012 (r235495) +++ stable/7/sys/geom/eli/g_eli_integrity.c Wed May 16 00:36:51 2012 (r235496) @@ -204,8 +204,8 @@ g_eli_auth_read_done(struct cryptop *crp * Report previous corruption if there was one. */ if (coroff != -1) { - G_ELI_DEBUG(0, "%s: %jd bytes " - "corrupted at offset %jd.", + G_ELI_DEBUG(0, "%s: Failed to authenticate %jd " + "bytes of data at offset %jd.", sc->sc_name, (intmax_t)corsize, (intmax_t)coroff); coroff = -1; @@ -220,7 +220,8 @@ g_eli_auth_read_done(struct cryptop *crp } /* Report previous corruption if there was one. */ if (coroff != -1) { - G_ELI_DEBUG(0, "%s: %jd bytes corrupted at offset %jd.", + G_ELI_DEBUG(0, "%s: Failed to authenticate %jd " + "bytes of data at offset %jd.", sc->sc_name, (intmax_t)corsize, (intmax_t)coroff); } } From owner-svn-src-all@FreeBSD.ORG Wed May 16 00:37:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17A5810656E9; Wed, 16 May 2012 00:37:16 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBF628FC0A; Wed, 16 May 2012 00:37:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4G0bFod014145; Wed, 16 May 2012 00:37:15 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4G0bF2B014142; Wed, 16 May 2012 00:37:15 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205160037.q4G0bF2B014142@svn.freebsd.org> From: Eitan Adler Date: Wed, 16 May 2012 00:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235497 - in stable/8: sbin/geom/class/eli sys/geom/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 00:37:16 -0000 Author: eadler Date: Wed May 16 00:37:15 2012 New Revision: 235497 URL: http://svn.freebsd.org/changeset/base/235497 Log: MFC r235201 r235419: Add missing period at the end of the error message Approved by: cperciva (implicit) Modified: stable/8/sbin/geom/class/eli/geli.8 stable/8/sys/geom/eli/g_eli_integrity.c Directory Properties: stable/8/sbin/geom/ (props changed) stable/8/sys/ (props changed) Modified: stable/8/sbin/geom/class/eli/geli.8 ============================================================================== --- stable/8/sbin/geom/class/eli/geli.8 Wed May 16 00:36:51 2012 (r235496) +++ stable/8/sbin/geom/class/eli/geli.8 Wed May 16 00:37:15 2012 (r235497) @@ -879,6 +879,9 @@ will not protect your data against repla It is recommended to write the whole provider before the first use, in order to make sure that all sectors and their corresponding checksums are properly initialized into a consistent state. +One can safely ignore data authentication errors that occur immediately +after the first time a provider is attached and before it is +initialized in this way. .Sh SEE ALSO .Xr crypto 4 , .Xr gbde 4 , Modified: stable/8/sys/geom/eli/g_eli_integrity.c ============================================================================== --- stable/8/sys/geom/eli/g_eli_integrity.c Wed May 16 00:36:51 2012 (r235496) +++ stable/8/sys/geom/eli/g_eli_integrity.c Wed May 16 00:37:15 2012 (r235497) @@ -204,8 +204,8 @@ g_eli_auth_read_done(struct cryptop *crp * Report previous corruption if there was one. */ if (coroff != -1) { - G_ELI_DEBUG(0, "%s: %jd bytes " - "corrupted at offset %jd.", + G_ELI_DEBUG(0, "%s: Failed to authenticate %jd " + "bytes of data at offset %jd.", sc->sc_name, (intmax_t)corsize, (intmax_t)coroff); coroff = -1; @@ -220,7 +220,8 @@ g_eli_auth_read_done(struct cryptop *crp } /* Report previous corruption if there was one. */ if (coroff != -1) { - G_ELI_DEBUG(0, "%s: %jd bytes corrupted at offset %jd.", + G_ELI_DEBUG(0, "%s: Failed to authenticate %jd " + "bytes of data at offset %jd.", sc->sc_name, (intmax_t)corsize, (intmax_t)coroff); } } From owner-svn-src-all@FreeBSD.ORG Wed May 16 00:37:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCF64106564A; Wed, 16 May 2012 00:37:37 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB0E38FC16; Wed, 16 May 2012 00:37:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4G0bbJS014193; Wed, 16 May 2012 00:37:37 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4G0bbCC014190; Wed, 16 May 2012 00:37:37 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205160037.q4G0bbCC014190@svn.freebsd.org> From: Eitan Adler Date: Wed, 16 May 2012 00:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235498 - in stable/9: sbin/geom/class/eli sys/geom/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 00:37:38 -0000 Author: eadler Date: Wed May 16 00:37:37 2012 New Revision: 235498 URL: http://svn.freebsd.org/changeset/base/235498 Log: MFC r235201 r235419: Add missing period at the end of the error message Approved by: cperciva (implicit) Modified: stable/9/sbin/geom/class/eli/geli.8 stable/9/sys/geom/eli/g_eli_integrity.c Directory Properties: stable/9/sbin/geom/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sbin/geom/class/eli/geli.8 ============================================================================== --- stable/9/sbin/geom/class/eli/geli.8 Wed May 16 00:37:15 2012 (r235497) +++ stable/9/sbin/geom/class/eli/geli.8 Wed May 16 00:37:37 2012 (r235498) @@ -899,6 +899,9 @@ will not protect your data against repla It is recommended to write the whole provider before the first use, in order to make sure that all sectors and their corresponding checksums are properly initialized into a consistent state. +One can safely ignore data authentication errors that occur immediately +after the first time a provider is attached and before it is +initialized in this way. .Sh SEE ALSO .Xr crypto 4 , .Xr gbde 4 , Modified: stable/9/sys/geom/eli/g_eli_integrity.c ============================================================================== --- stable/9/sys/geom/eli/g_eli_integrity.c Wed May 16 00:37:15 2012 (r235497) +++ stable/9/sys/geom/eli/g_eli_integrity.c Wed May 16 00:37:37 2012 (r235498) @@ -205,8 +205,8 @@ g_eli_auth_read_done(struct cryptop *crp * Report previous corruption if there was one. */ if (coroff != -1) { - G_ELI_DEBUG(0, "%s: %jd bytes " - "corrupted at offset %jd.", + G_ELI_DEBUG(0, "%s: Failed to authenticate %jd " + "bytes of data at offset %jd.", sc->sc_name, (intmax_t)corsize, (intmax_t)coroff); coroff = -1; @@ -221,7 +221,8 @@ g_eli_auth_read_done(struct cryptop *crp } /* Report previous corruption if there was one. */ if (coroff != -1) { - G_ELI_DEBUG(0, "%s: %jd bytes corrupted at offset %jd.", + G_ELI_DEBUG(0, "%s: Failed to authenticate %jd " + "bytes of data at offset %jd.", sc->sc_name, (intmax_t)corsize, (intmax_t)coroff); } } From owner-svn-src-all@FreeBSD.ORG Wed May 16 01:39:36 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3559106564A; Wed, 16 May 2012 01:39:36 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper-int.allbsd.org [IPv6:2001:2f0:104:e002::2]) by mx1.freebsd.org (Postfix) with ESMTP id C33698FC08; Wed, 16 May 2012 01:39:35 +0000 (UTC) Received: from alph.allbsd.org (p4242-ipbf1504funabasi.chiba.ocn.ne.jp [118.7.211.242]) (authenticated bits=128) by mail.allbsd.org (8.14.4/8.14.4) with ESMTP id q4G1dC4T083655; Wed, 16 May 2012 10:39:22 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.allbsd.org (8.14.4/8.14.4) with ESMTP id q4G1dBkY026618; Wed, 16 May 2012 10:39:12 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Wed, 16 May 2012 10:38:42 +0900 (JST) Message-Id: <20120516.103842.730056917692339809.hrs@allbsd.org> To: gjb@FreeBSD.org From: Hiroki Sato In-Reply-To: <201205121508.q4CF8MLI039258@svn.freebsd.org> References: <201205121508.q4CF8MLI039258@svn.freebsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.4.50 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Wed_May_16_10_38_42_2012_091)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.3 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (mail.allbsd.org [133.31.130.32]); Wed, 16 May 2012 10:39:28 +0900 (JST) X-Spam-Status: No, score=-104.1 required=13.0 tests=BAYES_00, CONTENT_TYPE_PRESENT,RCVD_IN_RP_RNBL,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r235337 - in head: lib/libutil sbin/hastd sbin/iscontrol share/man/man5 share/termcap usr.sbin/jail usr.sbin/ntp/doc usr.sbin/wpa/hostapd usr.sbin/wpa/wpa_supplicant X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 01:39:36 -0000 ----Security_Multipart(Wed_May_16_10_38_42_2012_091)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Glen Barber wrote in <201205121508.q4CF8MLI039258@svn.freebsd.org>: gj> Author: gjb (doc committer) gj> Date: Sat May 12 15:08:22 2012 gj> New Revision: 235337 gj> URL: http://svn.freebsd.org/changeset/base/235337 gj> gj> Log: gj> General mdoc(7) and typo fixes. gj> gj> PR: 167804 gj> Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) gj> MFC after: 3 days gj> gj> Modified: gj> head/lib/libutil/login.conf.5 gj> head/sbin/hastd/hast.conf.5 gj> head/sbin/iscontrol/iscsi.conf.5 gj> head/share/man/man5/device.hints.5 gj> head/share/man/man5/make.conf.5 gj> head/share/man/man5/nsmb.conf.5 gj> head/share/man/man5/portsnap.conf.5 gj> head/share/man/man5/rc.conf.5 gj> head/share/termcap/termcap.5 gj> head/usr.sbin/jail/jail.conf.5 gj> head/usr.sbin/ntp/doc/ntp.conf.5 gj> head/usr.sbin/wpa/hostapd/hostapd.conf.5 gj> head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 gj> (snip) gj> Optionally, WPA PSKs can be read from a separate text file (containing a gj> -list of (PSK,MAC address) pairs. gj> +list of PSK,MAC address pairs). I think "containing list of (PSK, MAC address) pairs." or "containing a list of PSK and MAC address pairs." is better for this part. -- Hiroki ----Security_Multipart(Wed_May_16_10_38_42_2012_091)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAk+zBSIACgkQTyzT2CeTzy2H7ACeK1cT4BPj1+g9lvKOFhr7PAa7 gG0An2NF9j7Wg8L9PsQ7gpzRF2mflAIO =BZrz -----END PGP SIGNATURE----- ----Security_Multipart(Wed_May_16_10_38_42_2012_091)---- From owner-svn-src-all@FreeBSD.ORG Wed May 16 01:59:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2F531065673; Wed, 16 May 2012 01:59:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD5EC8FC0C; Wed, 16 May 2012 01:59:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4G1x9jl017021; Wed, 16 May 2012 01:59:09 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4G1x9Fc017019; Wed, 16 May 2012 01:59:09 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205160159.q4G1x9Fc017019@svn.freebsd.org> From: Glen Barber Date: Wed, 16 May 2012 01:59:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235499 - head/usr.sbin/wpa/hostapd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 01:59:09 -0000 Author: gjb (doc committer) Date: Wed May 16 01:59:09 2012 New Revision: 235499 URL: http://svn.freebsd.org/changeset/base/235499 Log: Reword hostapd.conf(5) sentence. Suggested by: hrs MFC after: 3 days X-MFC-With: r235337 (a bit delayed...) Modified: head/usr.sbin/wpa/hostapd/hostapd.conf.5 Modified: head/usr.sbin/wpa/hostapd/hostapd.conf.5 ============================================================================== --- head/usr.sbin/wpa/hostapd/hostapd.conf.5 Wed May 16 00:37:37 2012 (r235498) +++ head/usr.sbin/wpa/hostapd/hostapd.conf.5 Wed May 16 01:59:09 2012 (r235499) @@ -172,8 +172,8 @@ will be converted to PSK. This conversion uses SSID so the PSK changes when ASCII passphrase is used and the SSID is changed. .It Va wpa_psk_file -Optionally, WPA PSKs can be read from a separate text file (containing a -list of PSK,MAC address pairs). +Optionally, WPA PSKs can be read from a separate text file containing a +list of PSK and MAC address pairs. .It Va wpa_key_mgmt Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). .It Va wpa_pairwise From owner-svn-src-all@FreeBSD.ORG Wed May 16 02:00:28 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8243106567C for ; Wed, 16 May 2012 02:00:28 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from glenbarber.us (onyx.glenbarber.us [199.48.134.227]) by mx1.freebsd.org (Postfix) with SMTP id 5935C8FC17 for ; Wed, 16 May 2012 02:00:27 +0000 (UTC) Received: (qmail 78785 invoked by uid 0); 15 May 2012 22:00:27 -0400 Received: from unknown (HELO glenbarber.us) (76.124.49.145) by 0 with SMTP; 15 May 2012 22:00:27 -0400 Date: Tue, 15 May 2012 22:00:25 -0400 From: Glen Barber To: Hiroki Sato Message-ID: <20120516020025.GC1374@glenbarber.us> References: <201205121508.q4CF8MLI039258@svn.freebsd.org> <20120516.103842.730056917692339809.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mvpLiMfbWzRoNl4x" Content-Disposition: inline In-Reply-To: <20120516.103842.730056917692339809.hrs@allbsd.org> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r235337 - in head: lib/libutil sbin/hastd sbin/iscontrol share/man/man5 share/termcap usr.sbin/jail usr.sbin/ntp/doc usr.sbin/wpa/hostapd usr.sbin/wpa/wpa_supplicant X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 02:00:28 -0000 --mvpLiMfbWzRoNl4x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 16, 2012 at 10:38:42AM +0900, Hiroki Sato wrote: > gj> Optionally, WPA PSKs can be read from a separate text file (containi= ng a > gj> -list of (PSK,MAC address) pairs. > gj> +list of PSK,MAC address pairs). >=20 > I think "containing list of (PSK, MAC address) pairs." or "containing > a list of PSK and MAC address pairs." is better for this part. >=20 Agreed. I have just committed a change with the latter suggestion. Glen --mvpLiMfbWzRoNl4x Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBCAAGBQJPswo5AAoJEFJPDDeguUaj+hsH/jyxIuzWUlr2HWfCoZBATdJf EZ71VU9GQdko+0JzzjQncjVL6PjQkfMydupaD6W+p/IU9SMfLtPzC3jSYuDU3p4C tr6APHLMKox/z163boKZshsy/evegOwFNhS+GCwMPKRAzQpMfv9GJiJG+xVZ5Ayd RKdQe3GnlyoLsrg8SyNw6UgnVY3/cEcnQM/ZDnFSsRRrhSmkFj1z62KP7dIWzIPa 3TrW5ma35kd90DwX39t+B7yernDzgx9mTpIRE66cqUzw6uPgmrbeY7LqIAc62LRI H7400Vk26p6TMBbmK3tUeHDDyInlHbafbFCog3t7wcUKqce1usbWqL/og78gUzI= =spok -----END PGP SIGNATURE----- --mvpLiMfbWzRoNl4x-- From owner-svn-src-all@FreeBSD.ORG Wed May 16 04:21:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA790106566B; Wed, 16 May 2012 04:21:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CDCC8FC14; Wed, 16 May 2012 04:21:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4G4LM4o021984; Wed, 16 May 2012 04:21:22 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4G4LMFo021982; Wed, 16 May 2012 04:21:22 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201205160421.q4G4LMFo021982@svn.freebsd.org> From: Warner Losh Date: Wed, 16 May 2012 04:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235500 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 04:21:22 -0000 Author: imp Date: Wed May 16 04:21:21 2012 New Revision: 235500 URL: http://svn.freebsd.org/changeset/base/235500 Log: By request, add back support from 7.0 and newer, since the changes for that are so minimal. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed May 16 01:59:09 2012 (r235499) +++ head/Makefile.inc1 Wed May 16 04:21:21 2012 (r235500) @@ -978,8 +978,8 @@ update: # legacy: Build compatibility shims for the next three targets # legacy: -.if ${BOOTSTRAPPING} < 800107 && ${BOOTSTRAPPING} != 0 - @echo "ERROR: Source upgrades from versions prior to 8.0 not supported."; \ +.if ${BOOTSTRAPPING} < 700055 && ${BOOTSTRAPPING} != 0 + @echo "ERROR: Source upgrades from versions prior to 7.0 not supported."; \ false .endif .for _tool in tools/build @@ -1007,6 +1007,10 @@ _gperf= gnu/usr.bin/gperf _groff= gnu/usr.bin/groff .endif +.if ${BOOTSTRAPPING} < 800013 +_mklocale= usr.bin/mklocale +.endif + .if ${BOOTSTRAPPING} < 900002 _sed= usr.bin/sed .endif @@ -1020,7 +1024,7 @@ _yacc= usr.bin/yacc _awk= usr.bin/awk .endif -.if ${MK_BSNMP} != "no" && !exists(/usr/sbin/gensnmptree) +.if ${MK_BSNMP} != "no" && !exists(/usr/sbin/gensnmptree) _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif @@ -1034,7 +1038,9 @@ _clang_tblgen= \ # dtrace tools are required for older bootstrap env and cross-build .if ${MK_CDDL} != "no" && \ - (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH}) + ((${BOOTSTRAPPING} < 800038 && \ + !(${BOOTSTRAPPING} >= 700112 && ${BOOTSTRAPPING} < 799999)) \ + || (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH})) _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \ lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge .endif @@ -1067,6 +1073,7 @@ bootstrap-tools: ${_awk} \ usr.bin/lorder \ usr.bin/makewhatis \ + ${_mklocale} \ usr.bin/rpcgen \ ${_sed} \ ${_lex} \ @@ -1132,7 +1139,7 @@ build-tools: # # cross-tools: Build cross-building tools # -.if ${TARGET_ARCH} != ${MACHINE_ARCH} +.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 800035 .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" _btxld= usr.sbin/btxld .endif From owner-svn-src-all@FreeBSD.ORG Wed May 16 08:26:24 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96A111065675; Wed, 16 May 2012 08:26:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id D56458FC08; Wed, 16 May 2012 08:26:22 +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 LAA21283; Wed, 16 May 2012 11:26:20 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SUZYq-000NyW-Bs; Wed, 16 May 2012 11:26:20 +0300 Message-ID: <4FB364AA.2070505@FreeBSD.org> Date: Wed, 16 May 2012 11:26:18 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: Konstantin Belousov References: <201205151721.q4FHLlgq097452@svn.freebsd.org> <20120515182747.GD2358@deviant.kiev.zoral.com.ua> <4FB2B7C5.2080604@FreeBSD.org> <20120515203832.GE2358@deviant.kiev.zoral.com.ua> In-Reply-To: <20120515203832.GE2358@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-9@FreeBSD.org Subject: Re: svn commit: r235480 - in stable/9/sys: dev/usb geom geom/mountver i386/conf kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 08:26:24 -0000 on 15/05/2012 23:38 Konstantin Belousov said the following: > On Tue, May 15, 2012 at 11:08:37PM +0300, Andriy Gapon wrote: >> on 15/05/2012 21:27 Konstantin Belousov said the following: >>> Did you verified that there is a gap between td_lk_slocks and >>> td_blocked an all tier-1 architectures large enough to adopt >>> td_stopsched without changing the layout of struct thread after the new >>> member ? >> >> I haven't verified that. but I presumed that the gap was either 2 bytes >> on 32-bit architectures or 6 bytes on 64-bit ones. What is the proper and >> doable way of verifying this? > I think that p sizeof(struct thread) from gdb on previous and current > version of the kernel would be a good indicator. If sizes differ, it is > bad. > > To be completely sure, calculate offset of the next member in the > structure: in gdb, p &(((struct thread *)0)->td_blocked) for previous and > current kernels. This sounds a bit laborious. It really did :-) Until I realized that tier-1 is just i386 and amd64. So, I've just verified that neither the size nor the offset change on either platform. Thanks again! >> >>> If not, this breaks KBI. >> >> I can just revert the commit to not risk an obscure breakage. What would >> you suggest? > Move the new member to the end of the struct thread, and do explicit > zeroing on the thread allocation, if commit changed the layout. As Attilio said, this wouldn't be much better than just reverting the change. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed May 16 09:03:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9CFF106564A; Wed, 16 May 2012 09:03:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2A7C8FC12; Wed, 16 May 2012 09:03:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4G93UD3031732; Wed, 16 May 2012 09:03:30 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4G93UWt031712; Wed, 16 May 2012 09:03:30 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205160903.q4G93UWt031712@svn.freebsd.org> From: Andriy Gapon Date: Wed, 16 May 2012 09:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235502 - in stable/8/sys: cddl/contrib/opensolaris/uts/common/dtrace dev/usb geom i386/conf kern security/mac sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 09:03:31 -0000 Author: avg Date: Wed May 16 09:03:29 2012 New Revision: 235502 URL: http://svn.freebsd.org/changeset/base/235502 Log: MFC r228424,228448,230643: panic: add a switch and infrastructure for stopping other CPUs in SMP case Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/8/sys/dev/usb/usb_transfer.c stable/8/sys/geom/geom_bsd.c stable/8/sys/geom/geom_mbr.c stable/8/sys/geom/geom_pc98.c stable/8/sys/kern/kern_lock.c stable/8/sys/kern/kern_mutex.c stable/8/sys/kern/kern_rmlock.c stable/8/sys/kern/kern_rwlock.c stable/8/sys/kern/kern_shutdown.c stable/8/sys/kern/kern_sx.c stable/8/sys/kern/kern_synch.c stable/8/sys/kern/subr_kdb.c stable/8/sys/kern/subr_lock.c stable/8/sys/kern/subr_witness.c stable/8/sys/security/mac/mac_priv.c stable/8/sys/sys/mutex.h stable/8/sys/sys/proc.h stable/8/sys/sys/systm.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Wed May 16 09:03:29 2012 (r235502) @@ -5877,6 +5877,9 @@ dtrace_probe(dtrace_id_t id, uintptr_t a volatile uint16_t *flags; hrtime_t now; + if (panicstr != NULL) + return; + #if defined(sun) /* * Kick out immediately if this CPU is still being born (in which case Modified: stable/8/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/8/sys/dev/usb/usb_transfer.c Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/dev/usb/usb_transfer.c Wed May 16 09:03:29 2012 (r235502) @@ -42,6 +42,7 @@ #include #include #include +#include #include #include Modified: stable/8/sys/geom/geom_bsd.c ============================================================================== --- stable/8/sys/geom/geom_bsd.c Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/geom/geom_bsd.c Wed May 16 09:03:29 2012 (r235502) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/8/sys/geom/geom_mbr.c ============================================================================== --- stable/8/sys/geom/geom_mbr.c Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/geom/geom_mbr.c Wed May 16 09:03:29 2012 (r235502) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/8/sys/geom/geom_pc98.c ============================================================================== --- stable/8/sys/geom/geom_pc98.c Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/geom/geom_pc98.c Wed May 16 09:03:29 2012 (r235502) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/8/sys/kern/kern_lock.c ============================================================================== --- stable/8/sys/kern/kern_lock.c Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/kern/kern_lock.c Wed May 16 09:03:29 2012 (r235502) @@ -1207,6 +1207,9 @@ _lockmgr_disown(struct lock *lk, const c { uintptr_t tid, x; + if (SCHEDULER_STOPPED()) + return; + tid = (uintptr_t)curthread; _lockmgr_assert(lk, KA_XLOCKED | KA_NOTRECURSED, file, line); Modified: stable/8/sys/kern/kern_mutex.c ============================================================================== --- stable/8/sys/kern/kern_mutex.c Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/kern/kern_mutex.c Wed May 16 09:03:29 2012 (r235502) @@ -191,6 +191,8 @@ void _mtx_lock_flags(struct mtx *m, int opts, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_lock() of destroyed mutex @ %s:%d", file, line)); @@ -210,6 +212,9 @@ _mtx_lock_flags(struct mtx *m, int opts, void _mtx_unlock_flags(struct mtx *m, int opts, const char *file, int line) { + + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_unlock() of destroyed mutex @ %s:%d", file, line)); @@ -231,6 +236,8 @@ void _mtx_lock_spin_flags(struct mtx *m, int opts, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_lock_spin() of destroyed mutex @ %s:%d", file, line)); @@ -253,6 +260,8 @@ void _mtx_unlock_spin_flags(struct mtx *m, int opts, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_unlock_spin() of destroyed mutex @ %s:%d", file, line)); @@ -281,6 +290,9 @@ _mtx_trylock(struct mtx *m, int opts, co #endif int rval; + if (SCHEDULER_STOPPED()) + return (1); + MPASS(curthread != NULL); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_trylock() of destroyed mutex @ %s:%d", file, line)); @@ -337,6 +349,9 @@ _mtx_lock_sleep(struct mtx *m, uintptr_t int64_t sleep_time = 0; #endif + if (SCHEDULER_STOPPED()) + return; + if (mtx_owned(m)) { KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0, ("_mtx_lock_sleep: recursed on non-recursive mutex %s @ %s:%d\n", @@ -507,6 +522,9 @@ _mtx_lock_spin(struct mtx *m, uintptr_t uint64_t waittime = 0; #endif + if (SCHEDULER_STOPPED()) + return; + if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spinning", m); @@ -554,6 +572,10 @@ _thread_lock_flags(struct thread *td, in i = 0; tid = (uintptr_t)curthread; + + if (SCHEDULER_STOPPED()) + return; + for (;;) { retry: spinlock_enter(); @@ -655,6 +677,9 @@ _mtx_unlock_sleep(struct mtx *m, int opt { struct turnstile *ts; + if (SCHEDULER_STOPPED()) + return; + if (mtx_recursed(m)) { if (--(m->mtx_recurse) == 0) atomic_clear_ptr(&m->mtx_lock, MTX_RECURSED); Modified: stable/8/sys/kern/kern_rmlock.c ============================================================================== --- stable/8/sys/kern/kern_rmlock.c Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/kern/kern_rmlock.c Wed May 16 09:03:29 2012 (r235502) @@ -315,6 +315,9 @@ _rm_rlock(struct rmlock *rm, struct rm_p struct thread *td = curthread; struct pcpu *pc; + if (SCHEDULER_STOPPED()) + return; + tracker->rmp_flags = 0; tracker->rmp_thread = td; tracker->rmp_rmlock = rm; @@ -383,6 +386,9 @@ _rm_runlock(struct rmlock *rm, struct rm struct pcpu *pc; struct thread *td = tracker->rmp_thread; + if (SCHEDULER_STOPPED()) + return; + td->td_critnest++; /* critical_enter(); */ pc = cpuid_to_pcpu[td->td_oncpu]; /* pcpu_find(td->td_oncpu); */ rm_tracker_remove(pc, tracker); @@ -401,6 +407,9 @@ _rm_wlock(struct rmlock *rm) struct rm_priotracker *prio; struct turnstile *ts; + if (SCHEDULER_STOPPED()) + return; + mtx_lock(&rm->rm_lock); if (rm->rm_noreadtoken == 0) { @@ -447,6 +456,9 @@ _rm_wunlock(struct rmlock *rm) void _rm_wlock_debug(struct rmlock *rm, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; + WITNESS_CHECKORDER(&rm->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); @@ -464,6 +476,9 @@ void _rm_wunlock_debug(struct rmlock *rm, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; + curthread->td_locks--; WITNESS_UNLOCK(&rm->lock_object, LOP_EXCLUSIVE, file, line); LOCK_LOG_LOCK("RMWUNLOCK", &rm->lock_object, 0, 0, file, line); @@ -475,6 +490,9 @@ _rm_rlock_debug(struct rmlock *rm, struc const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; + WITNESS_CHECKORDER(&rm->lock_object, LOP_NEWORDER, file, line, NULL); _rm_rlock(rm, tracker); @@ -491,6 +509,9 @@ _rm_runlock_debug(struct rmlock *rm, str const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; + curthread->td_locks--; WITNESS_UNLOCK(&rm->lock_object, 0, file, line); LOCK_LOG_LOCK("RMRUNLOCK", &rm->lock_object, 0, 0, file, line); Modified: stable/8/sys/kern/kern_rwlock.c ============================================================================== --- stable/8/sys/kern/kern_rwlock.c Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/kern/kern_rwlock.c Wed May 16 09:03:29 2012 (r235502) @@ -229,6 +229,8 @@ void _rw_wlock(struct rwlock *rw, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_wlock() of destroyed rwlock @ %s:%d", file, line)); @@ -245,6 +247,9 @@ _rw_try_wlock(struct rwlock *rw, const c { int rval; + if (SCHEDULER_STOPPED()) + return (1); + KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_try_wlock() of destroyed rwlock @ %s:%d", file, line)); @@ -269,6 +274,8 @@ void _rw_wunlock(struct rwlock *rw, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_wunlock() of destroyed rwlock @ %s:%d", file, line)); @@ -313,6 +320,9 @@ _rw_rlock(struct rwlock *rw, const char int64_t sleep_time = 0; #endif + if (SCHEDULER_STOPPED()) + return; + KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_rlock() of destroyed rwlock @ %s:%d", file, line)); KASSERT(rw_wowner(rw) != curthread, @@ -495,6 +505,9 @@ _rw_try_rlock(struct rwlock *rw, const c { uintptr_t x; + if (SCHEDULER_STOPPED()) + return (1); + for (;;) { x = rw->rw_lock; KASSERT(rw->rw_lock != RW_DESTROYED, @@ -521,6 +534,9 @@ _rw_runlock(struct rwlock *rw, const cha struct turnstile *ts; uintptr_t x, v, queue; + if (SCHEDULER_STOPPED()) + return; + KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_runlock() of destroyed rwlock @ %s:%d", file, line)); _rw_assert(rw, RA_RLOCKED, file, line); @@ -646,6 +662,9 @@ _rw_wlock_hard(struct rwlock *rw, uintpt int64_t sleep_time = 0; #endif + if (SCHEDULER_STOPPED()) + return; + if (rw_wlocked(rw)) { KASSERT(rw->lock_object.lo_flags & LO_RECURSABLE, ("%s: recursing but non-recursive rw %s @ %s:%d\n", @@ -810,6 +829,9 @@ _rw_wunlock_hard(struct rwlock *rw, uint uintptr_t v; int queue; + if (SCHEDULER_STOPPED()) + return; + if (rw_wlocked(rw) && rw_recursed(rw)) { rw->rw_recurse--; if (LOCK_LOG_TEST(&rw->lock_object, 0)) @@ -872,6 +894,9 @@ _rw_try_upgrade(struct rwlock *rw, const struct turnstile *ts; int success; + if (SCHEDULER_STOPPED()) + return (1); + KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_try_upgrade() of destroyed rwlock @ %s:%d", file, line)); _rw_assert(rw, RA_RLOCKED, file, line); @@ -942,6 +967,9 @@ _rw_downgrade(struct rwlock *rw, const c uintptr_t tid, v; int rwait, wwait; + if (SCHEDULER_STOPPED()) + return; + KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_downgrade() of destroyed rwlock @ %s:%d", file, line)); _rw_assert(rw, RA_WLOCKED | RA_NOTRECURSED, file, line); Modified: stable/8/sys/kern/kern_shutdown.c ============================================================================== --- stable/8/sys/kern/kern_shutdown.c Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/kern/kern_shutdown.c Wed May 16 09:03:29 2012 (r235502) @@ -121,6 +121,11 @@ SYSCTL_INT(_kern, OID_AUTO, sync_on_pani &sync_on_panic, 0, "Do a sync before rebooting from a panic"); TUNABLE_INT("kern.sync_on_panic", &sync_on_panic); +static int stop_scheduler_on_panic = 0; +SYSCTL_INT(_kern, OID_AUTO, stop_scheduler_on_panic, CTLFLAG_RW | CTLFLAG_TUN, + &stop_scheduler_on_panic, 0, "stop scheduler upon entering panic"); +TUNABLE_INT("kern.stop_scheduler_on_panic", &stop_scheduler_on_panic); + SYSCTL_NODE(_kern, OID_AUTO, shutdown, CTLFLAG_RW, 0, "Shutdown environment"); #ifndef DIAGNOSTIC @@ -292,10 +297,12 @@ boot(int howto) * systems don't shutdown properly (i.e., ACPI power off) if we * run on another processor. */ - thread_lock(curthread); - sched_bind(curthread, 0); - thread_unlock(curthread); - KASSERT(PCPU_GET(cpuid) == 0, ("boot: not running on cpu 0")); + if (!SCHEDULER_STOPPED()) { + thread_lock(curthread); + sched_bind(curthread, 0); + thread_unlock(curthread); + KASSERT(PCPU_GET(cpuid) == 0, ("boot: not running on cpu 0")); + } #endif /* We're in the process of rebooting. */ rebooting = 1; @@ -551,7 +558,11 @@ panic(const char *fmt, ...) va_list ap; static char buf[256]; - critical_enter(); + if (stop_scheduler_on_panic) + spinlock_enter(); + else + critical_enter(); + #ifdef SMP /* * We don't want multiple CPU's to panic at the same time, so we @@ -564,6 +575,19 @@ panic(const char *fmt, ...) PCPU_GET(cpuid)) == 0) while (panic_cpu != NOCPU) ; /* nothing */ + + if (stop_scheduler_on_panic) { + if (panicstr == NULL && !kdb_active) + stop_cpus_hard(PCPU_GET(other_cpus)); + + /* + * We set stop_scheduler here and not in the block above, + * because we want to ensure that if panic has been called and + * stop_scheduler_on_panic is true, then stop_scheduler will + * always be set. Even if panic has been entered from kdb. + */ + td->td_stopsched = 1; + } #endif bootopt = RB_AUTOBOOT | RB_DUMP; @@ -610,7 +634,8 @@ panic(const char *fmt, ...) /* thread_unlock(td); */ if (!sync_on_panic) bootopt |= RB_NOSYNC; - critical_exit(); + if (!stop_scheduler_on_panic) + critical_exit(); boot(bootopt); } Modified: stable/8/sys/kern/kern_sx.c ============================================================================== --- stable/8/sys/kern/kern_sx.c Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/kern/kern_sx.c Wed May 16 09:03:29 2012 (r235502) @@ -238,6 +238,8 @@ _sx_slock(struct sx *sx, int opts, const { int error = 0; + if (SCHEDULER_STOPPED()) + return (0); MPASS(curthread != NULL); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_slock() of destroyed sx @ %s:%d", file, line)); @@ -257,6 +259,9 @@ _sx_try_slock(struct sx *sx, const char { uintptr_t x; + if (SCHEDULER_STOPPED()) + return (1); + for (;;) { x = sx->sx_lock; KASSERT(x != SX_LOCK_DESTROYED, @@ -280,6 +285,8 @@ _sx_xlock(struct sx *sx, int opts, const { int error = 0; + if (SCHEDULER_STOPPED()) + return (0); MPASS(curthread != NULL); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_xlock() of destroyed sx @ %s:%d", file, line)); @@ -301,6 +308,9 @@ _sx_try_xlock(struct sx *sx, const char { int rval; + if (SCHEDULER_STOPPED()) + return (1); + MPASS(curthread != NULL); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_try_xlock() of destroyed sx @ %s:%d", file, line)); @@ -327,6 +337,8 @@ void _sx_sunlock(struct sx *sx, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_sunlock() of destroyed sx @ %s:%d", file, line)); @@ -342,6 +354,8 @@ void _sx_xunlock(struct sx *sx, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_xunlock() of destroyed sx @ %s:%d", file, line)); @@ -366,6 +380,9 @@ _sx_try_upgrade(struct sx *sx, const cha uintptr_t x; int success; + if (SCHEDULER_STOPPED()) + return (1); + KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_try_upgrade() of destroyed sx @ %s:%d", file, line)); _sx_assert(sx, SA_SLOCKED, file, line); @@ -396,6 +413,9 @@ _sx_downgrade(struct sx *sx, const char uintptr_t x; int wakeup_swapper; + if (SCHEDULER_STOPPED()) + return; + KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_downgrade() of destroyed sx @ %s:%d", file, line)); _sx_assert(sx, SA_XLOCKED | SA_NOTRECURSED, file, line); @@ -478,6 +498,9 @@ _sx_xlock_hard(struct sx *sx, uintptr_t int64_t sleep_time = 0; #endif + if (SCHEDULER_STOPPED()) + return (0); + /* If we already hold an exclusive lock, then recurse. */ if (sx_xlocked(sx)) { KASSERT((sx->lock_object.lo_flags & LO_RECURSABLE) != 0, @@ -678,6 +701,9 @@ _sx_xunlock_hard(struct sx *sx, uintptr_ uintptr_t x; int queue, wakeup_swapper; + if (SCHEDULER_STOPPED()) + return; + MPASS(!(sx->sx_lock & SX_LOCK_SHARED)); /* If the lock is recursed, then unrecurse one level. */ @@ -750,6 +776,9 @@ _sx_slock_hard(struct sx *sx, int opts, int64_t sleep_time = 0; #endif + if (SCHEDULER_STOPPED()) + return (0); + /* * As with rwlocks, we don't make any attempt to try to block * shared locks once there is an exclusive waiter. @@ -916,6 +945,9 @@ _sx_sunlock_hard(struct sx *sx, const ch uintptr_t x; int wakeup_swapper; + if (SCHEDULER_STOPPED()) + return; + for (;;) { x = sx->sx_lock; Modified: stable/8/sys/kern/kern_synch.c ============================================================================== --- stable/8/sys/kern/kern_synch.c Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/kern/kern_synch.c Wed May 16 09:03:29 2012 (r235502) @@ -158,7 +158,7 @@ _sleep(void *ident, struct lock_object * else class = NULL; - if (cold) { + if (cold || SCHEDULER_STOPPED()) { /* * During autoconfiguration, just return; * don't run any other threads or panic below, @@ -260,7 +260,7 @@ msleep_spin(void *ident, struct mtx *mtx KASSERT(p != NULL, ("msleep1")); KASSERT(ident != NULL && TD_IS_RUNNING(td), ("msleep")); - if (cold) { + if (cold || SCHEDULER_STOPPED()) { /* * During autoconfiguration, just return; * don't run any other threads or panic below, @@ -411,6 +411,8 @@ mi_switch(int flags, struct thread *newt */ if (kdb_active) kdb_switch(); + if (SCHEDULER_STOPPED()) + return; if (flags & SW_VOL) td->td_ru.ru_nvcsw++; else Modified: stable/8/sys/kern/subr_kdb.c ============================================================================== --- stable/8/sys/kern/subr_kdb.c Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/kern/subr_kdb.c Wed May 16 09:03:29 2012 (r235502) @@ -250,10 +250,7 @@ kdb_sysctl_trap_code(SYSCTL_HANDLER_ARGS void kdb_panic(const char *msg) { - -#ifdef SMP - stop_cpus_hard(PCPU_GET(other_cpus)); -#endif + printf("KDB: panic\n"); panic("%s", msg); } @@ -611,8 +608,11 @@ kdb_trap(int type, int code, struct trap intr = intr_disable(); #ifdef SMP - if ((did_stop_cpus = kdb_stop_cpus) != 0) - stop_cpus_hard(PCPU_GET(other_cpus)); + if (!SCHEDULER_STOPPED()) { + if ((did_stop_cpus = kdb_stop_cpus) != 0) + stop_cpus_hard(PCPU_GET(other_cpus)); + } else + did_stop_cpus = 0; #endif kdb_active++; Modified: stable/8/sys/kern/subr_lock.c ============================================================================== --- stable/8/sys/kern/subr_lock.c Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/kern/subr_lock.c Wed May 16 09:03:29 2012 (r235502) @@ -537,6 +537,9 @@ lock_profile_obtain_lock_success(struct struct lock_profile_object *l; int spin; + if (SCHEDULER_STOPPED()) + return; + /* don't reset the timer when/if recursing */ if (!lock_prof_enable || (lo->lo_flags & LO_NOPROFILE)) return; @@ -601,6 +604,8 @@ lock_profile_release_lock(struct lock_ob struct lpohead *head; int spin; + if (SCHEDULER_STOPPED()) + return; if (lo->lo_flags & LO_NOPROFILE) return; spin = (LOCK_CLASS(lo)->lc_flags & LC_SPINLOCK) ? 1 : 0; Modified: stable/8/sys/kern/subr_witness.c ============================================================================== --- stable/8/sys/kern/subr_witness.c Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/kern/subr_witness.c Wed May 16 09:03:29 2012 (r235502) @@ -2144,6 +2144,13 @@ witness_save(struct lock_object *lock, c struct lock_instance *instance; struct lock_class *class; + /* + * This function is used independently in locking code to deal with + * Giant, SCHEDULER_STOPPED() check can be removed here after Giant + * is gone. + */ + if (SCHEDULER_STOPPED()) + return; KASSERT(witness_cold == 0, ("%s: witness_cold", __func__)); if (lock->lo_witness == NULL || witness_watch == -1 || panicstr != NULL) return; @@ -2170,6 +2177,13 @@ witness_restore(struct lock_object *lock struct lock_instance *instance; struct lock_class *class; + /* + * This function is used independently in locking code to deal with + * Giant, SCHEDULER_STOPPED() check can be removed here after Giant + * is gone. + */ + if (SCHEDULER_STOPPED()) + return; KASSERT(witness_cold == 0, ("%s: witness_cold", __func__)); if (lock->lo_witness == NULL || witness_watch == -1 || panicstr != NULL) return; Modified: stable/8/sys/security/mac/mac_priv.c ============================================================================== --- stable/8/sys/security/mac/mac_priv.c Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/security/mac/mac_priv.c Wed May 16 09:03:29 2012 (r235502) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include "opt_mac.h" #include -#include #include #include #include Modified: stable/8/sys/sys/mutex.h ============================================================================== --- stable/8/sys/sys/mutex.h Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/sys/mutex.h Wed May 16 09:03:29 2012 (r235502) @@ -380,7 +380,8 @@ do { \ \ if (mtx_owned(&Giant)) { \ WITNESS_SAVE(&Giant.lock_object, Giant); \ - for (_giantcnt = 0; mtx_owned(&Giant); _giantcnt++) \ + for (_giantcnt = 0; mtx_owned(&Giant) && \ + !SCHEDULER_STOPPED(); _giantcnt++) \ mtx_unlock(&Giant); \ } Modified: stable/8/sys/sys/proc.h ============================================================================== --- stable/8/sys/sys/proc.h Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/sys/proc.h Wed May 16 09:03:29 2012 (r235502) @@ -229,6 +229,7 @@ struct thread { short td_locks; /* (k) Count of non-spin locks. */ short td_rw_rlocks; /* (k) Count of rwlock read locks. */ short td_lk_slocks; /* (k) Count of lockmgr shared locks. */ + short td_stopsched; /* (k) Scheduler stopped. */ struct turnstile *td_blocked; /* (t) Lock thread is blocked on. */ const char *td_lockname; /* (t) Name of lock blocked on. */ LIST_HEAD(, turnstile) td_contested; /* (q) Contested locks. */ Modified: stable/8/sys/sys/systm.h ============================================================================== --- stable/8/sys/sys/systm.h Wed May 16 07:18:56 2012 (r235501) +++ stable/8/sys/sys/systm.h Wed May 16 09:03:29 2012 (r235502) @@ -111,6 +111,14 @@ enum VM_GUEST { VM_GUEST_NO = 0, VM_GUES ((uintptr_t)&(var) & (sizeof(void *) - 1)) == 0, msg) /* + * If we have already panic'd and this is the thread that called + * panic(), then don't block on any mutexes but silently succeed. + * Otherwise, the kernel will deadlock since the scheduler isn't + * going to run the thread that holds any lock we need. + */ +#define SCHEDULER_STOPPED() __predict_false(curthread->td_stopsched) + +/* * XXX the hints declarations are even more misplaced than most declarations * in this file, since they are needed in one file (per arch) and only used * in two files. From owner-svn-src-all@FreeBSD.ORG Wed May 16 10:44:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05C3A106564A; Wed, 16 May 2012 10:44:10 +0000 (UTC) (envelope-from gleb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E45808FC0A; Wed, 16 May 2012 10:44:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GAi9Cj038844; Wed, 16 May 2012 10:44:09 GMT (envelope-from gleb@svn.freebsd.org) Received: (from gleb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GAi91b038841; Wed, 16 May 2012 10:44:09 GMT (envelope-from gleb@svn.freebsd.org) Message-Id: <201205161044.q4GAi91b038841@svn.freebsd.org> From: Gleb Kurtsou Date: Wed, 16 May 2012 10:44:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235503 - in head/sys: fs/unionfs kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 10:44:10 -0000 Author: gleb Date: Wed May 16 10:44:09 2012 New Revision: 235503 URL: http://svn.freebsd.org/changeset/base/235503 Log: Skip directory entries with zero inode number during traversal. Entries with zero inode number are considered placeholders by libc and UFS. Fix remaining uses of VOP_READDIR in kernel: vop_stdvptocnp, unionfs. Sponsored by: Google Summer of Code 2011 Modified: head/sys/fs/unionfs/union_subr.c head/sys/kern/vfs_default.c Modified: head/sys/fs/unionfs/union_subr.c ============================================================================== --- head/sys/fs/unionfs/union_subr.c Wed May 16 09:03:29 2012 (r235502) +++ head/sys/fs/unionfs/union_subr.c Wed May 16 10:44:09 2012 (r235503) @@ -1184,7 +1184,7 @@ unionfs_check_rmdir(struct vnode *vp, st edp = (struct dirent*)&buf[sizeof(buf) - uio.uio_resid]; for (dp = (struct dirent*)buf; !error && dp < edp; dp = (struct dirent*)((caddr_t)dp + dp->d_reclen)) { - if (dp->d_type == DT_WHT || + if (dp->d_type == DT_WHT || dp->d_fileno == 0 || (dp->d_namlen == 1 && dp->d_name[0] == '.') || (dp->d_namlen == 2 && !bcmp(dp->d_name, "..", 2))) continue; Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Wed May 16 09:03:29 2012 (r235502) +++ head/sys/kern/vfs_default.c Wed May 16 10:44:09 2012 (r235503) @@ -343,8 +343,8 @@ dirent_exists(struct vnode *vp, const ch if (error) goto out; - if ((dp->d_type != DT_WHT) && - !strcmp(dp->d_name, dirname)) { + if (dp->d_type != DT_WHT && dp->d_fileno != 0 && + strcmp(dp->d_name, dirname) == 0) { found = 1; goto out; } From owner-svn-src-all@FreeBSD.ORG Wed May 16 10:47:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 790DE106564A; Wed, 16 May 2012 10:47:14 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 640388FC0C; Wed, 16 May 2012 10:47:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GAlEtu038983; Wed, 16 May 2012 10:47:14 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GAlEhx038980; Wed, 16 May 2012 10:47:14 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205161047.q4GAlEhx038980@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 16 May 2012 10:47:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235504 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 10:47:14 -0000 Author: bz Date: Wed May 16 10:47:13 2012 New Revision: 235504 URL: http://svn.freebsd.org/changeset/base/235504 Log: Welcome David C Somayajulu (davidcs). He's doing the Qlogic network drivers as in qlxgb(4) and another upcoming one. bz to mentor for now. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Wed May 16 10:44:09 2012 (r235503) +++ svnadmin/conf/access Wed May 16 10:47:13 2012 (r235504) @@ -59,6 +59,7 @@ darrenr das davidc davidch +davidcs davide davidxu dchagin Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Wed May 16 10:44:09 2012 (r235503) +++ svnadmin/conf/mentors Wed May 16 10:47:13 2012 (r235504) @@ -15,6 +15,7 @@ art avg Co-mentor: marcel bapt des benl philip Co-mentor: simon bgray cognet +davidcs bz eadler cperciva eri mlaier Co-mentor: thompsa jceel wkoszek Co-mentor: cognet From owner-svn-src-all@FreeBSD.ORG Wed May 16 15:17:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8CF46106564A; Wed, 16 May 2012 15:17:52 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76F0E8FC0C; Wed, 16 May 2012 15:17:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GFHqdk048251; Wed, 16 May 2012 15:17:52 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GFHqdN048249; Wed, 16 May 2012 15:17:52 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201205161517.q4GFHqdN048249@svn.freebsd.org> From: Martin Matuska Date: Wed, 16 May 2012 15:17:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235507 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 15:17:52 -0000 Author: mm Date: Wed May 16 15:17:51 2012 New Revision: 235507 URL: http://svn.freebsd.org/changeset/base/235507 Log: MFC r228363 (pjd): The vfs.zfs.txg.timeout sysctl can be safely modified at run time. Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Wed May 16 12:05:55 2012 (r235506) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Wed May 16 15:17:51 2012 (r235507) @@ -43,7 +43,7 @@ int zfs_txg_timeout = 5; /* max seconds SYSCTL_DECL(_vfs_zfs); SYSCTL_NODE(_vfs_zfs, OID_AUTO, txg, CTLFLAG_RW, 0, "ZFS TXG"); TUNABLE_INT("vfs.zfs.txg.timeout", &zfs_txg_timeout); -SYSCTL_INT(_vfs_zfs_txg, OID_AUTO, timeout, CTLFLAG_RDTUN, &zfs_txg_timeout, 0, +SYSCTL_INT(_vfs_zfs_txg, OID_AUTO, timeout, CTLFLAG_RW, &zfs_txg_timeout, 0, "Maximum seconds worth of delta per txg"); /* From owner-svn-src-all@FreeBSD.ORG Wed May 16 15:53:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3115B106564A; Wed, 16 May 2012 15:53:39 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11DF18FC16; Wed, 16 May 2012 15:53:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GFrcMQ049501; Wed, 16 May 2012 15:53:38 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GFrcls049498; Wed, 16 May 2012 15:53:38 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201205161553.q4GFrcls049498@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 16 May 2012 15:53:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235508 - head/sys/fs/ext2fs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 15:53:39 -0000 Author: pfg Date: Wed May 16 15:53:38 2012 New Revision: 235508 URL: http://svn.freebsd.org/changeset/base/235508 Log: Fix a couple of issues that appear to be inherited from the old 8.x code: - If the lock cannot be acquired immediately unlocks 'bar' vnode and then locks both vnodes in order. - wrong vnode type panics from cache_enter_time after calls by ext2_lookup. The fix merges the fixes from ufs/ufs_lookup.c. Submitted by: Mateusz Guzik Approved by: jhb@ (mentor) Reviewed by: kib@ MFC after: 1 week Modified: head/sys/fs/ext2fs/ext2_lookup.c head/sys/fs/ext2fs/ext2_vnops.c Modified: head/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- head/sys/fs/ext2fs/ext2_lookup.c Wed May 16 15:17:51 2012 (r235507) +++ head/sys/fs/ext2fs/ext2_lookup.c Wed May 16 15:53:38 2012 (r235508) @@ -115,6 +115,8 @@ static u_char dt_to_ext2_ft[] = { static int ext2_dirbadentry(struct vnode *dp, struct ext2fs_direct_2 *de, int entryoffsetinblock); +static int ext2_lookup_ino(struct vnode *vdp, struct vnode **vpp, + struct componentname *cnp, ino_t *dd_ino); /* * Vnode op for reading directories. @@ -285,7 +287,14 @@ ext2_lookup(ap) struct componentname *a_cnp; } */ *ap; { - struct vnode *vdp; /* vnode for directory being searched */ + + return (ext2_lookup_ino(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL)); +} + +static int +ext2_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, + ino_t *dd_ino) +{ struct inode *dp; /* inode for directory being searched */ struct buf *bp; /* a buffer of directory entries */ struct ext2fs_direct_2 *ep; /* the current directory entry */ @@ -305,22 +314,22 @@ ext2_lookup(ap) doff_t enduseful; /* pointer past last used dir slot */ u_long bmask; /* block offset mask */ int namlen, error; - struct vnode **vpp = ap->a_vpp; - struct componentname *cnp = ap->a_cnp; struct ucred *cred = cnp->cn_cred; int flags = cnp->cn_flags; int nameiop = cnp->cn_nameiop; - ino_t ino; + ino_t ino, ino1; int ltype; - int DIRBLKSIZ = VTOI(ap->a_dvp)->i_e2fs->e2fs_bsize; + int DIRBLKSIZ = VTOI(vdp)->i_e2fs->e2fs_bsize; + + if (vpp != NULL) + *vpp = NULL; - bp = NULL; - slotoffset = -1; - *vpp = NULL; - vdp = ap->a_dvp; dp = VTOI(vdp); bmask = VFSTOEXT2(vdp->v_mount)->um_mountp->mnt_stat.f_iosize - 1; +restart: + bp = NULL; + slotoffset = -1; /* * We now have a segment name to search for, and a directory to search. @@ -536,10 +545,12 @@ searchloop: * Insert name into cache (as non-existent) if appropriate. */ if ((cnp->cn_flags & MAKEENTRY) && nameiop != CREATE) - cache_enter(vdp, *vpp, cnp); + cache_enter(vdp, NULL, cnp); return (ENOENT); found: + if (dd_ino != NULL) + *dd_ino = ino; if (numdirpasses == 2) nchstats.ncs_pass2++; /* @@ -582,6 +593,8 @@ found: dp->i_count = 0; else dp->i_count = dp->i_offset - prevoff; + if (dd_ino != NULL) + return (0); if (dp->i_number == ino) { VREF(vdp); *vpp = vdp; @@ -622,6 +635,8 @@ found: */ if (dp->i_number == ino) return (EISDIR); + if (dd_ino != NULL) + return (0); if ((error = VFS_VGET(vdp->v_mount, ino, LK_EXCLUSIVE, &tdp)) != 0) return (error); @@ -629,6 +644,8 @@ found: cnp->cn_flags |= SAVENAME; return (0); } + if (dd_ino != NULL) + return (0); /* * Step through the translation in the name. We do not `vput' the @@ -655,8 +672,27 @@ found: VOP_UNLOCK(pdp, 0); /* race to get the inode */ error = VFS_VGET(vdp->v_mount, ino, cnp->cn_lkflags, &tdp); vn_lock(pdp, ltype | LK_RETRY); - if (error != 0) + if (pdp->v_iflag & VI_DOOMED) { + if (error == 0) + vput(tdp); + error = ENOENT; + } + if (error) return (error); + /* + * Recheck that ".." entry in the vdp directory points + * to the inode we looked up before vdp lock was + * dropped. + */ + error = ext2_lookup_ino(pdp, NULL, cnp, &ino1); + if (error) { + vput(tdp); + return (error); + } + if (ino1 != ino) { + vput(tdp); + goto restart; + } *vpp = tdp; } else if (dp->i_number == ino) { VREF(vdp); /* we want ourself, ie "." */ Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Wed May 16 15:17:51 2012 (r235507) +++ head/sys/fs/ext2fs/ext2_vnops.c Wed May 16 15:53:38 2012 (r235508) @@ -1336,7 +1336,11 @@ ext2_rmdir(ap) error = ext2_truncate(vp, (off_t)0, IO_SYNC, cnp->cn_cred, cnp->cn_thread); cache_purge(ITOV(ip)); - vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); + if (vn_lock(dvp, LK_EXCLUSIVE | LK_NOWAIT) != 0) { + VOP_UNLOCK(vp, 0); + vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + } out: return (error); } From owner-svn-src-all@FreeBSD.ORG Wed May 16 17:26:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5785F106566B; Wed, 16 May 2012 17:26:15 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41EA38FC14; Wed, 16 May 2012 17:26:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GHQFhS053533; Wed, 16 May 2012 17:26:15 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GHQF7L053531; Wed, 16 May 2012 17:26:15 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201205161726.q4GHQF7L053531@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 16 May 2012 17:26:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235509 - stable/8/usr.sbin/wake X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 17:26:15 -0000 Author: jh Date: Wed May 16 17:26:14 2012 New Revision: 235509 URL: http://svn.freebsd.org/changeset/base/235509 Log: MFC r232102: Exit with proper status when wake() fails. PR: bin/153527 Modified: stable/8/usr.sbin/wake/wake.c Directory Properties: stable/8/usr.sbin/wake/ (props changed) Modified: stable/8/usr.sbin/wake/wake.c ============================================================================== --- stable/8/usr.sbin/wake/wake.c Wed May 16 15:53:38 2012 (r235508) +++ stable/8/usr.sbin/wake/wake.c Wed May 16 17:26:14 2012 (r235509) @@ -165,14 +165,17 @@ send_wakeup(int bpf, struct ether_addr c int main(int argc, char *argv[]) { - int n; + int n, rval; if (argc < 3) usage(); - for (n = 2; n < argc; n++) - if (wake(argv[1], argv[n])) + for (n = 2; n < argc; n++) { + if (wake(argv[1], argv[n])) { + rval = 1; warnx("error sending Wake on LAN frame over %s to %s", argv[1], argv[n]); - return (0); + } + } + exit(rval); } From owner-svn-src-all@FreeBSD.ORG Wed May 16 17:51:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBD4F1065670; Wed, 16 May 2012 17:51:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D700E8FC1E; Wed, 16 May 2012 17:51:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GHpu7P054497; Wed, 16 May 2012 17:51:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GHpuce054494; Wed, 16 May 2012 17:51:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205161751.q4GHpuce054494@svn.freebsd.org> From: Alexander Motin Date: Wed, 16 May 2012 17:51:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235510 - in head: lib/libusbhid sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 17:51:57 -0000 Author: mav Date: Wed May 16 17:51:56 2012 New Revision: 235510 URL: http://svn.freebsd.org/changeset/base/235510 Log: HID Report ID is unsigned value, so clear the rest of bits from possible sign expansion. Modified: head/lib/libusbhid/parse.c head/sys/dev/usb/usb_hid.c Modified: head/lib/libusbhid/parse.c ============================================================================== --- head/lib/libusbhid/parse.c Wed May 16 17:26:14 2012 (r235509) +++ head/lib/libusbhid/parse.c Wed May 16 17:51:56 2012 (r235510) @@ -392,7 +392,7 @@ hid_get_item(hid_data_t s, hid_item_t *h s->loc_size = dval & mask; break; case 8: - hid_switch_rid(s, c, dval); + hid_switch_rid(s, c, dval & mask); break; case 9: /* mask because value is unsigned */ Modified: head/sys/dev/usb/usb_hid.c ============================================================================== --- head/sys/dev/usb/usb_hid.c Wed May 16 17:26:14 2012 (r235509) +++ head/sys/dev/usb/usb_hid.c Wed May 16 17:51:56 2012 (r235510) @@ -425,7 +425,7 @@ hid_get_item(struct hid_data *s, struct s->loc_size = dval & mask; break; case 8: - hid_switch_rid(s, c, dval); + hid_switch_rid(s, c, dval & mask); break; case 9: /* mask because value is unsigned */ From owner-svn-src-all@FreeBSD.ORG Wed May 16 19:25:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A24431065670; Wed, 16 May 2012 19:25:51 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C44A8FC12; Wed, 16 May 2012 19:25:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GJPoQB057936; Wed, 16 May 2012 19:25:50 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GJPoU2057934; Wed, 16 May 2012 19:25:50 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201205161925.q4GJPoU2057934@svn.freebsd.org> From: Christian Brueffer Date: Wed, 16 May 2012 19:25:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235511 - stable/9/sys/security/mac_mls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 19:25:51 -0000 Author: brueffer Date: Wed May 16 19:25:50 2012 New Revision: 235511 URL: http://svn.freebsd.org/changeset/base/235511 Log: MFC: r234957 Check vplabel for NULL before dereferencing it. Fixes a panic when running atop with MAC_MLS enabled. Modified: stable/9/sys/security/mac_mls/mac_mls.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/security/mac_mls/mac_mls.c ============================================================================== --- stable/9/sys/security/mac_mls/mac_mls.c Wed May 16 17:51:56 2012 (r235510) +++ stable/9/sys/security/mac_mls/mac_mls.c Wed May 16 19:25:50 2012 (r235511) @@ -2028,6 +2028,9 @@ mls_system_check_acct(struct ucred *cred if (!mls_enabled) return (0); + if (vplabel == NULL) + return (0); + subj = SLOT(cred->cr_label); obj = SLOT(vplabel); From owner-svn-src-all@FreeBSD.ORG Wed May 16 19:47:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E0301065670; Wed, 16 May 2012 19:47:03 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2863F8FC0A; Wed, 16 May 2012 19:47:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GJl3rI058734; Wed, 16 May 2012 19:47:03 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GJl21w058732; Wed, 16 May 2012 19:47:02 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201205161947.q4GJl21w058732@svn.freebsd.org> From: Christian Brueffer Date: Wed, 16 May 2012 19:47:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235512 - stable/8/sys/security/mac_mls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 19:47:03 -0000 Author: brueffer Date: Wed May 16 19:47:02 2012 New Revision: 235512 URL: http://svn.freebsd.org/changeset/base/235512 Log: MFC: r234957 Check vplabel for NULL before dereferencing it. Fixes a panic when running atop with MAC_MLS enabled. Modified: stable/8/sys/security/mac_mls/mac_mls.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/security/mac_mls/mac_mls.c ============================================================================== --- stable/8/sys/security/mac_mls/mac_mls.c Wed May 16 19:25:50 2012 (r235511) +++ stable/8/sys/security/mac_mls/mac_mls.c Wed May 16 19:47:02 2012 (r235512) @@ -1837,6 +1837,9 @@ mls_system_check_acct(struct ucred *cred if (!mls_enabled) return (0); + if (vplabel == NULL) + return (0); + subj = SLOT(cred->cr_label); obj = SLOT(vplabel); From owner-svn-src-all@FreeBSD.ORG Wed May 16 20:00:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4075A1065674; Wed, 16 May 2012 20:00:34 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B0978FC1A; Wed, 16 May 2012 20:00:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GK0YjC059285; Wed, 16 May 2012 20:00:34 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GK0XH3059283; Wed, 16 May 2012 20:00:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201205162000.q4GK0XH3059283@svn.freebsd.org> From: Xin LI Date: Wed, 16 May 2012 20:00:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235513 - stable/9/usr.sbin/lpr/lpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 20:00:34 -0000 Author: delphij Date: Wed May 16 20:00:33 2012 New Revision: 235513 URL: http://svn.freebsd.org/changeset/base/235513 Log: MFC r234244: The scandir(3) function expects fourth parameter, compar, be in type of: int (*compar)(const struct dirent **, const struct dirent **) The current code defines sortq() to accept two void *, then cast them to const struct dirent **. Because the code does not really need this cast, we can eliminate the casts by changing the function prototype to match scandir(3) expectation. Modified: stable/9/usr.sbin/lpr/lpc/cmds.c Directory Properties: stable/9/usr.sbin/lpr/ (props changed) Modified: stable/9/usr.sbin/lpr/lpc/cmds.c ============================================================================== --- stable/9/usr.sbin/lpr/lpc/cmds.c Wed May 16 19:47:02 2012 (r235512) +++ stable/9/usr.sbin/lpr/lpc/cmds.c Wed May 16 20:00:33 2012 (r235513) @@ -79,7 +79,7 @@ static char *args2line(int argc, char ** static int doarg(char *_job); static int doselect(struct dirent *_d); static int kill_qtask(const char *lf); -static int sortq(const void *_a, const void *_b); +static int sortq(const struct dirent **a, const struct dirent **b); static int touch(struct jobqueue *_jq); static void unlinkf(char *_name); static void upstat(struct printer *_pp, const char *_msg, int _notify); @@ -486,14 +486,14 @@ doselect(struct dirent *d) * filenames (they will have datafile names which start with `dfB*'). */ static int -sortq(const void *a, const void *b) +sortq(const struct dirent **a, const struct dirent **b) { const int a_lt_b = -1, a_gt_b = 1, cat_other = 10; const char *fname_a, *fname_b, *jnum_a, *jnum_b; int cat_a, cat_b, ch, res, seq_a, seq_b; - fname_a = (*(const struct dirent * const *)a)->d_name; - fname_b = (*(const struct dirent * const *)b)->d_name; + fname_a = (*a)->d_name; + fname_b = (*b)->d_name; /* * First separate filenames into cagatories. Catagories are From owner-svn-src-all@FreeBSD.ORG Wed May 16 20:02:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D49E7106566B; Wed, 16 May 2012 20:02:30 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81A798FC1A; Wed, 16 May 2012 20:02:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GK2Ufx059403; Wed, 16 May 2012 20:02:30 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GK2UpE059401; Wed, 16 May 2012 20:02:30 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201205162002.q4GK2UpE059401@svn.freebsd.org> From: Xin LI Date: Wed, 16 May 2012 20:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235514 - stable/8/usr.sbin/lpr/lpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 20:02:31 -0000 Author: delphij Date: Wed May 16 20:02:29 2012 New Revision: 235514 URL: http://svn.freebsd.org/changeset/base/235514 Log: MFC r234244: The scandir(3) function expects fourth parameter, compar, be in type of: int (*compar)(const struct dirent **, const struct dirent **) The current code defines sortq() to accept two void *, then cast them to const struct dirent **. Because the code does not really need this cast, we can eliminate the casts by changing the function prototype to match scandir(3) expectation. Modified: stable/8/usr.sbin/lpr/lpc/cmds.c Directory Properties: stable/8/usr.sbin/lpr/ (props changed) Modified: stable/8/usr.sbin/lpr/lpc/cmds.c ============================================================================== --- stable/8/usr.sbin/lpr/lpc/cmds.c Wed May 16 20:00:33 2012 (r235513) +++ stable/8/usr.sbin/lpr/lpc/cmds.c Wed May 16 20:02:29 2012 (r235514) @@ -83,7 +83,7 @@ static char *args2line(int argc, char ** static int doarg(char *_job); static int doselect(struct dirent *_d); static int kill_qtask(const char *lf); -static int sortq(const void *_a, const void *_b); +static int sortq(const struct dirent **a, const struct dirent **b); static int touch(struct jobqueue *_jq); static void unlinkf(char *_name); static void upstat(struct printer *_pp, const char *_msg, int _notify); @@ -490,14 +490,14 @@ doselect(struct dirent *d) * filenames (they will have datafile names which start with `dfB*'). */ static int -sortq(const void *a, const void *b) +sortq(const struct dirent **a, const struct dirent **b) { const int a_lt_b = -1, a_gt_b = 1, cat_other = 10; const char *fname_a, *fname_b, *jnum_a, *jnum_b; int cat_a, cat_b, ch, res, seq_a, seq_b; - fname_a = (*(const struct dirent * const *)a)->d_name; - fname_b = (*(const struct dirent * const *)b)->d_name; + fname_a = (*a)->d_name; + fname_b = (*b)->d_name; /* * First separate filenames into cagatories. Catagories are From owner-svn-src-all@FreeBSD.ORG Wed May 16 20:04:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9AB1E106564A; Wed, 16 May 2012 20:04:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82F0F8FC15; Wed, 16 May 2012 20:04:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GK4k8R059543; Wed, 16 May 2012 20:04:46 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GK4kJx059538; Wed, 16 May 2012 20:04:46 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205162004.q4GK4kJx059538@svn.freebsd.org> From: John Baldwin Date: Wed, 16 May 2012 20:04:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235515 - in stable/9/sys: amd64/amd64 i386/conf i386/i386 kern x86/include x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 20:04:46 -0000 Author: jhb Date: Wed May 16 20:04:45 2012 New Revision: 235515 URL: http://svn.freebsd.org/changeset/base/235515 Log: MFC 233709,233781,233793: - Don't malloc() new MCA records for machine checks logged due to a CMCI or MC# exception. Instead, use a pre-allocated pool of records. When a CMCI or MC# exception fires, schedule a task to refill the pool. The pool is sized to hold at least one record per available machine bank, and one record per CPU. This should handle the case of all CPUs triggering a single bank at once as well as the case a single CPU triggering all of its banks. The periodic scans still use malloc() since they are run from a safe context. - Make machine check exception logging more readable. On newer Intel systems, an uncorrected ECC error tends to fire on all CPUs in a package simultaneously and the current printf hacks are not sufficient to make the messages legible. Instead, use the existing mca_lock spinlock to serialize calls to mca_log() and change the machine check code to panic directly when an unrecoverable error is encoutered rather than falling back to a trap_fatal() call in trap() (which adds nearly a screen-full of logging messages that aren't useful for machine checks). Modified: stable/9/sys/amd64/amd64/trap.c stable/9/sys/i386/i386/trap.c stable/9/sys/x86/include/mca.h stable/9/sys/x86/x86/mca.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/amd64/amd64/trap.c ============================================================================== --- stable/9/sys/amd64/amd64/trap.c Wed May 16 20:02:29 2012 (r235514) +++ stable/9/sys/amd64/amd64/trap.c Wed May 16 20:04:45 2012 (r235515) @@ -230,8 +230,7 @@ trap(struct trapframe *frame) #endif if (type == T_MCHK) { - if (!mca_intr()) - trap_fatal(frame, 0); + mca_intr(); goto out; } Modified: stable/9/sys/i386/i386/trap.c ============================================================================== --- stable/9/sys/i386/i386/trap.c Wed May 16 20:02:29 2012 (r235514) +++ stable/9/sys/i386/i386/trap.c Wed May 16 20:04:45 2012 (r235515) @@ -251,8 +251,7 @@ trap(struct trapframe *frame) #endif if (type == T_MCHK) { - if (!mca_intr()) - trap_fatal(frame, 0); + mca_intr(); goto out; } Modified: stable/9/sys/x86/include/mca.h ============================================================================== --- stable/9/sys/x86/include/mca.h Wed May 16 20:02:29 2012 (r235514) +++ stable/9/sys/x86/include/mca.h Wed May 16 20:04:45 2012 (r235515) @@ -48,7 +48,7 @@ struct mca_record { void cmc_intr(void); void mca_init(void); -int mca_intr(void); +void mca_intr(void); void mca_resume(void); #endif Modified: stable/9/sys/x86/x86/mca.c ============================================================================== --- stable/9/sys/x86/x86/mca.c Wed May 16 20:02:29 2012 (r235514) +++ stable/9/sys/x86/x86/mca.c Wed May 16 20:04:45 2012 (r235515) @@ -85,6 +85,7 @@ struct mca_internal { static MALLOC_DEFINE(M_MCA, "MCA", "Machine Check Architecture"); static int mca_count; /* Number of records stored. */ +static int mca_banks; /* Number of per-CPU register banks. */ SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RD, NULL, "Machine Check Architecture"); @@ -102,16 +103,17 @@ int workaround_erratum383; SYSCTL_INT(_hw_mca, OID_AUTO, erratum383, CTLFLAG_RD, &workaround_erratum383, 0, "Is the workaround for Erratum 383 on AMD Family 10h processors enabled?"); +static STAILQ_HEAD(, mca_internal) mca_freelist; +static int mca_freecount; static STAILQ_HEAD(, mca_internal) mca_records; static struct callout mca_timer; static int mca_ticks = 3600; /* Check hourly by default. */ static struct taskqueue *mca_tq; -static struct task mca_task; +static struct task mca_refill_task, mca_scan_task; static struct mtx mca_lock; #ifdef DEV_APIC static struct cmc_state **cmc_state; /* Indexed by cpuid, bank */ -static int cmc_banks; static int cmc_throttle = 60; /* Time in seconds to throttle CMCI. */ #endif @@ -415,24 +417,63 @@ mca_check_status(int bank, struct mca_re return (1); } -static void __nonnull(1) -mca_record_entry(const struct mca_record *record) +static void +mca_fill_freelist(void) { struct mca_internal *rec; + int desired; - rec = malloc(sizeof(*rec), M_MCA, M_NOWAIT); - if (rec == NULL) { - printf("MCA: Unable to allocate space for an event.\n"); - mca_log(record); - return; + /* + * Ensure we have at least one record for each bank and one + * record per CPU. + */ + desired = imax(mp_ncpus, mca_banks); + mtx_lock_spin(&mca_lock); + while (mca_freecount < desired) { + mtx_unlock_spin(&mca_lock); + rec = malloc(sizeof(*rec), M_MCA, M_WAITOK); + mtx_lock_spin(&mca_lock); + STAILQ_INSERT_TAIL(&mca_freelist, rec, link); + mca_freecount++; + } + mtx_unlock_spin(&mca_lock); +} + +static void +mca_refill(void *context, int pending) +{ + + mca_fill_freelist(); +} + +static void __nonnull(2) +mca_record_entry(enum scan_mode mode, const struct mca_record *record) +{ + struct mca_internal *rec; + + if (mode == POLLED) { + rec = malloc(sizeof(*rec), M_MCA, M_WAITOK); + mtx_lock_spin(&mca_lock); + } else { + mtx_lock_spin(&mca_lock); + rec = STAILQ_FIRST(&mca_freelist); + if (rec == NULL) { + printf("MCA: Unable to allocate space for an event.\n"); + mca_log(record); + mtx_unlock_spin(&mca_lock); + return; + } + STAILQ_REMOVE_HEAD(&mca_freelist, link); + mca_freecount--; } rec->rec = *record; rec->logged = 0; - mtx_lock_spin(&mca_lock); STAILQ_INSERT_TAIL(&mca_records, rec, link); mca_count++; mtx_unlock_spin(&mca_lock); + if (mode == CMCI) + taskqueue_enqueue_fast(mca_tq, &mca_refill_task); } #ifdef DEV_APIC @@ -549,9 +590,11 @@ mca_scan(enum scan_mode mode) count++; if (rec.mr_status & ucmask) { recoverable = 0; + mtx_lock_spin(&mca_lock); mca_log(&rec); + mtx_unlock_spin(&mca_lock); } - mca_record_entry(&rec); + mca_record_entry(mode, &rec); } #ifdef DEV_APIC @@ -563,6 +606,8 @@ mca_scan(enum scan_mode mode) cmci_update(mode, i, valid, &rec); #endif } + if (mode == POLLED) + mca_fill_freelist(); return (mode == MCE ? recoverable : count); } @@ -578,6 +623,7 @@ mca_scan_cpus(void *context, int pending struct thread *td; int count, cpu; + mca_fill_freelist(); td = curthread; count = 0; thread_lock(td); @@ -594,9 +640,7 @@ mca_scan_cpus(void *context, int pending STAILQ_FOREACH(mca, &mca_records, link) { if (!mca->logged) { mca->logged = 1; - mtx_unlock_spin(&mca_lock); mca_log(&mca->rec); - mtx_lock_spin(&mca_lock); } } mtx_unlock_spin(&mca_lock); @@ -607,7 +651,7 @@ static void mca_periodic_scan(void *arg) { - taskqueue_enqueue(mca_tq, &mca_task); + taskqueue_enqueue_fast(mca_tq, &mca_scan_task); callout_reset(&mca_timer, mca_ticks * hz, mca_periodic_scan, NULL); } @@ -621,36 +665,43 @@ sysctl_mca_scan(SYSCTL_HANDLER_ARGS) if (error) return (error); if (i) - taskqueue_enqueue(mca_tq, &mca_task); + taskqueue_enqueue_fast(mca_tq, &mca_scan_task); return (0); } static void +mca_createtq(void *dummy) +{ + if (mca_banks <= 0) + return; + + mca_tq = taskqueue_create_fast("mca", M_WAITOK, + taskqueue_thread_enqueue, &mca_tq); + taskqueue_start_threads(&mca_tq, 1, PI_SWI(SWI_TQ), "mca taskq"); +} +SYSINIT(mca_createtq, SI_SUB_CONFIGURE, SI_ORDER_ANY, mca_createtq, NULL); + +static void mca_startup(void *dummy) { - if (!mca_enabled || !(cpu_feature & CPUID_MCA)) + if (mca_banks <= 0) return; - mca_tq = taskqueue_create("mca", M_WAITOK, taskqueue_thread_enqueue, - &mca_tq); - taskqueue_start_threads(&mca_tq, 1, PI_SWI(SWI_TQ), "mca taskq"); - callout_reset(&mca_timer, mca_ticks * hz, mca_periodic_scan, - NULL); + callout_reset(&mca_timer, mca_ticks * hz, mca_periodic_scan, NULL); } SYSINIT(mca_startup, SI_SUB_SMP, SI_ORDER_ANY, mca_startup, NULL); #ifdef DEV_APIC static void -cmci_setup(uint64_t mcg_cap) +cmci_setup(void) { int i; cmc_state = malloc((mp_maxid + 1) * sizeof(struct cmc_state **), M_MCA, M_WAITOK); - cmc_banks = mcg_cap & MCG_CAP_COUNT; for (i = 0; i <= mp_maxid; i++) - cmc_state[i] = malloc(sizeof(struct cmc_state) * cmc_banks, + cmc_state[i] = malloc(sizeof(struct cmc_state) * mca_banks, M_MCA, M_WAITOK | M_ZERO); SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, "cmc_throttle", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, @@ -672,10 +723,14 @@ mca_setup(uint64_t mcg_cap) CPUID_TO_FAMILY(cpu_id) == 0x10 && amd10h_L1TP) workaround_erratum383 = 1; + mca_banks = mcg_cap & MCG_CAP_COUNT; mtx_init(&mca_lock, "mca", NULL, MTX_SPIN); STAILQ_INIT(&mca_records); - TASK_INIT(&mca_task, 0, mca_scan_cpus, NULL); + TASK_INIT(&mca_scan_task, 0, mca_scan_cpus, NULL); callout_init(&mca_timer, CALLOUT_MPSAFE); + STAILQ_INIT(&mca_freelist); + TASK_INIT(&mca_refill_task, 0, mca_refill, NULL); + mca_fill_freelist(); SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, "count", CTLFLAG_RD, &mca_count, 0, "Record count"); SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, @@ -689,7 +744,7 @@ mca_setup(uint64_t mcg_cap) sysctl_mca_scan, "I", "Force an immediate scan for machine checks"); #ifdef DEV_APIC if (mcg_cap & MCG_CAP_CMCI_P) - cmci_setup(mcg_cap); + cmci_setup(); #endif } @@ -707,7 +762,7 @@ cmci_monitor(int i) struct cmc_state *cc; uint64_t ctl; - KASSERT(i < cmc_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); + KASSERT(i < mca_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); ctl = rdmsr(MSR_MC_CTL2(i)); if (ctl & MC_CTL2_CMCI_EN) @@ -751,7 +806,7 @@ cmci_resume(int i) struct cmc_state *cc; uint64_t ctl; - KASSERT(i < cmc_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); + KASSERT(i < mca_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); /* Ignore banks not monitored by this CPU. */ if (!(PCPU_GET(cmci_mask) & 1 << i)) @@ -879,7 +934,7 @@ mca_init_bsp(void *arg __unused) SYSINIT(mca_init_bsp, SI_SUB_CPU, SI_ORDER_ANY, mca_init_bsp, NULL); /* Called when a machine check exception fires. */ -int +void mca_intr(void) { uint64_t mcg_status; @@ -893,7 +948,7 @@ mca_intr(void) printf("MC Type: 0x%jx Address: 0x%jx\n", (uintmax_t)rdmsr(MSR_P5_MC_TYPE), (uintmax_t)rdmsr(MSR_P5_MC_ADDR)); - return (0); + panic("Machine check"); } /* Scan the banks and check for any non-recoverable errors. */ @@ -904,7 +959,8 @@ mca_intr(void) /* Clear MCIP. */ wrmsr(MSR_MCG_STATUS, mcg_status & ~MCG_STATUS_MCIP); - return (recoverable); + if (!recoverable) + panic("Unrecoverable machine check exception"); } #ifdef DEV_APIC @@ -927,9 +983,7 @@ cmc_intr(void) STAILQ_FOREACH(mca, &mca_records, link) { if (!mca->logged) { mca->logged = 1; - mtx_unlock_spin(&mca_lock); mca_log(&mca->rec); - mtx_lock_spin(&mca_lock); } } mtx_unlock_spin(&mca_lock); From owner-svn-src-all@FreeBSD.ORG Wed May 16 20:05:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2ECF31065677; Wed, 16 May 2012 20:05:22 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1959B8FC19; Wed, 16 May 2012 20:05:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GK5Lw7059596; Wed, 16 May 2012 20:05:21 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GK5LZg059594; Wed, 16 May 2012 20:05:21 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201205162005.q4GK5LZg059594@svn.freebsd.org> From: Xin LI Date: Wed, 16 May 2012 20:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235516 - stable/9/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 20:05:22 -0000 Author: delphij Date: Wed May 16 20:05:21 2012 New Revision: 235516 URL: http://svn.freebsd.org/changeset/base/235516 Log: MFC r234245: Eliminate an unused parameter of static method igmp_stats_live_old(). Modified: stable/9/usr.bin/netstat/inet.c Directory Properties: stable/9/usr.bin/netstat/ (props changed) Modified: stable/9/usr.bin/netstat/inet.c ============================================================================== --- stable/9/usr.bin/netstat/inet.c Wed May 16 20:04:45 2012 (r235515) +++ stable/9/usr.bin/netstat/inet.c Wed May 16 20:05:21 2012 (r235516) @@ -1068,7 +1068,7 @@ icmp_stats(u_long off, const char *name, * Dump IGMP statistics structure (pre 8.x kernel). */ static void -igmp_stats_live_old(u_long off, const char *name) +igmp_stats_live_old(const char *name) { struct oigmpstat oigmpstat, zerostat; size_t len = sizeof(oigmpstat); @@ -1128,7 +1128,7 @@ igmp_stats(u_long off, const char *name, return; } if (len < sizeof(igmpstat)) { - igmp_stats_live_old(off, name); + igmp_stats_live_old(name); return; } } From owner-svn-src-all@FreeBSD.ORG Wed May 16 20:05:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0EFB1065672; Wed, 16 May 2012 20:05:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98B6E8FC17; Wed, 16 May 2012 20:05:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GK5WO3059642; Wed, 16 May 2012 20:05:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GK5WDa059636; Wed, 16 May 2012 20:05:32 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205162005.q4GK5WDa059636@svn.freebsd.org> From: John Baldwin Date: Wed, 16 May 2012 20:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235517 - in stable/8/sys: amd64/amd64 amd64/include i386/conf i386/i386 i386/include x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 20:05:32 -0000 Author: jhb Date: Wed May 16 20:05:31 2012 New Revision: 235517 URL: http://svn.freebsd.org/changeset/base/235517 Log: MFC 218221,233709,233781,233793: - Use a dedicated taskqueue with a thread that runs at a software-interrupt priority for the periodic polling of the machine check registers. - Don't malloc() new MCA records for machine checks logged due to a CMCI or MC# exception. Instead, use a pre-allocated pool of records. When a CMCI or MC# exception fires, schedule a task to refill the pool. The pool is sized to hold at least one record per available machine bank, and one record per CPU. This should handle the case of all CPUs triggering a single bank at once as well as the case a single CPU triggering all of its banks. The periodic scans still use malloc() since they are run from a safe context. - Make machine check exception logging more readable. On newer Intel systems, an uncorrected ECC error tends to fire on all CPUs in a package simultaneously and the current printf hacks are not sufficient to make the messages legible. Instead, use the existing mca_lock spinlock to serialize calls to mca_log() and change the machine check code to panic directly when an unrecoverable error is encoutered rather than falling back to a trap_fatal() call in trap() (which adds nearly a screen-full of logging messages that aren't useful for machine checks). Modified: stable/8/sys/amd64/amd64/trap.c stable/8/sys/amd64/include/mca.h stable/8/sys/i386/i386/trap.c stable/8/sys/i386/include/mca.h stable/8/sys/x86/x86/mca.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/amd64/amd64/trap.c ============================================================================== --- stable/8/sys/amd64/amd64/trap.c Wed May 16 20:05:21 2012 (r235516) +++ stable/8/sys/amd64/amd64/trap.c Wed May 16 20:05:31 2012 (r235517) @@ -234,8 +234,7 @@ trap(struct trapframe *frame) #endif if (type == T_MCHK) { - if (!mca_intr()) - trap_fatal(frame, 0); + mca_intr(); goto out; } Modified: stable/8/sys/amd64/include/mca.h ============================================================================== --- stable/8/sys/amd64/include/mca.h Wed May 16 20:05:21 2012 (r235516) +++ stable/8/sys/amd64/include/mca.h Wed May 16 20:05:31 2012 (r235517) @@ -48,7 +48,7 @@ struct mca_record { void cmc_intr(void); void mca_init(void); -int mca_intr(void); +void mca_intr(void); void mca_resume(void); #endif Modified: stable/8/sys/i386/i386/trap.c ============================================================================== --- stable/8/sys/i386/i386/trap.c Wed May 16 20:05:21 2012 (r235516) +++ stable/8/sys/i386/i386/trap.c Wed May 16 20:05:31 2012 (r235517) @@ -255,8 +255,7 @@ trap(struct trapframe *frame) #endif if (type == T_MCHK) { - if (!mca_intr()) - trap_fatal(frame, 0); + mca_intr(); goto out; } Modified: stable/8/sys/i386/include/mca.h ============================================================================== --- stable/8/sys/i386/include/mca.h Wed May 16 20:05:21 2012 (r235516) +++ stable/8/sys/i386/include/mca.h Wed May 16 20:05:31 2012 (r235517) @@ -48,7 +48,7 @@ struct mca_record { void cmc_intr(void); void mca_init(void); -int mca_intr(void); +void mca_intr(void); void mca_resume(void); #endif Modified: stable/8/sys/x86/x86/mca.c ============================================================================== --- stable/8/sys/x86/x86/mca.c Wed May 16 20:05:21 2012 (r235516) +++ stable/8/sys/x86/x86/mca.c Wed May 16 20:05:31 2012 (r235517) @@ -85,6 +85,7 @@ struct mca_internal { static MALLOC_DEFINE(M_MCA, "MCA", "Machine Check Architecture"); static int mca_count; /* Number of records stored. */ +static int mca_banks; /* Number of per-CPU register banks. */ SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RD, NULL, "Machine Check Architecture"); @@ -102,15 +103,17 @@ int workaround_erratum383; SYSCTL_INT(_hw_mca, OID_AUTO, erratum383, CTLFLAG_RD, &workaround_erratum383, 0, "Is the workaround for Erratum 383 on AMD Family 10h processors enabled?"); +static STAILQ_HEAD(, mca_internal) mca_freelist; +static int mca_freecount; static STAILQ_HEAD(, mca_internal) mca_records; static struct callout mca_timer; static int mca_ticks = 3600; /* Check hourly by default. */ -static struct task mca_task; +static struct taskqueue *mca_tq; +static struct task mca_refill_task, mca_scan_task; static struct mtx mca_lock; #ifdef DEV_APIC static struct cmc_state **cmc_state; /* Indexed by cpuid, bank */ -static int cmc_banks; static int cmc_throttle = 60; /* Time in seconds to throttle CMCI. */ #endif @@ -414,24 +417,63 @@ mca_check_status(int bank, struct mca_re return (1); } -static void __nonnull(1) -mca_record_entry(const struct mca_record *record) +static void +mca_fill_freelist(void) { struct mca_internal *rec; + int desired; - rec = malloc(sizeof(*rec), M_MCA, M_NOWAIT); - if (rec == NULL) { - printf("MCA: Unable to allocate space for an event.\n"); - mca_log(record); - return; + /* + * Ensure we have at least one record for each bank and one + * record per CPU. + */ + desired = imax(mp_ncpus, mca_banks); + mtx_lock_spin(&mca_lock); + while (mca_freecount < desired) { + mtx_unlock_spin(&mca_lock); + rec = malloc(sizeof(*rec), M_MCA, M_WAITOK); + mtx_lock_spin(&mca_lock); + STAILQ_INSERT_TAIL(&mca_freelist, rec, link); + mca_freecount++; + } + mtx_unlock_spin(&mca_lock); +} + +static void +mca_refill(void *context, int pending) +{ + + mca_fill_freelist(); +} + +static void __nonnull(2) +mca_record_entry(enum scan_mode mode, const struct mca_record *record) +{ + struct mca_internal *rec; + + if (mode == POLLED) { + rec = malloc(sizeof(*rec), M_MCA, M_WAITOK); + mtx_lock_spin(&mca_lock); + } else { + mtx_lock_spin(&mca_lock); + rec = STAILQ_FIRST(&mca_freelist); + if (rec == NULL) { + printf("MCA: Unable to allocate space for an event.\n"); + mca_log(record); + mtx_unlock_spin(&mca_lock); + return; + } + STAILQ_REMOVE_HEAD(&mca_freelist, link); + mca_freecount--; } rec->rec = *record; rec->logged = 0; - mtx_lock_spin(&mca_lock); STAILQ_INSERT_TAIL(&mca_records, rec, link); mca_count++; mtx_unlock_spin(&mca_lock); + if (mode == CMCI) + taskqueue_enqueue_fast(mca_tq, &mca_refill_task); } #ifdef DEV_APIC @@ -548,9 +590,11 @@ mca_scan(enum scan_mode mode) count++; if (rec.mr_status & ucmask) { recoverable = 0; + mtx_lock_spin(&mca_lock); mca_log(&rec); + mtx_unlock_spin(&mca_lock); } - mca_record_entry(&rec); + mca_record_entry(mode, &rec); } #ifdef DEV_APIC @@ -562,6 +606,8 @@ mca_scan(enum scan_mode mode) cmci_update(mode, i, valid, &rec); #endif } + if (mode == POLLED) + mca_fill_freelist(); return (mode == MCE ? recoverable : count); } @@ -577,6 +623,7 @@ mca_scan_cpus(void *context, int pending struct thread *td; int count, cpu; + mca_fill_freelist(); td = curthread; count = 0; thread_lock(td); @@ -593,9 +640,7 @@ mca_scan_cpus(void *context, int pending STAILQ_FOREACH(mca, &mca_records, link) { if (!mca->logged) { mca->logged = 1; - mtx_unlock_spin(&mca_lock); mca_log(&mca->rec); - mtx_lock_spin(&mca_lock); } } mtx_unlock_spin(&mca_lock); @@ -606,7 +651,7 @@ static void mca_periodic_scan(void *arg) { - taskqueue_enqueue(taskqueue_thread, &mca_task); + taskqueue_enqueue_fast(mca_tq, &mca_scan_task); callout_reset(&mca_timer, mca_ticks * hz, mca_periodic_scan, NULL); } @@ -620,33 +665,43 @@ sysctl_mca_scan(SYSCTL_HANDLER_ARGS) if (error) return (error); if (i) - taskqueue_enqueue(taskqueue_thread, &mca_task); + taskqueue_enqueue_fast(mca_tq, &mca_scan_task); return (0); } static void +mca_createtq(void *dummy) +{ + if (mca_banks <= 0) + return; + + mca_tq = taskqueue_create_fast("mca", M_WAITOK, + taskqueue_thread_enqueue, &mca_tq); + taskqueue_start_threads(&mca_tq, 1, PI_SWI(SWI_TQ), "mca taskq"); +} +SYSINIT(mca_createtq, SI_SUB_CONFIGURE, SI_ORDER_ANY, mca_createtq, NULL); + +static void mca_startup(void *dummy) { - if (!mca_enabled || !(cpu_feature & CPUID_MCA)) + if (mca_banks <= 0) return; - callout_reset(&mca_timer, mca_ticks * hz, mca_periodic_scan, - NULL); + callout_reset(&mca_timer, mca_ticks * hz, mca_periodic_scan, NULL); } SYSINIT(mca_startup, SI_SUB_SMP, SI_ORDER_ANY, mca_startup, NULL); #ifdef DEV_APIC static void -cmci_setup(uint64_t mcg_cap) +cmci_setup(void) { int i; cmc_state = malloc((mp_maxid + 1) * sizeof(struct cmc_state **), M_MCA, M_WAITOK); - cmc_banks = mcg_cap & MCG_CAP_COUNT; for (i = 0; i <= mp_maxid; i++) - cmc_state[i] = malloc(sizeof(struct cmc_state) * cmc_banks, + cmc_state[i] = malloc(sizeof(struct cmc_state) * mca_banks, M_MCA, M_WAITOK | M_ZERO); SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, "cmc_throttle", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, @@ -668,10 +723,14 @@ mca_setup(uint64_t mcg_cap) CPUID_TO_FAMILY(cpu_id) == 0x10 && amd10h_L1TP) workaround_erratum383 = 1; + mca_banks = mcg_cap & MCG_CAP_COUNT; mtx_init(&mca_lock, "mca", NULL, MTX_SPIN); STAILQ_INIT(&mca_records); - TASK_INIT(&mca_task, 0x8000, mca_scan_cpus, NULL); + TASK_INIT(&mca_scan_task, 0, mca_scan_cpus, NULL); callout_init(&mca_timer, CALLOUT_MPSAFE); + STAILQ_INIT(&mca_freelist); + TASK_INIT(&mca_refill_task, 0, mca_refill, NULL); + mca_fill_freelist(); SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, "count", CTLFLAG_RD, &mca_count, 0, "Record count"); SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, @@ -685,7 +744,7 @@ mca_setup(uint64_t mcg_cap) sysctl_mca_scan, "I", "Force an immediate scan for machine checks"); #ifdef DEV_APIC if (mcg_cap & MCG_CAP_CMCI_P) - cmci_setup(mcg_cap); + cmci_setup(); #endif } @@ -703,7 +762,7 @@ cmci_monitor(int i) struct cmc_state *cc; uint64_t ctl; - KASSERT(i < cmc_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); + KASSERT(i < mca_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); ctl = rdmsr(MSR_MC_CTL2(i)); if (ctl & MC_CTL2_CMCI_EN) @@ -747,7 +806,7 @@ cmci_resume(int i) struct cmc_state *cc; uint64_t ctl; - KASSERT(i < cmc_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); + KASSERT(i < mca_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); /* Ignore banks not monitored by this CPU. */ if (!(PCPU_GET(cmci_mask) & 1 << i)) @@ -875,7 +934,7 @@ mca_init_bsp(void *arg __unused) SYSINIT(mca_init_bsp, SI_SUB_CPU, SI_ORDER_ANY, mca_init_bsp, NULL); /* Called when a machine check exception fires. */ -int +void mca_intr(void) { uint64_t mcg_status; @@ -889,7 +948,7 @@ mca_intr(void) printf("MC Type: 0x%jx Address: 0x%jx\n", (uintmax_t)rdmsr(MSR_P5_MC_TYPE), (uintmax_t)rdmsr(MSR_P5_MC_ADDR)); - return (0); + panic("Machine check"); } /* Scan the banks and check for any non-recoverable errors. */ @@ -900,7 +959,8 @@ mca_intr(void) /* Clear MCIP. */ wrmsr(MSR_MCG_STATUS, mcg_status & ~MCG_STATUS_MCIP); - return (recoverable); + if (!recoverable) + panic("Unrecoverable machine check exception"); } #ifdef DEV_APIC @@ -923,9 +983,7 @@ cmc_intr(void) STAILQ_FOREACH(mca, &mca_records, link) { if (!mca->logged) { mca->logged = 1; - mtx_unlock_spin(&mca_lock); mca_log(&mca->rec); - mtx_lock_spin(&mca_lock); } } mtx_unlock_spin(&mca_lock); From owner-svn-src-all@FreeBSD.ORG Wed May 16 20:06:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7DFEC1065672; Wed, 16 May 2012 20:06:18 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69F528FC1E; Wed, 16 May 2012 20:06:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GK6IXB059720; Wed, 16 May 2012 20:06:18 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GK6ILd059718; Wed, 16 May 2012 20:06:18 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201205162006.q4GK6ILd059718@svn.freebsd.org> From: Xin LI Date: Wed, 16 May 2012 20:06:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235518 - stable/8/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 20:06:18 -0000 Author: delphij Date: Wed May 16 20:06:17 2012 New Revision: 235518 URL: http://svn.freebsd.org/changeset/base/235518 Log: MFC r234245: Eliminate an unused parameter of static method igmp_stats_live_old(). Modified: stable/8/usr.bin/netstat/inet.c (contents, props changed) Directory Properties: stable/8/usr.bin/netstat/ (props changed) Modified: stable/8/usr.bin/netstat/inet.c ============================================================================== --- stable/8/usr.bin/netstat/inet.c Wed May 16 20:05:31 2012 (r235517) +++ stable/8/usr.bin/netstat/inet.c Wed May 16 20:06:17 2012 (r235518) @@ -1052,7 +1052,7 @@ icmp_stats(u_long off, const char *name, * Dump IGMP statistics structure (pre 8.x kernel). */ static void -igmp_stats_live_old(u_long off, const char *name) +igmp_stats_live_old(const char *name) { struct oigmpstat oigmpstat, zerostat; size_t len = sizeof(oigmpstat); @@ -1112,7 +1112,7 @@ igmp_stats(u_long off, const char *name, return; } if (len < sizeof(igmpstat)) { - igmp_stats_live_old(off, name); + igmp_stats_live_old(name); return; } } From owner-svn-src-all@FreeBSD.ORG Wed May 16 20:30:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 267C2106564A; Wed, 16 May 2012 20:30:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECB9C8FC15; Wed, 16 May 2012 20:30:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GKUKB9060607; Wed, 16 May 2012 20:30:20 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GKUKWB060604; Wed, 16 May 2012 20:30:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205162030.q4GKUKWB060604@svn.freebsd.org> From: Alexander Motin Date: Wed, 16 May 2012 20:30:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235519 - head/usr.bin/usbhidctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 20:30:21 -0000 Author: mav Date: Wed May 16 20:30:20 2012 New Revision: 235519 URL: http://svn.freebsd.org/changeset/base/235519 Log: Add support for -z option for reading operations. It allows to not request current values from device, but only receive changes. Modified: head/usr.bin/usbhidctl/usbhid.c head/usr.bin/usbhidctl/usbhidctl.1 Modified: head/usr.bin/usbhidctl/usbhid.c ============================================================================== --- head/usr.bin/usbhidctl/usbhid.c Wed May 16 20:06:17 2012 (r235518) +++ head/usr.bin/usbhidctl/usbhid.c Wed May 16 20:30:20 2012 (r235519) @@ -182,11 +182,11 @@ usage(void) fprintf(stderr, "usage: %s -f device " - "[-l] [-n] [-r] [-t tablefile] [-v] [-x] name ...\n", + "[-l] [-n] [-r] [-t tablefile] [-v] [-x] [-z] name ...\n", getprogname()); fprintf(stderr, " %s -f device " - "[-l] [-n] [-r] [-t tablefile] [-v] [-x] -a\n", + "[-l] [-n] [-r] [-t tablefile] [-v] [-x] [-z] -a\n", getprogname()); fprintf(stderr, " %s -f device " @@ -304,7 +304,7 @@ dumpdata(int f, report_desc_t rd, int lo u_char *dbuf; enum hid_kind kind; - kind = 0; + kind = zflag ? 3 : 0; rid = -1; use_rid = !!hid_get_report_id(f); do { Modified: head/usr.bin/usbhidctl/usbhidctl.1 ============================================================================== --- head/usr.bin/usbhidctl/usbhidctl.1 Wed May 16 20:06:17 2012 (r235518) +++ head/usr.bin/usbhidctl/usbhidctl.1 Wed May 16 20:30:20 2012 (r235519) @@ -47,6 +47,7 @@ .Op Fl l .Op Fl v .Op Fl x +.Op Fl z .Fl a .Nm .Fl f Ar device @@ -55,6 +56,7 @@ .Op Fl n .Op Fl v .Op Fl x +.Op Fl z .Ar item ... .Nm .Fl f Ar device @@ -99,9 +101,8 @@ Only 'output' and 'feature' kinds can be .It Fl x Dump data in hexadecimal as well as decimal. .It Fl z -Reset reports to zero before processing -.Fl w -arguments. If not specified, current values will be requested from device. +Reset reports to zero before processing other arguments. +If not specified, current values will be requested from device. .El .Sh SYNTAX .Nm From owner-svn-src-all@FreeBSD.ORG Wed May 16 20:31:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63D971065673; Wed, 16 May 2012 20:31:38 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EB7E8FC1C; Wed, 16 May 2012 20:31:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GKVciM060706; Wed, 16 May 2012 20:31:38 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GKVciF060704; Wed, 16 May 2012 20:31:38 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201205162031.q4GKVciF060704@svn.freebsd.org> From: Jeremie Le Hen Date: Wed, 16 May 2012 20:31:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235520 - stable/9/usr.bin/stdbuf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 20:31:38 -0000 Author: jlh Date: Wed May 16 20:31:37 2012 New Revision: 235520 URL: http://svn.freebsd.org/changeset/base/235520 Log: MFC r235142: Always define LD_32_PRELOAD so it works for 32 bits binaries on 64 bits platforms. Let rtld(1) decide if it needs to honor it or not. While here, fix a small bug in error reporting when asprintf(3) returns an error. Modified: stable/9/usr.bin/stdbuf/stdbuf.c Directory Properties: stable/9/usr.bin/stdbuf/ (props changed) Modified: stable/9/usr.bin/stdbuf/stdbuf.c ============================================================================== --- stable/9/usr.bin/stdbuf/stdbuf.c Wed May 16 20:30:20 2012 (r235519) +++ stable/9/usr.bin/stdbuf/stdbuf.c Wed May 16 20:31:37 2012 (r235520) @@ -32,6 +32,7 @@ #include #define LIBSTDBUF "/usr/lib/libstdbuf.so" +#define LIBSTDBUF32 "/usr/lib32/libstdbuf.so" extern char *__progname; @@ -92,7 +93,17 @@ main(int argc, char *argv[]) LIBSTDBUF); if (i < 0 || putenv(preload1) == -1) - warn("Failed to set environment variable: %s", preload1); + warn("Failed to set environment variable: LD_PRELOAD"); + + preload0 = getenv("LD_32_PRELOAD"); + if (preload0 == NULL) + i = asprintf(&preload1, "LD_32_PRELOAD=" LIBSTDBUF32); + else + i = asprintf(&preload1, "LD_32_PRELOAD=%s:%s", preload0, + LIBSTDBUF32); + + if (i < 0 || putenv(preload1) == -1) + warn("Failed to set environment variable: LD_32_PRELOAD"); execvp(argv[0], argv); err(2, "%s", argv[0]); From owner-svn-src-all@FreeBSD.ORG Wed May 16 20:33:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 059EA106566B; Wed, 16 May 2012 20:33:30 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E42648FC0A; Wed, 16 May 2012 20:33:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GKXTso060824; Wed, 16 May 2012 20:33:29 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GKXTIQ060822; Wed, 16 May 2012 20:33:29 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201205162033.q4GKXTIQ060822@svn.freebsd.org> From: Jeremie Le Hen Date: Wed, 16 May 2012 20:33:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235521 - stable/8/usr.bin/stdbuf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 20:33:30 -0000 Author: jlh Date: Wed May 16 20:33:29 2012 New Revision: 235521 URL: http://svn.freebsd.org/changeset/base/235521 Log: MFC r235142: Always define LD_32_PRELOAD so it works for 32 bits binaries on 64 bits platforms. Let rtld(1) decide if it needs to honor it or not. While here, fix a small bug in error reporting when asprintf(3) returns an error. Modified: stable/8/usr.bin/stdbuf/stdbuf.c Directory Properties: stable/8/usr.bin/stdbuf/ (props changed) Modified: stable/8/usr.bin/stdbuf/stdbuf.c ============================================================================== --- stable/8/usr.bin/stdbuf/stdbuf.c Wed May 16 20:31:37 2012 (r235520) +++ stable/8/usr.bin/stdbuf/stdbuf.c Wed May 16 20:33:29 2012 (r235521) @@ -32,6 +32,7 @@ #include #define LIBSTDBUF "/usr/lib/libstdbuf.so" +#define LIBSTDBUF32 "/usr/lib32/libstdbuf.so" extern char *__progname; @@ -92,7 +93,17 @@ main(int argc, char *argv[]) LIBSTDBUF); if (i < 0 || putenv(preload1) == -1) - warn("Failed to set environment variable: %s", preload1); + warn("Failed to set environment variable: LD_PRELOAD"); + + preload0 = getenv("LD_32_PRELOAD"); + if (preload0 == NULL) + i = asprintf(&preload1, "LD_32_PRELOAD=" LIBSTDBUF32); + else + i = asprintf(&preload1, "LD_32_PRELOAD=%s:%s", preload0, + LIBSTDBUF32); + + if (i < 0 || putenv(preload1) == -1) + warn("Failed to set environment variable: LD_32_PRELOAD"); execvp(argv[0], argv); err(2, "%s", argv[0]); From owner-svn-src-all@FreeBSD.ORG Wed May 16 21:06:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E9DD1065674; Wed, 16 May 2012 21:06:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 790258FC0A; Wed, 16 May 2012 21:06:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GL6v7J062036; Wed, 16 May 2012 21:06:57 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GL6vkg062033; Wed, 16 May 2012 21:06:57 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205162106.q4GL6vkg062033@svn.freebsd.org> From: John Baldwin Date: Wed, 16 May 2012 21:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235522 - in stable/9/sys: i386/conf kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 21:06:57 -0000 Author: jhb Date: Wed May 16 21:06:56 2012 New Revision: 235522 URL: http://svn.freebsd.org/changeset/base/235522 Log: MFC 234152: Allow device_busy() and device_unbusy() to be invoked while a device is being attached. This is implemented by adding a new DS_ATTACHING state while a device's DEVICE_ATTACH() method is being invoked. A driver is required to not fail an attach of a busy device. The device's state will be promoted to DS_BUSY rather than DS_ACTIVE() if the device was marked busy during DEVICE_ATTACH() Modified: stable/9/sys/kern/subr_bus.c stable/9/sys/sys/bus.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/kern/subr_bus.c ============================================================================== --- stable/9/sys/kern/subr_bus.c Wed May 16 20:33:29 2012 (r235521) +++ stable/9/sys/kern/subr_bus.c Wed May 16 21:06:56 2012 (r235522) @@ -2466,12 +2466,13 @@ device_disable(device_t dev) void device_busy(device_t dev) { - if (dev->state < DS_ATTACHED) + if (dev->state < DS_ATTACHING) panic("device_busy: called for unattached device"); if (dev->busy == 0 && dev->parent) device_busy(dev->parent); dev->busy++; - dev->state = DS_BUSY; + if (dev->state == DS_ATTACHED) + dev->state = DS_BUSY; } /** @@ -2480,14 +2481,16 @@ device_busy(device_t dev) void device_unbusy(device_t dev) { - if (dev->state != DS_BUSY) + if (dev->busy != 0 && dev->state != DS_BUSY && + dev->state != DS_ATTACHING) panic("device_unbusy: called for non-busy device %s", device_get_nameunit(dev)); dev->busy--; if (dev->busy == 0) { if (dev->parent) device_unbusy(dev->parent); - dev->state = DS_ATTACHED; + if (dev->state == DS_BUSY) + dev->state = DS_ATTACHED; } } @@ -2723,6 +2726,7 @@ device_attach(device_t dev) device_sysctl_init(dev); if (!device_is_quiet(dev)) device_print_child(dev->parent, dev); + dev->state = DS_ATTACHING; if ((error = DEVICE_ATTACH(dev)) != 0) { printf("device_attach: %s%d attach returned %d\n", dev->driver->name, dev->unit, error); @@ -2730,11 +2734,15 @@ device_attach(device_t dev) devclass_delete_device(dev->devclass, dev); (void)device_set_driver(dev, NULL); device_sysctl_fini(dev); + KASSERT(dev->busy == 0, ("attach failed but busy")); dev->state = DS_NOTPRESENT; return (error); } device_sysctl_update(dev); - dev->state = DS_ATTACHED; + if (dev->busy) + dev->state = DS_BUSY; + else + dev->state = DS_ATTACHED; dev->flags &= ~DF_DONENOMATCH; devadded(dev); return (0); Modified: stable/9/sys/sys/bus.h ============================================================================== --- stable/9/sys/sys/bus.h Wed May 16 20:33:29 2012 (r235521) +++ stable/9/sys/sys/bus.h Wed May 16 21:06:56 2012 (r235522) @@ -52,6 +52,7 @@ struct u_businfo { typedef enum device_state { DS_NOTPRESENT = 10, /**< @brief not probed or probe failed */ DS_ALIVE = 20, /**< @brief probe succeeded */ + DS_ATTACHING = 25, /**< @brief currently attaching */ DS_ATTACHED = 30, /**< @brief attach method called */ DS_BUSY = 40 /**< @brief device is open */ } device_state_t; From owner-svn-src-all@FreeBSD.ORG Wed May 16 21:07:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9D303106564A; Wed, 16 May 2012 21:07:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87A0F8FC1A; Wed, 16 May 2012 21:07:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GL7K2t062087; Wed, 16 May 2012 21:07:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GL7Klq062084; Wed, 16 May 2012 21:07:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205162107.q4GL7Klq062084@svn.freebsd.org> From: John Baldwin Date: Wed, 16 May 2012 21:07:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235523 - in stable/8/sys: i386/conf kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 21:07:20 -0000 Author: jhb Date: Wed May 16 21:07:19 2012 New Revision: 235523 URL: http://svn.freebsd.org/changeset/base/235523 Log: MFC 234152: Allow device_busy() and device_unbusy() to be invoked while a device is being attached. This is implemented by adding a new DS_ATTACHING state while a device's DEVICE_ATTACH() method is being invoked. A driver is required to not fail an attach of a busy device. The device's state will be promoted to DS_BUSY rather than DS_ACTIVE() if the device was marked busy during DEVICE_ATTACH() Modified: stable/8/sys/kern/subr_bus.c stable/8/sys/sys/bus.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/kern/subr_bus.c ============================================================================== --- stable/8/sys/kern/subr_bus.c Wed May 16 21:06:56 2012 (r235522) +++ stable/8/sys/kern/subr_bus.c Wed May 16 21:07:19 2012 (r235523) @@ -2469,12 +2469,13 @@ device_disable(device_t dev) void device_busy(device_t dev) { - if (dev->state < DS_ATTACHED) + if (dev->state < DS_ATTACHING) panic("device_busy: called for unattached device"); if (dev->busy == 0 && dev->parent) device_busy(dev->parent); dev->busy++; - dev->state = DS_BUSY; + if (dev->state == DS_ATTACHED) + dev->state = DS_BUSY; } /** @@ -2483,14 +2484,16 @@ device_busy(device_t dev) void device_unbusy(device_t dev) { - if (dev->state != DS_BUSY) + if (dev->busy != 0 && dev->state != DS_BUSY && + dev->state != DS_ATTACHING) panic("device_unbusy: called for non-busy device %s", device_get_nameunit(dev)); dev->busy--; if (dev->busy == 0) { if (dev->parent) device_unbusy(dev->parent); - dev->state = DS_ATTACHED; + if (dev->state == DS_BUSY) + dev->state = DS_ATTACHED; } } @@ -2726,6 +2729,7 @@ device_attach(device_t dev) device_sysctl_init(dev); if (!device_is_quiet(dev)) device_print_child(dev->parent, dev); + dev->state = DS_ATTACHING; if ((error = DEVICE_ATTACH(dev)) != 0) { printf("device_attach: %s%d attach returned %d\n", dev->driver->name, dev->unit, error); @@ -2733,11 +2737,15 @@ device_attach(device_t dev) devclass_delete_device(dev->devclass, dev); (void)device_set_driver(dev, NULL); device_sysctl_fini(dev); + KASSERT(dev->busy == 0, ("attach failed but busy")); dev->state = DS_NOTPRESENT; return (error); } device_sysctl_update(dev); - dev->state = DS_ATTACHED; + if (dev->busy) + dev->state = DS_BUSY; + else + dev->state = DS_ATTACHED; dev->flags &= ~DF_DONENOMATCH; devadded(dev); return (0); Modified: stable/8/sys/sys/bus.h ============================================================================== --- stable/8/sys/sys/bus.h Wed May 16 21:06:56 2012 (r235522) +++ stable/8/sys/sys/bus.h Wed May 16 21:07:19 2012 (r235523) @@ -52,6 +52,7 @@ struct u_businfo { typedef enum device_state { DS_NOTPRESENT = 10, /**< @brief not probed or probe failed */ DS_ALIVE = 20, /**< @brief probe succeeded */ + DS_ATTACHING = 25, /**< @brief currently attaching */ DS_ATTACHED = 30, /**< @brief attach method called */ DS_BUSY = 40 /**< @brief device is open */ } device_state_t; From owner-svn-src-all@FreeBSD.ORG Wed May 16 22:19:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA6DB1065678; Wed, 16 May 2012 22:19:22 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BADC58FC16; Wed, 16 May 2012 22:19:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GMJMhp064895; Wed, 16 May 2012 22:19:22 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GMJMEs064892; Wed, 16 May 2012 22:19:22 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201205162219.q4GMJMEs064892@svn.freebsd.org> From: Sean Bruno Date: Wed, 16 May 2012 22:19:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235525 - stable/9/sys/dev/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 22:19:23 -0000 Author: sbruno Date: Wed May 16 22:19:22 2012 New Revision: 235525 URL: http://svn.freebsd.org/changeset/base/235525 Log: MFC r235318, r235321 Fix inappropriate data type for two bus_dmamap_t variables that were causing PAE to insta-panic on startup. Remove one unused variable that was commented out. Modified: stable/9/sys/dev/mfi/mfi_cam.c stable/9/sys/dev/mfi/mfivar.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/mfi/mfi_cam.c ============================================================================== --- stable/9/sys/dev/mfi/mfi_cam.c Wed May 16 22:13:02 2012 (r235524) +++ stable/9/sys/dev/mfi/mfi_cam.c Wed May 16 22:19:22 2012 (r235525) @@ -293,8 +293,8 @@ mfip_start(void *data) pt->header.data_len = csio->dxfer_len; pt->header.sense_len = MFI_SENSE_LEN; pt->header.cdb_len = csio->cdb_len; - pt->sense_addr_lo = cm->cm_sense_busaddr; - pt->sense_addr_hi = 0; + pt->sense_addr_lo = (uint32_t)cm->cm_sense_busaddr; + pt->sense_addr_hi = (uint32_t)((uint64_t)cm->cm_sense_busaddr >> 32); if (ccbh->flags & CAM_CDB_POINTER) bcopy(csio->cdb_io.cdb_ptr, &pt->cdb[0], csio->cdb_len); else Modified: stable/9/sys/dev/mfi/mfivar.h ============================================================================== --- stable/9/sys/dev/mfi/mfivar.h Wed May 16 22:13:02 2012 (r235524) +++ stable/9/sys/dev/mfi/mfivar.h Wed May 16 22:19:22 2012 (r235525) @@ -176,7 +176,7 @@ struct mfi_softc { // Start: LSIP200113393 bus_dma_tag_t verbuf_h_dmat; bus_dmamap_t verbuf_h_dmamap; - uint32_t verbuf_h_busaddr; + bus_addr_t verbuf_h_busaddr; uint32_t *verbuf; void *kbuff_arr[MAX_IOCTL_SGE]; bus_dma_tag_t mfi_kbuff_arr_dmat[2]; @@ -232,7 +232,7 @@ struct mfi_softc { bus_dma_tag_t mfi_sense_dmat; bus_dmamap_t mfi_sense_dmamap; - uint32_t mfi_sense_busaddr; + bus_addr_t mfi_sense_busaddr; struct mfi_sense *mfi_sense; struct resource *mfi_irq; @@ -319,7 +319,6 @@ struct mfi_softc { uint8_t * request_message_pool; uint8_t * request_message_pool_align; uint8_t * request_desc_pool; - //uint32_t request_desc_busaddr; bus_addr_t request_msg_busaddr; bus_addr_t reply_frame_busaddr; bus_addr_t sg_frame_busaddr; From owner-svn-src-all@FreeBSD.ORG Wed May 16 22:22:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0DBAA1065673; Wed, 16 May 2012 22:22:53 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EAA9A8FC0A; Wed, 16 May 2012 22:22:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GMMqEc065127; Wed, 16 May 2012 22:22:52 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GMMqig065119; Wed, 16 May 2012 22:22:52 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201205162222.q4GMMqig065119@svn.freebsd.org> From: Jack F Vogel Date: Wed, 16 May 2012 22:22:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235527 - stable/9/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 22:22:53 -0000 Author: jfv Date: Wed May 16 22:22:52 2012 New Revision: 235527 URL: http://svn.freebsd.org/changeset/base/235527 Log: MFC of the e1000 drivers: revisions include 227309,228281,228386,228387,228393,228405, 228415,228788,228803,229606,229767,229939, 230023,230024,230742,231796,232238,233708, 234154,234665,235256 Modified: stable/9/sys/dev/e1000/README stable/9/sys/dev/e1000/e1000_80003es2lan.c stable/9/sys/dev/e1000/e1000_80003es2lan.h stable/9/sys/dev/e1000/e1000_82540.c stable/9/sys/dev/e1000/e1000_82541.c stable/9/sys/dev/e1000/e1000_82543.c stable/9/sys/dev/e1000/e1000_82571.c stable/9/sys/dev/e1000/e1000_82575.c stable/9/sys/dev/e1000/e1000_82575.h stable/9/sys/dev/e1000/e1000_api.c stable/9/sys/dev/e1000/e1000_api.h stable/9/sys/dev/e1000/e1000_defines.h stable/9/sys/dev/e1000/e1000_hw.h stable/9/sys/dev/e1000/e1000_ich8lan.c stable/9/sys/dev/e1000/e1000_ich8lan.h stable/9/sys/dev/e1000/e1000_mac.c stable/9/sys/dev/e1000/e1000_nvm.c stable/9/sys/dev/e1000/e1000_nvm.h stable/9/sys/dev/e1000/e1000_phy.c stable/9/sys/dev/e1000/e1000_phy.h stable/9/sys/dev/e1000/e1000_regs.h stable/9/sys/dev/e1000/e1000_vf.c stable/9/sys/dev/e1000/if_em.c stable/9/sys/dev/e1000/if_em.h stable/9/sys/dev/e1000/if_igb.c stable/9/sys/dev/e1000/if_igb.h stable/9/sys/dev/e1000/if_lem.c stable/9/sys/dev/e1000/if_lem.h Directory Properties: stable/9/sys/dev/e1000/ (props changed) Modified: stable/9/sys/dev/e1000/README ============================================================================== --- stable/9/sys/dev/e1000/README Wed May 16 22:21:57 2012 (r235526) +++ stable/9/sys/dev/e1000/README Wed May 16 22:22:52 2012 (r235527) @@ -354,6 +354,7 @@ Known Limitations include: Planex FXG-08TE I-O Data ETG-SH8 + Netgear GS105v3 The driver can be compiled with the following changes: Modified: stable/9/sys/dev/e1000/e1000_80003es2lan.c ============================================================================== --- stable/9/sys/dev/e1000/e1000_80003es2lan.c Wed May 16 22:21:57 2012 (r235526) +++ stable/9/sys/dev/e1000/e1000_80003es2lan.c Wed May 16 22:22:52 2012 (r235527) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2010, Intel Corporation + Copyright (c) 2001-2011, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47,18 +47,18 @@ static void e1000_release_phy_80003es2la static s32 e1000_acquire_nvm_80003es2lan(struct e1000_hw *hw); static void e1000_release_nvm_80003es2lan(struct e1000_hw *hw); static s32 e1000_read_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw, - u32 offset, - u16 *data); + u32 offset, + u16 *data); static s32 e1000_write_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw, - u32 offset, - u16 data); + u32 offset, + u16 data); static s32 e1000_write_nvm_80003es2lan(struct e1000_hw *hw, u16 offset, - u16 words, u16 *data); + u16 words, u16 *data); static s32 e1000_get_cfg_done_80003es2lan(struct e1000_hw *hw); static s32 e1000_phy_force_speed_duplex_80003es2lan(struct e1000_hw *hw); static s32 e1000_get_cable_length_80003es2lan(struct e1000_hw *hw); static s32 e1000_get_link_up_info_80003es2lan(struct e1000_hw *hw, u16 *speed, - u16 *duplex); + u16 *duplex); static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw); static s32 e1000_init_hw_80003es2lan(struct e1000_hw *hw); static s32 e1000_setup_copper_link_80003es2lan(struct e1000_hw *hw); @@ -68,9 +68,9 @@ static s32 e1000_cfg_kmrn_10_100_80003e static s32 e1000_cfg_kmrn_1000_80003es2lan(struct e1000_hw *hw); static s32 e1000_cfg_on_link_up_80003es2lan(struct e1000_hw *hw); static s32 e1000_read_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset, - u16 *data); + u16 *data); static s32 e1000_write_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset, - u16 data); + u16 data); static s32 e1000_copper_link_setup_gg82563_80003es2lan(struct e1000_hw *hw); static void e1000_initialize_hw_bits_80003es2lan(struct e1000_hw *hw); static void e1000_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask); @@ -85,8 +85,8 @@ static void e1000_power_down_phy_copper_ static const u16 e1000_gg82563_cable_length_table[] = { 0, 60, 115, 150, 150, 60, 115, 150, 180, 180, 0xFF }; #define GG82563_CABLE_LENGTH_TABLE_SIZE \ - (sizeof(e1000_gg82563_cable_length_table) / \ - sizeof(e1000_gg82563_cable_length_table[0])) + (sizeof(e1000_gg82563_cable_length_table) / \ + sizeof(e1000_gg82563_cable_length_table[0])) /** * e1000_init_phy_params_80003es2lan - Init ESB2 PHY func ptrs. @@ -100,34 +100,34 @@ static s32 e1000_init_phy_params_80003es DEBUGFUNC("e1000_init_phy_params_80003es2lan"); if (hw->phy.media_type != e1000_media_type_copper) { - phy->type = e1000_phy_none; + phy->type = e1000_phy_none; goto out; } else { phy->ops.power_up = e1000_power_up_phy_copper; phy->ops.power_down = e1000_power_down_phy_copper_80003es2lan; } - phy->addr = 1; - phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; - phy->reset_delay_us = 100; - phy->type = e1000_phy_gg82563; - - phy->ops.acquire = e1000_acquire_phy_80003es2lan; - phy->ops.check_polarity = e1000_check_polarity_m88; - phy->ops.check_reset_block = e1000_check_reset_block_generic; - phy->ops.commit = e1000_phy_sw_reset_generic; - phy->ops.get_cfg_done = e1000_get_cfg_done_80003es2lan; - phy->ops.get_info = e1000_get_phy_info_m88; - phy->ops.release = e1000_release_phy_80003es2lan; - phy->ops.reset = e1000_phy_hw_reset_generic; - phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_generic; + phy->addr = 1; + phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; + phy->reset_delay_us = 100; + phy->type = e1000_phy_gg82563; + + phy->ops.acquire = e1000_acquire_phy_80003es2lan; + phy->ops.check_polarity = e1000_check_polarity_m88; + phy->ops.check_reset_block = e1000_check_reset_block_generic; + phy->ops.commit = e1000_phy_sw_reset_generic; + phy->ops.get_cfg_done = e1000_get_cfg_done_80003es2lan; + phy->ops.get_info = e1000_get_phy_info_m88; + phy->ops.release = e1000_release_phy_80003es2lan; + phy->ops.reset = e1000_phy_hw_reset_generic; + phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_generic; phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_80003es2lan; - phy->ops.get_cable_length = e1000_get_cable_length_80003es2lan; - phy->ops.read_reg = e1000_read_phy_reg_gg82563_80003es2lan; - phy->ops.write_reg = e1000_write_phy_reg_gg82563_80003es2lan; + phy->ops.get_cable_length = e1000_get_cable_length_80003es2lan; + phy->ops.read_reg = e1000_read_phy_reg_gg82563_80003es2lan; + phy->ops.write_reg = e1000_write_phy_reg_gg82563_80003es2lan; - phy->ops.cfg_on_link_up = e1000_cfg_on_link_up_80003es2lan; + phy->ops.cfg_on_link_up = e1000_cfg_on_link_up_80003es2lan; /* This can only be done after all function pointers are setup. */ ret_val = e1000_get_phy_id(hw); @@ -154,19 +154,19 @@ static s32 e1000_init_nvm_params_80003es DEBUGFUNC("e1000_init_nvm_params_80003es2lan"); - nvm->opcode_bits = 8; - nvm->delay_usec = 1; + nvm->opcode_bits = 8; + nvm->delay_usec = 1; switch (nvm->override) { case e1000_nvm_override_spi_large: - nvm->page_size = 32; + nvm->page_size = 32; nvm->address_bits = 16; break; case e1000_nvm_override_spi_small: - nvm->page_size = 8; + nvm->page_size = 8; nvm->address_bits = 8; break; default: - nvm->page_size = eecd & E1000_EECD_ADDR_BITS ? 32 : 8; + nvm->page_size = eecd & E1000_EECD_ADDR_BITS ? 32 : 8; nvm->address_bits = eecd & E1000_EECD_ADDR_BITS ? 16 : 8; break; } @@ -174,7 +174,7 @@ static s32 e1000_init_nvm_params_80003es nvm->type = e1000_nvm_eeprom_spi; size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >> - E1000_EECD_SIZE_EX_SHIFT); + E1000_EECD_SIZE_EX_SHIFT); /* * Added to a constant, "size" becomes the left-shift value @@ -185,16 +185,16 @@ static s32 e1000_init_nvm_params_80003es /* EEPROM access above 16k is unsupported */ if (size > 14) size = 14; - nvm->word_size = 1 << size; + nvm->word_size = 1 << size; /* Function Pointers */ - nvm->ops.acquire = e1000_acquire_nvm_80003es2lan; - nvm->ops.read = e1000_read_nvm_eerd; - nvm->ops.release = e1000_release_nvm_80003es2lan; - nvm->ops.update = e1000_update_nvm_checksum_generic; + nvm->ops.acquire = e1000_acquire_nvm_80003es2lan; + nvm->ops.read = e1000_read_nvm_eerd; + nvm->ops.release = e1000_release_nvm_80003es2lan; + nvm->ops.update = e1000_update_nvm_checksum_generic; nvm->ops.valid_led_default = e1000_valid_led_default_generic; - nvm->ops.validate = e1000_validate_nvm_checksum_generic; - nvm->ops.write = e1000_write_nvm_80003es2lan; + nvm->ops.validate = e1000_validate_nvm_checksum_generic; + nvm->ops.write = e1000_write_nvm_80003es2lan; return E1000_SUCCESS; } @@ -215,13 +215,13 @@ static s32 e1000_init_mac_params_80003es hw->phy.media_type = e1000_media_type_internal_serdes; mac->ops.check_for_link = e1000_check_for_serdes_link_generic; mac->ops.setup_physical_interface = - e1000_setup_fiber_serdes_link_generic; + e1000_setup_fiber_serdes_link_generic; break; default: hw->phy.media_type = e1000_media_type_copper; mac->ops.check_for_link = e1000_check_for_copper_link_generic; mac->ops.setup_physical_interface = - e1000_setup_copper_link_80003es2lan; + e1000_setup_copper_link_80003es2lan; break; } @@ -234,9 +234,8 @@ static s32 e1000_init_mac_params_80003es /* FWSM register */ mac->has_fwsm = TRUE; /* ARC supported; valid only if manageability features are enabled. */ - mac->arc_subsystem_valid = - (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK) - ? TRUE : FALSE; + mac->arc_subsystem_valid = (E1000_READ_REG(hw, E1000_FWSM) & + E1000_FWSM_MODE_MASK) ? TRUE : FALSE; /* Adaptive IFS not supported */ mac->adaptive_ifs = FALSE; @@ -330,7 +329,7 @@ static void e1000_release_phy_80003es2la } /** - * e1000_acquire_mac_csr_80003es2lan - Acquire rights to access Kumeran register + * e1000_acquire_mac_csr_80003es2lan - Acquire right to access Kumeran register * @hw: pointer to the HW structure * * Acquire the semaphore to access the Kumeran interface. @@ -348,7 +347,7 @@ static s32 e1000_acquire_mac_csr_80003es } /** - * e1000_release_mac_csr_80003es2lan - Release rights to access Kumeran Register + * e1000_release_mac_csr_80003es2lan - Release right to access Kumeran Register * @hw: pointer to the HW structure * * Release the semaphore used to access the Kumeran interface @@ -488,7 +487,7 @@ static void e1000_release_swfw_sync_8000 * Read the GG82563 PHY register. **/ static s32 e1000_read_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw, - u32 offset, u16 *data) + u32 offset, u16 *data) { s32 ret_val; u32 page_select; @@ -538,14 +537,14 @@ static s32 e1000_read_phy_reg_gg82563_80 usec_delay(200); ret_val = e1000_read_phy_reg_mdic(hw, - MAX_PHY_REG_ADDRESS & offset, - data); + MAX_PHY_REG_ADDRESS & offset, + data); usec_delay(200); } else { ret_val = e1000_read_phy_reg_mdic(hw, - MAX_PHY_REG_ADDRESS & offset, - data); + MAX_PHY_REG_ADDRESS & offset, + data); } e1000_release_phy_80003es2lan(hw); @@ -563,7 +562,7 @@ out: * Write to the GG82563 PHY register. **/ static s32 e1000_write_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw, - u32 offset, u16 data) + u32 offset, u16 data) { s32 ret_val; u32 page_select; @@ -613,14 +612,14 @@ static s32 e1000_write_phy_reg_gg82563_8 usec_delay(200); ret_val = e1000_write_phy_reg_mdic(hw, - MAX_PHY_REG_ADDRESS & offset, - data); + MAX_PHY_REG_ADDRESS & offset, + data); usec_delay(200); } else { ret_val = e1000_write_phy_reg_mdic(hw, - MAX_PHY_REG_ADDRESS & offset, - data); + MAX_PHY_REG_ADDRESS & offset, + data); } e1000_release_phy_80003es2lan(hw); @@ -639,7 +638,7 @@ out: * Write "words" of data to the ESB2 NVM. **/ static s32 e1000_write_nvm_80003es2lan(struct e1000_hw *hw, u16 offset, - u16 words, u16 *data) + u16 words, u16 *data) { DEBUGFUNC("e1000_write_nvm_80003es2lan"); @@ -729,11 +728,10 @@ static s32 e1000_phy_force_speed_duplex_ usec_delay(1); if (hw->phy.autoneg_wait_to_complete) { - DEBUGOUT("Waiting for forced speed/duplex link " - "on GG82563 phy.\n"); + DEBUGOUT("Waiting for forced speed/duplex link on GG82563 phy.\n"); ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT, - 100000, &link); + 100000, &link); if (ret_val) goto out; @@ -749,12 +747,13 @@ static s32 e1000_phy_force_speed_duplex_ /* Try once more */ ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT, - 100000, &link); + 100000, &link); if (ret_val) goto out; } - ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, &phy_data); + ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, + &phy_data); if (ret_val) goto out; @@ -773,7 +772,8 @@ static s32 e1000_phy_force_speed_duplex_ * duplex. */ phy_data |= GG82563_MSCR_ASSERT_CRS_ON_TX; - ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, phy_data); + ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, + phy_data); out: return ret_val; @@ -826,21 +826,20 @@ out: * Retrieve the current speed and duplex configuration. **/ static s32 e1000_get_link_up_info_80003es2lan(struct e1000_hw *hw, u16 *speed, - u16 *duplex) + u16 *duplex) { s32 ret_val; DEBUGFUNC("e1000_get_link_up_info_80003es2lan"); if (hw->phy.media_type == e1000_media_type_copper) { - ret_val = e1000_get_speed_and_duplex_copper_generic(hw, - speed, - duplex); + ret_val = e1000_get_speed_and_duplex_copper_generic(hw, speed, + duplex); hw->phy.ops.cfg_on_link_up(hw); } else { ret_val = e1000_get_speed_and_duplex_fiber_serdes_generic(hw, - speed, - duplex); + speed, + duplex); } return ret_val; @@ -939,21 +938,21 @@ static s32 e1000_init_hw_80003es2lan(str /* Disable IBIST slave mode (far-end loopback) */ e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, - &kum_reg_data); + &kum_reg_data); kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, - kum_reg_data); + kum_reg_data); /* Set the transmit descriptor write-back policy */ reg_data = E1000_READ_REG(hw, E1000_TXDCTL(0)); reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) | - E1000_TXDCTL_FULL_TX_DESC_WB | E1000_TXDCTL_COUNT_DESC; + E1000_TXDCTL_FULL_TX_DESC_WB | E1000_TXDCTL_COUNT_DESC; E1000_WRITE_REG(hw, E1000_TXDCTL(0), reg_data); /* ...for both queues. */ reg_data = E1000_READ_REG(hw, E1000_TXDCTL(1)); reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) | - E1000_TXDCTL_FULL_TX_DESC_WB | E1000_TXDCTL_COUNT_DESC; + E1000_TXDCTL_FULL_TX_DESC_WB | E1000_TXDCTL_COUNT_DESC; E1000_WRITE_REG(hw, E1000_TXDCTL(1), reg_data); /* Enable retransmit on late collisions */ @@ -981,9 +980,9 @@ static s32 e1000_init_hw_80003es2lan(str hw->dev_spec._80003es2lan.mdic_wa_enable = TRUE; ret_val = e1000_read_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET >> - E1000_KMRNCTRLSTA_OFFSET_SHIFT, - &i); + E1000_KMRNCTRLSTA_OFFSET >> + E1000_KMRNCTRLSTA_OFFSET_SHIFT, + &i); if (!ret_val) { if ((i & E1000_KMRNCTRLSTA_OPMODE_MASK) == E1000_KMRNCTRLSTA_OPMODE_INBAND_MDIO) @@ -1056,11 +1055,7 @@ static s32 e1000_copper_link_setup_gg825 DEBUGFUNC("e1000_copper_link_setup_gg82563_80003es2lan"); - if (phy->reset_disable) - goto skip_reset; - - ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, - &data); + ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, &data); if (ret_val) goto out; @@ -1068,8 +1063,7 @@ static s32 e1000_copper_link_setup_gg825 /* Use 25MHz for both link down and 1000Base-T for Tx clock. */ data |= GG82563_MSCR_TX_CLK_1000MBPS_25; - ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, - data); + ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, data); if (ret_val) goto out; @@ -1122,7 +1116,6 @@ static s32 e1000_copper_link_setup_gg825 goto out; } -skip_reset: /* Bypass Rx and Tx FIFO's */ ret_val = e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_OFFSET_FIFO_CTRL, @@ -1132,14 +1125,12 @@ skip_reset: goto out; ret_val = e1000_read_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE, - &data); + E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE, &data); if (ret_val) goto out; data |= E1000_KMRNCTRLSTA_OPMODE_E_IDLE; ret_val = e1000_write_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE, - data); + E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE, data); if (ret_val) goto out; @@ -1169,18 +1160,18 @@ skip_reset: /* Enable Electrical Idle on the PHY */ data |= GG82563_PMCR_ENABLE_ELECTRICAL_IDLE; ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_PWR_MGMT_CTRL, - data); + data); if (ret_val) goto out; ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, - &data); + &data); if (ret_val) goto out; data &= ~GG82563_KMCR_PASS_FALSE_CARRIER; ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, - data); + data); if (ret_val) goto out; } @@ -1228,27 +1219,25 @@ static s32 e1000_setup_copper_link_80003 * polling the phy; this fixes erroneous timeouts at 10Mbps. */ ret_val = e1000_write_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 4), - 0xFFFF); + 0xFFFF); if (ret_val) goto out; ret_val = e1000_read_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 9), - ®_data); + ®_data); if (ret_val) goto out; reg_data |= 0x3F; ret_val = e1000_write_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 9), - reg_data); + reg_data); if (ret_val) goto out; ret_val = e1000_read_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_INB_CTRL, - ®_data); + E1000_KMRNCTRLSTA_OFFSET_INB_CTRL, ®_data); if (ret_val) goto out; reg_data |= E1000_KMRNCTRLSTA_INB_CTRL_DIS_PADDING; ret_val = e1000_write_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_INB_CTRL, - reg_data); + E1000_KMRNCTRLSTA_OFFSET_INB_CTRL, reg_data); if (ret_val) goto out; @@ -1279,9 +1268,8 @@ static s32 e1000_cfg_on_link_up_80003es2 DEBUGFUNC("e1000_configure_on_link_up"); if (hw->phy.media_type == e1000_media_type_copper) { - ret_val = e1000_get_speed_and_duplex_copper_generic(hw, - &speed, - &duplex); + ret_val = e1000_get_speed_and_duplex_copper_generic(hw, &speed, + &duplex); if (ret_val) goto out; @@ -1314,8 +1302,8 @@ static s32 e1000_cfg_kmrn_10_100_80003es reg_data = E1000_KMRNCTRLSTA_HD_CTRL_10_100_DEFAULT; ret_val = e1000_write_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_HD_CTRL, - reg_data); + E1000_KMRNCTRLSTA_OFFSET_HD_CTRL, + reg_data); if (ret_val) goto out; @@ -1327,12 +1315,12 @@ static s32 e1000_cfg_kmrn_10_100_80003es do { ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, - ®_data); + ®_data); if (ret_val) goto out; ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, - ®_data2); + ®_data2); if (ret_val) goto out; i++; @@ -1343,7 +1331,8 @@ static s32 e1000_cfg_kmrn_10_100_80003es else reg_data &= ~GG82563_KMCR_PASS_FALSE_CARRIER; - ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, reg_data); + ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, + reg_data); out: return ret_val; @@ -1367,8 +1356,7 @@ static s32 e1000_cfg_kmrn_1000_80003es2l reg_data = E1000_KMRNCTRLSTA_HD_CTRL_1000_DEFAULT; ret_val = e1000_write_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_HD_CTRL, - reg_data); + E1000_KMRNCTRLSTA_OFFSET_HD_CTRL, reg_data); if (ret_val) goto out; @@ -1380,19 +1368,20 @@ static s32 e1000_cfg_kmrn_1000_80003es2l do { ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, - ®_data); + ®_data); if (ret_val) goto out; ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, - ®_data2); + ®_data2); if (ret_val) goto out; i++; } while ((reg_data != reg_data2) && (i < GG82563_MAX_KMRN_RETRY)); reg_data &= ~GG82563_KMCR_PASS_FALSE_CARRIER; - ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, reg_data); + ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, + reg_data); out: return ret_val; @@ -1409,7 +1398,7 @@ out: * Release the semaphore before exiting. **/ static s32 e1000_read_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset, - u16 *data) + u16 *data) { u32 kmrnctrlsta; s32 ret_val = E1000_SUCCESS; @@ -1421,8 +1410,9 @@ static s32 e1000_read_kmrn_reg_80003es2l goto out; kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) & - E1000_KMRNCTRLSTA_OFFSET) | E1000_KMRNCTRLSTA_REN; + E1000_KMRNCTRLSTA_OFFSET) | E1000_KMRNCTRLSTA_REN; E1000_WRITE_REG(hw, E1000_KMRNCTRLSTA, kmrnctrlsta); + E1000_WRITE_FLUSH(hw); usec_delay(2); @@ -1446,7 +1436,7 @@ out: * before exiting. **/ static s32 e1000_write_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset, - u16 data) + u16 data) { u32 kmrnctrlsta; s32 ret_val = E1000_SUCCESS; @@ -1458,8 +1448,9 @@ static s32 e1000_write_kmrn_reg_80003es2 goto out; kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) & - E1000_KMRNCTRLSTA_OFFSET) | data; + E1000_KMRNCTRLSTA_OFFSET) | data; E1000_WRITE_REG(hw, E1000_KMRNCTRLSTA, kmrnctrlsta); + E1000_WRITE_FLUSH(hw); usec_delay(2); Modified: stable/9/sys/dev/e1000/e1000_80003es2lan.h ============================================================================== --- stable/9/sys/dev/e1000/e1000_80003es2lan.h Wed May 16 22:21:57 2012 (r235526) +++ stable/9/sys/dev/e1000/e1000_80003es2lan.h Wed May 16 22:22:52 2012 (r235527) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2010, Intel Corporation + Copyright (c) 2001-2011, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -35,48 +35,47 @@ #ifndef _E1000_80003ES2LAN_H_ #define _E1000_80003ES2LAN_H_ -#define E1000_KMRNCTRLSTA_OFFSET_FIFO_CTRL 0x00 -#define E1000_KMRNCTRLSTA_OFFSET_INB_CTRL 0x02 -#define E1000_KMRNCTRLSTA_OFFSET_HD_CTRL 0x10 -#define E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE 0x1F - -#define E1000_KMRNCTRLSTA_FIFO_CTRL_RX_BYPASS 0x0008 -#define E1000_KMRNCTRLSTA_FIFO_CTRL_TX_BYPASS 0x0800 -#define E1000_KMRNCTRLSTA_INB_CTRL_DIS_PADDING 0x0010 +#define E1000_KMRNCTRLSTA_OFFSET_FIFO_CTRL 0x00 +#define E1000_KMRNCTRLSTA_OFFSET_INB_CTRL 0x02 +#define E1000_KMRNCTRLSTA_OFFSET_HD_CTRL 0x10 +#define E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE 0x1F + +#define E1000_KMRNCTRLSTA_FIFO_CTRL_RX_BYPASS 0x0008 +#define E1000_KMRNCTRLSTA_FIFO_CTRL_TX_BYPASS 0x0800 +#define E1000_KMRNCTRLSTA_INB_CTRL_DIS_PADDING 0x0010 #define E1000_KMRNCTRLSTA_HD_CTRL_10_100_DEFAULT 0x0004 -#define E1000_KMRNCTRLSTA_HD_CTRL_1000_DEFAULT 0x0000 -#define E1000_KMRNCTRLSTA_OPMODE_E_IDLE 0x2000 +#define E1000_KMRNCTRLSTA_HD_CTRL_1000_DEFAULT 0x0000 +#define E1000_KMRNCTRLSTA_OPMODE_E_IDLE 0x2000 -#define E1000_KMRNCTRLSTA_OPMODE_MASK 0x000C -#define E1000_KMRNCTRLSTA_OPMODE_INBAND_MDIO 0x0004 +#define E1000_KMRNCTRLSTA_OPMODE_MASK 0x000C +#define E1000_KMRNCTRLSTA_OPMODE_INBAND_MDIO 0x0004 #define E1000_TCTL_EXT_GCEX_MASK 0x000FFC00 /* Gigabit Carry Extend Padding */ -#define DEFAULT_TCTL_EXT_GCEX_80003ES2LAN 0x00010000 +#define DEFAULT_TCTL_EXT_GCEX_80003ES2LAN 0x00010000 -#define DEFAULT_TIPG_IPGT_1000_80003ES2LAN 0x8 -#define DEFAULT_TIPG_IPGT_10_100_80003ES2LAN 0x9 +#define DEFAULT_TIPG_IPGT_1000_80003ES2LAN 0x8 +#define DEFAULT_TIPG_IPGT_10_100_80003ES2LAN 0x9 /* GG82563 PHY Specific Status Register (Page 0, Register 16 */ -#define GG82563_PSCR_POLARITY_REVERSAL_DISABLE 0x0002 /* 1=Reversal Disabled */ -#define GG82563_PSCR_CROSSOVER_MODE_MASK 0x0060 -#define GG82563_PSCR_CROSSOVER_MODE_MDI 0x0000 /* 00=Manual MDI */ -#define GG82563_PSCR_CROSSOVER_MODE_MDIX 0x0020 /* 01=Manual MDIX */ -#define GG82563_PSCR_CROSSOVER_MODE_AUTO 0x0060 /* 11=Auto crossover */ +#define GG82563_PSCR_POLARITY_REVERSAL_DISABLE 0x0002 /* 1=Reversal Disabled */ +#define GG82563_PSCR_CROSSOVER_MODE_MASK 0x0060 +#define GG82563_PSCR_CROSSOVER_MODE_MDI 0x0000 /* 00=Manual MDI */ +#define GG82563_PSCR_CROSSOVER_MODE_MDIX 0x0020 /* 01=Manual MDIX */ +#define GG82563_PSCR_CROSSOVER_MODE_AUTO 0x0060 /* 11=Auto crossover */ /* PHY Specific Control Register 2 (Page 0, Register 26) */ -#define GG82563_PSCR2_REVERSE_AUTO_NEG 0x2000 - /* 1=Reverse Auto-Negotiation */ +#define GG82563_PSCR2_REVERSE_AUTO_NEG 0x2000 /* 1=Reverse Auto-Nego */ /* MAC Specific Control Register (Page 2, Register 21) */ /* Tx clock speed for Link Down and 1000BASE-T for the following speeds */ -#define GG82563_MSCR_TX_CLK_MASK 0x0007 -#define GG82563_MSCR_TX_CLK_10MBPS_2_5 0x0004 -#define GG82563_MSCR_TX_CLK_100MBPS_25 0x0005 -#define GG82563_MSCR_TX_CLK_1000MBPS_2_5 0x0006 -#define GG82563_MSCR_TX_CLK_1000MBPS_25 0x0007 +#define GG82563_MSCR_TX_CLK_MASK 0x0007 +#define GG82563_MSCR_TX_CLK_10MBPS_2_5 0x0004 +#define GG82563_MSCR_TX_CLK_100MBPS_25 0x0005 +#define GG82563_MSCR_TX_CLK_1000MBPS_2_5 0x0006 +#define GG82563_MSCR_TX_CLK_1000MBPS_25 0x0007 -#define GG82563_MSCR_ASSERT_CRS_ON_TX 0x0010 /* 1=Assert */ +#define GG82563_MSCR_ASSERT_CRS_ON_TX 0x0010 /* 1=Assert */ /* DSP Distance Register (Page 5, Register 26) */ /* @@ -86,19 +85,19 @@ * 3 = 110-140M * 4 = >140M */ -#define GG82563_DSPD_CABLE_LENGTH 0x0007 +#define GG82563_DSPD_CABLE_LENGTH 0x0007 /* Kumeran Mode Control Register (Page 193, Register 16) */ -#define GG82563_KMCR_PASS_FALSE_CARRIER 0x0800 +#define GG82563_KMCR_PASS_FALSE_CARRIER 0x0800 /* Max number of times Kumeran read/write should be validated */ -#define GG82563_MAX_KMRN_RETRY 0x5 +#define GG82563_MAX_KMRN_RETRY 0x5 /* Power Management Control Register (Page 193, Register 20) */ -#define GG82563_PMCR_ENABLE_ELECTRICAL_IDLE 0x0001 - /* 1=Enable SERDES Electrical Idle */ +/* 1=Enable SERDES Electrical Idle */ +#define GG82563_PMCR_ENABLE_ELECTRICAL_IDLE 0x0001 /* In-Band Control Register (Page 194, Register 18) */ -#define GG82563_ICR_DIS_PADDING 0x0010 /* Disable Padding */ +#define GG82563_ICR_DIS_PADDING 0x0010 /* Disable Padding */ #endif Modified: stable/9/sys/dev/e1000/e1000_82540.c ============================================================================== --- stable/9/sys/dev/e1000/e1000_82540.c Wed May 16 22:21:57 2012 (r235526) +++ stable/9/sys/dev/e1000/e1000_82540.c Wed May 16 22:22:52 2012 (r235527) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2010, Intel Corporation + Copyright (c) 2001-2011, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -68,23 +68,23 @@ static s32 e1000_init_phy_params_82540(s struct e1000_phy_info *phy = &hw->phy; s32 ret_val = E1000_SUCCESS; - phy->addr = 1; - phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; - phy->reset_delay_us = 10000; - phy->type = e1000_phy_m88; + phy->addr = 1; + phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; + phy->reset_delay_us = 10000; + phy->type = e1000_phy_m88; /* Function Pointers */ - phy->ops.check_polarity = e1000_check_polarity_m88; - phy->ops.commit = e1000_phy_sw_reset_generic; - phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_m88; - phy->ops.get_cable_length = e1000_get_cable_length_m88; - phy->ops.get_cfg_done = e1000_get_cfg_done_generic; - phy->ops.read_reg = e1000_read_phy_reg_m88; - phy->ops.reset = e1000_phy_hw_reset_generic; - phy->ops.write_reg = e1000_write_phy_reg_m88; - phy->ops.get_info = e1000_get_phy_info_m88; - phy->ops.power_up = e1000_power_up_phy_copper; - phy->ops.power_down = e1000_power_down_phy_copper_82540; + phy->ops.check_polarity = e1000_check_polarity_m88; + phy->ops.commit = e1000_phy_sw_reset_generic; + phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_m88; + phy->ops.get_cable_length = e1000_get_cable_length_m88; + phy->ops.get_cfg_done = e1000_get_cfg_done_generic; + phy->ops.read_reg = e1000_read_phy_reg_m88; + phy->ops.reset = e1000_phy_hw_reset_generic; + phy->ops.write_reg = e1000_write_phy_reg_m88; + phy->ops.get_info = e1000_get_phy_info_m88; + phy->ops.power_up = e1000_power_up_phy_copper; + phy->ops.power_down = e1000_power_down_phy_copper_82540; ret_val = e1000_get_phy_id(hw); if (ret_val) @@ -121,32 +121,32 @@ static s32 e1000_init_nvm_params_82540(s DEBUGFUNC("e1000_init_nvm_params_82540"); - nvm->type = e1000_nvm_eeprom_microwire; - nvm->delay_usec = 50; - nvm->opcode_bits = 3; + nvm->type = e1000_nvm_eeprom_microwire; + nvm->delay_usec = 50; + nvm->opcode_bits = 3; switch (nvm->override) { case e1000_nvm_override_microwire_large: - nvm->address_bits = 8; - nvm->word_size = 256; + nvm->address_bits = 8; + nvm->word_size = 256; break; case e1000_nvm_override_microwire_small: - nvm->address_bits = 6; - nvm->word_size = 64; + nvm->address_bits = 6; + nvm->word_size = 64; break; default: - nvm->address_bits = eecd & E1000_EECD_SIZE ? 8 : 6; - nvm->word_size = eecd & E1000_EECD_SIZE ? 256 : 64; + nvm->address_bits = eecd & E1000_EECD_SIZE ? 8 : 6; + nvm->word_size = eecd & E1000_EECD_SIZE ? 256 : 64; break; } /* Function Pointers */ - nvm->ops.acquire = e1000_acquire_nvm_generic; - nvm->ops.read = e1000_read_nvm_microwire; - nvm->ops.release = e1000_release_nvm_generic; - nvm->ops.update = e1000_update_nvm_checksum_generic; - nvm->ops.valid_led_default = e1000_valid_led_default_generic; - nvm->ops.validate = e1000_validate_nvm_checksum_generic; - nvm->ops.write = e1000_write_nvm_microwire; + nvm->ops.acquire = e1000_acquire_nvm_generic; + nvm->ops.read = e1000_read_nvm_microwire; + nvm->ops.release = e1000_release_nvm_generic; + nvm->ops.update = e1000_update_nvm_checksum_generic; + nvm->ops.valid_led_default = e1000_valid_led_default_generic; + nvm->ops.validate = e1000_validate_nvm_checksum_generic; + nvm->ops.write = e1000_write_nvm_microwire; return E1000_SUCCESS; } @@ -198,9 +198,9 @@ static s32 e1000_init_mac_params_82540(s mac->ops.setup_link = e1000_setup_link_generic; /* physical interface setup */ mac->ops.setup_physical_interface = - (hw->phy.media_type == e1000_media_type_copper) - ? e1000_setup_copper_link_82540 - : e1000_setup_fiber_serdes_link_82540; + (hw->phy.media_type == e1000_media_type_copper) + ? e1000_setup_copper_link_82540 + : e1000_setup_fiber_serdes_link_82540; /* check for link */ switch (hw->phy.media_type) { case e1000_media_type_copper: @@ -219,9 +219,9 @@ static s32 e1000_init_mac_params_82540(s } /* link info */ mac->ops.get_link_up_info = - (hw->phy.media_type == e1000_media_type_copper) - ? e1000_get_speed_and_duplex_copper_generic - : e1000_get_speed_and_duplex_fiber_serdes_generic; + (hw->phy.media_type == e1000_media_type_copper) + ? e1000_get_speed_and_duplex_copper_generic + : e1000_get_speed_and_duplex_fiber_serdes_generic; /* multicast address update */ mac->ops.update_mc_addr_list = e1000_update_mc_addr_list_generic; /* writing VFTA */ @@ -374,7 +374,7 @@ static s32 e1000_init_hw_82540(struct e1 txdctl = E1000_READ_REG(hw, E1000_TXDCTL(0)); txdctl = (txdctl & ~E1000_TXDCTL_WTHRESH) | - E1000_TXDCTL_FULL_TX_DESC_WB; + E1000_TXDCTL_FULL_TX_DESC_WB; E1000_WRITE_REG(hw, E1000_TXDCTL(0), txdctl); /* @@ -427,11 +427,13 @@ static s32 e1000_setup_copper_link_82540 if (hw->mac.type == e1000_82545_rev_3 || hw->mac.type == e1000_82546_rev_3) { - ret_val = hw->phy.ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &data); + ret_val = hw->phy.ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, + &data); if (ret_val) goto out; data |= 0x00000008; - ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, data); + ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, + data); if (ret_val) goto out; } @@ -508,9 +510,8 @@ static s32 e1000_adjust_serdes_amplitude if (nvm_data != NVM_RESERVED_WORD) { /* Adjust serdes output amplitude only. */ nvm_data &= NVM_SERDES_AMPLITUDE_MASK; - ret_val = hw->phy.ops.write_reg(hw, - M88E1000_PHY_EXT_CTRL, - nvm_data); + ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_EXT_CTRL, + nvm_data); if (ret_val) goto out; } @@ -535,9 +536,8 @@ static s32 e1000_set_vco_speed_82540(str /* Set PHY register 30, page 5, bit 8 to 0 */ - ret_val = hw->phy.ops.read_reg(hw, - M88E1000_PHY_PAGE_SELECT, - &default_page); + ret_val = hw->phy.ops.read_reg(hw, M88E1000_PHY_PAGE_SELECT, + &default_page); if (ret_val) goto out; @@ -570,7 +570,7 @@ static s32 e1000_set_vco_speed_82540(str goto out; ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_PAGE_SELECT, - default_page); + default_page); out: return ret_val; @@ -587,7 +587,6 @@ out: **/ static s32 e1000_set_phy_mode_82540(struct e1000_hw *hw) { - struct e1000_phy_info *phy = &hw->phy; s32 ret_val = E1000_SUCCESS; u16 nvm_data; @@ -604,20 +603,18 @@ static s32 e1000_set_phy_mode_82540(stru if ((nvm_data != NVM_RESERVED_WORD) && (nvm_data & NVM_PHY_CLASS_A)) { ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_PAGE_SELECT, - 0x000B); + 0x000B); if (ret_val) { ret_val = -E1000_ERR_PHY; goto out; } - ret_val = hw->phy.ops.write_reg(hw, - M88E1000_PHY_GEN_CONTROL, - 0x8104); + ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL, + 0x8104); if (ret_val) { ret_val = -E1000_ERR_PHY; goto out; } - phy->reset_disable = FALSE; } out: Modified: stable/9/sys/dev/e1000/e1000_82541.c ============================================================================== --- stable/9/sys/dev/e1000/e1000_82541.c Wed May 16 22:21:57 2012 (r235526) +++ stable/9/sys/dev/e1000/e1000_82541.c Wed May 16 22:22:52 2012 (r235527) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2010, Intel Corporation + Copyright (c) 2001-2011, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -300,7 +300,7 @@ void e1000_init_function_pointers_82541( **/ static s32 e1000_reset_hw_82541(struct e1000_hw *hw) { - u32 ledctl, ctrl, manc; + u32 ledctl, ctrl, icr, manc; DEBUGFUNC("e1000_reset_hw_82541"); @@ -364,7 +364,7 @@ static s32 e1000_reset_hw_82541(struct e E1000_WRITE_REG(hw, E1000_IMC, 0xFFFFFFFF); /* Clear any pending interrupt events. */ - E1000_READ_REG(hw, E1000_ICR); + icr = E1000_READ_REG(hw, E1000_ICR); return E1000_SUCCESS; } @@ -390,7 +390,7 @@ static s32 e1000_init_hw_82541(struct e1 DEBUGOUT("Error initializing identification LED\n"); /* This is not fatal and we should not stop init due to this */ } - + /* Storing the Speed Power Down value for later use */ ret_val = hw->phy.ops.read_reg(hw, IGP01E1000_GMII_FIFO, @@ -549,8 +549,6 @@ static s32 e1000_setup_copper_link_82541 ctrl &= ~(E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX); E1000_WRITE_REG(hw, E1000_CTRL, ctrl); - hw->phy.reset_disable = FALSE; - /* Earlier revs of the IGP phy require us to force MDI. */ if (hw->mac.type == e1000_82541 || hw->mac.type == e1000_82547) { dev_spec->dsp_config = e1000_dsp_config_disabled; Modified: stable/9/sys/dev/e1000/e1000_82543.c ============================================================================== --- stable/9/sys/dev/e1000/e1000_82543.c Wed May 16 22:21:57 2012 (r235526) +++ stable/9/sys/dev/e1000/e1000_82543.c Wed May 16 22:22:52 2012 (r235527) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2010, Intel Corporation *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu May 17 00:06:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0A32106564A; Thu, 17 May 2012 00:06:54 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C93918FC0C; Thu, 17 May 2012 00:06:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4H06sEb069759; Thu, 17 May 2012 00:06:54 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4H06sQT069755; Thu, 17 May 2012 00:06:54 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201205170006.q4H06sQT069755@svn.freebsd.org> From: Jack F Vogel Date: Thu, 17 May 2012 00:06:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235528 - in stable/9/sys: conf dev/ixgbe modules/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 00:06:55 -0000 Author: jfv Date: Thu May 17 00:06:54 2012 New Revision: 235528 URL: http://svn.freebsd.org/changeset/base/235528 Log: MFC of the ixgbe driver. Including revisions: 228276,229767,229939,230329, 230572,230775,230790,231796, 232238,234137,234229,234620 Added: stable/9/sys/dev/ixgbe/ixgbe_82598.h - copied unchanged from r230775, head/sys/dev/ixgbe/ixgbe_82598.h stable/9/sys/dev/ixgbe/ixgbe_82599.h - copied unchanged from r230775, head/sys/dev/ixgbe/ixgbe_82599.h stable/9/sys/dev/ixgbe/ixgbe_x540.c - copied unchanged from r230775, head/sys/dev/ixgbe/ixgbe_x540.c stable/9/sys/dev/ixgbe/ixgbe_x540.h - copied unchanged from r230775, head/sys/dev/ixgbe/ixgbe_x540.h Modified: stable/9/sys/conf/files stable/9/sys/dev/ixgbe/ixgbe.c stable/9/sys/dev/ixgbe/ixgbe.h stable/9/sys/dev/ixgbe/ixgbe_82598.c stable/9/sys/dev/ixgbe/ixgbe_82599.c stable/9/sys/dev/ixgbe/ixgbe_api.c stable/9/sys/dev/ixgbe/ixgbe_api.h stable/9/sys/dev/ixgbe/ixgbe_common.c stable/9/sys/dev/ixgbe/ixgbe_common.h stable/9/sys/dev/ixgbe/ixgbe_mbx.c stable/9/sys/dev/ixgbe/ixgbe_mbx.h stable/9/sys/dev/ixgbe/ixgbe_osdep.h stable/9/sys/dev/ixgbe/ixgbe_phy.c stable/9/sys/dev/ixgbe/ixgbe_phy.h stable/9/sys/dev/ixgbe/ixgbe_type.h stable/9/sys/dev/ixgbe/ixgbe_vf.c stable/9/sys/dev/ixgbe/ixgbe_vf.h stable/9/sys/dev/ixgbe/ixv.c stable/9/sys/dev/ixgbe/ixv.h stable/9/sys/modules/ixgbe/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Wed May 16 22:22:52 2012 (r235527) +++ stable/9/sys/conf/files Thu May 17 00:06:54 2012 (r235528) @@ -1387,6 +1387,8 @@ dev/ixgbe/ixgbe_82598.c optional ixgbe compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_82599.c optional ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_x540.c optional ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/jme/if_jme.c optional jme pci dev/joy/joy.c optional joy dev/joy/joy_isa.c optional joy isa Modified: stable/9/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixgbe.c Wed May 16 22:22:52 2012 (r235527) +++ stable/9/sys/dev/ixgbe/ixgbe.c Thu May 17 00:06:54 2012 (r235528) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2012, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /********************************************************************* * Driver version *********************************************************************/ -char ixgbe_driver_version[] = "2.3.11"; +char ixgbe_driver_version[] = "2.4.5"; /********************************************************************* * PCI Device ID Table @@ -81,6 +81,8 @@ static ixgbe_vendor_info_t ixgbe_vendor_ {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BACKPLANE_FCOE, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_FCOE, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T, 0, 0, 0}, /* required last entry */ {0, 0, 0, 0, 0} }; @@ -153,6 +155,7 @@ static void ixgbe_refresh_mbufs(struct r static int ixgbe_xmit(struct tx_ring *, struct mbuf **); static int ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS); static int ixgbe_set_advertise(SYSCTL_HANDLER_ARGS); +static int ixgbe_set_thermal_test(SYSCTL_HANDLER_ARGS); static int ixgbe_dma_malloc(struct adapter *, bus_size_t, struct ixgbe_dma_alloc *, int); static void ixgbe_dma_free(struct adapter *, struct ixgbe_dma_alloc *); @@ -232,7 +235,7 @@ MODULE_DEPEND(ixgbe, ether, 1, 1, 1); static int ixgbe_enable_aim = TRUE; TUNABLE_INT("hw.ixgbe.enable_aim", &ixgbe_enable_aim); -static int ixgbe_max_interrupt_rate = (8000000 / IXGBE_LOW_LATENCY); +static int ixgbe_max_interrupt_rate = (4000000 / IXGBE_LOW_LATENCY); TUNABLE_INT("hw.ixgbe.max_interrupt_rate", &ixgbe_max_interrupt_rate); /* How many packets rxeof tries to clean at a time */ @@ -313,6 +316,18 @@ static int atr_sample_rate = 20; static int fdir_pballoc = 1; #endif +#ifdef DEV_NETMAP +/* + * The #ifdef DEV_NETMAP / #endif blocks in this file are meant to + * be a reference on how to implement netmap support in a driver. + * Additional comments are in ixgbe_netmap.h . + * + * contains functions for netmap support + * that extend the standard driver. + */ +#include +#endif /* DEV_NETMAP */ + /********************************************************************* * Device identification routine * @@ -403,19 +418,29 @@ ixgbe_attach(device_t dev) SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "flow_control", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "fc", CTLTYPE_INT | CTLFLAG_RW, adapter, 0, ixgbe_set_flowcntl, "I", "Flow Control"); - SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "advertise_gig", CTLTYPE_INT | CTLFLAG_RW, - adapter, 0, ixgbe_set_advertise, "I", "1G Link"); - SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "enable_aim", CTLTYPE_INT|CTLFLAG_RW, &ixgbe_enable_aim, 1, "Interrupt Moderation"); + /* + ** Allow a kind of speed control by forcing the autoneg + ** advertised speed list to only a certain value, this + ** supports 1G on 82599 devices, and 100Mb on x540. + */ + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "advertise_speed", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_set_advertise, "I", "Link Speed"); + + 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"); + /* Set up the timer callout */ callout_init_mtx(&adapter->timer, &adapter->core_mtx, 0); @@ -503,9 +528,10 @@ ixgbe_attach(device_t dev) /* Get Hardware Flow Control setting */ hw->fc.requested_mode = ixgbe_fc_full; + adapter->fc = hw->fc.requested_mode; hw->fc.pause_time = IXGBE_FC_PAUSE; hw->fc.low_water = IXGBE_FC_LO; - hw->fc.high_water = IXGBE_FC_HI; + hw->fc.high_water[0] = IXGBE_FC_HI; hw->fc.send_xon = TRUE; error = ixgbe_init_hw(hw); @@ -578,6 +604,9 @@ ixgbe_attach(device_t dev) ixgbe_add_hw_stats(adapter); +#ifdef DEV_NETMAP + ixgbe_netmap_attach(adapter); +#endif /* DEV_NETMAP */ INIT_DEBUGOUT("ixgbe_attach: end"); return (0); err_late: @@ -652,6 +681,9 @@ ixgbe_detach(device_t dev) ether_ifdetach(adapter->ifp); callout_drain(&adapter->timer); +#ifdef DEV_NETMAP + netmap_detach(adapter->ifp); +#endif /* DEV_NETMAP */ ixgbe_free_pci_resources(adapter); bus_generic_detach(dev); if_free(adapter->ifp); @@ -706,16 +738,20 @@ ixgbe_start_locked(struct tx_ring *txr, return; while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + if (txr->tx_avail <= IXGBE_QUEUE_MIN_FREE) { + txr->queue_status |= IXGBE_QUEUE_DEPLETED; + break; + } IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) break; if (ixgbe_xmit(txr, &m_head)) { - if (m_head == NULL) - break; - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - IFQ_DRV_PREPEND(&ifp->if_snd, m_head); + if (m_head != NULL) + IFQ_DRV_PREPEND(&ifp->if_snd, m_head); + if (txr->tx_avail <= IXGBE_QUEUE_MIN_FREE) + txr->queue_status |= IXGBE_QUEUE_DEPLETED; break; } /* Send a copy of the frame to the BPF listener */ @@ -764,11 +800,14 @@ ixgbe_mq_start(struct ifnet *ifp, struct /* Which queue to use */ if ((m->m_flags & M_FLOWID) != 0) i = m->m_pkthdr.flowid % adapter->num_queues; + else + i = curcpu % adapter->num_queues; txr = &adapter->tx_rings[i]; que = &adapter->queues[i]; - if (IXGBE_TX_TRYLOCK(txr)) { + if (((txr->queue_status & IXGBE_QUEUE_DEPLETED) == 0) && + IXGBE_TX_TRYLOCK(txr)) { err = ixgbe_mq_start_locked(ifp, txr, m); IXGBE_TX_UNLOCK(txr); } else { @@ -786,8 +825,9 @@ ixgbe_mq_start_locked(struct ifnet *ifp, struct mbuf *next; int enqueued, err = 0; - if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING || adapter->link_active == 0) { + if (((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) || + (txr->queue_status == IXGBE_QUEUE_DEPLETED) || + adapter->link_active == 0) { if (m != NULL) err = drbr_enqueue(ifp, txr->br, m); return (err); @@ -819,7 +859,7 @@ ixgbe_mq_start_locked(struct ifnet *ifp, if (txr->tx_avail < IXGBE_TX_OP_THRESHOLD) ixgbe_txeof(txr); if (txr->tx_avail < IXGBE_TX_OP_THRESHOLD) { - ifp->if_drv_flags |= IFF_DRV_OACTIVE; + txr->queue_status |= IXGBE_QUEUE_DEPLETED; break; } next = drbr_dequeue(ifp, txr->br); @@ -827,10 +867,13 @@ ixgbe_mq_start_locked(struct ifnet *ifp, if (enqueued > 0) { /* Set watchdog on */ - txr->queue_status = IXGBE_QUEUE_WORKING; + txr->queue_status |= IXGBE_QUEUE_WORKING; txr->watchdog_time = ticks; } + if (txr->tx_avail < IXGBE_TX_CLEANUP_THRESHOLD) + ixgbe_txeof(txr); + return (err); } @@ -898,8 +941,8 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c arp_ifinit(ifp, ifa); } else error = ether_ioctl(ifp, command, data); - break; #endif + break; case SIOCSIFMTU: IOCTL_DEBUGOUT("ioctl: SIOCSIFMTU (Set Interface MTU)"); if (ifr->ifr_mtu > IXGBE_MAX_FRAME_SIZE - ETHER_HDR_LEN) { @@ -1069,10 +1112,14 @@ ixgbe_init_locked(struct adapter *adapte /* Enable Fan Failure Interrupt */ gpie |= IXGBE_SDP1_GPIEN; - /* Add for Thermal detection */ + /* Add for Module detection */ if (hw->mac.type == ixgbe_mac_82599EB) gpie |= IXGBE_SDP2_GPIEN; + /* Thermal Failure Detection */ + if (hw->mac.type == ixgbe_mac_X540) + gpie |= IXGBE_SDP0_GPIEN; + if (adapter->msix > 1) { /* Enable Enhanced MSIX mode */ gpie |= IXGBE_GPIE_MSIX_MODE; @@ -1096,6 +1143,14 @@ ixgbe_init_locked(struct adapter *adapte txdctl |= IXGBE_TXDCTL_ENABLE; /* Set WTHRESH to 8, burst writeback */ txdctl |= (8 << 16); + /* + * When the internal queue falls below PTHRESH (32), + * start prefetching as long as there are at least + * HTHRESH (1) buffers ready. The values are taken + * from the Intel linux driver 3.8.21. + * Prefetching enables tx line rate even with 1 queue. + */ + txdctl |= (16 << 0) | (1 << 8); IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(i), txdctl); } @@ -1120,6 +1175,31 @@ ixgbe_init_locked(struct adapter *adapte msec_delay(1); } wmb(); +#ifdef DEV_NETMAP + /* + * In netmap mode, we must preserve the buffers made + * available to userspace before the if_init() + * (this is true by default on the TX side, because + * init makes all buffers available to userspace). + * + * netmap_reset() and the device specific routines + * (e.g. ixgbe_setup_receive_rings()) map these + * buffers at the end of the NIC ring, so here we + * must set the RDT (tail) register to make sure + * they are not overwritten. + * + * In this driver the NIC ring starts at RDH = 0, + * RDT points to the last slot available for reception (?), + * so RDT = num_rx_desc - 1 means the whole ring is available. + */ + if (ifp->if_capenable & IFCAP_NETMAP) { + struct netmap_adapter *na = NA(adapter->ifp); + struct netmap_kring *kring = &na->rx_rings[i]; + int t = na->num_rx_desc - 1 - kring->nr_hwavail; + + IXGBE_WRITE_REG(hw, IXGBE_RDT(i), t); + } else +#endif /* DEV_NETMAP */ IXGBE_WRITE_REG(hw, IXGBE_RDT(i), adapter->num_rx_desc - 1); } @@ -1153,8 +1233,12 @@ ixgbe_init_locked(struct adapter *adapte #ifdef IXGBE_FDIR /* Init Flow director */ - if (hw->mac.type != ixgbe_mac_82598EB) + if (hw->mac.type != ixgbe_mac_82598EB) { + u32 hdrm = 64 << fdir_pballoc; + + hw->mac.ops.setup_rxpba(hw, 0, hdrm, PBA_STRATEGY_EQUAL); ixgbe_init_fdir_signature_82599(&adapter->hw, fdir_pballoc); + } #endif /* @@ -1282,7 +1366,7 @@ ixgbe_handle_que(void *context, int pend ixgbe_start_locked(txr, ifp); #endif IXGBE_TX_UNLOCK(txr); - if (more) { + if (more || (ifp->if_drv_flags & IFF_DRV_OACTIVE)) { taskqueue_enqueue(que->tq, &que->que_task); return; } @@ -1362,6 +1446,7 @@ ixgbe_msix_que(void *arg) bool more_tx, more_rx; u32 newitr = 0; + ixgbe_disable_queue(adapter, que->msix); ++que->irqs; more_rx = ixgbe_rxeof(que, adapter->rx_process_limit); @@ -1496,6 +1581,15 @@ ixgbe_msix_link(void *arg) IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1); } + /* Check for over temp condition */ + if ((hw->mac.type == ixgbe_mac_X540) && + (reg_eicr & IXGBE_EICR_GPI_SDP0)) { + device_printf(adapter->dev, "\nCRITICAL: OVER TEMP!! " + "PHY IS SHUT DOWN!!\n"); + device_printf(adapter->dev, "System shutdown required\n"); + IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP0); + } + IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, IXGBE_EIMS_OTHER); return; } @@ -1528,6 +1622,9 @@ ixgbe_media_status(struct ifnet * ifp, s ifmr->ifm_status |= IFM_ACTIVE; switch (adapter->link_speed) { + case IXGBE_LINK_SPEED_100_FULL: + ifmr->ifm_active |= IFM_100_TX | IFM_FDX; + break; case IXGBE_LINK_SPEED_1GB_FULL: ifmr->ifm_active |= IFM_1000_T | IFM_FDX; break; @@ -1563,7 +1660,9 @@ ixgbe_media_change(struct ifnet * ifp) switch (IFM_SUBTYPE(ifm->ifm_media)) { case IFM_AUTO: adapter->hw.phy.autoneg_advertised = - IXGBE_LINK_SPEED_1GB_FULL | IXGBE_LINK_SPEED_10GB_FULL; + IXGBE_LINK_SPEED_100_FULL | + IXGBE_LINK_SPEED_1GB_FULL | + IXGBE_LINK_SPEED_10GB_FULL; break; default: device_printf(adapter->dev, "Only auto media type\n"); @@ -1835,7 +1934,7 @@ ixgbe_set_multi(struct adapter *adapter) update_ptr = mta; ixgbe_update_mc_addr_list(&adapter->hw, - update_ptr, mcnt, ixgbe_mc_array_itr); + update_ptr, mcnt, ixgbe_mc_array_itr, TRUE); return; } @@ -1869,11 +1968,15 @@ ixgbe_mc_array_itr(struct ixgbe_hw *hw, static void ixgbe_local_timer(void *arg) { - struct adapter *adapter = arg; + struct adapter *adapter = arg; device_t dev = adapter->dev; - struct tx_ring *txr = adapter->tx_rings; + struct ifnet *ifp = adapter->ifp; + struct ix_queue *que = adapter->queues; + struct tx_ring *txr = adapter->tx_rings; + int hung, busy, paused; mtx_assert(&adapter->core_mtx, MA_OWNED); + hung = busy = paused = 0; /* Check for pluggable optics */ if (adapter->sfp_probe) @@ -1888,21 +1991,38 @@ ixgbe_local_timer(void *arg) * then don't do the watchdog check */ if (IXGBE_READ_REG(&adapter->hw, IXGBE_TFCS) & IXGBE_TFCS_TXOFF) - goto out; + paused = 1; /* - ** Check status on the TX queues for a hang - */ - for (int i = 0; i < adapter->num_queues; i++, txr++) - if (txr->queue_status == IXGBE_QUEUE_HUNG) - goto hung; + ** Check the TX queues status + ** - central locked handling of OACTIVE + ** - watchdog only if all queues show hung + */ + for (int i = 0; i < adapter->num_queues; i++, que++, txr++) { + if ((txr->queue_status & IXGBE_QUEUE_HUNG) && + (paused == 0)) + ++hung; + if (txr->queue_status & IXGBE_QUEUE_DEPLETED) + ++busy; + if ((txr->queue_status & IXGBE_QUEUE_IDLE) == 0) + taskqueue_enqueue(que->tq, &que->que_task); + } + /* Only truely watchdog if all queues show hung */ + if (hung == adapter->num_queues) + goto watchdog; + /* Only turn off the stack flow when ALL are depleted */ + if (busy == adapter->num_queues) + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + else if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) && + (busy < adapter->num_queues)) + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; out: ixgbe_rearm_queues(adapter, adapter->que_mask); callout_reset(&adapter->timer, hz, ixgbe_local_timer, adapter); return; -hung: +watchdog: device_printf(adapter->dev, "Watchdog timeout -- resetting\n"); device_printf(dev,"Queue(%d) tdh = %d, hw tdt = %d\n", txr->me, IXGBE_READ_REG(&adapter->hw, IXGBE_TDH(txr->me)), @@ -1972,9 +2092,11 @@ ixgbe_stop(void *arg) INIT_DEBUGOUT("ixgbe_stop: begin\n"); ixgbe_disable_intr(adapter); + callout_stop(&adapter->timer); - /* Tell the stack that the interface is no longer active */ - ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); + /* Let the stack know...*/ + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; ixgbe_reset_hw(hw); hw->adapter_stopped = FALSE; @@ -1982,7 +2104,6 @@ ixgbe_stop(void *arg) /* Turn off the laser */ if (hw->phy.multispeed_fiber) ixgbe_disable_tx_laser(hw); - callout_stop(&adapter->timer); /* reprogram the RAR[0] in case user changed it. */ ixgbe_set_rar(&adapter->hw, 0, adapter->hw.mac.addr, 0, IXGBE_RAH_AV); @@ -2036,35 +2157,41 @@ ixgbe_setup_optics(struct adapter *adapt int layer; layer = ixgbe_get_supported_physical_layer(hw); - switch (layer) { - case IXGBE_PHYSICAL_LAYER_10GBASE_T: - adapter->optics = IFM_10G_T; - break; - case IXGBE_PHYSICAL_LAYER_1000BASE_T: - adapter->optics = IFM_1000_T; - break; - case IXGBE_PHYSICAL_LAYER_10GBASE_LR: - case IXGBE_PHYSICAL_LAYER_10GBASE_LRM: - adapter->optics = IFM_10G_LR; - break; - case IXGBE_PHYSICAL_LAYER_10GBASE_SR: - adapter->optics = IFM_10G_SR; - break; - case IXGBE_PHYSICAL_LAYER_10GBASE_KX4: - case IXGBE_PHYSICAL_LAYER_10GBASE_CX4: - adapter->optics = IFM_10G_CX4; - break; - case IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU: - adapter->optics = IFM_10G_TWINAX; - break; - case IXGBE_PHYSICAL_LAYER_1000BASE_KX: - case IXGBE_PHYSICAL_LAYER_10GBASE_KR: - case IXGBE_PHYSICAL_LAYER_10GBASE_XAUI: - case IXGBE_PHYSICAL_LAYER_UNKNOWN: - default: - adapter->optics = IFM_ETHER | IFM_AUTO; - break; + + if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_T) { + adapter->optics = IFM_10G_T; + return; + } + + if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_T) { + adapter->optics = IFM_1000_T; + return; + } + + if (layer & (IXGBE_PHYSICAL_LAYER_10GBASE_LR | + IXGBE_PHYSICAL_LAYER_10GBASE_LRM)) { + adapter->optics = IFM_10G_LR; + return; + } + + if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_SR) { + adapter->optics = IFM_10G_SR; + return; } + + if (layer & IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU) { + adapter->optics = IFM_10G_TWINAX; + return; + } + + if (layer & (IXGBE_PHYSICAL_LAYER_10GBASE_KX4 | + IXGBE_PHYSICAL_LAYER_10GBASE_CX4)) { + adapter->optics = IFM_10G_CX4; + return; + } + + /* If we get here just set the default */ + adapter->optics = IFM_ETHER | IFM_AUTO; return; } @@ -2413,7 +2540,6 @@ ixgbe_setup_interface(device_t dev, stru return (-1); } if_initname(ifp, device_get_name(dev), device_get_unit(dev)); - ifp->if_mtu = ETHERMTU; ifp->if_baudrate = 1000000000; ifp->if_init = ixgbe_init; ifp->if_softc = adapter; @@ -2814,9 +2940,20 @@ ixgbe_setup_transmit_ring(struct tx_ring struct adapter *adapter = txr->adapter; struct ixgbe_tx_buf *txbuf; int i; +#ifdef DEV_NETMAP + struct netmap_adapter *na = NA(adapter->ifp); + struct netmap_slot *slot; +#endif /* DEV_NETMAP */ /* Clear the old ring contents */ IXGBE_TX_LOCK(txr); +#ifdef DEV_NETMAP + /* + * (under lock): if in netmap mode, do some consistency + * checks and set slot to entry 0 of the netmap ring. + */ + slot = netmap_reset(na, NR_TX, txr->me, 0); +#endif /* DEV_NETMAP */ bzero((void *)txr->tx_base, (sizeof(union ixgbe_adv_tx_desc)) * adapter->num_tx_desc); /* Reset indices */ @@ -2833,6 +2970,22 @@ ixgbe_setup_transmit_ring(struct tx_ring m_freem(txbuf->m_head); txbuf->m_head = NULL; } +#ifdef DEV_NETMAP + /* + * In netmap mode, set the map for the packet buffer. + * NOTE: Some drivers (not this one) also need to set + * the physical buffer address in the NIC ring. + * Slots in the netmap ring (indexed by "si") are + * kring->nkr_hwofs positions "ahead" wrt the + * corresponding slot in the NIC ring. In some drivers + * (not here) nkr_hwofs can be negative. Function + * netmap_idx_n2k() handles wraparounds properly. + */ + if (slot) { + int si = netmap_idx_n2k(&na->tx_rings[txr->me], i); + netmap_load_map(txr->txtag, txbuf->map, NMB(slot + si)); + } +#endif /* DEV_NETMAP */ /* Clear the EOP index */ txbuf->eop_index = -1; } @@ -2904,6 +3057,7 @@ ixgbe_initialize_transmit_units(struct a txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(i)); break; case ixgbe_mac_82599EB: + case ixgbe_mac_X540: default: txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(i)); break; @@ -2914,6 +3068,7 @@ ixgbe_initialize_transmit_units(struct a IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(i), txctrl); break; case ixgbe_mac_82599EB: + case ixgbe_mac_X540: default: IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(i), txctrl); break; @@ -3311,6 +3466,48 @@ ixgbe_txeof(struct tx_ring *txr) mtx_assert(&txr->tx_mtx, MA_OWNED); +#ifdef DEV_NETMAP + if (ifp->if_capenable & IFCAP_NETMAP) { + struct netmap_adapter *na = NA(ifp); + struct netmap_kring *kring = &na->tx_rings[txr->me]; + + tx_desc = (struct ixgbe_legacy_tx_desc *)txr->tx_base; + + bus_dmamap_sync(txr->txdma.dma_tag, txr->txdma.dma_map, + BUS_DMASYNC_POSTREAD); + /* + * In netmap mode, all the work is done in the context + * of the client thread. Interrupt handlers only wake up + * clients, which may be sleeping on individual rings + * or on a global resource for all rings. + * To implement tx interrupt mitigation, we wake up the client + * thread roughly every half ring, even if the NIC interrupts + * more frequently. This is implemented as follows: + * - ixgbe_txsync() sets kring->nr_kflags with the index of + * the slot that should wake up the thread (nkr_num_slots + * means the user thread should not be woken up); + * - the driver ignores tx interrupts unless netmap_mitigate=0 + * or the slot has the DD bit set. + * + * When the driver has separate locks, we need to + * release and re-acquire txlock to avoid deadlocks. + * XXX see if we can find a better way. + */ + if (!netmap_mitigate || + (kring->nr_kflags < kring->nkr_num_slots && + tx_desc[kring->nr_kflags].upper.fields.status & IXGBE_TXD_STAT_DD)) { + kring->nr_kflags = kring->nkr_num_slots; + selwakeuppri(&na->tx_rings[txr->me].si, PI_NET); + IXGBE_TX_UNLOCK(txr); + IXGBE_CORE_LOCK(adapter); + selwakeuppri(&na->tx_si, PI_NET); + IXGBE_CORE_UNLOCK(adapter); + IXGBE_TX_LOCK(txr); + } + return FALSE; + } +#endif /* DEV_NETMAP */ + if (txr->tx_avail == adapter->num_tx_desc) { txr->queue_status = IXGBE_QUEUE_IDLE; return FALSE; @@ -3399,18 +3596,13 @@ ixgbe_txeof(struct tx_ring *txr) if ((!processed) && ((ticks - txr->watchdog_time) > IXGBE_WATCHDOG)) txr->queue_status = IXGBE_QUEUE_HUNG; - /* - * If we have enough room, clear IFF_DRV_OACTIVE to tell the stack that - * it is OK to send packets. If there are no pending descriptors, - * clear the timeout. Otherwise, if some descriptors have been freed, - * restart the timeout. - */ - if (txr->tx_avail > IXGBE_TX_CLEANUP_THRESHOLD) { - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - if (txr->tx_avail == adapter->num_tx_desc) { - txr->queue_status = IXGBE_QUEUE_IDLE; - return FALSE; - } + /* With a minimum free clear the depleted state bit. */ + if (txr->tx_avail > IXGBE_TX_CLEANUP_THRESHOLD) + txr->queue_status &= ~IXGBE_QUEUE_DEPLETED; + + if (txr->tx_avail == adapter->num_tx_desc) { + txr->queue_status = IXGBE_QUEUE_IDLE; + return (FALSE); } return TRUE; @@ -3620,6 +3812,9 @@ ixgbe_setup_hw_rsc(struct rx_ring *rxr) rdrxctl = IXGBE_READ_REG(hw, IXGBE_RDRXCTL); rdrxctl &= ~IXGBE_RDRXCTL_RSCFRSTSIZE; +#ifdef DEV_NETMAP /* crcstrip is optional in netmap */ + if (adapter->ifp->if_capenable & IFCAP_NETMAP && !ix_crcstrip) +#endif /* DEV_NETMAP */ rdrxctl |= IXGBE_RDRXCTL_CRCSTRIP; rdrxctl |= IXGBE_RDRXCTL_RSCACKC; IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rdrxctl); @@ -3699,6 +3894,10 @@ ixgbe_setup_receive_ring(struct rx_ring bus_dma_segment_t pseg[1], hseg[1]; struct lro_ctrl *lro = &rxr->lro; int rsize, nsegs, error = 0; +#ifdef DEV_NETMAP + struct netmap_adapter *na = NA(rxr->adapter->ifp); + struct netmap_slot *slot; +#endif /* DEV_NETMAP */ adapter = rxr->adapter; ifp = adapter->ifp; @@ -3706,6 +3905,10 @@ ixgbe_setup_receive_ring(struct rx_ring /* Clear the ring contents */ IXGBE_RX_LOCK(rxr); +#ifdef DEV_NETMAP + /* same as in ixgbe_setup_transmit_ring() */ + slot = netmap_reset(na, NR_RX, rxr->me, 0); +#endif /* DEV_NETMAP */ rsize = roundup2(adapter->num_rx_desc * sizeof(union ixgbe_adv_rx_desc), DBA_ALIGN); bzero((void *)rxr->rx_base, rsize); @@ -3722,6 +3925,26 @@ ixgbe_setup_receive_ring(struct rx_ring struct mbuf *mh, *mp; rxbuf = &rxr->rx_buffers[j]; +#ifdef DEV_NETMAP + /* + * In netmap mode, fill the map and set the buffer + * address in the NIC ring, considering the offset + * between the netmap and NIC rings (see comment in + * ixgbe_setup_transmit_ring() ). No need to allocate + * an mbuf, so end the block with a continue; + */ + if (slot) { + int sj = netmap_idx_n2k(&na->rx_rings[rxr->me], j); + uint64_t paddr; + void *addr; + + addr = PNMB(slot + sj, &paddr); + netmap_load_map(rxr->ptag, rxbuf->pmap, addr); + /* Update descriptor */ + rxr->rx_base[j].read.pkt_addr = htole64(paddr); + continue; + } +#endif /* DEV_NETMAP */ /* ** Don't allocate mbufs if not ** doing header split, its wasteful @@ -3780,6 +4003,7 @@ skip_head: rxr->rx_split_packets = 0; rxr->rx_bytes = 0; rxr->discard = FALSE; + rxr->vtag_strip = FALSE; bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); @@ -3787,7 +4011,7 @@ skip_head: /* ** Now set up the LRO interface: ** 82598 uses software LRO, the - ** 82599 uses a hardware assist. + ** 82599 and X540 use a hardware assist. */ if ((adapter->hw.mac.type != ixgbe_mac_82598EB) && (ifp->if_capenable & IFCAP_RXCSUM) && @@ -3883,9 +4107,17 @@ ixgbe_initialize_receive_units(struct ad hlreg |= IXGBE_HLREG0_JUMBOEN; else hlreg &= ~IXGBE_HLREG0_JUMBOEN; +#ifdef DEV_NETMAP + /* crcstrip is conditional in netmap (in RDRXCTL too ?) */ + if (ifp->if_capenable & IFCAP_NETMAP && !ix_crcstrip) + hlreg &= ~IXGBE_HLREG0_RXCRCSTRP; + else + hlreg |= IXGBE_HLREG0_RXCRCSTRP; +#endif /* DEV_NETMAP */ IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg); - bufsz = (adapter->rx_mbuf_sz + BSIZEPKT_ROUNDUP) >> IXGBE_SRRCTL_BSIZEPKT_SHIFT; + bufsz = (adapter->rx_mbuf_sz + + BSIZEPKT_ROUNDUP) >> IXGBE_SRRCTL_BSIZEPKT_SHIFT; for (int i = 0; i < adapter->num_queues; i++, rxr++) { u64 rdba = rxr->rxdma.dma_paddr; @@ -4149,10 +4381,30 @@ ixgbe_rxeof(struct ix_queue *que, int co IXGBE_RX_LOCK(rxr); +#ifdef DEV_NETMAP + if (ifp->if_capenable & IFCAP_NETMAP) { + /* + * Same as the txeof routine: only wakeup clients on intr. + * NKR_PENDINTR in nr_kflags is used to implement interrupt + * mitigation (ixgbe_rxsync() will not look for new packets + * unless NKR_PENDINTR is set). + */ + struct netmap_adapter *na = NA(ifp); + + na->rx_rings[rxr->me].nr_kflags |= NKR_PENDINTR; + selwakeuppri(&na->rx_rings[rxr->me].si, PI_NET); + IXGBE_RX_UNLOCK(rxr); + IXGBE_CORE_LOCK(adapter); + selwakeuppri(&na->rx_si, PI_NET); + IXGBE_CORE_UNLOCK(adapter); + return (FALSE); + } +#endif /* DEV_NETMAP */ for (i = rxr->next_to_check; count != 0;) { struct mbuf *sendmp, *mh, *mp; u32 rsc, ptype; - u16 hlen, plen, hdr, vtag; + u16 hlen, plen, hdr; + u16 vtag = 0; bool eop; /* Sync the ring. */ @@ -4180,9 +4432,12 @@ ixgbe_rxeof(struct ix_queue *que, int co ptype = le32toh(cur->wb.lower.lo_dword.data) & IXGBE_RXDADV_PKTTYPE_MASK; hdr = le16toh(cur->wb.lower.lo_dword.hs_rss.hdr_info); - vtag = le16toh(cur->wb.upper.vlan); eop = ((staterr & IXGBE_RXD_STAT_EOP) != 0); + /* Process vlan info */ + if ((rxr->vtag_strip) && (staterr & IXGBE_RXD_STAT_VP)) + vtag = le16toh(cur->wb.upper.vlan); + /* Make sure bad packets are discarded */ if (((staterr & IXGBE_RXDADV_ERR_FRAME_ERR_MASK) != 0) || (rxr->discard)) { @@ -4283,8 +4538,8 @@ ixgbe_rxeof(struct ix_queue *que, int co } else { /* Singlet, prepare to send */ sendmp = mh; - if ((adapter->num_vlans) && - (staterr & IXGBE_RXD_STAT_VP)) { + /* If hardware handled vtag */ + if (vtag) { sendmp->m_pkthdr.ether_vtag = vtag; sendmp->m_flags |= M_VLANTAG; } @@ -4493,6 +4748,7 @@ ixgbe_setup_vlan_hw_support(struct adapt { struct ifnet *ifp = adapter->ifp; struct ixgbe_hw *hw = &adapter->hw; + struct rx_ring *rxr; u32 ctrl; @@ -4524,13 +4780,17 @@ ixgbe_setup_vlan_hw_support(struct adapt ctrl |= IXGBE_VLNCTRL_VME; IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, ctrl); - /* On 82599 the VLAN enable is per/queue in RXDCTL */ - if (hw->mac.type != ixgbe_mac_82598EB) - for (int i = 0; i < adapter->num_queues; i++) { + /* Setup the queues for vlans */ + for (int i = 0; i < adapter->num_queues; i++) { + rxr = &adapter->rx_rings[i]; + /* On 82599 the VLAN enable is per/queue in RXDCTL */ + if (hw->mac.type != ixgbe_mac_82598EB) { ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); - ctrl |= IXGBE_RXDCTL_VME; + ctrl |= IXGBE_RXDCTL_VME; IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), ctrl); } + rxr->vtag_strip = TRUE; + } } static void @@ -4546,6 +4806,7 @@ ixgbe_enable_intr(struct adapter *adapte mask |= IXGBE_EIMS_GPI_SDP1; else { mask |= IXGBE_EIMS_ECC; + mask |= IXGBE_EIMS_GPI_SDP0; mask |= IXGBE_EIMS_GPI_SDP1; mask |= IXGBE_EIMS_GPI_SDP2; #ifdef IXGBE_FDIR @@ -4643,6 +4904,7 @@ ixgbe_set_ivar(struct adapter *adapter, break; case ixgbe_mac_82599EB: + case ixgbe_mac_X540: if (type == -1) { /* MISC IVAR */ index = (entry & 1) * 8; ivar = IXGBE_READ_REG(hw, IXGBE_IVAR_MISC); @@ -4669,7 +4931,7 @@ ixgbe_configure_ivars(struct adapter *ad u32 newitr; if (ixgbe_max_interrupt_rate > 0) - newitr = (8000000 / ixgbe_max_interrupt_rate) & 0x0FF8; + newitr = (4000000 / ixgbe_max_interrupt_rate) & 0x0FF8; else newitr = 0; @@ -5032,12 +5294,21 @@ ixgbe_sysctl_interrupt_rate_handler(SYSC reg = IXGBE_READ_REG(&que->adapter->hw, IXGBE_EITR(que->msix)); usec = ((reg & 0x0FF8) >> 3); if (usec > 0) - rate = 1000000 / usec; + rate = 500000 / usec; else rate = 0; error = sysctl_handle_int(oidp, &rate, 0, req); if (error || !req->newptr) return error; + reg &= ~0xfff; /* default, no limitation */ + ixgbe_max_interrupt_rate = 0; + if (rate > 0 && rate < 500000) { + if (rate < 1000) + rate = 1000; + ixgbe_max_interrupt_rate = rate; + reg |= ((4000000/rate) & 0xff8 ); + } + IXGBE_WRITE_REG(&que->adapter->hw, IXGBE_EITR(que->msix), reg); return 0; } @@ -5091,10 +5362,13 @@ ixgbe_add_hw_stats(struct adapter *adapt queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "interrupt_rate", - CTLTYPE_UINT | CTLFLAG_RD, &adapter->queues[i], + CTLTYPE_UINT | CTLFLAG_RW, &adapter->queues[i], sizeof(&adapter->queues[i]), ixgbe_sysctl_interrupt_rate_handler, "IU", "Interrupt Rate"); + SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "irqs", + CTLFLAG_RD, &(adapter->queues[i].irqs), + "irqs on this queue"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", CTLTYPE_UINT | CTLFLAG_RD, txr, sizeof(txr), ixgbe_sysctl_tdh_handler, "IU", @@ -5318,24 +5592,23 @@ ixgbe_add_hw_stats(struct adapter *adapt static int ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS) { - int error; - int last = ixgbe_flow_control; - struct adapter *adapter; + int error, last; + struct adapter *adapter = (struct adapter *) arg1; - error = sysctl_handle_int(oidp, &ixgbe_flow_control, 0, req); - if (error) + last = adapter->fc; + error = sysctl_handle_int(oidp, &adapter->fc, 0, req); + if ((error) || (req->newptr == NULL)) return (error); /* Don't bother if it's not changed */ - if (ixgbe_flow_control == last) + if (adapter->fc == last) return (0); - adapter = (struct adapter *) arg1; - switch (ixgbe_flow_control) { + switch (adapter->fc) { case ixgbe_fc_rx_pause: case ixgbe_fc_tx_pause: case ixgbe_fc_full: - adapter->hw.fc.requested_mode = ixgbe_flow_control; + adapter->hw.fc.requested_mode = adapter->fc; break; case ixgbe_fc_none: default: @@ -5360,16 +5633,19 @@ ixgbe_add_rx_process_limit(struct adapte ** Control link advertise speed: ** 0 - normal ** 1 - advertise only 1G +** 2 - advertise 100Mb */ static int ixgbe_set_advertise(SYSCTL_HANDLER_ARGS) { int error = 0; struct adapter *adapter; + device_t dev; struct ixgbe_hw *hw; ixgbe_link_speed speed, last; adapter = (struct adapter *) arg1; + dev = adapter->dev; hw = &adapter->hw; last = hw->phy.autoneg_advertised; @@ -5382,8 +5658,15 @@ ixgbe_set_advertise(SYSCTL_HANDLER_ARGS) (hw->phy.multispeed_fiber))) return (error); + if ((adapter->advertise == 2) && (hw->mac.type != ixgbe_mac_X540)) { + device_printf(dev, "Set Advertise: 100Mb on X540 only\n"); + return (error); + } + if (adapter->advertise == 1) speed = IXGBE_LINK_SPEED_1GB_FULL; + else if (adapter->advertise == 2) + speed = IXGBE_LINK_SPEED_100_FULL; else speed = IXGBE_LINK_SPEED_1GB_FULL | IXGBE_LINK_SPEED_10GB_FULL; @@ -5396,3 +5679,31 @@ ixgbe_set_advertise(SYSCTL_HANDLER_ARGS) return (error); } + +/* +** Thermal Shutdown Trigger +** - cause a Thermal Overtemp IRQ +*/ +static int +ixgbe_set_thermal_test(SYSCTL_HANDLER_ARGS) +{ + int error, fire = 0; + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu May 17 04:04:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E175106567D; Thu, 17 May 2012 04:04:49 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 23A278FC18; Thu, 17 May 2012 04:04:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4H44m8q077805; Thu, 17 May 2012 04:04:48 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4H44mh0077802; Thu, 17 May 2012 04:04:48 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201205170404.q4H44mh0077802@svn.freebsd.org> From: Tim Kientzle Date: Thu, 17 May 2012 04:04:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235529 - in head/sys/boot: fdt uboot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 04:04:49 -0000 Author: kientzle Date: Thu May 17 04:04:48 2012 New Revision: 235529 URL: http://svn.freebsd.org/changeset/base/235529 Log: Access the device tree blob via copyin/copyout. The code previously assumed that copyin/copyout did no address translation and that the device tree blob could be manipulated in-place (with only a few adjustments for the ELF loader offset). This isn't possible on all platforms, so the revised code uses copyout() to copy the device tree blob into a heap-allocated buffer and then updates the device tree with copyout(). This isn't ideal, since it bloats the loader memory usage, but seems the only feasible approach (short of rewriting all of the fdt manipulation routines). Modified: head/sys/boot/fdt/fdt_loader_cmd.c head/sys/boot/uboot/common/metadata.c Modified: head/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- head/sys/boot/fdt/fdt_loader_cmd.c Thu May 17 00:06:54 2012 (r235528) +++ head/sys/boot/fdt/fdt_loader_cmd.c Thu May 17 04:04:48 2012 (r235529) @@ -57,11 +57,17 @@ __FBSDID("$FreeBSD$"); #define STR(number) #number #define STRINGIFY(number) STR(number) -#define COPYOUT(s,d,l) archsw.arch_copyout((vm_offset_t)(s), d, l) +#define COPYOUT(s,d,l) archsw.arch_copyout(s, d, l) +#define COPYIN(s,d,l) archsw.arch_copyin(s, d, l) #define FDT_STATIC_DTB_SYMBOL "fdt_static_dtb" +/* Local copy of FDT */ static struct fdt_header *fdtp = NULL; +/* Size of FDT blob */ +static size_t fdtp_size = 0; +/* Location of FDT in kernel or module */ +static vm_offset_t fdtp_va = 0; static int fdt_cmd_nyi(int argc, char *argv[]); @@ -98,21 +104,19 @@ static const struct cmdtab commands[] = static char cwd[FDT_CWD_LEN] = "/"; static vm_offset_t -fdt_find_static_dtb(void) +fdt_find_static_dtb() { + Elf_Dyn dyn; Elf_Sym sym; - vm_offset_t dyntab, esym; + vm_offset_t dyntab, esym, strtab, symtab, fdt_start; uint64_t offs; struct preloaded_file *kfp; struct file_metadata *md; - Elf_Sym *symtab; - Elf_Dyn *dyn; - char *strtab, *strp; - int i, sym_count; - - symtab = NULL; - dyntab = esym = 0; - strtab = strp = NULL; + char *strp; + int sym_count; + + symtab = strtab = dyntab = esym = 0; + strp = NULL; offs = __elfN(relocation_offset); @@ -123,28 +127,29 @@ fdt_find_static_dtb(void) md = file_findmetadata(kfp, MODINFOMD_ESYM); if (md == NULL) return (0); - COPYOUT(md->md_data, &esym, sizeof(esym)); + bcopy(md->md_data, &esym, sizeof(esym)); + // esym is already offset md = file_findmetadata(kfp, MODINFOMD_DYNAMIC); if (md == NULL) return (0); - COPYOUT(md->md_data, &dyntab, sizeof(dyntab)); - + bcopy(md->md_data, &dyntab, sizeof(dyntab)); dyntab += offs; /* Locate STRTAB and DYNTAB */ - for (dyn = (Elf_Dyn *)dyntab; dyn->d_tag != DT_NULL; dyn++) { - if (dyn->d_tag == DT_STRTAB) { - strtab = (char *)(uintptr_t)(dyn->d_un.d_ptr + offs); - continue; - } else if (dyn->d_tag == DT_SYMTAB) { - symtab = (Elf_Sym *)(uintptr_t) - (dyn->d_un.d_ptr + offs); - continue; + for (;;) { + COPYOUT(dyntab, &dyn, sizeof(dyn)); + if (dyn.d_tag == DT_STRTAB) { + strtab = (vm_offset_t)(dyn.d_un.d_ptr) + offs; + } else if (dyn.d_tag == DT_SYMTAB) { + symtab = (vm_offset_t)(dyn.d_un.d_ptr) + offs; + } else if (dyn.d_tag == DT_NULL) { + break; } + dyntab += sizeof(dyn); } - if (symtab == NULL || strtab == NULL) { + if (symtab == 0 || strtab == 0) { /* * No symtab? No strtab? That should not happen here, * and should have been verified during __elfN(loadimage). @@ -153,7 +158,7 @@ fdt_find_static_dtb(void) return (0); } - sym_count = (int)((Elf_Sym *)esym - symtab) / sizeof(Elf_Sym); + sym_count = (int)(esym - symtab) / sizeof(Elf_Sym); /* * The most efficent way to find a symbol would be to calculate a @@ -165,26 +170,27 @@ fdt_find_static_dtb(void) * we are eliminating symbols type of which is not STT_NOTYPE, or(and) * those which binding attribute is not STB_GLOBAL. */ - for (i = 0; i < sym_count; i++) { - COPYOUT(symtab + i, &sym, sizeof(sym)); + fdt_start = 0; + while (sym_count > 0 && fdt_start == 0) { + COPYOUT(symtab, &sym, sizeof(sym)); + symtab += sizeof(sym); + --sym_count; if (ELF_ST_BIND(sym.st_info) != STB_GLOBAL || ELF_ST_TYPE(sym.st_info) != STT_NOTYPE) continue; - - strp = strdupout((vm_offset_t)(strtab + sym.st_name)); - if (strcmp(strp, FDT_STATIC_DTB_SYMBOL) == 0) { - /* Found a match ! */ - free(strp); - return ((vm_offset_t)(sym.st_value + offs)); - } + strp = strdupout(strtab + sym.st_name); + if (strcmp(strp, FDT_STATIC_DTB_SYMBOL) == 0) + fdt_start = (vm_offset_t)sym.st_value + offs; free(strp); } - return (0); + printf("fdt_start: 0x%08jX\n", (intmax_t)fdt_start); + return (fdt_start); } static int fdt_setup_fdtp() { + struct fdt_header header; struct preloaded_file *bfp; int err; @@ -193,15 +199,26 @@ fdt_setup_fdtp() */ bfp = file_findfile(NULL, "dtb"); if (bfp == NULL) { - if ((fdtp = (struct fdt_header *)fdt_find_static_dtb()) == 0) { + if ((fdtp_va = fdt_find_static_dtb()) == 0) { command_errmsg = "no device tree blob found!"; + printf("%s\n", command_errmsg); return (CMD_ERROR); } } else { /* Dynamic blob has precedence over static. */ - fdtp = (struct fdt_header *)bfp->f_addr; + fdtp_va = bfp->f_addr; } + COPYOUT(fdtp_va, &header, sizeof(header)); + fdtp_size = fdt_totalsize(&header); + fdtp = malloc(fdtp_size); + if (fdtp == NULL) { + command_errmsg = "can't allocate memory for device tree copy"; + printf("%s\n", command_errmsg); + return (CMD_ERROR); + } + COPYOUT(fdtp_va, fdtp, fdtp_size); + /* * Validate the blob. */ @@ -547,7 +564,7 @@ fixup_stdout(const char *env) /* * Locate the blob, fix it up and return its location. */ -void * +vm_offset_t fdt_fixup(void) { const char *env; @@ -563,7 +580,7 @@ fdt_fixup(void) err = fdt_setup_fdtp(); if (err) { sprintf(command_errbuf, "No valid device tree blob found!"); - return (NULL); + return (0); } /* Create /chosen node (if not exists) */ @@ -618,7 +635,9 @@ fdt_fixup(void) fdt_setprop(fdtp, chosen, "fixup-applied", NULL, 0); success: - return (fdtp); + /* Overwrite the FDT with the fixed version. */ + COPYIN(fdtp, fdtp_va, fdtp_size); + return (fdtp_va); } int @@ -636,7 +655,7 @@ command_fdt_internal(int argc, char *arg /* * Check if uboot env vars were parsed already. If not, do it now. */ - if (fdt_fixup() == NULL) + if (fdt_fixup() == 0) return (CMD_ERROR); /* @@ -1153,6 +1172,8 @@ fdt_modprop(int nodeoff, char *propname, else sprintf(command_errbuf, "Could not add/modify property!\n"); + } else { + COPYIN(fdtp, fdtp_va, fdtp_size); } return (rv); } @@ -1373,6 +1394,8 @@ fdt_cmd_rm(int argc, char *argv[]) if (rv) { sprintf(command_errbuf, "could not delete node"); return (CMD_ERROR); + } else { + COPYIN(fdtp, fdtp_va, fdtp_size); } return (CMD_OK); } @@ -1403,6 +1426,8 @@ fdt_cmd_mknode(int argc, char *argv[]) sprintf(command_errbuf, "Could not add node!\n"); return (CMD_ERROR); + } else { + COPYIN(fdtp, fdtp_va, fdtp_size); } return (CMD_OK); } Modified: head/sys/boot/uboot/common/metadata.c ============================================================================== --- head/sys/boot/uboot/common/metadata.c Thu May 17 00:06:54 2012 (r235528) +++ head/sys/boot/uboot/common/metadata.c Thu May 17 04:04:48 2012 (r235529) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include "glue.h" #if defined(LOADER_FDT_SUPPORT) -extern int fdt_fixup(void); +extern vm_offset_t fdt_fixup(void); #endif /* @@ -337,7 +337,7 @@ md_load(char *args, vm_offset_t *modulep #if defined(LOADER_FDT_SUPPORT) /* Handle device tree blob */ dtbp = fdt_fixup(); - if (dtbp != (vm_offset_t)NULL) + if (dtbp != 0) file_addmetadata(kfp, MODINFOMD_DTBP, sizeof dtbp, &dtbp); else pager_output("WARNING! Trying to fire up the kernel, but no " From owner-svn-src-all@FreeBSD.ORG Thu May 17 05:11:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50EF4106564A; Thu, 17 May 2012 05:11:58 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3903D8FC19; Thu, 17 May 2012 05:11:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4H5BwCp080008; Thu, 17 May 2012 05:11:58 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4H5Bvm5079996; Thu, 17 May 2012 05:11:57 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201205170511.q4H5Bvm5079996@svn.freebsd.org> From: Xin LI Date: Thu, 17 May 2012 05:11:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235530 - in head: contrib/tcpdump contrib/tcpdump/missing contrib/tcpdump/tests usr.sbin/tcpdump/tcpdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 05:11:58 -0000 Author: delphij Date: Thu May 17 05:11:57 2012 New Revision: 235530 URL: http://svn.freebsd.org/changeset/base/235530 Log: Merge tcpdump 4.2.1. MFC after: 2 weeks Added: head/contrib/tcpdump/in_cksum.c - copied unchanged from r235428, vendor/tcpdump/dist/in_cksum.c head/contrib/tcpdump/ppi.h - copied unchanged from r235428, vendor/tcpdump/dist/ppi.h head/contrib/tcpdump/print-802_15_4.c - copied unchanged from r235428, vendor/tcpdump/dist/print-802_15_4.c head/contrib/tcpdump/print-babel.c - copied unchanged from r235428, vendor/tcpdump/dist/print-babel.c head/contrib/tcpdump/print-carp.c - copied unchanged from r235428, vendor/tcpdump/dist/print-carp.c head/contrib/tcpdump/print-ppi.c - copied unchanged from r235428, vendor/tcpdump/dist/print-ppi.c head/contrib/tcpdump/print-rpki-rtr.c - copied unchanged from r235428, vendor/tcpdump/dist/print-rpki-rtr.c Deleted: head/contrib/tcpdump/missing/addrsize.h head/contrib/tcpdump/missing/bittypes.h head/contrib/tcpdump/missing/resolv6.h head/contrib/tcpdump/missing/resolv_ext.h head/contrib/tcpdump/tests/ Modified: head/contrib/tcpdump/CHANGES head/contrib/tcpdump/CREDITS head/contrib/tcpdump/Makefile.in head/contrib/tcpdump/VERSION head/contrib/tcpdump/acconfig.h head/contrib/tcpdump/addrtoname.c head/contrib/tcpdump/addrtoname.h head/contrib/tcpdump/bootp.h head/contrib/tcpdump/config.h.in head/contrib/tcpdump/configure head/contrib/tcpdump/configure.in head/contrib/tcpdump/cpack.c head/contrib/tcpdump/cpack.h head/contrib/tcpdump/ethertype.h head/contrib/tcpdump/forces.h head/contrib/tcpdump/ieee802_11_radio.h head/contrib/tcpdump/interface.h head/contrib/tcpdump/ip.h head/contrib/tcpdump/ip6.h head/contrib/tcpdump/ipproto.c head/contrib/tcpdump/ipproto.h head/contrib/tcpdump/netdissect.h head/contrib/tcpdump/ospf.h head/contrib/tcpdump/oui.c head/contrib/tcpdump/oui.h head/contrib/tcpdump/print-802_11.c head/contrib/tcpdump/print-ap1394.c head/contrib/tcpdump/print-arcnet.c head/contrib/tcpdump/print-arp.c head/contrib/tcpdump/print-atalk.c head/contrib/tcpdump/print-atm.c head/contrib/tcpdump/print-bgp.c head/contrib/tcpdump/print-cdp.c head/contrib/tcpdump/print-chdlc.c head/contrib/tcpdump/print-dccp.c head/contrib/tcpdump/print-dhcp6.c head/contrib/tcpdump/print-enc.c head/contrib/tcpdump/print-ether.c head/contrib/tcpdump/print-forces.c head/contrib/tcpdump/print-fr.c head/contrib/tcpdump/print-gre.c head/contrib/tcpdump/print-icmp.c head/contrib/tcpdump/print-icmp6.c head/contrib/tcpdump/print-igmp.c head/contrib/tcpdump/print-ip.c head/contrib/tcpdump/print-ip6.c head/contrib/tcpdump/print-ipnet.c head/contrib/tcpdump/print-ipx.c head/contrib/tcpdump/print-isoclns.c head/contrib/tcpdump/print-juniper.c head/contrib/tcpdump/print-lane.c head/contrib/tcpdump/print-llc.c head/contrib/tcpdump/print-lldp.c head/contrib/tcpdump/print-mobile.c head/contrib/tcpdump/print-mpls.c head/contrib/tcpdump/print-null.c head/contrib/tcpdump/print-ospf.c head/contrib/tcpdump/print-pflog.c head/contrib/tcpdump/print-pgm.c head/contrib/tcpdump/print-pim.c head/contrib/tcpdump/print-ppp.c head/contrib/tcpdump/print-rrcp.c head/contrib/tcpdump/print-sctp.c head/contrib/tcpdump/print-sflow.c head/contrib/tcpdump/print-sl.c head/contrib/tcpdump/print-sll.c head/contrib/tcpdump/print-sunrpc.c head/contrib/tcpdump/print-symantec.c head/contrib/tcpdump/print-tcp.c head/contrib/tcpdump/print-tftp.c head/contrib/tcpdump/print-udp.c head/contrib/tcpdump/print-vrrp.c head/contrib/tcpdump/tcp.h head/contrib/tcpdump/tcpdump-stdinc.h head/contrib/tcpdump/tcpdump.1.in head/contrib/tcpdump/tcpdump.c head/contrib/tcpdump/udp.h head/usr.sbin/tcpdump/tcpdump/Makefile head/usr.sbin/tcpdump/tcpdump/config.h head/usr.sbin/tcpdump/tcpdump/tcpdump.1 Directory Properties: head/contrib/tcpdump/ (props changed) Modified: head/contrib/tcpdump/CHANGES ============================================================================== --- head/contrib/tcpdump/CHANGES Thu May 17 04:04:48 2012 (r235529) +++ head/contrib/tcpdump/CHANGES Thu May 17 05:11:57 2012 (r235530) @@ -1,3 +1,64 @@ +Friday December 9, 2011. guy@alum.mit.edu. + Summary for 4.2.1 tcpdump release + Only build the Babel printer if IPv6 is enabled. + Support Babel on port 6696 as well as 6697. + Include ppi.h in release tarball. + Include all the test files in the release tarball, and don't + "include" test files that no longer exist. + Don't assume we have - check for it. + Support "-T carp" as a way of dissecting IP protocol 112 as CARP + rather than VRRP. + Support Hilscher NetAnalyzer link-layer header format. + Constify some pointers and fix compiler warnings. + Get rid of never-true test. + Fix an unintended fall-through in a case statement in the ARP + printer. + Fix several cases where sizeof(sizeof(XXX)) was used when just + sizeof(XXX) was intended. + Make stricter sanity checks in the ES-IS printer. + Get rid of some GCCisms that caused builds to fai with compilers + that don't support them. + Fix typo in man page. + Added length checks to Babel printer. + +Sunday July 24, 2011. mcr@sandelman.ca. + Summary for 4.2.+ + merged 802.15.4 decoder from Dmitry Eremin-Solenikov + updates to forces for new port numbers + Use "-H", not "-h", for the 802.11s option. (-h always help) + Better ICMPv6 checksum handling. + add support for the RPKI/Router Protocol, per -ietf-sidr-rpki-rtr-12 + get rid of uuencoded pcap test files, git can do binary. + sFlow changes for 64-bit counters. + fixes for PPI packet header handling and printing. + Add DCB Exchange protocol (DCBX) version 1.01. + Babel dissector, from Juliusz Chroboczek and Grégoire Henry. + improvements to radiotap for rate values > 127. + Many improvements to ForCES decode, including fix SCTP TML port + updated RPL type code to RPL-17 draft + Improve printout of DHCPv6 options. + added support and test case for QinQ (802.1q VLAN) packets + Handle DLT_IEEE802_15_4_NOFCS like DLT_IEEE802_15_4. + Build fixes for Sparc and other machines with alignment restrictions. + Merged changes from Debian package. + PGM: Add ACK decoding and add PGMCC DATA and FEEDBACK options. + Build fixes for OSX (Snow Leopard and others) + Add support for IEEE 802.15.4 packets + +Tue. July 20, 2010. guy@alum.mit.edu. + Summary for 4.1.2 tcpdump release + If -U is specified, flush the file after creating it, so it's + not zero-length + Fix TCP flags output description, and some typoes, in the man + page + Add a -h flag, and only attempt to recognize 802.11s mesh + headers if it's set + When printing the link-layer type list, send *all* output to + stderr + Include the CFLAGS setting when configure was run in the + compiler flags + Thu. April 1, 2010. guy@alum.mit.edu. Summary for 4.1.1 tcpdump release Fix build on systems with PF, such as FreeBSD and OpenBSD. Modified: head/contrib/tcpdump/CREDITS ============================================================================== --- head/contrib/tcpdump/CREDITS Thu May 17 04:04:48 2012 (r235529) +++ head/contrib/tcpdump/CREDITS Thu May 17 05:11:57 2012 (r235530) @@ -1,189 +1,203 @@ This file lists people who have contributed to tcpdump: The current maintainers: - Bill Fenner - David Young - Fulvio Risso - Guy Harris - Hannes Gredler - Michael Richardson + Bill Fenner + David Young + Fulvio Risso + Guy Harris + Hannes Gredler + Michael Richardson Additional people who have contributed patches: - Aaron Campbell - Alfredo Andres - Albert Chin - Ananth Suryanarayana - Andrea Bittau - Andrew Brown - Andrew Church - Andrew Hintz - Andrew Silent - Andrew Tridgell - Andy Heffernan - Arkadiusz Miskiewicz - Armando L. Caro Jr. - Arnaldo Carvalho de Melo - Ben Byer - Atsushi Onoe - Ben Smithurst - Bert Vermeulen - Bjoern A. Zeeb - Brent L. Bates - Brian Ginsbach - Bruce M. Simpson - Carles Kishimoto Bisbe - Charlie Lenahan - Charles M. Hannum - Chris Cogdon - Chris G. Demetriou - Christian Sievers - Chris Jepeway - Chris Larson - Craig Rodrigues - Crist J. Clark - Daniel Hagerty - Darren Reed - David Binderman - David Horn - David Smith - David Young - Don Ebright - Eddie Kohler - Elmar Kirchner - Fang Wang - Florent Drouin - Florian Forster - Francis Dupont - Francisco Matias Cuenca-Acuna - Francois-Xavier Le Bail - Frank Volf - Fulvio Risso - George Bakos - Gerald Combs - Gerrit Renker - Gert Doering - Greg Minshall - Greg Stark - Gilbert Ramirez Jr. - Gisle Vanem - Hannes Viertel - Hank Leininger - Harry Raaymakers - Heinz-Ado Arnolds - Hendrik Scholz - Ian McDonald - Ilpo Järvinen - Jacek Tobiasz - Jakob Schlyter - Jamal Hadi Salim - Jan Oravec - Jason R. Thorpe - Jefferson Ogata - Jeffrey Hutzelman - Jesper Peterson - Jim Hutchins - Jonathan Heusser - Tatuya Jinmei - João Medeiros - Joerg Mayer - Jørgen Thomsen - Julian Cowley - Kaarthik Sivakumar - Karl Norby - Kazushi Sugyo - Kelly Carmichael - Ken Hornstein - Kevin Steves - Klaus Klein - Kris Kennaway - Krzysztof Halasa - Larry Lile - Lennert Buytenhek - Loris Degioanni - Love Hörnquist-Åstrand - Lucas C. Villa Real - Luis Martin Garcia - Maciej W. Rozycki - Manu Pathak - Marc Binderberger - Marc A. Lehmann - Mark Ellzey Thomas - Marko Kiiskila - Markus Schöpflin - Marshall Rose - Martin Husemann - Max Laier - Michael A. Meffie III - Michael Madore - Michael Riepe - Michael Shalayeff - Michael Shields - Michael T. Stolarchuk - Michele "mydecay" Marchetto - Mike Frysinger - Monroe Williams - Motonori Shindo - Nathan J. Williams - Nathaniel Couper-Noles - Neil T. Spring - Niels Provos - Nickolai Zeldovich - Nicolas Ferrero - Noritoshi Demizu - Olaf Kirch - Onno van der Linden - Paolo Abeni - Pascal Hennequin - Pasvorn Boonmark - Paul Mundt - Paul S. Traina - Pavlin Radoslavov - Pekka Savola - Peter Fales - Peter Jeremy - - Peter Volkov - Phil Wood - Rafal Maszkowski - Randy Sofia - Raphael Raimbault - Rick Cheng - Rick Jones - Rick Watson - Rob Braun - Robert Edmonds - Roderick Schertler - Sagun Shakya - Sami Farin - Scott Rose - Sebastian Krahmer - Sebastien Raveau - Sebastien Vincent - Sepherosa Ziehau - Seth Webster - Shinsuke Suzuki - Steinar Haug - Swaminathan Chandrasekaran - Takashi Yamamoto - Terry Kennedy - Timo Koskiahde - Tony Li - Toshihiro Kanda - Uns Lider - Victor Oppleman - Wesley Griffin - Wesley Shields - Wilbert de Graaf - Will Drewry - William J. Hulley - Yen Yen Lim - Yoshifumi Nishida + A Costa + Aaron Campbell + Alfredo Andres + Albert Chin + Ananth Suryanarayana + Andrea Bittau + Andrew Brown + Andrew Church + Andrew Hintz + Andrew Nording + Andrew Tridgell + Andy Heffernan + Anton Bernal + Arkadiusz Miskiewicz + Armando L. Caro Jr. + Arnaldo Carvalho de Melo + Ben Byer + Atsushi Onoe + Ben Smithurst + Bert Vermeulen + Bjoern A. Zeeb + Brent L. Bates + Brian Ginsbach + Bruce M. Simpson + Carles Kishimoto Bisbe + Charlie Lenahan + Charles M. Hannum + Chris Cogdon + Chris G. Demetriou + Chris Jepeway + Chris Larson + Christian Sievers + Christophe Rhodes + Craig Rodrigues + Crist J. Clark + Daniel Hagerty + Darren Reed + David Binderman + David Horn + David Smith + David Young + Dmitry Eremin-Solenikov + Don Ebright + Eddie Kohler + Elmar Kirchner + Fang Wang + Florent Drouin + Florian Forster + Francis Dupont + Francisco Matias Cuenca-Acuna + Francois-Xavier Le Bail + Frank Volf + Fulvio Risso + George Bakos + Gerald Combs + Gerrit Renker + Gert Doering + Greg Minshall + Greg Stark + Grégoire Henry + Gilbert Ramirez Jr. + Gisle Vanem + Hannes Viertel + Hank Leininger + Harry Raaymakers + Heinz-Ado Arnolds + Hendrik Scholz + Ian McDonald + Ilpo Järvinen + Jacek Tobiasz + Jakob Schlyter + Jamal Hadi Salim + Jan Oravec + Jason R. Thorpe + Jefferson Ogata + Jeffrey Hutzelman + Jesper Peterson + Jim Hutchins + Jonathan Heusser + Tatuya Jinmei + João Medeiros + Joerg Mayer + Jørgen Thomsen + Julian Cowley + Juliusz Chroboczek + Kaarthik Sivakumar + Kaladhar Musunuru + Karl Norby + Kazushi Sugyo + Kelly Carmichael + Ken Hornstein + Kevin Steves + Klaus Klein + Kris Kennaway + Krzysztof Halasa + Larry Lile + Lennert Buytenhek + Loris Degioanni + Love Hörnquist-Åstrand + Lucas C. Villa Real + Luis MartinGarcia + Maciej W. Rozycki + Manu Pathak + Marc Binderberger + Marc A. Lehmann + Mark Ellzey Thomas + Marko Kiiskila + Markus Schöpflin + Marshall Rose + Martin Husemann + Max Laier + Michael A. Meffie III + Michael Madore + Michael Riepe + Michael Shalayeff + Michael Shields + Michael T. Stolarchuk + Michal Sekletar + Michele "mydecay" Marchetto + Mike Frysinger + Minto Jeyananth + Monroe Williams + Motonori Shindo + Nathan J. Williams + Nathaniel Couper-Noles + Neil T. Spring + Niels Provos + Nickolai Zeldovich + Nicolas Ferrero + Noritoshi Demizu + Olaf Kirch + Onno van der Linden + Paolo Abeni + Pascal Hennequin + Pasvorn Boonmark + Paul Ferrell + Paul Mundt + Paul S. Traina + Pavlin Radoslavov + Pawel Worach + Pekka Savola + Peter Fales + Peter Jeremy + + Peter Volkov + Phil Wood + Rafal Maszkowski + Randy Sofia + Raphael Raimbault + Rick Cheng + Rick Jones + Rick Watson + Rob Braun + Robert Edmonds + Roderick Schertler + Romain Francoise + Sagun Shakya + Sami Farin + Scott Mcmillan + Scott Rose + Sebastian Krahmer + Sebastien Raveau + Sebastien Vincent + Sepherosa Ziehau + Seth Webster + Shinsuke Suzuki + Steinar Haug + Swaminathan Chandrasekaran + Takashi Yamamoto + Terry Kennedy + Timo Koskiahde + Tony Li + Toshihiro Kanda + Uns Lider + Victor Oppleman + Weesan Lee + Wesley Griffin + Wesley Shields + Wilbert de Graaf + Will Drewry + William J. Hulley + Yen Yen Lim + Yoshifumi Nishida The original LBL crew: - Steve McCanne - Craig Leres - Van Jacobson + Steve McCanne + Craig Leres + Van Jacobson Past maintainers: - Jun-ichiro itojun Hagino + Jun-ichiro itojun Hagino Modified: head/contrib/tcpdump/Makefile.in ============================================================================== --- head/contrib/tcpdump/Makefile.in Thu May 17 04:04:48 2012 (r235529) +++ head/contrib/tcpdump/Makefile.in Thu May 17 05:11:57 2012 (r235530) @@ -26,6 +26,7 @@ # Top level hierarchy prefix = @prefix@ exec_prefix = @exec_prefix@ +datarootdir = @datarootdir@ # Pathname of directory to install the binary sbindir = @sbindir@ # Pathname of directory to install the man page @@ -46,7 +47,8 @@ INCLS = -I. @V_INCLS@ DEFS = @DEFS@ @CPPFLAGS@ @V_DEFS@ # Standard CFLAGS -CFLAGS = $(CCOPT) $(DEFS) $(INCLS) +CFLAGS = @CFLAGS@ +FULL_CFLAGS = $(CCOPT) $(DEFS) $(INCLS) $(CFLAGS) # Standard LDFLAGS LDFLAGS = @LDFLAGS@ @@ -64,15 +66,15 @@ RANLIB = @RANLIB@ # problem if you don't own the file but can write to the directory. .c.o: @rm -f $@ - $(CC) $(CFLAGS) -c $(srcdir)/$*.c + $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c CSRC = addrtoname.c af.c checksum.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \ - nlpid.c l2vpn.c machdep.c parsenfsfh.c \ - print-802_11.c print-ap1394.c print-ah.c print-arcnet.c \ - print-aodv.c print-arp.c print-ascii.c print-atalk.c print-atm.c \ - print-beep.c print-bfd.c print-bgp.c print-bootp.c print-bt.c \ - print-cdp.c print-cfm.c print-chdlc.c print-cip.c print-cnfp.c \ - print-dccp.c print-decnet.c \ + nlpid.c l2vpn.c machdep.c parsenfsfh.c in_cksum.c \ + print-802_11.c print-802_15_4.c print-ap1394.c print-ah.c \ + print-arcnet.c print-aodv.c print-arp.c print-ascii.c print-atalk.c \ + print-atm.c print-beep.c print-bfd.c print-bgp.c \ + print-bootp.c print-bt.c print-carp.c print-cdp.c print-cfm.c \ + print-chdlc.c print-cip.c print-cnfp.c print-dccp.c print-decnet.c \ print-domain.c print-dtp.c print-dvmrp.c print-enc.c print-egp.c \ print-eap.c print-eigrp.c\ print-esp.c print-ether.c print-fddi.c print-fr.c \ @@ -83,8 +85,9 @@ CSRC = addrtoname.c af.c checksum.c cpac print-lmp.c print-lspping.c print-lwapp.c \ print-lwres.c print-mobile.c print-mpcp.c print-mpls.c print-msdp.c \ print-nfs.c print-ntp.c print-null.c print-olsr.c print-ospf.c \ - print-pgm.c print-pim.c print-ppp.c print-pppoe.c print-pptp.c \ - print-radius.c print-raw.c print-rip.c print-rrcp.c print-rsvp.c \ + print-pgm.c print-pim.c \ + print-ppi.c print-ppp.c print-pppoe.c print-pptp.c \ + print-radius.c print-raw.c print-rip.c print-rpki-rtr.c print-rrcp.c print-rsvp.c \ print-rx.c print-sctp.c print-sflow.c print-sip.c print-sl.c print-sll.c \ print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \ print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \ @@ -165,6 +168,7 @@ HDR = \ oui.h \ pcap-missing.h \ pmap_prot.h \ + ppi.h \ ppp.h \ route6d.h \ rpc_auth.h \ @@ -226,16 +230,12 @@ EXTRA_DIST = \ lbl/os-ultrix4.h \ makemib \ missing/addrinfo.h \ - missing/addrsize.h \ - missing/bittypes.h \ missing/dlnames.c \ missing/datalinks.c \ missing/getnameinfo.c \ missing/inet_aton.c \ missing/inet_ntop.c \ missing/inet_pton.c \ - missing/resolv6.h \ - missing/resolv_ext.h \ missing/snprintf.c \ missing/sockstorage.h \ missing/strdup.c \ @@ -245,6 +245,7 @@ EXTRA_DIST = \ mkdep \ packetdat.awk \ pcap_dump_ftell.c \ + print-babel.c \ print-dhcp6.c \ print-frag6.c \ print-icmp6.c \ @@ -262,12 +263,18 @@ EXTRA_DIST = \ stime.awk \ strcasecmp.c \ tcpdump.1.in \ - tests/02-sunrise-sunset-esp.puu \ - tests/08-sunrise-sunset-aes.puu \ - tests/08-sunrise-sunset-esp2.puu \ + tests/02-sunrise-sunset-esp.pcap \ + tests/08-sunrise-sunset-aes.pcap \ + tests/08-sunrise-sunset-esp2.pcap \ + tests/QinQpacket.out \ + tests/QinQpacket.pcap \ + tests/QinQpacketv.out \ tests/TESTLIST \ tests/TESTonce \ tests/TESTrun.sh \ + tests/babel.pcap \ + tests/babel1.out \ + tests/babel1v.out \ tests/bgp-infinite-loop.pcap \ tests/bgp_vpn_attrset.out \ tests/bgp_vpn_attrset.pcap \ @@ -279,8 +286,8 @@ EXTRA_DIST = \ tests/e1000g.pcap \ tests/eapon1.gdbinit \ tests/eapon1.out \ - tests/eapon1.puu \ - tests/eapon2.puu \ + tests/eapon1.pcap \ + tests/empty.uu \ tests/esp-secrets.txt \ tests/esp0.out \ tests/esp1.gdbinit \ @@ -292,61 +299,57 @@ EXTRA_DIST = \ tests/esp5.gdbinit \ tests/esp5.out \ tests/espudp1.out \ - tests/espudp1.puu \ + tests/espudp1.pcap \ tests/forces1.out \ tests/forces1.pcap \ tests/forces1vvv.out \ tests/forces1vvvv.out \ tests/forces2.out \ - tests/forces2.pcap \ tests/forces2v.out \ tests/forces2vv.out \ - tests/ikev2.puu \ + tests/forces3vvv.out \ tests/ikev2four.out \ - tests/ikev2four.puu \ + tests/ikev2four.pcap \ tests/ikev2fourv.out \ tests/ikev2fourv4.out \ tests/ikev2pI2-secrets.txt \ tests/ikev2pI2.out \ - tests/ikev2pI2.puu \ - tests/isakmp-delete-segfault.puu \ - tests/isakmp-identification-segfault.puu \ - tests/isakmp-pointer-loop.puu \ + tests/ikev2pI2.pcap \ + tests/isakmp-delete-segfault.pcap \ + tests/isakmp-identification-segfault.pcap \ + tests/isakmp-pointer-loop.pcap \ tests/isakmp1.out \ tests/isakmp2.out \ tests/isakmp3.out \ tests/isakmp4.out \ - tests/isakmp4500.puu \ + tests/isakmp4500.pcap \ tests/isis-infinite-loop.pcap \ tests/ldp-infinite-loop.pcap \ tests/lmp.out \ - tests/lmp.puu \ + tests/lmp.pcap \ tests/lmp.sh \ tests/lspping-fec-ldp.pcap \ tests/lspping-fec-rsvp.pcap \ tests/mpls-ldp-hello.out \ - tests/mpls-ldp-hello.puu \ + tests/mpls-ldp-hello.pcap \ tests/mpls-traceroute.pcap \ tests/ospf-gmpls.out \ - tests/ospf-gmpls.puu \ + tests/ospf-gmpls.pcap \ tests/print-A.out \ tests/print-AA.out \ tests/print-capX.out \ tests/print-capXX.out \ - tests/print-flags.puu \ + tests/print-flags.pcap \ tests/print-flags.sh \ tests/print-x.out \ tests/print-xx.out \ tests/rsvp-infinite-loop.pcap \ + tests/sflow_multiple_counter_30_pdus.out \ + tests/sflow_multiple_counter_30_pdus.pcap \ vfprintf.c \ - win32/Include/Arpa/tftp.h \ win32/Include/errno.h \ win32/Include/getopt.h \ - win32/Include/inetprivate.h \ - win32/Include/telnet.h \ win32/Include/w32_fzs.h \ - win32/Include/Netinet/in_systm.h \ - win32/Include/Netinet/ip.h \ win32/Src/getopt.c \ win32/prj/GNUmakefile \ win32/prj/WinDump.dsp \ @@ -356,7 +359,7 @@ all: $(PROG) $(PROG): $(OBJ) @V_PCAPDEP@ @rm -f $@ - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) + $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ) @rm -f $@ @@ -364,30 +367,30 @@ $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ) $(RANLIB) $@ datalinks.o: $(srcdir)/missing/datalinks.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c dlnames.o: $(srcdir)/missing/dlnames.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c getnameinfo.o: $(srcdir)/missing/getnameinfo.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c getaddrinfo.o: $(srcdir)/missing/getaddrinfo.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c inet_pton.o: $(srcdir)/missing/inet_pton.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c inet_ntop.o: $(srcdir)/missing/inet_ntop.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c inet_aton.o: $(srcdir)/missing/inet_aton.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c snprintf.o: $(srcdir)/missing/snprintf.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c strlcat.o: $(srcdir)/missing/strlcat.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c strlcpy.o: $(srcdir)/missing/strlcpy.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c strsep.o: $(srcdir)/missing/strsep.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c version.o: version.c - $(CC) $(CFLAGS) -c version.c + $(CC) $(FULL_CFLAGS) -c version.c version.c: $(srcdir)/VERSION @rm -f $@ @@ -423,9 +426,9 @@ clean: distclean: rm -f $(CLEANFILES) Makefile config.cache config.log config.status \ config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1 + rm -rf autom4te.cache check: tcpdump - uudecode --help || (echo "No uudecode program found, not running tests"; echo "apt-get/rpm install sharutils?"; exit 1) (cd tests && ./TESTrun.sh) tags: $(TAGFILES) Modified: head/contrib/tcpdump/VERSION ============================================================================== --- head/contrib/tcpdump/VERSION Thu May 17 04:04:48 2012 (r235529) +++ head/contrib/tcpdump/VERSION Thu May 17 05:11:57 2012 (r235530) @@ -1 +1 @@ -4.1.1 +4.2.1 Modified: head/contrib/tcpdump/acconfig.h ============================================================================== --- head/contrib/tcpdump/acconfig.h Thu May 17 04:04:48 2012 (r235529) +++ head/contrib/tcpdump/acconfig.h Thu May 17 05:11:57 2012 (r235530) @@ -8,12 +8,6 @@ /* Define if you enable support for the libsmi. */ #undef LIBSMI -/* define if you have struct __res_state_ext */ -#undef HAVE_RES_STATE_EXT - -/* define if your struct __res_state has the nsort member */ -#undef HAVE_NEW_RES_STATE - /* define if you have the addrinfo function. */ #undef HAVE_ADDRINFO @@ -23,15 +17,6 @@ /* define ifyou have the h_errno variable. */ #undef HAVE_H_ERRNO -/* define if IN6ADDRSZ is defined (XXX not used!) */ -#undef HAVE_IN6ADDRSZ - -/* define if INADDRSZ is defined (XXX not used!) */ -#undef HAVE_INADDRSZ - -/* define if RES_USE_INET6 is defined */ -#undef HAVE_RES_USE_INET6 - /* define if you have struct sockaddr_storage */ #undef HAVE_SOCKADDR_STORAGE @@ -68,9 +53,6 @@ /* define if you have getrpcbynumber() */ #undef HAVE_GETRPCBYNUMBER -/* AIX hack. */ -#undef _SUN - /* Workaround for missing 64-bit formats */ #undef PRId64 #undef PRIo64 Modified: head/contrib/tcpdump/addrtoname.c ============================================================================== --- head/contrib/tcpdump/addrtoname.c Thu May 17 04:04:48 2012 (r235529) +++ head/contrib/tcpdump/addrtoname.c Thu May 17 05:11:57 2012 (r235530) @@ -510,6 +510,34 @@ etheraddr_string(register const u_char * } const char * +le64addr_string(const u_char *ep) +{ + const unsigned int len = 8; + register u_int i; + register char *cp; + register struct enamemem *tp; + char buf[BUFSIZE]; + + tp = lookup_bytestring(ep, len); + if (tp->e_name) + return (tp->e_name); + + cp = buf; + for (i = len; i > 0 ; --i) { + *cp++ = hex[*(ep + i - 1) >> 4]; + *cp++ = hex[*(ep + i - 1) & 0xf]; + *cp++ = ':'; + } + cp --; + + *cp = '\0'; + + tp->e_name = strdup(buf); + + return (tp->e_name); +} + +const char * linkaddr_string(const u_char *ep, const unsigned int type, const unsigned int len) { register u_int i; Modified: head/contrib/tcpdump/addrtoname.h ============================================================================== --- head/contrib/tcpdump/addrtoname.h Thu May 17 04:04:48 2012 (r235529) +++ head/contrib/tcpdump/addrtoname.h Thu May 17 05:11:57 2012 (r235530) @@ -34,6 +34,7 @@ enum { extern const char *linkaddr_string(const u_char *, const unsigned int, const unsigned int); extern const char *etheraddr_string(const u_char *); +extern const char *le64addr_string(const u_char *); extern const char *etherproto_string(u_short); extern const char *tcpport_string(u_short); extern const char *udpport_string(u_short); Modified: head/contrib/tcpdump/bootp.h ============================================================================== --- head/contrib/tcpdump/bootp.h Thu May 17 04:04:48 2012 (r235529) +++ head/contrib/tcpdump/bootp.h Thu May 17 05:11:57 2012 (r235530) @@ -37,7 +37,7 @@ struct bootp { u_int8_t bp_sname[64]; /* server host name */ u_int8_t bp_file[128]; /* boot file name */ u_int8_t bp_vend[64]; /* vendor-specific area */ -}; +} UNALIGNED; /* * UDP port numbers, server and client. @@ -217,7 +217,7 @@ struct cmu_vend { struct in_addr v_ins1, v_ins2; /* IEN-116 name servers */ struct in_addr v_ts1, v_ts2; /* Time servers */ u_int8_t v_unused[24]; /* currently unused */ -}; +} UNALIGNED; /* v_flags values */ Modified: head/contrib/tcpdump/config.h.in ============================================================================== --- head/contrib/tcpdump/config.h.in Thu May 17 04:04:48 2012 (r235529) +++ head/contrib/tcpdump/config.h.in Thu May 17 05:11:57 2012 (r235530) @@ -8,12 +8,6 @@ /* Define if you enable support for the libsmi. */ #undef LIBSMI -/* define if you have struct __res_state_ext */ -#undef HAVE_RES_STATE_EXT - -/* define if your struct __res_state has the nsort member */ -#undef HAVE_NEW_RES_STATE - /* define if you have the addrinfo function. */ #undef HAVE_ADDRINFO @@ -23,15 +17,6 @@ /* define ifyou have the h_errno variable. */ #undef HAVE_H_ERRNO -/* define if IN6ADDRSZ is defined (XXX not used!) */ -#undef HAVE_IN6ADDRSZ - -/* define if INADDRSZ is defined (XXX not used!) */ -#undef HAVE_INADDRSZ - -/* define if RES_USE_INET6 is defined */ -#undef HAVE_RES_USE_INET6 - /* define if you have struct sockaddr_storage */ #undef HAVE_SOCKADDR_STORAGE @@ -68,9 +53,6 @@ /* define if you have getrpcbynumber() */ #undef HAVE_GETRPCBYNUMBER -/* AIX hack. */ -#undef _SUN - /* Workaround for missing 64-bit formats */ #undef PRId64 #undef PRIo64 @@ -108,6 +90,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H +/* Define to 1 if you have the `fork' function. */ +#undef HAVE_FORK + /* Define to 1 if you have the `getnameinfo' function. */ #undef HAVE_GETNAMEINFO @@ -165,6 +150,9 @@ /* Define to 1 if you have the `pcap_lib_version' function. */ #undef HAVE_PCAP_LIB_VERSION +/* Define to 1 if you have the `pcap_set_tstamp_type' function. */ +#undef HAVE_PCAP_SET_TSTAMP_TYPE + /* Define to 1 if you have the header file. */ #undef HAVE_PCAP_USB_H @@ -174,6 +162,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_RPC_RPCENT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_RPC_RPC_H + /* Define to 1 if you have the `setlinebuf' function. */ #undef HAVE_SETLINEBUF @@ -237,6 +228,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if you have the `vfork' function. */ +#undef HAVE_VFORK + /* Define to 1 if you have the `vfprintf' function. */ #undef HAVE_VFPRINTF @@ -276,21 +270,6 @@ /* return value of signal handlers */ #undef RETSIGVAL -/* The size of `char', as computed by sizeof. */ -#undef SIZEOF_CHAR - -/* The size of `int', as computed by sizeof. */ -#undef SIZEOF_INT - -/* The size of `long', as computed by sizeof. */ -#undef SIZEOF_LONG - -/* The size of `long long', as computed by sizeof. */ -#undef SIZEOF_LONG_LONG - -/* The size of `short', as computed by sizeof. */ -#undef SIZEOF_SHORT - /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS @@ -303,6 +282,9 @@ /* needed on HP-UX */ #undef _HPUX_SOURCE +/* define on AIX to get certain functions */ +#undef _SUN + /* define if your compiler allows __attribute__((format)) to be applied to function pointers */ #undef __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS Modified: head/contrib/tcpdump/configure ============================================================================== --- head/contrib/tcpdump/configure Thu May 17 04:04:48 2012 (r235529) +++ head/contrib/tcpdump/configure Thu May 17 05:11:57 2012 (r235530) @@ -1267,6 +1267,7 @@ if test -n "$ac_init_help"; then Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-universal don't build universal on OS X --enable-smb enable possibly-buggy SMB printer default=yes --disable-smb disable possibly-buggy SMB printer --enable-ipv6 enable ipv6 (with ipv4) support @@ -1845,7 +1846,7 @@ fi V_CCOPT="-O" V_INCLS="" if test "${srcdir}" != "." ; then - V_INCLS="-I\$(srcdir)" + V_INCLS="-I$srcdir" fi if test "${CFLAGS+set}" = set; then LBL_CFLAGS="$CFLAGS" @@ -3217,7 +3218,8 @@ if test "${ac_cv___attribute__+set}" = s else cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + + /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF @@ -3290,7 +3292,8 @@ if test "${ac_cv___attribute___format_fu else cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + + /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF @@ -3986,7 +3989,8 @@ done -for ac_header in fcntl.h rpc/rpcent.h netdnet/dnetdb.h + +for ac_header in fcntl.h rpc/rpc.h rpc/rpcent.h netdnet/dnetdb.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then @@ -4387,6 +4391,36 @@ fi case "$host_os" in +darwin*) + # Check whether --enable-universal was given. +if test "${enable_universal+set}" = set; then + enableval=$enable_universal; +fi + + if test "$enable_universal" != "no"; then + case "$host_os" in + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu May 17 07:59:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 63ABC106564A; Thu, 17 May 2012 07:59:16 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43F6F8FC14; Thu, 17 May 2012 07:59:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4H7xGXU085475; Thu, 17 May 2012 07:59:16 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4H7xGr2085471; Thu, 17 May 2012 07:59:16 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201205170759.q4H7xGr2085471@svn.freebsd.org> From: Jeremie Le Hen Date: Thu, 17 May 2012 07:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235534 - in stable/9: . share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 07:59:16 -0000 Author: jlh Date: Thu May 17 07:59:15 2012 New Revision: 235534 URL: http://svn.freebsd.org/changeset/base/235534 Log: MFC r235122: Introduce the ${SHLIB_LDSCRIPT} variable to have an ld(1) script instead of a symlink for .so files. Modified: stable/9/Makefile.inc1 (contents, props changed) stable/9/share/mk/bsd.README stable/9/share/mk/bsd.lib.mk Directory Properties: stable/9/ (props changed) stable/9/share/mk/ (props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Thu May 17 07:24:13 2012 (r235533) +++ stable/9/Makefile.inc1 Thu May 17 07:59:15 2012 (r235534) @@ -260,6 +260,7 @@ XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE # world stage WMAKEENV= ${CROSSENV} \ _SHLIBDIRPREFIX=${WORLDTMP} \ + _LDSCRIPTROOT= \ VERSION="${VERSION}" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} @@ -302,6 +303,7 @@ LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -DCOMP # Yes, the flags are redundant. LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \ _SHLIBDIRPREFIX=${LIB32TMP} \ + _LDSCRIPTROOT=${LIB32TMP} \ VERSION="${VERSION}" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} \ @@ -314,11 +316,11 @@ LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DN -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ -DWITHOUT_HTML -DNO_CTF -DNO_LINT -ECC -ECXX -EAS -ELD \ DESTDIR=${LIB32TMP} -LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*} -DNO_INCS +LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS .endif # install stage -IMAKEENV= ${CROSSENV} +IMAKEENV= ${CROSSENV:N_LDSCRIPTROOT=*} IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 .if empty(.MAKEFLAGS:M-n) IMAKEENV+= PATH=${STRICTTMPPATH}:${INSTALLTMP} \ Modified: stable/9/share/mk/bsd.README ============================================================================== --- stable/9/share/mk/bsd.README Thu May 17 07:24:13 2012 (r235533) +++ stable/9/share/mk/bsd.README Thu May 17 07:59:15 2012 (r235534) @@ -352,6 +352,10 @@ SRCS List of source files to build the to .c files of the same name. (This is not the default for versions of make.) +SHLIB_LDSCRIPT Template file to generate shared library linker script. + Unless used, a simple symlink is created to the real + shared object. + The include file includes the file named "../Makefile.inc" if it exists, as well as the include file . Modified: stable/9/share/mk/bsd.lib.mk ============================================================================== --- stable/9/share/mk/bsd.lib.mk Thu May 17 07:24:13 2012 (r235533) +++ stable/9/share/mk/bsd.lib.mk Thu May 17 07:59:15 2012 (r235534) @@ -287,6 +287,25 @@ _libinstall: ${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \ ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR} .if defined(SHLIB_LINK) +# ${_SHLIBDIRPREFIX} and ${_LDSCRIPTROOT} are both needed when cross-building +# and when building 32 bits library shims. ${_SHLIBDIRPREFIX} is the directory +# prefix where shared objects will be installed. ${_LDSCRIPTROOT} is the +# directory prefix that will be used in generated ld(1) scripts. They cannot +# be coalesced because of the way ld(1) handles the sysroot prefix (used in the +# cross-toolchain): +# - 64 bits libs are located under sysroot, so ${_LDSCRIPTROOT} must be empty. +# - 32 bits shims are not, so ${_LDSCRIPTROOT} is used to specify their full +# path. Note that ld(1) scripts are generated both during buildworld and +# installworld; in the later case ${_LDSCRIPTROOT} must be obviously empty. +# On the other hand, the use of ${_SHLIBDIRPREFIX} is more consistent since it +# does not involve the logic of a tool we do not own. +.if defined(SHLIB_LDSCRIPT) && !empty(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT}) + sed -e 's,@@SHLIB@@,${_LDSCRIPTROOT}${SHLIBDIR}/${SHLIB_NAME},g' \ + -e 's,@@LIBDIR@@,${_LDSCRIPTROOT}${LIBDIR},g' \ + ${.CURDIR}/${SHLIB_LDSCRIPT} > lib${LIB}.ld + ${INSTALL} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${_INSTALLFLAGS} lib${LIB}.ld ${DESTDIR}${LIBDIR}/${SHLIB_LINK} +.else .if ${SHLIBDIR} == ${LIBDIR} ln -fs ${SHLIB_NAME} ${DESTDIR}${LIBDIR}/${SHLIB_LINK} .else @@ -297,8 +316,9 @@ _libinstall: rm -f ${DESTDIR}${LIBDIR}/${SHLIB_NAME} .endif .endif -.endif -.endif +.endif # SHLIB_LDSCRIPT +.endif # SHLIB_LINK +.endif # SHIB_NAME .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${LIBDIR} @@ -366,6 +386,9 @@ clean: .endif .if defined(SHLIB_NAME) .if defined(SHLIB_LINK) +.if defined(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT}) + rm -f lib${LIB}.ld +.endif rm -f ${SHLIB_LINK} .endif .if defined(LIB) && !empty(LIB) From owner-svn-src-all@FreeBSD.ORG Thu May 17 08:14:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37B451065673; Thu, 17 May 2012 08:14:11 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 18C718FC18; Thu, 17 May 2012 08:14:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4H8EAYQ086080; Thu, 17 May 2012 08:14:10 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4H8EALY086076; Thu, 17 May 2012 08:14:10 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201205170814.q4H8EALY086076@svn.freebsd.org> From: Jeremie Le Hen Date: Thu, 17 May 2012 08:14:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235536 - in stable/8: . share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 08:14:11 -0000 Author: jlh Date: Thu May 17 08:14:10 2012 New Revision: 235536 URL: http://svn.freebsd.org/changeset/base/235536 Log: MFC r235122: Introduce the ${SHLIB_LDSCRIPT} variable to have an ld(1) script instead of a symlink for .so files. Modified: stable/8/Makefile.inc1 (contents, props changed) stable/8/share/mk/bsd.README stable/8/share/mk/bsd.lib.mk Directory Properties: stable/8/ (props changed) stable/8/share/ (props changed) stable/8/share/mk/ (props changed) Modified: stable/8/Makefile.inc1 ============================================================================== --- stable/8/Makefile.inc1 Thu May 17 08:07:09 2012 (r235535) +++ stable/8/Makefile.inc1 Thu May 17 08:14:10 2012 (r235536) @@ -254,6 +254,7 @@ XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE # world stage WMAKEENV= ${CROSSENV} \ _SHLIBDIRPREFIX=${WORLDTMP} \ + _LDSCRIPTROOT= \ VERSION="${VERSION}" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} @@ -279,6 +280,7 @@ LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -mfanc # Yes, the flags are redundant. LIB32WMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \ _SHLIBDIRPREFIX=${LIB32TMP} \ + _LDSCRIPTROOT=${LIB32TMP} \ VERSION="${VERSION}" \ MACHINE=i386 \ MACHINE_ARCH=i386 \ @@ -296,11 +298,11 @@ LIB32WMAKEENV= MAKEOBJDIRPREFIX=${OBJTRE LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ -DWITHOUT_HTML -DNO_CTF DESTDIR=${LIB32TMP} -LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*} -DNO_INCS +LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS .endif # install stage -IMAKEENV= ${CROSSENV} +IMAKEENV= ${CROSSENV:N_LDSCRIPTROOT=*} IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 .if empty(.MAKEFLAGS:M-n) IMAKEENV+= PATH=${STRICTTMPPATH}:${INSTALLTMP} \ Modified: stable/8/share/mk/bsd.README ============================================================================== --- stable/8/share/mk/bsd.README Thu May 17 08:07:09 2012 (r235535) +++ stable/8/share/mk/bsd.README Thu May 17 08:14:10 2012 (r235536) @@ -352,6 +352,10 @@ SRCS List of source files to build the to .c files of the same name. (This is not the default for versions of make.) +SHLIB_LDSCRIPT Template file to generate shared library linker script. + Unless used, a simple symlink is created to the real + shared object. + The include file includes the file named "../Makefile.inc" if it exists, as well as the include file . Modified: stable/8/share/mk/bsd.lib.mk ============================================================================== --- stable/8/share/mk/bsd.lib.mk Thu May 17 08:07:09 2012 (r235535) +++ stable/8/share/mk/bsd.lib.mk Thu May 17 08:14:10 2012 (r235536) @@ -288,6 +288,25 @@ _libinstall: ${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \ ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR} .if defined(SHLIB_LINK) +# ${_SHLIBDIRPREFIX} and ${_LDSCRIPTROOT} are both needed when cross-building +# and when building 32 bits library shims. ${_SHLIBDIRPREFIX} is the directory +# prefix where shared objects will be installed. ${_LDSCRIPTROOT} is the +# directory prefix that will be used in generated ld(1) scripts. They cannot +# be coalesced because of the way ld(1) handles the sysroot prefix (used in the +# cross-toolchain): +# - 64 bits libs are located under sysroot, so ${_LDSCRIPTROOT} must be empty. +# - 32 bits shims are not, so ${_LDSCRIPTROOT} is used to specify their full +# path. Note that ld(1) scripts are generated both during buildworld and +# installworld; in the later case ${_LDSCRIPTROOT} must be obviously empty. +# On the other hand, the use of ${_SHLIBDIRPREFIX} is more consistent since it +# does not involve the logic of a tool we do not own. +.if defined(SHLIB_LDSCRIPT) && !empty(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT}) + sed -e 's,@@SHLIB@@,${_LDSCRIPTROOT}${SHLIBDIR}/${SHLIB_NAME},g' \ + -e 's,@@LIBDIR@@,${_LDSCRIPTROOT}${LIBDIR},g' \ + ${.CURDIR}/${SHLIB_LDSCRIPT} > lib${LIB}.ld + ${INSTALL} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${_INSTALLFLAGS} lib${LIB}.ld ${DESTDIR}${LIBDIR}/${SHLIB_LINK} +.else .if ${SHLIBDIR} == ${LIBDIR} ln -fs ${SHLIB_NAME} ${DESTDIR}${LIBDIR}/${SHLIB_LINK} .else @@ -298,8 +317,9 @@ _libinstall: rm -f ${DESTDIR}${LIBDIR}/${SHLIB_NAME} .endif .endif -.endif -.endif +.endif # SHLIB_LDSCRIPT +.endif # SHLIB_LINK +.endif # SHIB_NAME .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${LIBDIR} @@ -367,6 +387,9 @@ clean: .endif .if defined(SHLIB_NAME) .if defined(SHLIB_LINK) +.if defined(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT}) + rm -f lib${LIB}.ld +.endif rm -f ${SHLIB_LINK} .endif .if defined(LIB) && !empty(LIB) From owner-svn-src-all@FreeBSD.ORG Thu May 17 10:11:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 16ACC106566C; Thu, 17 May 2012 10:11:19 +0000 (UTC) (envelope-from gber@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F10758FC1F; Thu, 17 May 2012 10:11:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HABItu090244; Thu, 17 May 2012 10:11:18 GMT (envelope-from gber@svn.freebsd.org) Received: (from gber@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HABIJY090234; Thu, 17 May 2012 10:11:18 GMT (envelope-from gber@svn.freebsd.org) Message-Id: <201205171011.q4HABIJY090234@svn.freebsd.org> From: Grzegorz Bernacki Date: Thu, 17 May 2012 10:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235537 - in head: etc/mtree include lib lib/libnandfs lib/libstand sbin sbin/nandfs sbin/newfs_nandfs share/man/man4 share/man/man5 share/mk sys/boot/arm/uboot sys/boot/i386/loader sys... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 10:11:19 -0000 Author: gber Date: Thu May 17 10:11:18 2012 New Revision: 235537 URL: http://svn.freebsd.org/changeset/base/235537 Log: Import work done under project/nand (@235533) into head. The NAND Flash environment consists of several distinct components: - NAND framework (drivers harness for NAND controllers and NAND chips) - NAND simulator (NANDsim) - NAND file system (NAND FS) - Companion tools and utilities - Documentation (manual pages) This work is still experimental. Please use with caution. Obtained from: Semihalf Supported by: FreeBSD Foundation, Juniper Networks Added: head/lib/libnandfs/ head/lib/libnandfs/Makefile (contents, props changed) head/lib/libnandfs/libnandfs.h (contents, props changed) head/lib/libnandfs/nandfs.c (contents, props changed) head/lib/libstand/nandfs.c (contents, props changed) head/sbin/nandfs/ head/sbin/nandfs/Makefile (contents, props changed) head/sbin/nandfs/lssnap.c (contents, props changed) head/sbin/nandfs/mksnap.c (contents, props changed) head/sbin/nandfs/nandfs.8 (contents, props changed) head/sbin/nandfs/nandfs.c (contents, props changed) head/sbin/nandfs/nandfs.h (contents, props changed) head/sbin/nandfs/rmsnap.c (contents, props changed) head/sbin/newfs_nandfs/ head/sbin/newfs_nandfs/Makefile (contents, props changed) head/sbin/newfs_nandfs/newfs_nandfs.8 (contents, props changed) head/sbin/newfs_nandfs/newfs_nandfs.c (contents, props changed) head/share/man/man4/nand.4 (contents, props changed) head/share/man/man4/nandsim.4 (contents, props changed) head/share/man/man5/nandfs.5 (contents, props changed) head/sys/dev/nand/ head/sys/dev/nand/nand.c (contents, props changed) head/sys/dev/nand/nand.h (contents, props changed) head/sys/dev/nand/nand_bbt.c (contents, props changed) head/sys/dev/nand/nand_cdev.c (contents, props changed) head/sys/dev/nand/nand_dev.h (contents, props changed) head/sys/dev/nand/nand_ecc_pos.h (contents, props changed) head/sys/dev/nand/nand_generic.c (contents, props changed) head/sys/dev/nand/nand_geom.c (contents, props changed) head/sys/dev/nand/nand_id.c (contents, props changed) head/sys/dev/nand/nand_if.m (contents, props changed) head/sys/dev/nand/nandbus.c (contents, props changed) head/sys/dev/nand/nandbus.h (contents, props changed) head/sys/dev/nand/nandbus_if.m (contents, props changed) head/sys/dev/nand/nandsim.c (contents, props changed) head/sys/dev/nand/nandsim.h (contents, props changed) head/sys/dev/nand/nandsim_chip.c (contents, props changed) head/sys/dev/nand/nandsim_chip.h (contents, props changed) head/sys/dev/nand/nandsim_ctrl.c (contents, props changed) head/sys/dev/nand/nandsim_log.c (contents, props changed) head/sys/dev/nand/nandsim_log.h (contents, props changed) head/sys/dev/nand/nandsim_swap.c (contents, props changed) head/sys/dev/nand/nandsim_swap.h (contents, props changed) head/sys/dev/nand/nfc_if.m (contents, props changed) head/sys/dev/nand/nfc_mv.c (contents, props changed) head/sys/fs/nandfs/ head/sys/fs/nandfs/bmap.c (contents, props changed) head/sys/fs/nandfs/bmap.h (contents, props changed) head/sys/fs/nandfs/nandfs.h (contents, props changed) head/sys/fs/nandfs/nandfs_alloc.c (contents, props changed) head/sys/fs/nandfs/nandfs_bmap.c (contents, props changed) head/sys/fs/nandfs/nandfs_buffer.c (contents, props changed) head/sys/fs/nandfs/nandfs_cleaner.c (contents, props changed) head/sys/fs/nandfs/nandfs_cpfile.c (contents, props changed) head/sys/fs/nandfs/nandfs_dat.c (contents, props changed) head/sys/fs/nandfs/nandfs_dir.c (contents, props changed) head/sys/fs/nandfs/nandfs_fs.h (contents, props changed) head/sys/fs/nandfs/nandfs_ifile.c (contents, props changed) head/sys/fs/nandfs/nandfs_mount.h (contents, props changed) head/sys/fs/nandfs/nandfs_segment.c (contents, props changed) head/sys/fs/nandfs/nandfs_subr.c (contents, props changed) head/sys/fs/nandfs/nandfs_subr.h (contents, props changed) head/sys/fs/nandfs/nandfs_sufile.c (contents, props changed) head/sys/fs/nandfs/nandfs_vfsops.c (contents, props changed) head/sys/fs/nandfs/nandfs_vnops.c (contents, props changed) head/sys/modules/nandfs/ head/sys/modules/nandfs/Makefile (contents, props changed) head/sys/modules/nandsim/ head/sys/modules/nandsim/Makefile (contents, props changed) head/tools/build/options/WITHOUT_NAND (contents, props changed) head/tools/build/options/WITH_NAND (contents, props changed) head/usr.sbin/nandsim/ head/usr.sbin/nandsim/Makefile (contents, props changed) head/usr.sbin/nandsim/nandsim.8 (contents, props changed) head/usr.sbin/nandsim/nandsim.c (contents, props changed) head/usr.sbin/nandsim/nandsim_cfgparse.c (contents, props changed) head/usr.sbin/nandsim/nandsim_cfgparse.h (contents, props changed) head/usr.sbin/nandsim/nandsim_rcfile.c (contents, props changed) head/usr.sbin/nandsim/nandsim_rcfile.h (contents, props changed) head/usr.sbin/nandsim/sample.conf (contents, props changed) head/usr.sbin/nandtool/ head/usr.sbin/nandtool/Makefile (contents, props changed) head/usr.sbin/nandtool/nand_erase.c (contents, props changed) head/usr.sbin/nandtool/nand_info.c (contents, props changed) head/usr.sbin/nandtool/nand_read.c (contents, props changed) head/usr.sbin/nandtool/nand_readoob.c (contents, props changed) head/usr.sbin/nandtool/nand_write.c (contents, props changed) head/usr.sbin/nandtool/nand_writeoob.c (contents, props changed) head/usr.sbin/nandtool/nandtool.8 (contents, props changed) head/usr.sbin/nandtool/nandtool.c (contents, props changed) head/usr.sbin/nandtool/nandtool.h (contents, props changed) head/usr.sbin/nandtool/usage.h (contents, props changed) Modified: head/etc/mtree/BSD.include.dist head/include/Makefile head/lib/Makefile head/lib/libstand/Makefile head/lib/libstand/stand.h head/sbin/Makefile head/share/man/man4/Makefile head/share/man/man5/Makefile head/share/mk/bsd.own.mk head/sys/boot/arm/uboot/Makefile head/sys/boot/arm/uboot/conf.c head/sys/boot/arm/uboot/version head/sys/boot/i386/loader/Makefile head/sys/boot/i386/loader/conf.c head/sys/conf/files head/sys/conf/options head/sys/modules/Makefile head/usr.sbin/Makefile Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Thu May 17 08:14:10 2012 (r235536) +++ head/etc/mtree/BSD.include.dist Thu May 17 10:11:18 2012 (r235537) @@ -122,6 +122,8 @@ mpilib .. .. + nand + .. ofw .. pbio @@ -154,6 +156,8 @@ .. msdosfs .. + nandfs + .. nfs .. ntfs Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Thu May 17 08:14:10 2012 (r235536) +++ head/include/Makefile Thu May 17 10:11:18 2012 (r235537) @@ -43,7 +43,7 @@ LSUBDIRS= cam/ata cam/scsi \ dev/ic dev/iicbus ${_dev_ieee488} dev/io dev/lmc dev/mfi dev/ofw \ dev/pbio ${_dev_powermac_nvram} dev/ppbus dev/smbus \ dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \ - fs/devfs fs/fdescfs fs/msdosfs fs/nfs fs/ntfs fs/nullfs \ + fs/devfs fs/fdescfs fs/msdosfs fs/nandfs fs/nfs fs/ntfs fs/nullfs \ ${_fs_nwfs} fs/portalfs fs/procfs fs/smbfs fs/udf fs/unionfs \ geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \ geom/mirror geom/mountver geom/multipath geom/nop \ @@ -157,7 +157,7 @@ copies: done .endif .endfor -.for i in ${LDIRS} ${LSUBDIRS:Ndev/acpica:Ndev/bktr} ${LSUBSUBDIRS} +.for i in ${LDIRS} ${LSUBDIRS:Ndev/acpica:Ndev/bktr:Ndev/nand} ${LSUBSUBDIRS} cd ${.CURDIR}/../sys; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ ${DESTDIR}${INCLUDEDIR}/$i @@ -168,6 +168,13 @@ copies: cd ${.CURDIR}/../sys/dev/bktr; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ioctl_*.h \ ${DESTDIR}${INCLUDEDIR}/dev/bktr +.if ${MK_NAND} != "no" + cd ${.CURDIR}/../sys/dev/nand; \ + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 nandsim.h \ + ${DESTDIR}${INCLUDEDIR}/dev/nand; \ + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 nand_dev.h \ + ${DESTDIR}${INCLUDEDIR}/dev/nand +.endif cd ${.CURDIR}/../sys/contrib/altq/altq; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/altq @@ -224,7 +231,7 @@ symlinks: ln -fs ../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ done .endfor -.for i in ${LSUBDIRS:Ndev/acpica:Ndev/bktr} +.for i in ${LSUBDIRS:Ndev/acpica:Ndev/bktr:Ndev/nand} cd ${.CURDIR}/../sys/$i; \ for h in *.h; do \ ln -fs ../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ @@ -240,6 +247,13 @@ symlinks: ln -fs ../../../../sys/dev/bktr/$$h \ ${DESTDIR}${INCLUDEDIR}/dev/bktr; \ done +.if ${MK_NAND} != "no" + cd ${.CURDIR}/../sys/dev/nand; \ + for h in nandsim.h nand_dev.h; do \ + ln -fs ../../../../sys/dev/nand/$$h \ + ${DESTDIR}${INCLUDEDIR}/dev/nand; \ + done +.endif .for i in ${LSUBSUBDIRS} cd ${.CURDIR}/../sys/$i; \ for h in *.h; do \ Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Thu May 17 08:14:10 2012 (r235536) +++ head/lib/Makefile Thu May 17 10:11:18 2012 (r235537) @@ -88,6 +88,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libmemstat \ ${_libmilter} \ ${_libmp} \ + ${_libnandfs} \ ${_libncp} \ ${_libngatm} \ libopie \ @@ -175,6 +176,10 @@ _libipx= libipx _libthr= libthr .endif +.if ${MK_NAND} != "no" +_libnandfs= libnandfs +.endif + .if ${MK_NETGRAPH} != "no" _libnetgraph= libnetgraph .endif Added: head/lib/libnandfs/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnandfs/Makefile Thu May 17 10:11:18 2012 (r235537) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +LIB= nandfs +SRCS+= nandfs.c +INCS= libnandfs.h + +CFLAGS += -I${.CURDIR} + +.include Added: head/lib/libnandfs/libnandfs.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnandfs/libnandfs.h Thu May 17 10:11:18 2012 (r235537) @@ -0,0 +1,65 @@ +/*- + * Copyright (c) 2010-2012 Semihalf. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LIBNANDFS_NANDFS_H +#define _LIBNANDFS_NANDFS_H + +struct nandfs { + struct nandfs_fsdata n_fsdata; + struct nandfs_super_block n_sb; + char n_ioc[MNAMELEN]; + char n_dev[MNAMELEN]; + int n_iocfd; + int n_devfd; + int n_flags; + char n_errmsg[120]; +}; + +int nandfs_iserror(struct nandfs *); +const char *nandfs_errmsg(struct nandfs *); + +void nandfs_init(struct nandfs *, const char *); +void nandfs_destroy(struct nandfs *); + +const char *nandfs_dev(struct nandfs *); + +int nandfs_open(struct nandfs *); +void nandfs_close(struct nandfs *); + +int nandfs_get_cpstat(struct nandfs *, struct nandfs_cpstat *); + +ssize_t nandfs_get_cp(struct nandfs *, uint64_t, + struct nandfs_cpinfo *, size_t); + +ssize_t nandfs_get_snap(struct nandfs *, uint64_t, + struct nandfs_cpinfo *, size_t); + +int nandfs_make_snap(struct nandfs *, uint64_t *); +int nandfs_delete_snap(struct nandfs *, uint64_t); + +#endif /* _LIBNANDFS_NANDFS_H */ Added: head/lib/libnandfs/nandfs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnandfs/nandfs.c Thu May 17 10:11:18 2012 (r235537) @@ -0,0 +1,247 @@ +/*- + * Copyright (c) 2010-2012 Semihalf. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#define NANDFS_IS_VALID 0x1 +#define NANDFS_IS_OPENED 0x2 +#define NANDFS_IS_OPENED_DEV 0x4 +#define NANDFS_IS_ERROR 0x8 + +#define DEBUG +#undef DEBUG +#ifdef DEBUG +#define NANDFS_DEBUG(fmt, args...) do { \ + printf("libnandfs:" fmt "\n", ##args); } while (0) +#else +#define NANDFS_DEBUG(fmt, args...) +#endif + +#define NANDFS_ASSERT_VALID(fs) assert((fs)->n_flags & NANDFS_IS_VALID) +#define NANDFS_ASSERT_VALID_DEV(fs) \ + assert(((fs)->n_flags & (NANDFS_IS_VALID | NANDFS_IS_OPENED_DEV)) == \ + (NANDFS_IS_VALID | NANDFS_IS_OPENED_DEV)) + +int +nandfs_iserror(struct nandfs *fs) +{ + + NANDFS_ASSERT_VALID(fs); + + return (fs->n_flags & NANDFS_IS_ERROR); +} + +const char * +nandfs_errmsg(struct nandfs *fs) +{ + + NANDFS_ASSERT_VALID(fs); + + assert(nandfs_iserror(fs)); + assert(fs->n_errmsg); + return (fs->n_errmsg); +} + +static void +nandfs_seterr(struct nandfs *fs, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vsnprintf(fs->n_errmsg, sizeof(fs->n_errmsg), fmt, ap); + va_end(ap); + fs->n_flags |= NANDFS_IS_ERROR; +} + +const char * +nandfs_dev(struct nandfs *fs) +{ + + NANDFS_ASSERT_VALID(fs); + return (fs->n_dev); +} + +void +nandfs_init(struct nandfs *fs, const char *dir) +{ + + snprintf(fs->n_ioc, sizeof(fs->n_ioc), "%s/%s", dir, "."); + fs->n_iocfd = -1; + fs->n_flags = NANDFS_IS_VALID; +} + +void +nandfs_destroy(struct nandfs *fs) +{ + + assert(fs->n_iocfd == -1); + fs->n_flags &= + ~(NANDFS_IS_ERROR | NANDFS_IS_VALID); + assert(fs->n_flags == 0); +} + +int +nandfs_open(struct nandfs *fs) +{ + struct nandfs_fsinfo fsinfo; + + fs->n_flags |= NANDFS_IS_OPENED; + + fs->n_iocfd = open(fs->n_ioc, O_RDONLY, S_IRUSR | S_IWUSR | S_IRGRP | + S_IWGRP | S_IROTH | S_IWOTH); + if (fs->n_iocfd == -1) { + nandfs_seterr(fs, "couldn't open %s: %s", fs->n_ioc, + strerror(errno)); + return (-1); + } + + if (ioctl(fs->n_iocfd, NANDFS_IOCTL_GET_FSINFO, &fsinfo) == -1) { + nandfs_seterr(fs, "couldn't fetch fsinfo: %s", + strerror(errno)); + return (-1); + } + + memcpy(&fs->n_fsdata, &fsinfo.fs_fsdata, sizeof(fs->n_fsdata)); + memcpy(&fs->n_sb, &fsinfo.fs_super, sizeof(fs->n_sb)); + snprintf(fs->n_dev, sizeof(fs->n_dev), "%s", fsinfo.fs_dev); + + return (0); +} + +void +nandfs_close(struct nandfs *fs) +{ + + NANDFS_ASSERT_VALID(fs); + assert(fs->n_flags & NANDFS_IS_OPENED); + + close(fs->n_iocfd); + fs->n_iocfd = -1; + fs->n_flags &= ~NANDFS_IS_OPENED; +} + +int +nandfs_get_cpstat(struct nandfs *fs, struct nandfs_cpstat *cpstat) +{ + + NANDFS_ASSERT_VALID(fs); + + if (ioctl(fs->n_iocfd, NANDFS_IOCTL_GET_CPSTAT, cpstat) == -1) { + nandfs_seterr(fs, "ioctl NANDFS_IOCTL_GET_CPSTAT: %s", + strerror(errno)); + return (-1); + } + + return (0); +} + +static ssize_t +nandfs_get_cpinfo(struct nandfs *fs, uint64_t cno, int mode, + struct nandfs_cpinfo *cpinfo, size_t nci) +{ + struct nandfs_argv args; + + NANDFS_ASSERT_VALID(fs); + + args.nv_base = (u_long)cpinfo; + args.nv_nmembs = nci; + args.nv_index = cno; + args.nv_flags = mode; + + if (ioctl(fs->n_iocfd, NANDFS_IOCTL_GET_CPINFO, &args) == -1) { + nandfs_seterr(fs, "ioctl NANDFS_IOCTL_GET_CPINFO: %s", + strerror(errno)); + return (-1); + } + + return (args.nv_nmembs); +} + +ssize_t +nandfs_get_cp(struct nandfs *fs, uint64_t cno, struct nandfs_cpinfo *cpinfo, + size_t nci) +{ + + return (nandfs_get_cpinfo(fs, cno, NANDFS_CHECKPOINT, cpinfo, nci)); +} + +ssize_t +nandfs_get_snap(struct nandfs *fs, uint64_t cno, struct nandfs_cpinfo *cpinfo, + size_t nci) +{ + + return (nandfs_get_cpinfo(fs, cno, NANDFS_SNAPSHOT, cpinfo, nci)); +} + +int +nandfs_make_snap(struct nandfs *fs, uint64_t *cno) +{ + + NANDFS_ASSERT_VALID(fs); + + if (ioctl(fs->n_iocfd, NANDFS_IOCTL_MAKE_SNAP, cno) == -1) { + nandfs_seterr(fs, "ioctl NANDFS_IOCTL_MAKE_SNAP: %s", + strerror(errno)); + return (-1); + } + + return (0); +} + +int +nandfs_delete_snap(struct nandfs *fs, uint64_t cno) +{ + + NANDFS_ASSERT_VALID(fs); + + if (ioctl(fs->n_iocfd, NANDFS_IOCTL_DELETE_SNAP, &cno) == -1) { + nandfs_seterr(fs, "ioctl NANDFS_IOCTL_DELETE_SNAP: %s", + strerror(errno)); + return (-1); + } + + return (0); +} Modified: head/lib/libstand/Makefile ============================================================================== --- head/lib/libstand/Makefile Thu May 17 08:14:10 2012 (r235536) +++ head/lib/libstand/Makefile Thu May 17 10:11:18 2012 (r235537) @@ -150,6 +150,9 @@ SRCS+= bootp.c rarp.c bootparam.c SRCS+= ufs.c nfs.c cd9660.c tftp.c gzipfs.c bzipfs.c SRCS+= dosfs.c ext2fs.c SRCS+= splitfs.c +.if ${MK_NAND} != "no" +SRCS+= nandfs.c +.endif .include Added: head/lib/libstand/nandfs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libstand/nandfs.c Thu May 17 10:11:18 2012 (r235537) @@ -0,0 +1,1041 @@ +/*- + * Copyright (c) 2010-2012 Semihalf. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include "stand.h" +#include "string.h" +#include "zlib.h" + +#define DEBUG +#undef DEBUG +#ifdef DEBUG +#define NANDFS_DEBUG(fmt, args...) do { \ + printf("NANDFS_DEBUG:" fmt "\n", ##args); } while (0) +#else +#define NANDFS_DEBUG(fmt, args...) +#endif + +struct nandfs_mdt { + uint32_t entries_per_block; + uint32_t entries_per_group; + uint32_t blocks_per_group; + uint32_t groups_per_desc_block; /* desc is super group */ + uint32_t blocks_per_desc_block; /* desc is super group */ +}; + +struct bmap_buf { + LIST_ENTRY(bmap_buf) list; + nandfs_daddr_t blknr; + uint64_t *map; +}; + +struct nandfs_node { + struct nandfs_inode *inode; + LIST_HEAD(, bmap_buf) bmap_bufs; +}; +struct nandfs { + int nf_blocksize; + int nf_sectorsize; + int nf_cpno; + + struct open_file *nf_file; + struct nandfs_node *nf_opened_node; + u_int nf_offset; + uint8_t *nf_buf; + int64_t nf_buf_blknr; + + struct nandfs_fsdata *nf_fsdata; + struct nandfs_super_block *nf_sb; + struct nandfs_segment_summary nf_segsum; + struct nandfs_checkpoint nf_checkpoint; + struct nandfs_super_root nf_sroot; + struct nandfs_node nf_ifile; + struct nandfs_node nf_datfile; + struct nandfs_node nf_cpfile; + struct nandfs_mdt nf_datfile_mdt; + struct nandfs_mdt nf_ifile_mdt; + + int nf_nindir[NIADDR]; +}; + +static int nandfs_open(const char *, struct open_file *); +static int nandfs_close(struct open_file *); +static int nandfs_read(struct open_file *, void *, size_t, size_t *); +static off_t nandfs_seek(struct open_file *, off_t, int); +static int nandfs_stat(struct open_file *, struct stat *); +static int nandfs_readdir(struct open_file *, struct dirent *); + +static int nandfs_buf_read(struct nandfs *, char **, size_t *); +static struct nandfs_node *nandfs_lookup_inode(struct nandfs *, nandfs_daddr_t); +static struct nandfs_node *nandfs_lookup_path(struct nandfs *, const char *); +static int nandfs_read_inode(struct nandfs *, struct nandfs_node *, + nandfs_lbn_t, u_int, void *, int); +static int nandfs_read_blk(struct nandfs *, nandfs_daddr_t, void *, int); +static int nandfs_bmap_lookup(struct nandfs *, struct nandfs_node *, + nandfs_lbn_t, nandfs_daddr_t *, int); +static int nandfs_get_checkpoint(struct nandfs *, uint64_t, + struct nandfs_checkpoint *); +static nandfs_daddr_t nandfs_vtop(struct nandfs *, nandfs_daddr_t); +static void nandfs_calc_mdt_consts(int, struct nandfs_mdt *, int); +static void nandfs_mdt_trans(struct nandfs_mdt *, uint64_t, + nandfs_daddr_t *, uint32_t *); +static int ioread(struct open_file *, off_t, void *, u_int); +static int nandfs_probe_sectorsize(struct open_file *); + +struct fs_ops nandfs_fsops = { + "nandfs", + nandfs_open, + nandfs_close, + nandfs_read, + null_write, + nandfs_seek, + nandfs_stat, + nandfs_readdir +}; + +#define NINDIR(fs) ((fs)->nf_blocksize / sizeof(nandfs_daddr_t)) + +static int +nandfs_check_fsdata_crc(struct nandfs_fsdata *fsdata) +{ + uint32_t fsdata_crc, comp_crc; + + if (fsdata->f_magic != NANDFS_FSDATA_MAGIC) + return (0); + + /* Preserve crc */ + fsdata_crc = fsdata->f_sum; + + /* Calculate */ + fsdata->f_sum = (0); + comp_crc = crc32(0, (uint8_t *)fsdata, fsdata->f_bytes); + + /* Restore */ + fsdata->f_sum = fsdata_crc; + + /* Check CRC */ + return (fsdata_crc == comp_crc); +} + +static int +nandfs_check_superblock_crc(struct nandfs_fsdata *fsdata, + struct nandfs_super_block *super) +{ + uint32_t super_crc, comp_crc; + + /* Check super block magic */ + if (super->s_magic != NANDFS_SUPER_MAGIC) + return (0); + + /* Preserve CRC */ + super_crc = super->s_sum; + + /* Calculate */ + super->s_sum = (0); + comp_crc = crc32(0, (uint8_t *)super, fsdata->f_sbbytes); + + /* Restore */ + super->s_sum = super_crc; + + /* Check CRC */ + return (super_crc == comp_crc); +} + +static int +nandfs_find_super_block(struct nandfs *fs, struct open_file *f) +{ + struct nandfs_super_block *sb; + int i, j, n; + int sectors_to_read, error; + + sb = malloc(fs->nf_sectorsize); + if (sb == NULL) + return (ENOMEM); + + memset(fs->nf_sb, 0, sizeof(*fs->nf_sb)); + + sectors_to_read = (NANDFS_NFSAREAS * fs->nf_fsdata->f_erasesize) / + fs->nf_sectorsize; + for (i = 0; i < sectors_to_read; i++) { + NANDFS_DEBUG("reading i %d offset %d\n", i, + i * fs->nf_sectorsize); + error = ioread(f, i * fs->nf_sectorsize, (char *)sb, + fs->nf_sectorsize); + if (error) { + NANDFS_DEBUG("error %d\n", error); + continue; + } + n = fs->nf_sectorsize / sizeof(struct nandfs_super_block); + if ((i * fs->nf_sectorsize) % fs->nf_fsdata->f_erasesize == 0) { + if (fs->nf_sectorsize == sizeof(struct nandfs_fsdata)) + continue; + else { + sb += (sizeof(struct nandfs_fsdata) / + sizeof(struct nandfs_super_block)); + n -= (sizeof(struct nandfs_fsdata) / + sizeof(struct nandfs_super_block)); + } + } + + for (j = 0; j < n; j++) { + if (!nandfs_check_superblock_crc(fs->nf_fsdata, &sb[j])) + continue; + NANDFS_DEBUG("magic %x wtime %jd\n", sb->s_magic, + sb->s_wtime); + if (sb[j].s_wtime > fs->nf_sb->s_wtime) + memcpy(fs->nf_sb, &sb[j], sizeof(*fs->nf_sb)); + } + } + + free(sb); + + return (fs->nf_sb->s_magic != 0 ? 0 : EINVAL); +} + +static int +nandfs_find_fsdata(struct nandfs *fs, struct open_file *f) +{ + int offset, error, i; + + NANDFS_DEBUG("starting\n"); + + offset = 0; + for (i = 0; i < 64 * NANDFS_NFSAREAS; i++) { + error = ioread(f, offset, (char *)fs->nf_fsdata, + sizeof(struct nandfs_fsdata)); + if (error) + return (error); + if (fs->nf_fsdata->f_magic == NANDFS_FSDATA_MAGIC) { + NANDFS_DEBUG("found at %x, volume %s\n", offset, + fs->nf_fsdata->f_volume_name); + if (nandfs_check_fsdata_crc(fs->nf_fsdata)) + break; + } + offset += fs->nf_sectorsize; + } + + return (error); +} + +static int +nandfs_read_structures(struct nandfs *fs, struct open_file *f) +{ + int error; + + error = nandfs_find_fsdata(fs, f); + if (error) + return (error); + + error = nandfs_find_super_block(fs, f); + + if (error == 0) + NANDFS_DEBUG("selected sb with w_time %jd last_pseg %jx\n", + fs->nf_sb->s_wtime, fs->nf_sb->s_last_pseg); + + return (error); +} + +static int +nandfs_mount(struct nandfs *fs, struct open_file *f) +{ + int err = 0, level; + uint64_t last_pseg; + + fs->nf_fsdata = malloc(sizeof(struct nandfs_fsdata)); + fs->nf_sb = malloc(sizeof(struct nandfs_super_block)); + + err = nandfs_read_structures(fs, f); + if (err) { + free(fs->nf_fsdata); + free(fs->nf_sb); + return (err); + } + + fs->nf_blocksize = 1 << (fs->nf_fsdata->f_log_block_size + 10); + + NANDFS_DEBUG("using superblock with wtime %jd\n", fs->nf_sb->s_wtime); + + fs->nf_cpno = fs->nf_sb->s_last_cno; + last_pseg = fs->nf_sb->s_last_pseg; + + /* + * Calculate indirect block levels. + */ + nandfs_daddr_t mult; + + mult = 1; + for (level = 0; level < NIADDR; level++) { + mult *= NINDIR(fs); + fs->nf_nindir[level] = mult; + } + + nandfs_calc_mdt_consts(fs->nf_blocksize, &fs->nf_datfile_mdt, + fs->nf_fsdata->f_dat_entry_size); + + nandfs_calc_mdt_consts(fs->nf_blocksize, &fs->nf_ifile_mdt, + fs->nf_fsdata->f_inode_size); + + err = ioread(f, last_pseg * fs->nf_blocksize, &fs->nf_segsum, + sizeof(struct nandfs_segment_summary)); + if (err) { + free(fs->nf_sb); + free(fs->nf_fsdata); + return (err); + } + + err = ioread(f, (last_pseg + fs->nf_segsum.ss_nblocks - 1) * + fs->nf_blocksize, &fs->nf_sroot, sizeof(struct nandfs_super_root)); + if (err) { + free(fs->nf_sb); + free(fs->nf_fsdata); + return (err); + } + + fs->nf_datfile.inode = &fs->nf_sroot.sr_dat; + LIST_INIT(&fs->nf_datfile.bmap_bufs); + fs->nf_cpfile.inode = &fs->nf_sroot.sr_cpfile; + LIST_INIT(&fs->nf_cpfile.bmap_bufs); + + err = nandfs_get_checkpoint(fs, fs->nf_cpno, &fs->nf_checkpoint); + if (err) { + free(fs->nf_sb); + free(fs->nf_fsdata); + return (err); + } + + NANDFS_DEBUG("checkpoint cp_cno=%lld\n", fs->nf_checkpoint.cp_cno); + NANDFS_DEBUG("checkpoint cp_inodes_count=%lld\n", + fs->nf_checkpoint.cp_inodes_count); + NANDFS_DEBUG("checkpoint cp_ifile_inode.i_blocks=%lld\n", + fs->nf_checkpoint.cp_ifile_inode.i_blocks); + + fs->nf_ifile.inode = &fs->nf_checkpoint.cp_ifile_inode; + LIST_INIT(&fs->nf_ifile.bmap_bufs); + return (0); +} + +#define NINDIR(fs) ((fs)->nf_blocksize / sizeof(nandfs_daddr_t)) + +static int +nandfs_open(const char *path, struct open_file *f) +{ + struct nandfs *fs; + struct nandfs_node *node; + int err, bsize, level; + + NANDFS_DEBUG("nandfs_open('%s', %p)\n", path, f); + + fs = malloc(sizeof(struct nandfs)); + f->f_fsdata = fs; + fs->nf_file = f; + + bsize = nandfs_probe_sectorsize(f); + if (bsize < 0) { + printf("Cannot probe medium sector size\n"); + return (EINVAL); + } + + fs->nf_sectorsize = bsize; + + /* + * Calculate indirect block levels. + */ + nandfs_daddr_t mult; + + mult = 1; + for (level = 0; level < NIADDR; level++) { + mult *= NINDIR(fs); + fs->nf_nindir[level] = mult; + } + + NANDFS_DEBUG("fs %p nf_sectorsize=%x\n", fs, fs->nf_sectorsize); + + err = nandfs_mount(fs, f); + if (err) { + NANDFS_DEBUG("Cannot mount nandfs: %s\n", strerror(err)); + return (err); + } + + node = nandfs_lookup_path(fs, path); + if (node == NULL) + return (EINVAL); + + fs->nf_offset = 0; + fs->nf_buf = NULL; + fs->nf_buf_blknr = -1; + fs->nf_opened_node = node; + LIST_INIT(&fs->nf_opened_node->bmap_bufs); + return (0); +} + +static int +nandfs_free_node(struct nandfs_node *node) +{ + struct bmap_buf *bmap, *tmp; + + free(node->inode); + LIST_FOREACH_SAFE(bmap, &node->bmap_bufs, list, tmp) { + LIST_REMOVE(bmap, list); + free(bmap->map); + free(bmap); + } + free(node); +} + +static int +nandfs_close(struct open_file *f) +{ + struct nandfs *fs = f->f_fsdata; + + NANDFS_DEBUG("nandfs_close(%p)\n", f); + + if (fs->nf_buf != NULL) + free(fs->nf_buf); + + nandfs_free_node(fs->nf_opened_node); + free(fs->nf_sb); + free(fs); +} + +static int +nandfs_read(struct open_file *f, void *addr, size_t size, size_t *resid) +{ + struct nandfs *fs = (struct nandfs *)f->f_fsdata; + size_t csize, buf_size; + uint8_t *buf; + int error = 0; + + NANDFS_DEBUG("nandfs_read(file=%p, addr=%p, size=%d)\n", f, addr, size); + + while (size != 0) { + if (fs->nf_offset >= fs->nf_opened_node->inode->i_size) + break; + + error = nandfs_buf_read(fs, (void *)&buf, &buf_size); + if (error) + break; + + csize = size; + if (csize > buf_size) + csize = buf_size; + + bcopy(buf, addr, csize); + + fs->nf_offset += csize; + addr = (char *)addr + csize; + size -= csize; + } + + if (resid) + *resid = size; + return (error); +} + +static off_t +nandfs_seek(struct open_file *f, off_t offset, int where) +{ + struct nandfs *fs = f->f_fsdata; + off_t off; + u_int size; + + NANDFS_DEBUG("nandfs_seek(file=%p, offset=%lld, where=%d)\n", f, + offset, where); + + size = fs->nf_opened_node->inode->i_size; + + switch (where) { + case SEEK_SET: + off = 0; + break; + case SEEK_CUR: + off = fs->nf_offset; + break; + case SEEK_END: + off = size; + break; + default: + errno = EINVAL; + return (-1); + } + + off += offset; + if (off < 0 || off > size) { + errno = EINVAL; + return(-1); + } + + fs->nf_offset = (u_int)off; + + return (off); +} + +static int +nandfs_stat(struct open_file *f, struct stat *sb) +{ + struct nandfs *fs = f->f_fsdata; + + NANDFS_DEBUG("nandfs_stat(file=%p, stat=%p)\n", f, sb); + + sb->st_size = fs->nf_opened_node->inode->i_size; + sb->st_mode = fs->nf_opened_node->inode->i_mode; + sb->st_uid = fs->nf_opened_node->inode->i_uid; + sb->st_gid = fs->nf_opened_node->inode->i_gid; + return (0); +} + +static int +nandfs_readdir(struct open_file *f, struct dirent *d) +{ + struct nandfs *fs = f->f_fsdata; + struct nandfs_dir_entry *dirent; + uint8_t *buf; + size_t buf_size; + + NANDFS_DEBUG("nandfs_readdir(file=%p, dirent=%p)\n", f, d); + + if (fs->nf_offset >= fs->nf_opened_node->inode->i_size) { + NANDFS_DEBUG("nandfs_readdir(file=%p, dirent=%p) ENOENT\n", + f, d); + return (ENOENT); + } + + if (nandfs_buf_read(fs, (void *)&buf, &buf_size)) { + NANDFS_DEBUG("nandfs_readdir(file=%p, dirent=%p)" + "buf_read failed\n", f, d); + return (EIO); + } + + NANDFS_DEBUG("nandfs_readdir(file=%p, dirent=%p) moving forward\n", + f, d); + + dirent = (struct nandfs_dir_entry *)buf; + fs->nf_offset += dirent->rec_len; + strncpy(d->d_name, dirent->name, dirent->name_len); + d->d_name[dirent->name_len] = '\0'; + d->d_type = dirent->file_type; + return (0); +} + +static int +nandfs_buf_read(struct nandfs *fs, char **buf_p, size_t *size_p) +{ + nandfs_daddr_t blknr, blkoff; + + blknr = fs->nf_offset / fs->nf_blocksize; + blkoff = fs->nf_offset % fs->nf_blocksize; + + if (blknr != fs->nf_buf_blknr) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu May 17 10:19:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D18F31065674; Thu, 17 May 2012 10:19:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7D6D8FC20; Thu, 17 May 2012 10:19:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HAJnjI090630; Thu, 17 May 2012 10:19:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HAJnYB090628; Thu, 17 May 2012 10:19:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205171019.q4HAJnYB090628@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 17 May 2012 10:19:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235538 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 10:19:49 -0000 Author: kib Date: Thu May 17 10:19:49 2012 New Revision: 235538 URL: http://svn.freebsd.org/changeset/base/235538 Log: Fix typo. MFC after: 3 days Modified: head/sys/amd64/amd64/fpu.c Modified: head/sys/amd64/amd64/fpu.c ============================================================================== --- head/sys/amd64/amd64/fpu.c Thu May 17 10:11:18 2012 (r235537) +++ head/sys/amd64/amd64/fpu.c Thu May 17 10:19:49 2012 (r235538) @@ -141,7 +141,7 @@ CTASSERT(sizeof(struct savefpu_ymm) == 8 /* * This requirement is to make it easier for asm code to calculate * offset of the fpu save area from the pcb address. FPU save area - * must by 64-bytes aligned. + * must be 64-bytes aligned. */ CTASSERT(sizeof(struct pcb) % XSAVE_AREA_ALIGN == 0); From owner-svn-src-all@FreeBSD.ORG Thu May 17 10:25:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA9BB106564A; Thu, 17 May 2012 10:25:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 926A78FC0C; Thu, 17 May 2012 10:25:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HAPZRh090873; Thu, 17 May 2012 10:25:35 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HAPZZX090860; Thu, 17 May 2012 10:25:35 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201205171025.q4HAPZZX090860@svn.freebsd.org> From: Dimitry Andric Date: Thu, 17 May 2012 10:25:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235539 - in stable/9: include sys/amd64/include sys/arm/include sys/i386/include sys/ia64/include sys/mips/include sys/powerpc/include sys/sparc64/include sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 10:25:35 -0000 Author: dim Date: Thu May 17 10:25:34 2012 New Revision: 235539 URL: http://svn.freebsd.org/changeset/base/235539 Log: MFC r234785: Add a convenience macro for the returns_twice attribute, and apply it to the prototypes of the appropriate functions (getcontext, savectx, setjmp, sigsetjmp and vfork). Modified: stable/9/include/setjmp.h stable/9/include/unistd.h stable/9/sys/amd64/include/pcb.h stable/9/sys/arm/include/pcb.h stable/9/sys/i386/include/pcb.h stable/9/sys/ia64/include/pcb.h stable/9/sys/mips/include/pcb.h stable/9/sys/powerpc/include/cpu.h stable/9/sys/sparc64/include/pcb.h stable/9/sys/sys/cdefs.h stable/9/sys/sys/systm.h stable/9/sys/sys/ucontext.h Directory Properties: stable/9/include/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/include/setjmp.h ============================================================================== --- stable/9/include/setjmp.h Thu May 17 10:19:49 2012 (r235538) +++ stable/9/include/setjmp.h Thu May 17 10:25:34 2012 (r235539) @@ -46,16 +46,16 @@ __BEGIN_DECLS #if __BSD_VISIBLE || __XSI_VISIBLE >= 600 void _longjmp(jmp_buf, int) __dead2; -int _setjmp(jmp_buf); +int _setjmp(jmp_buf) __returns_twice; #endif void longjmp(jmp_buf, int) __dead2; #if __BSD_VISIBLE void longjmperror(void); #endif -int setjmp(jmp_buf); +int setjmp(jmp_buf) __returns_twice; #if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE void siglongjmp(sigjmp_buf, int) __dead2; -int sigsetjmp(sigjmp_buf, int); +int sigsetjmp(sigjmp_buf, int) __returns_twice; #endif __END_DECLS Modified: stable/9/include/unistd.h ============================================================================== --- stable/9/include/unistd.h Thu May 17 10:19:49 2012 (r235538) +++ stable/9/include/unistd.h Thu May 17 10:25:34 2012 (r235539) @@ -479,7 +479,7 @@ char *getwd(char *); /* obsoleted by g useconds_t ualarm(useconds_t, useconds_t); int usleep(useconds_t); -pid_t vfork(void); +pid_t vfork(void) __returns_twice; #endif #if __BSD_VISIBLE Modified: stable/9/sys/amd64/include/pcb.h ============================================================================== --- stable/9/sys/amd64/include/pcb.h Thu May 17 10:19:49 2012 (r235538) +++ stable/9/sys/amd64/include/pcb.h Thu May 17 10:25:34 2012 (r235539) @@ -130,7 +130,7 @@ clear_pcb_flags(struct pcb *pcb, const u } void makectx(struct trapframe *, struct pcb *); -int savectx(struct pcb *); +int savectx(struct pcb *) __returns_twice; #endif Modified: stable/9/sys/arm/include/pcb.h ============================================================================== --- stable/9/sys/arm/include/pcb.h Thu May 17 10:19:49 2012 (r235538) +++ stable/9/sys/arm/include/pcb.h Thu May 17 10:25:34 2012 (r235539) @@ -94,7 +94,7 @@ void makectx(struct trapframe *tf, struc #ifdef _KERNEL -void savectx(struct pcb *); +void savectx(struct pcb *) __returns_twice; #endif /* _KERNEL */ #endif /* !_MACHINE_PCB_H_ */ Modified: stable/9/sys/i386/include/pcb.h ============================================================================== --- stable/9/sys/i386/include/pcb.h Thu May 17 10:19:49 2012 (r235538) +++ stable/9/sys/i386/include/pcb.h Thu May 17 10:25:34 2012 (r235539) @@ -84,7 +84,7 @@ struct pcb { struct trapframe; void makectx(struct trapframe *, struct pcb *); -void savectx(struct pcb *); +void savectx(struct pcb *) __returns_twice; #endif #endif /* _I386_PCB_H_ */ Modified: stable/9/sys/ia64/include/pcb.h ============================================================================== --- stable/9/sys/ia64/include/pcb.h Thu May 17 10:19:49 2012 (r235538) +++ stable/9/sys/ia64/include/pcb.h Thu May 17 10:25:34 2012 (r235539) @@ -65,10 +65,10 @@ struct trapframe; void makectx(struct trapframe *, struct pcb *); void restorectx(struct pcb *) __dead2; -int swapctx(struct pcb *old, struct pcb *new); +int swapctx(struct pcb *old, struct pcb *new) __returns_twice; void ia32_restorectx(struct pcb *); -void ia32_savectx(struct pcb *); +void ia32_savectx(struct pcb *) __returns_twice; #endif Modified: stable/9/sys/mips/include/pcb.h ============================================================================== --- stable/9/sys/mips/include/pcb.h Thu May 17 10:19:49 2012 (r235538) +++ stable/9/sys/mips/include/pcb.h Thu May 17 10:25:34 2012 (r235539) @@ -78,7 +78,7 @@ struct pcb extern struct pcb *curpcb; /* the current running pcb */ void makectx(struct trapframe *, struct pcb *); -int savectx(struct pcb *); +int savectx(struct pcb *) __returns_twice; #endif #endif /* !_MACHINE_PCB_H_ */ Modified: stable/9/sys/powerpc/include/cpu.h ============================================================================== --- stable/9/sys/powerpc/include/cpu.h Thu May 17 10:19:49 2012 (r235538) +++ stable/9/sys/powerpc/include/cpu.h Thu May 17 10:25:34 2012 (r235539) @@ -99,6 +99,6 @@ void fork_trampoline(void); void swi_vm(void *); /* XXX the following should not be here. */ -void savectx(struct pcb *); +void savectx(struct pcb *) __returns_twice; #endif /* _MACHINE_CPU_H_ */ Modified: stable/9/sys/sparc64/include/pcb.h ============================================================================== --- stable/9/sys/sparc64/include/pcb.h Thu May 17 10:19:49 2012 (r235538) +++ stable/9/sys/sparc64/include/pcb.h Thu May 17 10:25:34 2012 (r235539) @@ -55,7 +55,7 @@ struct pcb { #ifdef _KERNEL void makectx(struct trapframe *tf, struct pcb *pcb); -int savectx(struct pcb *pcb); +int savectx(struct pcb *pcb) __returns_twice; #endif #endif /* !LOCORE */ Modified: stable/9/sys/sys/cdefs.h ============================================================================== --- stable/9/sys/sys/cdefs.h Thu May 17 10:19:49 2012 (r235538) +++ stable/9/sys/sys/cdefs.h Thu May 17 10:25:34 2012 (r235539) @@ -292,6 +292,12 @@ #define __nonnull(x) #endif +#if __GNUC_PREREQ__(4, 1) +#define __returns_twice __attribute__((__returns_twice__)) +#else +#define __returns_twice +#endif + /* XXX: should use `#if __STDC_VERSION__ < 199901'. */ #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) #define __func__ NULL Modified: stable/9/sys/sys/systm.h ============================================================================== --- stable/9/sys/sys/systm.h Thu May 17 10:19:49 2012 (r235538) +++ stable/9/sys/sys/systm.h Thu May 17 10:25:34 2012 (r235539) @@ -155,7 +155,7 @@ struct uio; struct _jmp_buf; struct trapframe; -int setjmp(struct _jmp_buf *); +int setjmp(struct _jmp_buf *) __returns_twice; void longjmp(struct _jmp_buf *, int) __dead2; int dumpstatus(vm_offset_t addr, off_t count); int nullop(void); Modified: stable/9/sys/sys/ucontext.h ============================================================================== --- stable/9/sys/sys/ucontext.h Thu May 17 10:19:49 2012 (r235538) +++ stable/9/sys/sys/ucontext.h Thu May 17 10:25:34 2012 (r235539) @@ -71,7 +71,7 @@ struct ucontext4 { __BEGIN_DECLS -int getcontext(ucontext_t *); +int getcontext(ucontext_t *) __returns_twice; ucontext_t *getcontextx(void); int setcontext(const ucontext_t *); void makecontext(ucontext_t *, void (*)(void), int, ...); From owner-svn-src-all@FreeBSD.ORG Thu May 17 10:36:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 94355106564A; Thu, 17 May 2012 10:36:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64B5B8FC08; Thu, 17 May 2012 10:36:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HAaX7x091303; Thu, 17 May 2012 10:36:33 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HAaXuV091301; Thu, 17 May 2012 10:36:33 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201205171036.q4HAaXuV091301@svn.freebsd.org> From: Dimitry Andric Date: Thu, 17 May 2012 10:36:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235540 - stable/9/contrib/binutils/ld/emultempl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 10:36:33 -0000 Author: dim Date: Thu May 17 10:36:32 2012 New Revision: 235540 URL: http://svn.freebsd.org/changeset/base/235540 Log: MFC r235133: Revert r234656, and apply a proper fix for binutils PR 10474, which caused linking clang on 32-bit PowerPC to fail with "relocation truncated to fit: R_PPC_REL24" errors. Original diffs (relicensed under GPLv2 with permission from author): http://sourceware.org/git/?p=binutils.git;a=commit;h=1fd262ff7d7ea5adf4894c6b960e092e7e43e3cd http://sourceware.org/git/?p=binutils.git;a=commit;h=053c49fbff58bd33bd0d12200ea61302f92caceb Tested by: andreast Modified: stable/9/contrib/binutils/ld/emultempl/ppc32elf.em Directory Properties: stable/9/contrib/binutils/ (props changed) Modified: stable/9/contrib/binutils/ld/emultempl/ppc32elf.em ============================================================================== --- stable/9/contrib/binutils/ld/emultempl/ppc32elf.em Thu May 17 10:25:34 2012 (r235539) +++ stable/9/contrib/binutils/ld/emultempl/ppc32elf.em Thu May 17 10:36:32 2012 (r235540) @@ -119,7 +119,40 @@ ppc_before_allocation (void) } } } + gld${EMULATION_NAME}_before_allocation (); + + /* Turn on relaxation if executable sections have addresses that + might make branches overflow. */ + if (!command_line.relax) + { + bfd_vma low = (bfd_vma) -1; + bfd_vma high = 0; + asection *o; + + /* Run lang_size_sections (if not already done). */ + if (expld.phase != lang_mark_phase_enum) + { + expld.phase = lang_mark_phase_enum; + expld.dataseg.phase = exp_dataseg_none; + one_lang_size_sections_pass (NULL, FALSE); + lang_reset_memory_regions (); + } + + for (o = output_bfd->sections; o != NULL; o = o->next) + { + if ((o->flags & (SEC_ALLOC | SEC_CODE)) != (SEC_ALLOC | SEC_CODE)) + continue; + if (o->rawsize == 0) + continue; + if (low > o->vma) + low = o->vma; + if (high < o->vma + o->rawsize - 1) + high = o->vma + o->rawsize - 1; + } + if (high > low && high - low > (1 << 25) - 1) + command_line.relax = TRUE; + } } EOF From owner-svn-src-all@FreeBSD.ORG Thu May 17 11:10:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22EB11065674; Thu, 17 May 2012 11:10:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DDF28FC08; Thu, 17 May 2012 11:10:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HBADCt095829; Thu, 17 May 2012 11:10:13 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HBADMM095826; Thu, 17 May 2012 11:10:13 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205171110.q4HBADMM095826@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 17 May 2012 11:10:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235541 - head/usr.bin/lastcomm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 11:10:14 -0000 Author: kib Date: Thu May 17 11:10:13 2012 New Revision: 235541 URL: http://svn.freebsd.org/changeset/base/235541 Log: Allow to specify strftime(3) format for process start end exit times. Submitted by: Andrey Zonov MFC after: 1 week Modified: head/usr.bin/lastcomm/lastcomm.1 head/usr.bin/lastcomm/lastcomm.c Modified: head/usr.bin/lastcomm/lastcomm.1 ============================================================================== --- head/usr.bin/lastcomm/lastcomm.1 Thu May 17 10:36:32 2012 (r235540) +++ head/usr.bin/lastcomm/lastcomm.1 Thu May 17 11:10:13 2012 (r235541) @@ -28,7 +28,7 @@ .\" From: @(#)lastcomm.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 14, 2007 +.Dd May 17, 2012 .Dt LASTCOMM 1 .Os .Sh NAME @@ -38,6 +38,7 @@ .Nm .Op Fl EScesu .Op Fl f Ar file +.Op Cm + Ns Ar format .Op Ar command ...\& .Op Ar user ...\& .Op Ar terminal ...\& @@ -77,6 +78,15 @@ is a single dash reads accounting entries from the standard input. .El .Pp +An operand with a leading plus sign +.Pq Sq + +is followed a user-defined format string which specifies the format +in which to display the process's start or exit date and time. +The format string may contain any of the conversion specifications +described in the +.Xr strftime 3 +manual page, as well as arbitrary text. +.Pp If no options are specified, .Fl cS is assumed. @@ -165,6 +175,7 @@ will print details of each terminating c .Sh SEE ALSO .Xr last 1 , .Xr sigaction 2 , +.Xr strftime 3 , .Xr acct 5 , .Xr core 5 .Sh HISTORY Modified: head/usr.bin/lastcomm/lastcomm.c ============================================================================== --- head/usr.bin/lastcomm/lastcomm.c Thu May 17 10:36:32 2012 (r235540) +++ head/usr.bin/lastcomm/lastcomm.c Thu May 17 11:10:13 2012 (r235541) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "pathnames.h" @@ -82,10 +83,12 @@ main(int argc, char *argv[]) int (*readrec)(FILE *f, struct acctv2 *av2); time_t t; int ch, rv; - const char *acctfile; + const char *acctfile, *format; + char buf[1024]; int flags = 0; acctfile = _PATH_ACCT; + format = NULL; while ((ch = getopt(argc, argv, "f:usecSE")) != -1) switch((char)ch) { case 'f': @@ -126,6 +129,12 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; + if (argc > 0 && **argv == '+') { + format = *argv + 1; /* skip + */ + argc--; + argv++; + } + if (strcmp(acctfile, "-") == 0) { fp = stdin; readrec = readrec_forward; @@ -177,14 +186,24 @@ main(int argc, char *argv[]) /* starting time */ if (flags & AC_BTIME) { - (void)printf(" %.16s", ctime(&ab.ac_btime)); + if (format != NULL) { + (void)strftime(buf, sizeof(buf), format, + localtime(&ab.ac_btime)); + (void)printf(" %s", buf); + } else + (void)printf(" %.16s", ctime(&ab.ac_btime)); } /* exit time (starting time + elapsed time )*/ if (flags & AC_FTIME) { t = ab.ac_btime; t += (time_t)(ab.ac_etime / 1000000); - (void)printf(" %.16s", ctime(&t)); + if (format != NULL) { + (void)strftime(buf, sizeof(buf), format, + localtime(&t)); + (void)printf(" %s", buf); + } else + (void)printf(" %.16s", ctime(&t)); } printf("\n"); } @@ -250,6 +269,7 @@ static void usage(void) { (void)fprintf(stderr, -"usage: lastcomm [-EScesu] [-f file] [command ...] [user ...] [terminal ...]\n"); + "usage: lastcomm [-EScesu] [-f file] [+format] [command ...] " + "[user ...] [terminal ...]\n"); exit(1); } From owner-svn-src-all@FreeBSD.ORG Thu May 17 11:29:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D22BB106566B; Thu, 17 May 2012 11:29:22 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC5888FC12; Thu, 17 May 2012 11:29:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HBTMnx096568; Thu, 17 May 2012 11:29:22 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HBTMJp096564; Thu, 17 May 2012 11:29:22 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201205171129.q4HBTMJp096564@svn.freebsd.org> From: Joel Dahl Date: Thu, 17 May 2012 11:29:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235542 - in head: sbin/nandfs share/man/man5 usr.sbin/nandsim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 11:29:22 -0000 Author: joel (doc committer) Date: Thu May 17 11:29:22 2012 New Revision: 235542 URL: http://svn.freebsd.org/changeset/base/235542 Log: mdoc: remove superfluous paragraph macro. Modified: head/sbin/nandfs/nandfs.8 head/share/man/man5/nandfs.5 head/usr.sbin/nandsim/nandsim.8 Modified: head/sbin/nandfs/nandfs.8 ============================================================================== --- head/sbin/nandfs/nandfs.8 Thu May 17 11:10:13 2012 (r235541) +++ head/sbin/nandfs/nandfs.8 Thu May 17 11:29:22 2012 (r235542) @@ -50,7 +50,6 @@ The .Nm utility allows to manage snapshots of a mounted NAND FS. .Sh EXAMPLES -.Pp Create a snapshot of filesystem mounted on .Em /nand . .Bd -literal -offset 2n Modified: head/share/man/man5/nandfs.5 ============================================================================== --- head/share/man/man5/nandfs.5 Thu May 17 11:10:13 2012 (r235541) +++ head/share/man/man5/nandfs.5 Thu May 17 11:29:22 2012 (r235542) @@ -88,7 +88,6 @@ structure, and .Pa /mnt is a mount point. .Pp -.Pp It is possible to define an entry in .Pa /etc/fstab for the Modified: head/usr.sbin/nandsim/nandsim.8 ============================================================================== --- head/usr.sbin/nandsim/nandsim.8 Thu May 17 11:10:13 2012 (r235541) +++ head/usr.sbin/nandsim/nandsim.8 Thu May 17 11:29:22 2012 (r235542) @@ -115,7 +115,6 @@ Reads simulator configuration from a spe the simulation "layout" i.e. controllers-chips assignments). Configuration changes for an already started simulation require a full stop-start cycle in order to take effect i.e.: -.Pp .Bl -column .It nandsim stop ... .It nandsim destroy ... From owner-svn-src-all@FreeBSD.ORG Thu May 17 11:45:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 969971065672; Thu, 17 May 2012 11:45:57 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 682528FC12; Thu, 17 May 2012 11:45:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HBjvWu097168; Thu, 17 May 2012 11:45:57 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HBjv0w097166; Thu, 17 May 2012 11:45:57 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201205171145.q4HBjv0w097166@svn.freebsd.org> From: Joel Dahl Date: Thu, 17 May 2012 11:45:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235543 - head/usr.sbin/nandtool X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 11:45:57 -0000 Author: joel (doc committer) Date: Thu May 17 11:45:56 2012 New Revision: 235543 URL: http://svn.freebsd.org/changeset/base/235543 Log: Minor mdoc fixes. Modified: head/usr.sbin/nandtool/nandtool.8 Modified: head/usr.sbin/nandtool/nandtool.8 ============================================================================== --- head/usr.sbin/nandtool/nandtool.8 Thu May 17 11:29:22 2012 (r235542) +++ head/usr.sbin/nandtool/nandtool.8 Thu May 17 11:45:56 2012 (r235543) @@ -62,7 +62,6 @@ Write OOB area bound to specified page. Get usage info. .El .Sh COMMAND read -.Pp The following operands are available for .Nm .Cm read @@ -87,13 +86,11 @@ to page granularity). Count of objects (pages, blocks, bytes). .El .Sh COMMAND readoob -.Bl -tag -width ".Cm of Ns = Ns Ar file" -.Pp The following operands are available for .Nm .Cm readoob command: -.Pp +.Bl -tag -width ".Cm of Ns = Ns Ar file" .It Cm dev Ns = Ns Ar Path to NAND device node. .It Cm page Ns = Ns Ar @@ -102,11 +99,11 @@ Offset on device, expressed as page numb Output file path, optional. .El .Sh COMMAND write -.Bl -tag -width ".Cm of Ns = Ns Ar file" The following operands are available for .Nm .Cm write command: +.Bl -tag -width ".Cm of Ns = Ns Ar file" .It Cm dev Ns = Ns Ar Path to NAND device node. .It Cm page Ns = Ns Ar @@ -120,11 +117,11 @@ to page granularity). Input file path. .El .Sh COMMAND writeoob -.Bl -tag -width ".Cm of Ns = Ns Ar file" The following operands are available for .Nm .Cm writeoob command: +.Bl -tag -width ".Cm of Ns = Ns Ar file" .It Cm dev Ns = Ns Ar Path to NAND device node. .It Cm page Ns = Ns Ar @@ -133,11 +130,11 @@ Offset on device, expressed as page numb Input file path. .El .Sh COMMAND erase -.Bl -tag -width ".Cm of Ns = Ns Ar file" The following operands are available for .Nm .Cm erase command: +.Bl -tag -width ".Cm of Ns = Ns Ar file" .It Cm dev Ns = Ns Ar Path to NAND device node. .It Cm page Ns = Ns Ar @@ -155,21 +152,20 @@ WARNING: The only required parameter for .Ar dev . When no other arguments are provided the whole device is erased! .Sh COMMAND info -.Bl -tag -width ".Cm of Ns = Ns Ar file" There is only one operand available for .Nm .Cm info command: +.Bl -tag -width ".Cm of Ns = Ns Ar file" .It Cm dev Ns = Ns Ar Path to NAND device node. .El .Sh COMMAND help -.Bl -tag -width ".Cm of Ns = Ns Ar file" There is only one operand available for .Nm .Cm help command: -.Pp +.Bl -tag -width ".Cm of Ns = Ns Ar file" .It Cm topic Ns = Ns Ar Help topic. .El From owner-svn-src-all@FreeBSD.ORG Thu May 17 11:50:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD2E9106564A; Thu, 17 May 2012 11:50:12 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8A168FC08; Thu, 17 May 2012 11:50:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HBoCB2097355; Thu, 17 May 2012 11:50:12 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HBoCmf097352; Thu, 17 May 2012 11:50:12 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201205171150.q4HBoCmf097352@svn.freebsd.org> From: Joel Dahl Date: Thu, 17 May 2012 11:50:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235544 - in head: sbin/newfs_nandfs usr.sbin/nandtool X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 11:50:13 -0000 Author: joel (doc committer) Date: Thu May 17 11:50:12 2012 New Revision: 235544 URL: http://svn.freebsd.org/changeset/base/235544 Log: mdoc: remove whitespace. Modified: head/sbin/newfs_nandfs/newfs_nandfs.8 head/usr.sbin/nandtool/nandtool.8 Modified: head/sbin/newfs_nandfs/newfs_nandfs.8 ============================================================================== --- head/sbin/newfs_nandfs/newfs_nandfs.8 Thu May 17 11:45:56 2012 (r235543) +++ head/sbin/newfs_nandfs/newfs_nandfs.8 Thu May 17 11:50:12 2012 (r235544) @@ -25,7 +25,6 @@ .\" .\" $FreeBSD$ .\" - .Dd April 11, 2009 .Dt NEWFS_NANDFS 8 .Os Modified: head/usr.sbin/nandtool/nandtool.8 ============================================================================== --- head/usr.sbin/nandtool/nandtool.8 Thu May 17 11:45:56 2012 (r235543) +++ head/usr.sbin/nandtool/nandtool.8 Thu May 17 11:50:12 2012 (r235544) @@ -73,7 +73,7 @@ Path to a device node, required for all operations. .It Cm out Ns = Ns Ar Output file path. If not specified, page contents -will be dumped to stdout in format similar to +will be dumped to stdout in format similar to .Xr hexdump 1 .It Cm page Ns = Ns Ar Offset on device, expressed as page number. From owner-svn-src-all@FreeBSD.ORG Thu May 17 11:53:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53DEC106564A; Thu, 17 May 2012 11:53:39 +0000 (UTC) (envelope-from gber@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 356028FC08; Thu, 17 May 2012 11:53:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HBrdxs097516; Thu, 17 May 2012 11:53:39 GMT (envelope-from gber@svn.freebsd.org) Received: (from gber@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HBrcEv097514; Thu, 17 May 2012 11:53:38 GMT (envelope-from gber@svn.freebsd.org) Message-Id: <201205171153.q4HBrcEv097514@svn.freebsd.org> From: Grzegorz Bernacki Date: Thu, 17 May 2012 11:53:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235545 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 11:53:39 -0000 Author: gber Date: Thu May 17 11:53:38 2012 New Revision: 235545 URL: http://svn.freebsd.org/changeset/base/235545 Log: Removed repeated content from man page. Modified: head/share/man/man4/nandsim.4 Modified: head/share/man/man4/nandsim.4 ============================================================================== --- head/share/man/man4/nandsim.4 Thu May 17 11:50:12 2012 (r235544) +++ head/share/man/man4/nandsim.4 Thu May 17 11:53:38 2012 (r235545) @@ -90,95 +90,3 @@ kernel driver was developed by .An Grzegorz Bernacki . This manual page was written by .An Rafal Jaworowski . -.\" -.\" Copyright (c) 2012 The FreeBSD Foundation -.\" All rights reserved. -.\" -.\" This documentation was written by Semihalf under sponsorship from -.\" the FreeBSD Foundation. -.\" -.\" 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 March 8, 2012 -.Dt NANDSIM 4 -.Os -.Sh NAME -.Nm nandsim -.Nd NAND Flash simulator driver -.Sh SYNOPSIS -.Cd "device nand" -.Cd "device nandsim" -.Cd "options ALQ" -.Sh DESCRIPTION -The -.Nm -is part of the -.Fx -NAND framework -.Xr nand 4 -and can be characterized with the following highlights: -.Bl -bullet -.It -plugs into the -.Xr nand 4 -framework APIs as if it were a hardware controller (hanging on the nexus bus) -with real NAND chips connected to it -.It -physically part of the kernel code (either statically linked into the kernel -image or built as a module) -.It -controlled with a user space program -.Xr nandsim 8 -.El -.Pp -From the user perspective, the -.Nm -allows for imitating ONFI-compliant NAND Flash devices as if they were -attached to the system via a virtual controller. -.Pp -Some -.Nm -features rely on the ability to log contents to a file, which is achieved -through the -.Xr alq 9 -facility. -.Sh SEE ALSO -.Xr nand 4 , -.Xr nandsim.conf 5 , -.Xr nandsim 8 -.Sh STANDARDS -Open NAND Flash Interface Working Group -.Pq Vt ONFI . -.Sh HISTORY -The -.Nm -support first appeared in -.Fx 10.0 . -.Sh AUTHOR -The -.Nm -kernel driver was developed by -.An Grzegorz Bernacki . -This manual page was written by -.An Rafal Jaworowski . From owner-svn-src-all@FreeBSD.ORG Thu May 17 12:59:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 275E61065670; Thu, 17 May 2012 12:59:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from springbank.echomania.com (andric.com [IPv6:2001:888:2003:1001:230:48ff:fe51:76b6]) by mx1.freebsd.org (Postfix) with ESMTP id B22408FC08; Thu, 17 May 2012 12:59:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at springbank.echomania.com Received: from [192.168.1.6] (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by springbank.echomania.com (Postfix) with ESMTPSA id 7F54DA7071; Thu, 17 May 2012 14:59:22 +0200 (CEST) Message-ID: <4FB4F639.5070700@FreeBSD.org> Date: Thu, 17 May 2012 14:59:37 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120425 Thunderbird/13.0 MIME-Version: 1.0 To: Jack F Vogel References: <201205162222.q4GMMqig065119@svn.freebsd.org> In-Reply-To: <201205162222.q4GMMqig065119@svn.freebsd.org> X-Enigmail-Version: 1.5a1pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r235527 - stable/9/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 12:59:44 -0000 On 2012-05-17 00:22, Jack F Vogel wrote:> Author: jfv > Date: Wed May 16 22:22:52 2012 > New Revision: 235527 > URL: http://svn.freebsd.org/changeset/base/235527 > > Log: > MFC of the e1000 drivers: revisions include > 227309,228281,228386,228387,228393,228405, > 228415,228788,228803,229606,229767,229939, > 230023,230024,230742,231796,232238,233708, > 234154,234665,235256 ... Hi Jack, Some of the netmap-related changes in this merge don't work, at least not for the LINT kernels: TB --- 2012-05-17 07:31:43 - /usr/bin/make -B buildkernel KERNCONF=LINT ... cc1: warnings being treated as errors /src/sys/dev/e1000/if_em.c: In function 'em_setup_transmit_ring': /src/sys/dev/e1000/if_em.c:3332: warning: implicit declaration of function 'netmap_idx_n2k' /src/sys/dev/e1000/if_em.c:3332: warning: nested extern declaration of 'netmap_idx_n2k' [-Wnested-externs] /src/sys/dev/e1000/if_em.c: In function 'em_txeof': /src/sys/dev/e1000/if_em.c:3795: error: 'struct netmap_adapter' has no member named 'tx_si' /src/sys/dev/e1000/if_em.c: In function 'em_rxeof': /src/sys/dev/e1000/if_em.c:4407: error: 'struct netmap_adapter' has no member named 'rx_si' *** Error code 1 Can you please have a look at it? From owner-svn-src-all@FreeBSD.ORG Thu May 17 13:08:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BB591065670; Thu, 17 May 2012 13:08:31 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 269CE8FC0A; Thu, 17 May 2012 13:08:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HD8V68099996; Thu, 17 May 2012 13:08:31 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HD8U3o099994; Thu, 17 May 2012 13:08:30 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201205171308.q4HD8U3o099994@svn.freebsd.org> From: Gabor Kovesdan Date: Thu, 17 May 2012 13:08:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235546 - head/usr.bin/sort X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 13:08:31 -0000 Author: gabor Date: Thu May 17 13:08:30 2012 New Revision: 235546 URL: http://svn.freebsd.org/changeset/base/235546 Log: - Fix -o option that was broken by my clang compile fix Submitted by: Oleg Moskalenko Modified: head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/sort.c ============================================================================== --- head/usr.bin/sort/sort.c Thu May 17 11:53:38 2012 (r235545) +++ head/usr.bin/sort/sort.c Thu May 17 13:08:30 2012 (r235546) @@ -1049,9 +1049,8 @@ main(int argc, char **argv) sort_opts_vals.mflag = true; break; case 'o': - outfile = sort_realloc(outfile, sizeof(char) * - (strlen(optarg) + 1)); - strlcpy(outfile, optarg, strlen(outfile)); + outfile = sort_realloc(outfile, (strlen(optarg) + 1)); + strcpy(outfile, optarg); break; case 's': sort_opts_vals.sflag = true; From owner-svn-src-all@FreeBSD.ORG Thu May 17 13:31:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 775A91065673; Thu, 17 May 2012 13:31:01 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 2E8B48FC17; Thu, 17 May 2012 13:31:00 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 1421F73027; Thu, 17 May 2012 15:51:14 +0200 (CEST) Date: Thu, 17 May 2012 15:51:14 +0200 From: Luigi Rizzo To: Dimitry Andric Message-ID: <20120517135114.GA93530@onelab2.iet.unipi.it> References: <201205162222.q4GMMqig065119@svn.freebsd.org> <4FB4F639.5070700@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FB4F639.5070700@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: Jack F Vogel , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r235527 - stable/9/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 13:31:01 -0000 On Thu, May 17, 2012 at 02:59:37PM +0200, Dimitry Andric wrote: > On 2012-05-17 00:22, Jack F Vogel wrote:> Author: jfv > > Date: Wed May 16 22:22:52 2012 > > New Revision: 235527 > > URL: http://svn.freebsd.org/changeset/base/235527 > > > > Log: > > MFC of the e1000 drivers: revisions include > > 227309,228281,228386,228387,228393,228405, > > 228415,228788,228803,229606,229767,229939, > > 230023,230024,230742,231796,232238,233708, > > 234154,234665,235256 > ... > > Hi Jack, > > Some of the netmap-related changes in this merge don't work, at least > not for the LINT kernels: > > TB --- 2012-05-17 07:31:43 - /usr/bin/make -B buildkernel KERNCONF=LINT > ... > cc1: warnings being treated as errors > /src/sys/dev/e1000/if_em.c: In function 'em_setup_transmit_ring': > /src/sys/dev/e1000/if_em.c:3332: warning: implicit declaration of function 'netmap_idx_n2k' > /src/sys/dev/e1000/if_em.c:3332: warning: nested extern declaration of 'netmap_idx_n2k' [-Wnested-externs] > /src/sys/dev/e1000/if_em.c: In function 'em_txeof': > /src/sys/dev/e1000/if_em.c:3795: error: 'struct netmap_adapter' has no member named 'tx_si' > /src/sys/dev/e1000/if_em.c: In function 'em_rxeof': > /src/sys/dev/e1000/if_em.c:4407: error: 'struct netmap_adapter' has no member named 'rx_si' > *** Error code 1 i will take care of this later today. it is probably due to the dev/netmap/* code not in sync with the one in HEAD (i thought i had MFC'ed it but maybe i forgot) cheers luigi > Can you please have a look at it? From owner-svn-src-all@FreeBSD.ORG Thu May 17 14:36:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BD423106578D; Thu, 17 May 2012 14:36:20 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7EF18FC1C; Thu, 17 May 2012 14:36:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HEaK84002975; Thu, 17 May 2012 14:36:20 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HEaKCM002973; Thu, 17 May 2012 14:36:20 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201205171436.q4HEaKCM002973@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 17 May 2012 14:36:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235547 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 14:36:20 -0000 Author: luigi Date: Thu May 17 14:36:19 2012 New Revision: 235547 URL: http://svn.freebsd.org/changeset/base/235547 Log: fix a typo in a comment Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Thu May 17 13:08:30 2012 (r235546) +++ head/sys/dev/ixgbe/ixgbe.c Thu May 17 14:36:19 2012 (r235547) @@ -322,7 +322,7 @@ static int fdir_pballoc = 1; * be a reference on how to implement netmap support in a driver. * Additional comments are in ixgbe_netmap.h . * - * contains functions for netmap support + * contains functions for netmap support * that extend the standard driver. */ #include From owner-svn-src-all@FreeBSD.ORG Thu May 17 14:37:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 831F7106567D; Thu, 17 May 2012 14:37:02 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D44F8FC08; Thu, 17 May 2012 14:37:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HEb2U8003030; Thu, 17 May 2012 14:37:02 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HEb2dp003028; Thu, 17 May 2012 14:37:02 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201205171437.q4HEb2dp003028@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 17 May 2012 14:37:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235548 - stable/9/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 14:37:02 -0000 Author: luigi Date: Thu May 17 14:37:01 2012 New Revision: 235548 URL: http://svn.freebsd.org/changeset/base/235548 Log: fix a typo in a comment Modified: stable/9/sys/dev/ixgbe/ixgbe.c Modified: stable/9/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixgbe.c Thu May 17 14:36:19 2012 (r235547) +++ stable/9/sys/dev/ixgbe/ixgbe.c Thu May 17 14:37:01 2012 (r235548) @@ -322,7 +322,7 @@ static int fdir_pballoc = 1; * be a reference on how to implement netmap support in a driver. * Additional comments are in ixgbe_netmap.h . * - * contains functions for netmap support + * contains functions for netmap support * that extend the standard driver. */ #include From owner-svn-src-all@FreeBSD.ORG Thu May 17 15:02:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 812FF106567A; Thu, 17 May 2012 15:02:51 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6995E8FC19; Thu, 17 May 2012 15:02:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HF2pko003924; Thu, 17 May 2012 15:02:51 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HF2pIi003919; Thu, 17 May 2012 15:02:51 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201205171502.q4HF2pIi003919@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 17 May 2012 15:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235549 - in stable/9: sys/dev/netmap sys/net tools/tools/netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 15:02:51 -0000 Author: luigi Date: Thu May 17 15:02:51 2012 New Revision: 235549 URL: http://svn.freebsd.org/changeset/base/235549 Log: MFC: the netmap code from HEAD, now supported in the ixgbe/ and e1000/ drivers (re/ will come in the next commit) Modified: stable/9/sys/dev/netmap/if_em_netmap.h stable/9/sys/dev/netmap/if_igb_netmap.h stable/9/sys/dev/netmap/if_lem_netmap.h stable/9/sys/dev/netmap/if_re_netmap.h stable/9/sys/dev/netmap/ixgbe_netmap.h stable/9/sys/dev/netmap/netmap.c stable/9/sys/dev/netmap/netmap_kern.h stable/9/sys/net/netmap.h stable/9/sys/net/netmap_user.h stable/9/tools/tools/netmap/README stable/9/tools/tools/netmap/bridge.c stable/9/tools/tools/netmap/pcap.c stable/9/tools/tools/netmap/pkt-gen.c Modified: stable/9/sys/dev/netmap/if_em_netmap.h ============================================================================== --- stable/9/sys/dev/netmap/if_em_netmap.h Thu May 17 14:37:01 2012 (r235548) +++ stable/9/sys/dev/netmap/if_em_netmap.h Thu May 17 15:02:51 2012 (r235549) @@ -25,49 +25,25 @@ /* * $FreeBSD$ - * $Id: if_em_netmap.h 9802 2011-12-02 18:42:37Z luigi $ + * $Id: if_em_netmap.h 10627 2012-02-23 19:37:15Z luigi $ * - * netmap changes for if_em. + * netmap support for em. * - * For structure and details on the individual functions please see - * ixgbe_netmap.h + * For more details on netmap support please see ixgbe_netmap.h */ + #include #include #include #include /* vtophys ? */ #include + static void em_netmap_block_tasks(struct adapter *); static void em_netmap_unblock_tasks(struct adapter *); -static int em_netmap_reg(struct ifnet *, int onoff); -static int em_netmap_txsync(struct ifnet *, u_int, int); -static int em_netmap_rxsync(struct ifnet *, u_int, int); -static void em_netmap_lock_wrapper(struct ifnet *, int, u_int); - -static void -em_netmap_attach(struct adapter *adapter) -{ - struct netmap_adapter na; - - bzero(&na, sizeof(na)); - - na.ifp = adapter->ifp; - na.separate_locks = 1; - na.num_tx_desc = adapter->num_tx_desc; - na.num_rx_desc = adapter->num_rx_desc; - na.nm_txsync = em_netmap_txsync; - na.nm_rxsync = em_netmap_rxsync; - na.nm_lock = em_netmap_lock_wrapper; - na.nm_register = em_netmap_reg; - netmap_attach(&na, adapter->num_queues); -} -/* - * wrapper to export locks to the generic code - */ static void em_netmap_lock_wrapper(struct ifnet *ifp, int what, u_int queueid) { @@ -137,8 +113,9 @@ em_netmap_unblock_tasks(struct adapter * } } + /* - * register-unregister routine + * Register/unregister routine */ static int em_netmap_reg(struct ifnet *ifp, int onoff) @@ -170,7 +147,7 @@ em_netmap_reg(struct ifnet *ifp, int ono } } else { fail: - /* restore if_transmit */ + /* return to non-netmap mode */ ifp->if_transmit = na->if_transmit; ifp->if_capenable &= ~IFCAP_NETMAP; em_init_locked(adapter); /* also enable intr */ @@ -179,18 +156,19 @@ fail: return (error); } + /* - * Reconcile hardware and user view of the transmit ring. + * Reconcile kernel and user view of the transmit ring. */ static int em_netmap_txsync(struct ifnet *ifp, u_int ring_nr, int do_lock) { struct adapter *adapter = ifp->if_softc; struct tx_ring *txr = &adapter->tx_rings[ring_nr]; - struct netmap_adapter *na = NA(adapter->ifp); + struct netmap_adapter *na = NA(ifp); struct netmap_kring *kring = &na->tx_rings[ring_nr]; struct netmap_ring *ring = kring->ring; - int j, k, l, n = 0, lim = kring->nkr_num_slots - 1; + u_int j, k, l, n = 0, lim = kring->nkr_num_slots - 1; /* generate an interrupt approximately every half ring */ int report_frequency = kring->nkr_num_slots >> 1; @@ -204,18 +182,17 @@ em_netmap_txsync(struct ifnet *ifp, u_in bus_dmamap_sync(txr->txdma.dma_tag, txr->txdma.dma_map, BUS_DMASYNC_POSTREAD); - /* check for new packets to send. - * j indexes the netmap ring, l indexes the nic ring, and - * j = kring->nr_hwcur, l = E1000_TDT (not tracked), - * j == (l + kring->nkr_hwofs) % ring_size + /* + * Process new packets to send. j is the current index in the + * netmap ring, l is the corresponding index in the NIC ring. */ j = kring->nr_hwcur; - if (j != k) { /* we have packets to send */ - l = j - kring->nkr_hwofs; - if (l < 0) - l += lim + 1; - while (j != k) { + if (j != k) { /* we have new packets to send */ + l = netmap_idx_k2n(kring, j); + for (n = 0; j != k; n++) { + /* slot is the current slot in the netmap ring */ struct netmap_slot *slot = &ring->slot[j]; + /* curr is the current slot in the nic ring */ struct e1000_tx_desc *curr = &txr->tx_base[l]; struct em_buffer *txbuf = &txr->tx_buffers[l]; int flags = ((slot->flags & NS_REPORT) || @@ -223,7 +200,8 @@ em_netmap_txsync(struct ifnet *ifp, u_in E1000_TXD_CMD_RS : 0; uint64_t paddr; void *addr = PNMB(slot, &paddr); - int len = slot->len; + u_int len = slot->len; + if (addr == netmap_buffer_base || len > NETMAP_BUF_SIZE) { if (do_lock) EM_TX_UNLOCK(txr); @@ -231,26 +209,21 @@ em_netmap_txsync(struct ifnet *ifp, u_in } slot->flags &= ~NS_REPORT; - curr->upper.data = 0; - curr->lower.data = - htole32(adapter->txd_cmd | len | - (E1000_TXD_CMD_EOP | flags) ); if (slot->flags & NS_BUF_CHANGED) { curr->buffer_addr = htole64(paddr); /* buffer has changed, reload map */ netmap_reload_map(txr->txtag, txbuf->map, addr); slot->flags &= ~NS_BUF_CHANGED; } - + curr->upper.data = 0; + curr->lower.data = htole32(adapter->txd_cmd | len | + (E1000_TXD_CMD_EOP | flags) ); bus_dmamap_sync(txr->txtag, txbuf->map, BUS_DMASYNC_PREWRITE); j = (j == lim) ? 0 : j + 1; l = (l == lim) ? 0 : l + 1; - n++; } - kring->nr_hwcur = k; - - /* decrease avail by number of sent packets */ + kring->nr_hwcur = k; /* the saved ring->cur */ kring->nr_hwavail -= n; bus_dmamap_sync(txr->txdma.dma_tag, txr->txdma.dma_map, @@ -262,9 +235,9 @@ em_netmap_txsync(struct ifnet *ifp, u_in if (n == 0 || kring->nr_hwavail < 1) { int delta; - /* record completed transmissions using THD. */ + /* record completed transmissions using TDH */ l = E1000_READ_REG(&adapter->hw, E1000_TDH(ring_nr)); - if (l >= kring->nkr_num_slots) { /* XXX can happen */ + if (l >= kring->nkr_num_slots) { /* XXX can it happen ? */ D("TDH wrap %d", l); l -= kring->nkr_num_slots; } @@ -277,7 +250,7 @@ em_netmap_txsync(struct ifnet *ifp, u_in kring->nr_hwavail += delta; } } - /* update avail to what the hardware knows */ + /* update avail to what the kernel knows */ ring->avail = kring->nr_hwavail; if (do_lock) @@ -285,6 +258,7 @@ em_netmap_txsync(struct ifnet *ifp, u_in return 0; } + /* * Reconcile kernel and user view of the receive ring. */ @@ -293,10 +267,12 @@ em_netmap_rxsync(struct ifnet *ifp, u_in { struct adapter *adapter = ifp->if_softc; struct rx_ring *rxr = &adapter->rx_rings[ring_nr]; - struct netmap_adapter *na = NA(adapter->ifp); + struct netmap_adapter *na = NA(ifp); struct netmap_kring *kring = &na->rx_rings[ring_nr]; struct netmap_ring *ring = kring->ring; - int j, k, l, n, lim = kring->nkr_num_slots - 1; + u_int j, l, n, lim = kring->nkr_num_slots - 1; + int force_update = do_lock || kring->nr_kflags & NKR_PENDINTR; + u_int k = ring->cur, resvd = ring->reserved; k = ring->cur; if (k > lim) @@ -304,53 +280,51 @@ em_netmap_rxsync(struct ifnet *ifp, u_in if (do_lock) EM_RX_LOCK(rxr); + /* XXX check sync modes */ bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - /* import newly received packets into the netmap ring. - * j is an index in the netmap ring, l in the NIC ring, and - * j = (kring->nr_hwcur + kring->nr_hwavail) % ring_size - * l = rxr->next_to_check; - * and - * j == (l + kring->nkr_hwofs) % ring_size + /* + * Import newly received packets into the netmap ring. + * j is an index in the netmap ring, l in the NIC ring. */ l = rxr->next_to_check; - j = l + kring->nkr_hwofs; - /* here nkr_hwofs can be negative so must check for j < 0 */ - if (j < 0) - j += lim + 1; - else if (j > lim) - j -= lim + 1; - for (n = 0; ; n++) { - struct e1000_rx_desc *curr = &rxr->rx_base[l]; - - if ((curr->status & E1000_RXD_STAT_DD) == 0) - break; - ring->slot[j].len = le16toh(curr->length); - bus_dmamap_sync(rxr->rxtag, rxr->rx_buffers[l].map, - BUS_DMASYNC_POSTREAD); - j = (j == lim) ? 0 : j + 1; - /* make sure next_to_refresh follows next_to_check */ - rxr->next_to_refresh = l; // XXX - l = (l == lim) ? 0 : l + 1; - } - if (n) { - rxr->next_to_check = l; - kring->nr_hwavail += n; + j = netmap_idx_n2k(kring, l); + if (netmap_no_pendintr || force_update) { + for (n = 0; ; n++) { + struct e1000_rx_desc *curr = &rxr->rx_base[l]; + uint32_t staterr = le32toh(curr->status); + + if ((staterr & E1000_RXD_STAT_DD) == 0) + break; + ring->slot[j].len = le16toh(curr->length); + bus_dmamap_sync(rxr->rxtag, rxr->rx_buffers[l].map, + BUS_DMASYNC_POSTREAD); + j = (j == lim) ? 0 : j + 1; + /* make sure next_to_refresh follows next_to_check */ + rxr->next_to_refresh = l; // XXX + l = (l == lim) ? 0 : l + 1; + } + if (n) { /* update the state variables */ + rxr->next_to_check = l; + kring->nr_hwavail += n; + } + kring->nr_kflags &= ~NKR_PENDINTR; } - /* skip past packets that userspace has already processed */ - j = kring->nr_hwcur; - if (j != k) { /* userspace has read some packets. */ - n = 0; - l = j - kring->nkr_hwofs; /* NIC ring index */ - /* here nkr_hwofs can be negative so check for l > lim */ - if (l < 0) - l += lim + 1; - else if (l > lim) - l -= lim + 1; - while (j != k) { + /* skip past packets that userspace has released */ + j = kring->nr_hwcur; /* netmap ring index */ + if (resvd > 0) { + if (resvd + ring->avail >= lim + 1) { + D("XXX invalid reserve/avail %d %d", resvd, ring->avail); + ring->reserved = resvd = 0; // XXX panic... + } + k = (k >= resvd) ? k - resvd : k + lim + 1 - resvd; + } + if (j != k) { /* userspace has released some packets. */ + l = netmap_idx_k2n(kring, j); /* NIC ring index */ + for (n = 0; j != k; n++) { struct netmap_slot *slot = &ring->slot[j]; struct e1000_rx_desc *curr = &rxr->rx_base[l]; struct em_buffer *rxbuf = &rxr->rx_buffers[l]; @@ -363,20 +337,17 @@ em_netmap_rxsync(struct ifnet *ifp, u_in return netmap_ring_reinit(kring); } - curr->status = 0; if (slot->flags & NS_BUF_CHANGED) { curr->buffer_addr = htole64(paddr); /* buffer has changed, reload map */ netmap_reload_map(rxr->rxtag, rxbuf->map, addr); slot->flags &= ~NS_BUF_CHANGED; } - + curr->status = 0; bus_dmamap_sync(rxr->rxtag, rxbuf->map, BUS_DMASYNC_PREREAD); - j = (j == lim) ? 0 : j + 1; l = (l == lim) ? 0 : l + 1; - n++; } kring->nr_hwavail -= n; kring->nr_hwcur = k; @@ -390,8 +361,29 @@ em_netmap_rxsync(struct ifnet *ifp, u_in E1000_WRITE_REG(&adapter->hw, E1000_RDT(rxr->me), l); } /* tell userspace that there are new packets */ - ring->avail = kring->nr_hwavail ; + ring->avail = kring->nr_hwavail - resvd; if (do_lock) EM_RX_UNLOCK(rxr); return 0; } + + +static void +em_netmap_attach(struct adapter *adapter) +{ + struct netmap_adapter na; + + bzero(&na, sizeof(na)); + + na.ifp = adapter->ifp; + na.separate_locks = 1; + na.num_tx_desc = adapter->num_tx_desc; + na.num_rx_desc = adapter->num_rx_desc; + na.nm_txsync = em_netmap_txsync; + na.nm_rxsync = em_netmap_rxsync; + na.nm_lock = em_netmap_lock_wrapper; + na.nm_register = em_netmap_reg; + netmap_attach(&na, adapter->num_queues); +} + +/* end of file */ Modified: stable/9/sys/dev/netmap/if_igb_netmap.h ============================================================================== --- stable/9/sys/dev/netmap/if_igb_netmap.h Thu May 17 14:37:01 2012 (r235548) +++ stable/9/sys/dev/netmap/if_igb_netmap.h Thu May 17 15:02:51 2012 (r235549) @@ -25,42 +25,19 @@ /* * $FreeBSD$ - * $Id: if_igb_netmap.h 9802 2011-12-02 18:42:37Z luigi $ + * $Id: if_igb_netmap.h 10627 2012-02-23 19:37:15Z luigi $ * - * netmap modifications for igb - * contribured by Ahmed Kooli + * Netmap support for igb, partly contributed by Ahmed Kooli + * For details on netmap support please see ixgbe_netmap.h */ + #include #include #include #include /* vtophys ? */ #include -static int igb_netmap_reg(struct ifnet *, int onoff); -static int igb_netmap_txsync(struct ifnet *, u_int, int); -static int igb_netmap_rxsync(struct ifnet *, u_int, int); -static void igb_netmap_lock_wrapper(struct ifnet *, int, u_int); - - -static void -igb_netmap_attach(struct adapter *adapter) -{ - struct netmap_adapter na; - - bzero(&na, sizeof(na)); - - na.ifp = adapter->ifp; - na.separate_locks = 1; - na.num_tx_desc = adapter->num_tx_desc; - na.num_rx_desc = adapter->num_rx_desc; - na.nm_txsync = igb_netmap_txsync; - na.nm_rxsync = igb_netmap_rxsync; - na.nm_lock = igb_netmap_lock_wrapper; - na.nm_register = igb_netmap_reg; - netmap_attach(&na, adapter->num_queues); -} - /* * wrapper to export locks to the generic code @@ -95,8 +72,7 @@ igb_netmap_lock_wrapper(struct ifnet *if /* - * support for netmap register/unregisted. We are already under core lock. - * only called on the first init or the last unregister. + * register-unregister routine */ static int igb_netmap_reg(struct ifnet *ifp, int onoff) @@ -106,7 +82,7 @@ igb_netmap_reg(struct ifnet *ifp, int on int error = 0; if (na == NULL) - return EINVAL; + return EINVAL; /* no netmap support here */ igb_disable_intr(adapter); @@ -116,7 +92,6 @@ igb_netmap_reg(struct ifnet *ifp, int on if (onoff) { ifp->if_capenable |= IFCAP_NETMAP; - /* save if_transmit to restore it later */ na->if_transmit = ifp->if_transmit; ifp->if_transmit = netmap_start; @@ -130,7 +105,7 @@ fail: /* restore if_transmit */ ifp->if_transmit = na->if_transmit; ifp->if_capenable &= ~IFCAP_NETMAP; - igb_init_locked(adapter); /* also enables intr */ + igb_init_locked(adapter); /* also enable intr */ } return (error); } @@ -144,10 +119,10 @@ igb_netmap_txsync(struct ifnet *ifp, u_i { struct adapter *adapter = ifp->if_softc; struct tx_ring *txr = &adapter->tx_rings[ring_nr]; - struct netmap_adapter *na = NA(adapter->ifp); + struct netmap_adapter *na = NA(ifp); struct netmap_kring *kring = &na->tx_rings[ring_nr]; struct netmap_ring *ring = kring->ring; - int j, k, l, n = 0, lim = kring->nkr_num_slots - 1; + u_int j, k, l, n = 0, lim = kring->nkr_num_slots - 1; /* generate an interrupt approximately every half ring */ int report_frequency = kring->nkr_num_slots >> 1; @@ -161,31 +136,31 @@ igb_netmap_txsync(struct ifnet *ifp, u_i bus_dmamap_sync(txr->txdma.dma_tag, txr->txdma.dma_map, BUS_DMASYNC_POSTREAD); - /* update avail to what the hardware knows */ - ring->avail = kring->nr_hwavail; - - j = kring->nr_hwcur; /* netmap ring index */ + /* check for new packets to send. + * j indexes the netmap ring, l indexes the nic ring, and + * j = kring->nr_hwcur, l = E1000_TDT (not tracked), + * j == (l + kring->nkr_hwofs) % ring_size + */ + j = kring->nr_hwcur; if (j != k) { /* we have new packets to send */ - u32 olinfo_status = 0; - - l = j - kring->nkr_hwofs; /* NIC ring index */ - if (l < 0) - l += lim + 1; /* 82575 needs the queue index added */ - if (adapter->hw.mac.type == e1000_82575) - olinfo_status |= txr->me << 4; + u32 olinfo_status = + (adapter->hw.mac.type == e1000_82575) ? (txr->me << 4) : 0; - while (j != k) { + l = netmap_idx_k2n(kring, j); + for (n = 0; j != k; n++) { + /* slot is the current slot in the netmap ring */ struct netmap_slot *slot = &ring->slot[j]; - struct igb_tx_buffer *txbuf = &txr->tx_buffers[l]; + /* curr is the current slot in the nic ring */ union e1000_adv_tx_desc *curr = (union e1000_adv_tx_desc *)&txr->tx_base[l]; - uint64_t paddr; - void *addr = PNMB(slot, &paddr); + struct igb_tx_buffer *txbuf = &txr->tx_buffers[l]; int flags = ((slot->flags & NS_REPORT) || j == 0 || j == report_frequency) ? E1000_ADVTXD_DCMD_RS : 0; - int len = slot->len; + uint64_t paddr; + void *addr = PNMB(slot, &paddr); + u_int len = slot->len; if (addr == netmap_buffer_base || len > NETMAP_BUF_SIZE) { if (do_lock) @@ -194,8 +169,13 @@ igb_netmap_txsync(struct ifnet *ifp, u_i } slot->flags &= ~NS_REPORT; - // XXX do we need to set the address ? + if (slot->flags & NS_BUF_CHANGED) { + /* buffer has changed, reload map */ + netmap_reload_map(txr->txtag, txbuf->map, addr); + slot->flags &= ~NS_BUF_CHANGED; + } curr->read.buffer_addr = htole64(paddr); + // XXX check olinfo and cmd_type_len curr->read.olinfo_status = htole32(olinfo_status | (len<< E1000_ADVTXD_PAYLEN_SHIFT)); @@ -204,23 +184,14 @@ igb_netmap_txsync(struct ifnet *ifp, u_i E1000_ADVTXD_DCMD_IFCS | E1000_ADVTXD_DCMD_DEXT | E1000_ADVTXD_DCMD_EOP | flags); - if (slot->flags & NS_BUF_CHANGED) { - /* buffer has changed, reload map */ - netmap_reload_map(txr->txtag, txbuf->map, addr); - slot->flags &= ~NS_BUF_CHANGED; - } bus_dmamap_sync(txr->txtag, txbuf->map, BUS_DMASYNC_PREWRITE); j = (j == lim) ? 0 : j + 1; l = (l == lim) ? 0 : l + 1; - n++; } - kring->nr_hwcur = k; - - /* decrease avail by number of sent packets */ + kring->nr_hwcur = k; /* the saved ring->cur */ kring->nr_hwavail -= n; - ring->avail = kring->nr_hwavail; /* Set the watchdog XXX ? */ txr->queue_status = IGB_QUEUE_WORKING; @@ -231,23 +202,28 @@ igb_netmap_txsync(struct ifnet *ifp, u_i E1000_WRITE_REG(&adapter->hw, E1000_TDT(txr->me), l); } + if (n == 0 || kring->nr_hwavail < 1) { int delta; - /* record completed transmission using TDH */ + /* record completed transmissions using TDH */ l = E1000_READ_REG(&adapter->hw, E1000_TDH(ring_nr)); - if (l >= kring->nkr_num_slots) /* XXX can it happen ? */ + if (l >= kring->nkr_num_slots) { /* XXX can it happen ? */ + D("TDH wrap %d", l); l -= kring->nkr_num_slots; + } delta = l - txr->next_to_clean; if (delta) { - /* new tx were completed */ + /* some completed, increment hwavail. */ if (delta < 0) delta += kring->nkr_num_slots; txr->next_to_clean = l; kring->nr_hwavail += delta; - ring->avail = kring->nr_hwavail; } } + /* update avail to what the kernel knows */ + ring->avail = kring->nr_hwavail; + if (do_lock) IGB_TX_UNLOCK(txr); return 0; @@ -262,10 +238,12 @@ igb_netmap_rxsync(struct ifnet *ifp, u_i { struct adapter *adapter = ifp->if_softc; struct rx_ring *rxr = &adapter->rx_rings[ring_nr]; - struct netmap_adapter *na = NA(adapter->ifp); + struct netmap_adapter *na = NA(ifp); struct netmap_kring *kring = &na->rx_rings[ring_nr]; struct netmap_ring *ring = kring->ring; - int j, k, l, n, lim = kring->nkr_num_slots - 1; + u_int j, l, n, lim = kring->nkr_num_slots - 1; + int force_update = do_lock || kring->nr_kflags & NKR_PENDINTR; + u_int k = ring->cur, resvd = ring->reserved; k = ring->cur; if (k > lim) @@ -274,45 +252,48 @@ igb_netmap_rxsync(struct ifnet *ifp, u_i if (do_lock) IGB_RX_LOCK(rxr); - /* Sync the ring. */ + /* XXX check sync modes */ bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + /* + * import newly received packets into the netmap ring. + * j is an index in the netmap ring, l in the NIC ring. + */ l = rxr->next_to_check; - j = l + kring->nkr_hwofs; - if (j > lim) - j -= lim + 1; - for (n = 0; ; n++) { - union e1000_adv_rx_desc *curr = &rxr->rx_base[l]; - uint32_t staterr = le32toh(curr->wb.upper.status_error); - - if ((staterr & E1000_RXD_STAT_DD) == 0) - break; - ring->slot[j].len = le16toh(curr->wb.upper.length); - - bus_dmamap_sync(rxr->ptag, - rxr->rx_buffers[l].pmap, BUS_DMASYNC_POSTREAD); - j = (j == lim) ? 0 : j + 1; - l = (l == lim) ? 0 : l + 1; - } - if (n) { - rxr->next_to_check = l; - kring->nr_hwavail += n; + j = netmap_idx_n2k(kring, l); + if (netmap_no_pendintr || force_update) { + for (n = 0; ; n++) { + union e1000_adv_rx_desc *curr = &rxr->rx_base[l]; + uint32_t staterr = le32toh(curr->wb.upper.status_error); + + if ((staterr & E1000_RXD_STAT_DD) == 0) + break; + ring->slot[j].len = le16toh(curr->wb.upper.length); + bus_dmamap_sync(rxr->ptag, + rxr->rx_buffers[l].pmap, BUS_DMASYNC_POSTREAD); + j = (j == lim) ? 0 : j + 1; + l = (l == lim) ? 0 : l + 1; + } + if (n) { /* update the state variables */ + rxr->next_to_check = l; + kring->nr_hwavail += n; + } + kring->nr_kflags &= ~NKR_PENDINTR; } - /* skip past packets that userspace has already processed, - * making them available for reception. - * advance nr_hwcur and issue a bus_dmamap_sync on the - * buffers so it is safe to write to them. - * Also increase nr_hwavail - */ - j = kring->nr_hwcur; - l = kring->nr_hwcur - kring->nkr_hwofs; - if (l < 0) - l += lim + 1; - if (j != k) { /* userspace has read some packets. */ - n = 0; - while (j != k) { + /* skip past packets that userspace has released */ + j = kring->nr_hwcur; /* netmap ring index */ + if (resvd > 0) { + if (resvd + ring->avail >= lim + 1) { + D("XXX invalid reserve/avail %d %d", resvd, ring->avail); + ring->reserved = resvd = 0; // XXX panic... + } + k = (k >= resvd) ? k - resvd : k + lim + 1 - resvd; + } + if (j != k) { /* userspace has released some packets. */ + l = netmap_idx_k2n(kring, j); + for (n = 0; j != k; n++) { struct netmap_slot *slot = ring->slot + j; union e1000_adv_rx_desc *curr = &rxr->rx_base[l]; struct igb_rx_buf *rxbuf = rxr->rx_buffers + l; @@ -325,33 +306,51 @@ igb_netmap_rxsync(struct ifnet *ifp, u_i return netmap_ring_reinit(kring); } - curr->wb.upper.status_error = 0; - curr->read.pkt_addr = htole64(paddr); if (slot->flags & NS_BUF_CHANGED) { netmap_reload_map(rxr->ptag, rxbuf->pmap, addr); slot->flags &= ~NS_BUF_CHANGED; } - + curr->read.pkt_addr = htole64(paddr); + curr->wb.upper.status_error = 0; bus_dmamap_sync(rxr->ptag, rxbuf->pmap, BUS_DMASYNC_PREREAD); - j = (j == lim) ? 0 : j + 1; l = (l == lim) ? 0 : l + 1; - n++; } kring->nr_hwavail -= n; - kring->nr_hwcur = ring->cur; + kring->nr_hwcur = k; bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); - /* IMPORTANT: we must leave one free slot in the ring, + /* + * IMPORTANT: we must leave one free slot in the ring, * so move l back by one unit */ l = (l == 0) ? lim : l - 1; E1000_WRITE_REG(&adapter->hw, E1000_RDT(rxr->me), l); } /* tell userspace that there are new packets */ - ring->avail = kring->nr_hwavail ; + ring->avail = kring->nr_hwavail - resvd; if (do_lock) IGB_RX_UNLOCK(rxr); return 0; } + + +static void +igb_netmap_attach(struct adapter *adapter) +{ + struct netmap_adapter na; + + bzero(&na, sizeof(na)); + + na.ifp = adapter->ifp; + na.separate_locks = 1; + na.num_tx_desc = adapter->num_tx_desc; + na.num_rx_desc = adapter->num_rx_desc; + na.nm_txsync = igb_netmap_txsync; + na.nm_rxsync = igb_netmap_rxsync; + na.nm_lock = igb_netmap_lock_wrapper; + na.nm_register = igb_netmap_reg; + netmap_attach(&na, adapter->num_queues); +} +/* end of file */ Modified: stable/9/sys/dev/netmap/if_lem_netmap.h ============================================================================== --- stable/9/sys/dev/netmap/if_lem_netmap.h Thu May 17 14:37:01 2012 (r235548) +++ stable/9/sys/dev/netmap/if_lem_netmap.h Thu May 17 15:02:51 2012 (r235549) @@ -23,14 +23,14 @@ * SUCH DAMAGE. */ + /* * $FreeBSD$ - * $Id: if_lem_netmap.h 9802 2011-12-02 18:42:37Z luigi $ + * $Id: if_lem_netmap.h 10627 2012-02-23 19:37:15Z luigi $ * - * netmap support for if_lem.c + * netmap support for "lem" * - * For structure and details on the individual functions please see - * ixgbe_netmap.h + * For details on netmap support please see ixgbe_netmap.h */ #include @@ -39,32 +39,6 @@ #include /* vtophys ? */ #include -static int lem_netmap_reg(struct ifnet *, int onoff); -static int lem_netmap_txsync(struct ifnet *, u_int, int); -static int lem_netmap_rxsync(struct ifnet *, u_int, int); -static void lem_netmap_lock_wrapper(struct ifnet *, int, u_int); - - -SYSCTL_NODE(_dev, OID_AUTO, lem, CTLFLAG_RW, 0, "lem card"); - -static void -lem_netmap_attach(struct adapter *adapter) -{ - struct netmap_adapter na; - - bzero(&na, sizeof(na)); - - na.ifp = adapter->ifp; - na.separate_locks = 1; - na.num_tx_desc = adapter->num_tx_desc; - na.num_rx_desc = adapter->num_rx_desc; - na.nm_txsync = lem_netmap_txsync; - na.nm_rxsync = lem_netmap_rxsync; - na.nm_lock = lem_netmap_lock_wrapper; - na.nm_register = lem_netmap_reg; - netmap_attach(&na, 1); -} - static void lem_netmap_lock_wrapper(struct ifnet *ifp, int what, u_int ringid) @@ -96,7 +70,7 @@ lem_netmap_lock_wrapper(struct ifnet *if /* - * Register/unregister routine + * Register/unregister */ static int lem_netmap_reg(struct ifnet *ifp, int onoff) @@ -113,7 +87,6 @@ lem_netmap_reg(struct ifnet *ifp, int on /* Tell the stack that the interface is no longer active */ ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); - /* lem_netmap_block_tasks(adapter); */ #ifndef EM_LEGACY_IRQ // XXX do we need this ? taskqueue_block(adapter->tq); taskqueue_drain(adapter->tq, &adapter->rxtx_task); @@ -122,9 +95,6 @@ lem_netmap_reg(struct ifnet *ifp, int on if (onoff) { ifp->if_capenable |= IFCAP_NETMAP; - /* save if_transmit to restore it when exiting. - * XXX what about if_start and if_qflush ? - */ na->if_transmit = ifp->if_transmit; ifp->if_transmit = netmap_start; @@ -135,10 +105,10 @@ lem_netmap_reg(struct ifnet *ifp, int on } } else { fail: - /* restore non-netmap mode */ + /* return to non-netmap mode */ ifp->if_transmit = na->if_transmit; ifp->if_capenable &= ~IFCAP_NETMAP; - lem_init_locked(adapter); /* also enables intr */ + lem_init_locked(adapter); /* also enable intr */ } #ifndef EM_LEGACY_IRQ @@ -156,14 +126,15 @@ static int lem_netmap_txsync(struct ifnet *ifp, u_int ring_nr, int do_lock) { struct adapter *adapter = ifp->if_softc; - struct netmap_adapter *na = NA(adapter->ifp); - struct netmap_kring *kring = &na->tx_rings[0]; + struct netmap_adapter *na = NA(ifp); + struct netmap_kring *kring = &na->tx_rings[ring_nr]; struct netmap_ring *ring = kring->ring; - int j, k, l, n = 0, lim = kring->nkr_num_slots - 1; + u_int j, k, l, n = 0, lim = kring->nkr_num_slots - 1; /* generate an interrupt approximately every half ring */ int report_frequency = kring->nkr_num_slots >> 1; + /* take a copy of ring->cur now, and never read it again */ k = ring->cur; if (k > lim) return netmap_ring_reinit(kring); @@ -172,25 +143,25 @@ lem_netmap_txsync(struct ifnet *ifp, u_i EM_TX_LOCK(adapter); bus_dmamap_sync(adapter->txdma.dma_tag, adapter->txdma.dma_map, BUS_DMASYNC_POSTREAD); - - /* update avail to what the hardware knows */ - ring->avail = kring->nr_hwavail; - - j = kring->nr_hwcur; /* points into the netmap ring */ + /* + * Process new packets to send. j is the current index in the + * netmap ring, l is the corresponding index in the NIC ring. + */ + j = kring->nr_hwcur; if (j != k) { /* we have new packets to send */ - l = j - kring->nkr_hwofs; /* points into the NIC ring */ - if (l < 0) - l += lim + 1; - while (j != k) { + l = netmap_idx_k2n(kring, j); + for (n = 0; j != k; n++) { + /* slot is the current slot in the netmap ring */ struct netmap_slot *slot = &ring->slot[j]; + /* curr is the current slot in the nic ring */ struct e1000_tx_desc *curr = &adapter->tx_desc_base[l]; struct em_buffer *txbuf = &adapter->tx_buffer_area[l]; - uint64_t paddr; - void *addr = PNMB(slot, &paddr); int flags = ((slot->flags & NS_REPORT) || j == 0 || j == report_frequency) ? E1000_TXD_CMD_RS : 0; - int len = slot->len; + uint64_t paddr; + void *addr = PNMB(slot, &paddr); + u_int len = slot->len; if (addr == netmap_buffer_base || len > NETMAP_BUF_SIZE) { if (do_lock) @@ -199,28 +170,24 @@ lem_netmap_txsync(struct ifnet *ifp, u_i } slot->flags &= ~NS_REPORT; - curr->upper.data = 0; - curr->lower.data = - htole32( adapter->txd_cmd | len | - (E1000_TXD_CMD_EOP | flags) ); if (slot->flags & NS_BUF_CHANGED) { - curr->buffer_addr = htole64(paddr); /* buffer has changed, reload map */ netmap_reload_map(adapter->txtag, txbuf->map, addr); + curr->buffer_addr = htole64(paddr); slot->flags &= ~NS_BUF_CHANGED; } + curr->upper.data = 0; + curr->lower.data = + htole32( adapter->txd_cmd | len | + (E1000_TXD_CMD_EOP | flags) ); bus_dmamap_sync(adapter->txtag, txbuf->map, BUS_DMASYNC_PREWRITE); j = (j == lim) ? 0 : j + 1; l = (l == lim) ? 0 : l + 1; - n++; } - kring->nr_hwcur = k; - - /* decrease avail by number of sent packets */ + kring->nr_hwcur = k; /* the saved ring->cur */ kring->nr_hwavail -= n; - ring->avail = kring->nr_hwavail; bus_dmamap_sync(adapter->txdma.dma_tag, adapter->txdma.dma_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); @@ -233,19 +200,21 @@ lem_netmap_txsync(struct ifnet *ifp, u_i /* record completed transmissions using TDH */ l = E1000_READ_REG(&adapter->hw, E1000_TDH(0)); - if (l >= kring->nkr_num_slots) { /* can it happen ? */ + if (l >= kring->nkr_num_slots) { /* XXX can it happen ? */ D("bad TDH %d", l); l -= kring->nkr_num_slots; } delta = l - adapter->next_tx_to_clean; if (delta) { + /* some tx completed, increment hwavail. */ if (delta < 0) delta += kring->nkr_num_slots; adapter->next_tx_to_clean = l; kring->nr_hwavail += delta; - ring->avail = kring->nr_hwavail; } } + /* update avail to what the kernel knows */ + ring->avail = kring->nr_hwavail; if (do_lock) EM_TX_UNLOCK(adapter); @@ -260,57 +229,68 @@ static int lem_netmap_rxsync(struct ifnet *ifp, u_int ring_nr, int do_lock) { struct adapter *adapter = ifp->if_softc; - struct netmap_adapter *na = NA(adapter->ifp); - struct netmap_kring *kring = &na->rx_rings[0]; + struct netmap_adapter *na = NA(ifp); + struct netmap_kring *kring = &na->rx_rings[ring_nr]; struct netmap_ring *ring = kring->ring; - int j, k, l, n, lim = kring->nkr_num_slots - 1; + int j, l, n, lim = kring->nkr_num_slots - 1; + int force_update = do_lock || kring->nr_kflags & NKR_PENDINTR; + u_int k = ring->cur, resvd = ring->reserved; - k = ring->cur; if (k > lim) return netmap_ring_reinit(kring); if (do_lock) EM_RX_LOCK(adapter); + /* XXX check sync modes */ bus_dmamap_sync(adapter->rxdma.dma_tag, adapter->rxdma.dma_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - /* import newly received packets into the netmap ring */ - l = adapter->next_rx_desc_to_check; /* points into the NIC ring */ - j = l + kring->nkr_hwofs; /* points into the netmap ring */ - if (j > lim) - j -= lim + 1; - for (n = 0; ; n++) { - struct e1000_rx_desc *curr = &adapter->rx_desc_base[l]; - int len; - - if ((curr->status & E1000_RXD_STAT_DD) == 0) - break; - len = le16toh(curr->length) - 4; // CRC - - if (len < 0) { - D("bogus pkt size at %d", j); - len = 0; + /* + * Import newly received packets into the netmap ring. + * j is an index in the netmap ring, l in the NIC ring. + */ + l = adapter->next_rx_desc_to_check; + j = netmap_idx_n2k(kring, l); + if (netmap_no_pendintr || force_update) { + for (n = 0; ; n++) { + struct e1000_rx_desc *curr = &adapter->rx_desc_base[l]; + uint32_t staterr = le32toh(curr->status); + int len; + + if ((staterr & E1000_RXD_STAT_DD) == 0) + break; + len = le16toh(curr->length) - 4; // CRC + if (len < 0) { + D("bogus pkt size at %d", j); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu May 17 15:03:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34EA6106564A; Thu, 17 May 2012 15:03:17 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 158408FC20; Thu, 17 May 2012 15:03:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HF3GFN003974; Thu, 17 May 2012 15:03:16 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HF3G5H003972; Thu, 17 May 2012 15:03:16 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201205171503.q4HF3G5H003972@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 17 May 2012 15:03:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235550 - stable/9/sys/dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 15:03:17 -0000 Author: luigi Date: Thu May 17 15:03:16 2012 New Revision: 235550 URL: http://svn.freebsd.org/changeset/base/235550 Log: MFC: netmap support for the 're' driver Modified: stable/9/sys/dev/re/if_re.c Modified: stable/9/sys/dev/re/if_re.c ============================================================================== --- stable/9/sys/dev/re/if_re.c Thu May 17 15:02:51 2012 (r235549) +++ stable/9/sys/dev/re/if_re.c Thu May 17 15:03:16 2012 (r235550) @@ -296,6 +296,10 @@ static void re_setwol (struct rl_softc static void re_clrwol (struct rl_softc *); static void re_set_linkspeed (struct rl_softc *); +#ifdef DEV_NETMAP /* see ixgbe.c for details */ +#include +#endif /* !DEV_NETMAP */ + #ifdef RE_DIAG static int re_diag (struct rl_softc *); #endif @@ -1641,6 +1645,9 @@ re_attach(device_t dev) */ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); +#ifdef DEV_NETMAP + re_netmap_attach(sc); +#endif /* DEV_NETMAP */ #ifdef RE_DIAG /* * Perform hardware diagnostic on the original RTL8169. @@ -1836,6 +1843,9 @@ re_detach(device_t dev) bus_dma_tag_destroy(sc->rl_ldata.rl_stag); } +#ifdef DEV_NETMAP + netmap_detach(ifp); +#endif /* DEV_NETMAP */ if (sc->rl_parent_tag) bus_dma_tag_destroy(sc->rl_parent_tag); @@ -2010,6 +2020,9 @@ re_tx_list_init(struct rl_softc *sc) sc->rl_ldata.rl_tx_desc_cnt * sizeof(struct rl_desc)); for (i = 0; i < sc->rl_ldata.rl_tx_desc_cnt; i++) sc->rl_ldata.rl_tx_desc[i].tx_m = NULL; +#ifdef DEV_NETMAP + re_netmap_tx_init(sc); +#endif /* DEV_NETMAP */ /* Set EOR. */ desc = &sc->rl_ldata.rl_tx_list[sc->rl_ldata.rl_tx_desc_cnt - 1]; desc->rl_cmdstat |= htole32(RL_TDESC_CMD_EOR); @@ -2037,6 +2050,9 @@ re_rx_list_init(struct rl_softc *sc) if ((error = re_newbuf(sc, i)) != 0) return (error); } +#ifdef DEV_NETMAP + re_netmap_rx_init(sc); +#endif /* DEV_NETMAP */ /* Flush the RX descriptors */ @@ -2093,6 +2109,13 @@ re_rxeof(struct rl_softc *sc, int *rx_np RL_LOCK_ASSERT(sc); ifp = sc->rl_ifp; +#ifdef DEV_NETMAP + if (ifp->if_capenable & IFCAP_NETMAP) { + NA(ifp)->rx_rings->nr_kflags |= NKR_PENDINTR; + selwakeuppri(&NA(ifp)->rx_rings->si, PI_NET); + return 0; + } +#endif /* DEV_NETMAP */ if (ifp->if_mtu > RL_MTU && (sc->rl_flags & RL_FLAG_JUMBOV2) != 0) jumbo = 1; else @@ -2334,6 +2357,12 @@ re_txeof(struct rl_softc *sc) return; ifp = sc->rl_ifp; +#ifdef DEV_NETMAP + if (ifp->if_capenable & IFCAP_NETMAP) { + selwakeuppri(&NA(ifp)->tx_rings[0].si, PI_NET); + return; + } +#endif /* DEV_NETMAP */ /* Invalidate the TX descriptor list */ bus_dmamap_sync(sc->rl_ldata.rl_tx_list_tag, sc->rl_ldata.rl_tx_list_map, @@ -2852,6 +2881,21 @@ re_start_locked(struct ifnet *ifp) sc = ifp->if_softc; +#ifdef DEV_NETMAP + /* XXX is this necessary ? */ + if (ifp->if_capenable & IFCAP_NETMAP) { + struct netmap_kring *kring = &NA(ifp)->tx_rings[0]; + if (sc->rl_ldata.rl_tx_prodidx != kring->nr_hwcur) { + /* kick the tx unit */ + CSR_WRITE_1(sc, sc->rl_txstart, RL_TXSTART_START); +#ifdef RE_TX_MODERATION + CSR_WRITE_4(sc, RL_TIMERCNT, 1); +#endif + sc->rl_watchdog_timer = 5; + } + return; + } +#endif /* DEV_NETMAP */ if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING || (sc->rl_flags & RL_FLAG_LINK) == 0) return; From owner-svn-src-all@FreeBSD.ORG Thu May 17 15:04:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 732C81065675; Thu, 17 May 2012 15:04:19 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 2F8DE8FC19; Thu, 17 May 2012 15:04:18 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 4C4F173029; Thu, 17 May 2012 17:24:32 +0200 (CEST) Date: Thu, 17 May 2012 17:24:32 +0200 From: Luigi Rizzo To: Dimitry Andric Message-ID: <20120517152432.GA94387@onelab2.iet.unipi.it> References: <201205162222.q4GMMqig065119@svn.freebsd.org> <4FB4F639.5070700@FreeBSD.org> <20120517135114.GA93530@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120517135114.GA93530@onelab2.iet.unipi.it> User-Agent: Mutt/1.4.2.3i Cc: Jack F Vogel , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r235527 - stable/9/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 15:04:19 -0000 On Thu, May 17, 2012 at 03:51:14PM +0200, Luigi Rizzo wrote: ... > > Hi Jack, > > > > Some of the netmap-related changes in this merge don't work, at least > > not for the LINT kernels: should be fixed now - i have merged the netmap code from HEAD which was the cause of the LINT failure cheers luigi From owner-svn-src-all@FreeBSD.ORG Thu May 17 15:20:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 075D3106566B; Thu, 17 May 2012 15:20:22 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E51598FC14; Thu, 17 May 2012 15:20:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HFKLX3004565; Thu, 17 May 2012 15:20:21 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HFKLaw004563; Thu, 17 May 2012 15:20:21 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205171520.q4HFKLaw004563@svn.freebsd.org> From: Josh Paetzel Date: Thu, 17 May 2012 15:20:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235551 - stable/9/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 15:20:22 -0000 Author: jpaetzel Date: Thu May 17 15:20:21 2012 New Revision: 235551 URL: http://svn.freebsd.org/changeset/base/235551 Log: MFC: 235452 Set the MBR partition to active when doing a full disk MBR. Submitted by: kmoore Obtained from: PC-BSD Sponsored by: iXsystems Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh Directory Properties: stable/9/usr.sbin/pc-sysinstall/ (props changed) Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh ============================================================================== --- stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh Thu May 17 15:03:16 2012 (r235550) +++ stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh Thu May 17 15:20:21 2012 (r235551) @@ -689,6 +689,9 @@ init_mbr_full_disk() echo_log "Cleaning up ${_intDISK}s1" rc_halt "dd if=/dev/zero of=${_intDISK}s1 count=1024" + # Make the partition active + rc_halt "gpart set -a active -i 1 ${_intDISK}" + if [ "$_intBOOT" = "bsd" ] ; then echo_log "Stamping boot0 on ${_intDISK}" rc_halt "gpart bootcode -b /boot/boot0 ${_intDISK}" From owner-svn-src-all@FreeBSD.ORG Thu May 17 15:22:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 26093106566C; Thu, 17 May 2012 15:22:09 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 109238FC08; Thu, 17 May 2012 15:22:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HFM8Tn004683; Thu, 17 May 2012 15:22:08 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HFM8xu004681; Thu, 17 May 2012 15:22:08 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205171522.q4HFM8xu004681@svn.freebsd.org> From: Josh Paetzel Date: Thu, 17 May 2012 15:22:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235552 - stable/9/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 15:22:09 -0000 Author: jpaetzel Date: Thu May 17 15:22:08 2012 New Revision: 235552 URL: http://svn.freebsd.org/changeset/base/235552 Log: MFC 235453: Style fixes. Submitted by: kmoore Obtained from: PC-BSD Sponsored by: iXsystems Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions.sh Directory Properties: stable/9/usr.sbin/pc-sysinstall/ (props changed) Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions.sh ============================================================================== --- stable/9/usr.sbin/pc-sysinstall/backend/functions.sh Thu May 17 15:20:21 2012 (r235551) +++ stable/9/usr.sbin/pc-sysinstall/backend/functions.sh Thu May 17 15:22:08 2012 (r235552) @@ -208,15 +208,11 @@ fetch_file() FETCHOUTFILE="$2" EXITFAILED="$3" - SIZEFILE="${TMPDIR}/.fetchSize" EXITFILE="${TMPDIR}/.fetchExit" - rm ${SIZEFILE} 2>/dev/null >/dev/null rm ${FETCHOUTFILE} 2>/dev/null >/dev/null - fetch -s "${FETCHFILE}" >${SIZEFILE} - SIZE="`cat ${SIZEFILE}`" - SIZE=$((SIZE/1024)) + SIZE=$(( `fetch -s "${FETCHFILE}"` / 1024 )) echo "FETCH: ${FETCHFILE}" echo "FETCH: ${FETCHOUTFILE}" >>${LOGOUT} @@ -278,12 +274,10 @@ get_zpool_name() NUM=`ls ${TMPDIR}/.zpools/ | wc -l | sed 's| ||g'` # Is it used in another zpool? - while - z=1 + while : do NEWNAME="${BASENAME}${NUM}" - zpool import | grep -q "${NEWNAME}" - if [ $? -ne 0 ] ; then break ; fi + zpool import | grep -qw "${NEWNAME}" && break NUM=$((NUM+1)) done From owner-svn-src-all@FreeBSD.ORG Thu May 17 15:45:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D1F991065674; Thu, 17 May 2012 15:45:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B00718FC14; Thu, 17 May 2012 15:45:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HFj0j6005399; Thu, 17 May 2012 15:45:00 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HFj09q005394; Thu, 17 May 2012 15:45:00 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205171545.q4HFj09q005394@svn.freebsd.org> From: John Baldwin Date: Thu, 17 May 2012 15:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235553 - in stable/8/sys: dev/e1000 i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 15:45:01 -0000 Author: jhb Date: Thu May 17 15:45:00 2012 New Revision: 235553 URL: http://svn.freebsd.org/changeset/base/235553 Log: MFC 233708,234154: Fix a few issues with transmit handling in em(4) and igb(4): - Do not define the foo_start() methods or set if_start in the ifnet if multiq transmit is enabled. Also, set if_transmit and if_qflush before ether_ifattach rather than after when multiq transmit is enabled. This helps to ensure that the drivers never try to mix different transmit methods. - Properly restart transmit during resume. igb(4) was not restarting it at all, and em(4) was restarting even if the link was down and was calling the wrong method if multiq transmit was enabled. - Remove all the 'more' handling for transmit completions. Transmit completion processing does not have a processing limit, so it always runs to completion and never has more work to do when it returns. Instead, the previous code was returning 'true' anytime there were packets in the queue that weren't still in the process of being transmitted. The effect was that the driver would continuously reschedule a task to process TX completions in effect running at 100% CPU polling the hardware until it finished transmitting all of the packets in the ring. Now it will just wait for the next TX completion interrupt. - Restart packet transmission when the link becomes active. - Fix the MSI-X queue interrupt handlers to restart packet transmission if there are pending packets in the relevant software queue (IFQ or buf_ring) after processing TX completions. This is the root cause for the OACTIVE hangs as if the MSI-X queue handler drained all the pending packets from the TX ring, nothing would ever restart it. As such, remove some previously-added workarounds to reschedule a task to poll the TX ring anytime OACTIVE was set. - Use a dedicated task to handle deferred transmits from the if_transmit method instead of reusing the existing per-queue interrupt task. Reusing the per-queue interrupt task could result in both an interrupt thread and the taskqueue thread trying to handle received packets on a single queue resulting in out-of-order packet processing. - Call ether_ifdetach() earlier in igb_detach(). - Drain tasks and free taskqueues during igb_detach(). Modified: stable/8/sys/dev/e1000/if_em.c stable/8/sys/dev/e1000/if_igb.c stable/8/sys/dev/e1000/if_igb.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/dev/e1000/if_em.c ============================================================================== --- stable/8/sys/dev/e1000/if_em.c Thu May 17 15:22:08 2012 (r235552) +++ stable/8/sys/dev/e1000/if_em.c Thu May 17 15:45:00 2012 (r235553) @@ -193,13 +193,14 @@ static int em_detach(device_t); static int em_shutdown(device_t); static int em_suspend(device_t); static int em_resume(device_t); -static void em_start(struct ifnet *); -static void em_start_locked(struct ifnet *, struct tx_ring *); #ifdef EM_MULTIQUEUE static int em_mq_start(struct ifnet *, struct mbuf *); static int em_mq_start_locked(struct ifnet *, struct tx_ring *, struct mbuf *); static void em_qflush(struct ifnet *); +#else +static void em_start(struct ifnet *); +static void em_start_locked(struct ifnet *, struct tx_ring *); #endif static int em_ioctl(struct ifnet *, u_long, caddr_t); static void em_init(void *); @@ -234,7 +235,7 @@ static void em_enable_intr(struct adapte static void em_disable_intr(struct adapter *); static void em_update_stats_counters(struct adapter *); static void em_add_hw_stats(struct adapter *adapter); -static bool em_txeof(struct tx_ring *); +static void em_txeof(struct tx_ring *); static bool em_rxeof(struct rx_ring *, int, int *); #ifndef __NO_STRICT_ALIGNMENT static int em_fixup_rx(struct rx_ring *); @@ -836,6 +837,7 @@ static int em_resume(device_t dev) { struct adapter *adapter = device_get_softc(dev); + struct tx_ring *txr = adapter->tx_rings; struct ifnet *ifp = adapter->ifp; EM_CORE_LOCK(adapter); @@ -843,8 +845,22 @@ em_resume(device_t dev) e1000_resume_workarounds_pchlan(&adapter->hw); em_init_locked(adapter); em_init_manageability(adapter); + + if ((ifp->if_flags & IFF_UP) && + (ifp->if_drv_flags & IFF_DRV_RUNNING) && adapter->link_active) { + for (int i = 0; i < adapter->num_queues; i++, txr++) { + EM_TX_LOCK(txr); +#ifdef EM_MULTIQUEUE + if (!drbr_empty(ifp, txr->br)) + em_mq_start_locked(ifp, txr, NULL); +#else + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + em_start_locked(ifp, txr); +#endif + EM_TX_UNLOCK(txr); + } + } EM_CORE_UNLOCK(adapter); - em_start(ifp); return bus_generic_resume(dev); } @@ -948,7 +964,7 @@ em_qflush(struct ifnet *ifp) } if_qflush(ifp); } -#endif /* EM_MULTIQUEUE */ +#else /* !EM_MULTIQUEUE */ static void em_start_locked(struct ifnet *ifp, struct tx_ring *txr) @@ -1009,14 +1025,9 @@ em_start(struct ifnet *ifp) em_start_locked(ifp, txr); EM_TX_UNLOCK(txr); } - /* - ** If we went inactive schedule - ** a task to clean up. - */ - if (ifp->if_drv_flags & IFF_DRV_OACTIVE) - taskqueue_enqueue(txr->tq, &txr->tx_task); return; } +#endif /* EM_MULTIQUEUE */ /********************************************************************* * Ioctl entry point @@ -1413,7 +1424,8 @@ em_poll(struct ifnet *ifp, enum poll_cmd if (!drbr_empty(ifp, txr->br)) em_mq_start_locked(ifp, txr, NULL); #else - em_start_locked(ifp, txr); + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + em_start_locked(ifp, txr); #endif EM_TX_UNLOCK(txr); @@ -1486,10 +1498,11 @@ em_handle_que(void *context, int pending if (!drbr_empty(ifp, txr->br)) em_mq_start_locked(ifp, txr, NULL); #else - em_start_locked(ifp, txr); + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + em_start_locked(ifp, txr); #endif EM_TX_UNLOCK(txr); - if (more || (ifp->if_drv_flags & IFF_DRV_OACTIVE)) { + if (more) { taskqueue_enqueue(adapter->tq, &adapter->que_task); return; } @@ -1510,17 +1523,21 @@ em_msix_tx(void *arg) { struct tx_ring *txr = arg; struct adapter *adapter = txr->adapter; - bool more; + struct ifnet *ifp = adapter->ifp; ++txr->tx_irq; EM_TX_LOCK(txr); - more = em_txeof(txr); + em_txeof(txr); +#ifdef EM_MULTIQUEUE + if (!drbr_empty(ifp, txr->br)) + em_mq_start_locked(ifp, txr, NULL); +#else + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + em_start_locked(ifp, txr); +#endif + /* Reenable this interrupt */ + E1000_WRITE_REG(&adapter->hw, E1000_IMS, txr->ims); EM_TX_UNLOCK(txr); - if (more) - taskqueue_enqueue(txr->tq, &txr->tx_task); - else - /* Reenable this interrupt */ - E1000_WRITE_REG(&adapter->hw, E1000_IMS, txr->ims); return; } @@ -1598,7 +1615,8 @@ em_handle_tx(void *context, int pending) if (!drbr_empty(ifp, txr->br)) em_mq_start_locked(ifp, txr, NULL); #else - em_start_locked(ifp, txr); + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + em_start_locked(ifp, txr); #endif E1000_WRITE_REG(&adapter->hw, E1000_IMS, txr->ims); EM_TX_UNLOCK(txr); @@ -1608,6 +1626,7 @@ static void em_handle_link(void *context, int pending) { struct adapter *adapter = context; + struct tx_ring *txr = adapter->tx_rings; struct ifnet *ifp = adapter->ifp; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) @@ -1619,6 +1638,19 @@ em_handle_link(void *context, int pendin callout_reset(&adapter->timer, hz, em_local_timer, adapter); E1000_WRITE_REG(&adapter->hw, E1000_IMS, EM_MSIX_LINK | E1000_IMS_LSC); + if (adapter->link_active) { + for (int i = 0; i < adapter->num_queues; i++, txr++) { + EM_TX_LOCK(txr); +#ifdef EM_MULTIQUEUE + if (!drbr_empty(ifp, txr->br)) + em_mq_start_locked(ifp, txr, NULL); +#else + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + em_start_locked(ifp, txr); +#endif + EM_TX_UNLOCK(txr); + } + } EM_CORE_UNLOCK(adapter); } @@ -2891,20 +2923,21 @@ em_setup_interface(device_t dev, struct ifp->if_softc = adapter; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = em_ioctl; +#ifdef EM_MULTIQUEUE + /* Multiqueue stack interface */ + ifp->if_transmit = em_mq_start; + ifp->if_qflush = em_qflush; +#else ifp->if_start = em_start; IFQ_SET_MAXLEN(&ifp->if_snd, adapter->num_tx_desc - 1); ifp->if_snd.ifq_drv_maxlen = adapter->num_tx_desc - 1; IFQ_SET_READY(&ifp->if_snd); +#endif ether_ifattach(ifp, adapter->hw.mac.addr); ifp->if_capabilities = ifp->if_capenable = 0; -#ifdef EM_MULTIQUEUE - /* Multiqueue stack interface */ - ifp->if_transmit = em_mq_start; - ifp->if_qflush = em_qflush; -#endif ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM; ifp->if_capabilities |= IFCAP_TSO4; @@ -3710,7 +3743,7 @@ em_tso_setup(struct tx_ring *txr, struct * tx_buffer is put back on the free queue. * **********************************************************************/ -static bool +static void em_txeof(struct tx_ring *txr) { struct adapter *adapter = txr->adapter; @@ -3724,7 +3757,7 @@ em_txeof(struct tx_ring *txr) /* No work, make sure watchdog is off */ if (txr->tx_avail == adapter->num_tx_desc) { txr->queue_status = EM_QUEUE_IDLE; - return (FALSE); + return; } processed = 0; @@ -3813,10 +3846,7 @@ em_txeof(struct tx_ring *txr) /* Disable watchdog if all clean */ if (txr->tx_avail == adapter->num_tx_desc) { txr->queue_status = EM_QUEUE_IDLE; - return (FALSE); } - - return (TRUE); } Modified: stable/8/sys/dev/e1000/if_igb.c ============================================================================== --- stable/8/sys/dev/e1000/if_igb.c Thu May 17 15:22:08 2012 (r235552) +++ stable/8/sys/dev/e1000/if_igb.c Thu May 17 15:45:00 2012 (r235553) @@ -171,13 +171,15 @@ static int igb_detach(device_t); static int igb_shutdown(device_t); static int igb_suspend(device_t); static int igb_resume(device_t); -static void igb_start(struct ifnet *); -static void igb_start_locked(struct tx_ring *, struct ifnet *ifp); #if __FreeBSD_version >= 800000 static int igb_mq_start(struct ifnet *, struct mbuf *); static int igb_mq_start_locked(struct ifnet *, struct tx_ring *, struct mbuf *); static void igb_qflush(struct ifnet *); +static void igb_deferred_mq_start(void *, int); +#else +static void igb_start(struct ifnet *); +static void igb_start_locked(struct tx_ring *, struct ifnet *ifp); #endif static int igb_ioctl(struct ifnet *, u_long, caddr_t); static void igb_init(void *); @@ -261,6 +263,7 @@ static void igb_msix_que(void *); static void igb_msix_link(void *); static void igb_handle_que(void *context, int pending); static void igb_handle_link(void *context, int pending); +static void igb_handle_link_locked(struct adapter *); static void igb_set_sysctl_value(struct adapter *, const char *, const char *, int *, int); @@ -707,6 +710,8 @@ igb_detach(device_t dev) return (EBUSY); } + ether_ifdetach(adapter->ifp); + if (adapter->led_dev != NULL) led_destroy(adapter->led_dev); @@ -738,8 +743,6 @@ igb_detach(device_t dev) if (adapter->vlan_detach != NULL) EVENTHANDLER_DEREGISTER(vlan_unconfig, adapter->vlan_detach); - ether_ifdetach(adapter->ifp); - callout_drain(&adapter->timer); igb_free_pci_resources(adapter); @@ -798,6 +801,7 @@ static int igb_resume(device_t dev) { struct adapter *adapter = device_get_softc(dev); + struct tx_ring *txr = adapter->tx_rings; struct ifnet *ifp = adapter->ifp; IGB_CORE_LOCK(adapter); @@ -805,9 +809,21 @@ igb_resume(device_t dev) igb_init_manageability(adapter); if ((ifp->if_flags & IFF_UP) && - (ifp->if_drv_flags & IFF_DRV_RUNNING)) - igb_start(ifp); - + (ifp->if_drv_flags & IFF_DRV_RUNNING) && adapter->link_active) { + for (int i = 0; i < adapter->num_queues; i++, txr++) { + IGB_TX_LOCK(txr); +#if __FreeBSD_version >= 800000 + /* Process the stack queue only if not depleted */ + if (((txr->queue_status & IGB_QUEUE_DEPLETED) == 0) && + !drbr_empty(ifp, txr->br)) + igb_mq_start_locked(ifp, txr, NULL); +#else + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + igb_start_locked(txr, ifp); +#endif + IGB_TX_UNLOCK(txr); + } + } IGB_CORE_UNLOCK(adapter); return bus_generic_resume(dev); @@ -919,7 +935,7 @@ igb_mq_start(struct ifnet *ifp, struct m IGB_TX_UNLOCK(txr); } else { err = drbr_enqueue(ifp, txr->br, m); - taskqueue_enqueue(que->tq, &que->que_task); + taskqueue_enqueue(que->tq, &txr->txq_task); } return (err); @@ -979,6 +995,22 @@ igb_mq_start_locked(struct ifnet *ifp, s } /* + * Called from a taskqueue to drain queued transmit packets. + */ +static void +igb_deferred_mq_start(void *arg, int pending) +{ + struct tx_ring *txr = arg; + struct adapter *adapter = txr->adapter; + struct ifnet *ifp = adapter->ifp; + + IGB_TX_LOCK(txr); + if (!drbr_empty(ifp, txr->br)) + igb_mq_start_locked(ifp, txr, NULL); + IGB_TX_UNLOCK(txr); +} + +/* ** Flush all ring buffers */ static void @@ -1321,19 +1353,19 @@ igb_handle_que(void *context, int pendin more = igb_rxeof(que, adapter->rx_process_limit, NULL); IGB_TX_LOCK(txr); - if (igb_txeof(txr)) - more = TRUE; + igb_txeof(txr); #if __FreeBSD_version >= 800000 /* Process the stack queue only if not depleted */ if (((txr->queue_status & IGB_QUEUE_DEPLETED) == 0) && !drbr_empty(ifp, txr->br)) igb_mq_start_locked(ifp, txr, NULL); #else - igb_start_locked(txr, ifp); + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + igb_start_locked(txr, ifp); #endif IGB_TX_UNLOCK(txr); /* Do we need another? */ - if (more || (ifp->if_drv_flags & IFF_DRV_OACTIVE)) { + if (more) { taskqueue_enqueue(que->tq, &que->que_task); return; } @@ -1356,8 +1388,35 @@ igb_handle_link(void *context, int pendi { struct adapter *adapter = context; + IGB_CORE_LOCK(adapter); + igb_handle_link_locked(adapter); + IGB_CORE_UNLOCK(adapter); +} + +static void +igb_handle_link_locked(struct adapter *adapter) +{ + struct tx_ring *txr = adapter->tx_rings; + struct ifnet *ifp = adapter->ifp; + + IGB_CORE_LOCK_ASSERT(adapter); adapter->hw.mac.get_link_status = 1; igb_update_link_status(adapter); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) && adapter->link_active) { + for (int i = 0; i < adapter->num_queues; i++, txr++) { + IGB_TX_LOCK(txr); +#if __FreeBSD_version >= 800000 + /* Process the stack queue only if not depleted */ + if (((txr->queue_status & IGB_QUEUE_DEPLETED) == 0) && + !drbr_empty(ifp, txr->br)) + igb_mq_start_locked(ifp, txr, NULL); +#else + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + igb_start_locked(txr, ifp); +#endif + IGB_TX_UNLOCK(txr); + } + } } /********************************************************************* @@ -1437,7 +1496,7 @@ igb_poll(struct ifnet *ifp, enum poll_cm reg_icr = E1000_READ_REG(&adapter->hw, E1000_ICR); /* Link status change */ if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) - igb_handle_link(adapter, 0); + igb_handle_link_locked(adapter); if (reg_icr & E1000_ICR_RXO) adapter->rx_overruns++; @@ -1454,7 +1513,8 @@ igb_poll(struct ifnet *ifp, enum poll_cm if (!drbr_empty(ifp, txr->br)) igb_mq_start_locked(ifp, txr, NULL); #else - igb_start_locked(txr, ifp); + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + igb_start_locked(txr, ifp); #endif IGB_TX_UNLOCK(txr); return POLL_RETURN_COUNT(rx_done); @@ -1471,16 +1531,26 @@ igb_msix_que(void *arg) { struct igb_queue *que = arg; struct adapter *adapter = que->adapter; + struct ifnet *ifp = adapter->ifp; struct tx_ring *txr = que->txr; struct rx_ring *rxr = que->rxr; u32 newitr = 0; - bool more_tx, more_rx; + bool more_rx; E1000_WRITE_REG(&adapter->hw, E1000_EIMC, que->eims); ++que->irqs; IGB_TX_LOCK(txr); - more_tx = igb_txeof(txr); + igb_txeof(txr); +#if __FreeBSD_version >= 800000 + /* Process the stack queue only if not depleted */ + if (((txr->queue_status & IGB_QUEUE_DEPLETED) == 0) && + !drbr_empty(ifp, txr->br)) + igb_mq_start_locked(ifp, txr, NULL); +#else + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + igb_start_locked(txr, ifp); +#endif IGB_TX_UNLOCK(txr); more_rx = igb_rxeof(que, adapter->rx_process_limit, NULL); @@ -1538,7 +1608,7 @@ igb_msix_que(void *arg) no_calc: /* Schedule a clean task if needed*/ - if (more_tx || more_rx) + if (more_rx) taskqueue_enqueue(que->tq, &que->que_task); else /* Reenable this interrupt */ @@ -2320,6 +2390,7 @@ igb_allocate_legacy(struct adapter *adap { device_t dev = adapter->dev; struct igb_queue *que = adapter->queues; + struct tx_ring *txr = adapter->tx_rings; int error, rid = 0; /* Turn off all interrupts */ @@ -2338,6 +2409,10 @@ igb_allocate_legacy(struct adapter *adap return (ENXIO); } +#if __FreeBSD_version >= 800000 + TASK_INIT(&txr->txq_task, 0, igb_deferred_mq_start, txr); +#endif + /* * Try allocating a fast interrupt and the associated deferred * processing contexts. @@ -2411,9 +2486,13 @@ igb_allocate_msix(struct adapter *adapte */ if (adapter->num_queues > 1) bus_bind_intr(dev, que->res, i); +#if __FreeBSD_version >= 800000 + TASK_INIT(&que->txr->txq_task, 0, igb_deferred_mq_start, + que->txr); +#endif /* Make tasklet for deferred handling */ TASK_INIT(&que->que_task, 0, igb_handle_que, que); - que->tq = taskqueue_create_fast("igb_que", M_NOWAIT, + que->tq = taskqueue_create("igb_que", M_NOWAIT, taskqueue_thread_enqueue, &que->tq); taskqueue_start_threads(&que->tq, 1, PI_NET, "%s que", device_get_nameunit(adapter->dev)); @@ -2620,13 +2699,24 @@ igb_free_pci_resources(struct adapter *a else (adapter->msix != 0) ? (rid = 1):(rid = 0); + que = adapter->queues; if (adapter->tag != NULL) { + taskqueue_drain(que->tq, &adapter->link_task); bus_teardown_intr(dev, adapter->res, adapter->tag); adapter->tag = NULL; } if (adapter->res != NULL) bus_release_resource(dev, SYS_RES_IRQ, rid, adapter->res); + for (int i = 0; i < adapter->num_queues; i++, que++) { + if (que->tq != NULL) { +#if __FreeBSD_version >= 800000 + taskqueue_drain(que->tq, &que->txr->txq_task); +#endif + taskqueue_drain(que->tq, &que->que_task); + taskqueue_free(que->tq); + } + } mem: if (adapter->msix) pci_release_msi(dev); Modified: stable/8/sys/dev/e1000/if_igb.h ============================================================================== --- stable/8/sys/dev/e1000/if_igb.h Thu May 17 15:22:08 2012 (r235552) +++ stable/8/sys/dev/e1000/if_igb.h Thu May 17 15:45:00 2012 (r235553) @@ -301,6 +301,7 @@ struct tx_ring { struct buf_ring *br; #endif bus_dma_tag_t txtag; + struct task txq_task; u32 bytes; u32 packets; From owner-svn-src-all@FreeBSD.ORG Thu May 17 16:28:41 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0189106566B; Thu, 17 May 2012 16:28:41 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 5171A8FC19; Thu, 17 May 2012 16:28:41 +0000 (UTC) Received: from marcelm-sslvpn-nc.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id q4HGSTd2023601 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 17 May 2012 09:28:35 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar In-Reply-To: <201205171011.q4HABIJY090234@svn.freebsd.org> Date: Thu, 17 May 2012 09:28:27 -0700 Content-Transfer-Encoding: 7bit Message-Id: <67EA71E7-0FB0-435F-9A08-26DE9C98EFD0@xcllnt.net> References: <201205171011.q4HABIJY090234@svn.freebsd.org> To: Grzegorz Bernacki X-Mailer: Apple Mail (2.1278) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r235537 - in head: etc/mtree include lib lib/libnandfs lib/libstand sbin sbin/nandfs sbin/newfs_nandfs share/man/man4 share/man/man5 share/mk sys/boot/arm/uboot sys/boot/i386/loader sys... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 16:28:41 -0000 On May 17, 2012, at 3:11 AM, Grzegorz Bernacki wrote: > Author: gber > Date: Thu May 17 10:11:18 2012 > New Revision: 235537 > URL: http://svn.freebsd.org/changeset/base/235537 > > Log: > Import work done under project/nand (@235533) into head. I'm a happy man! -- Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@FreeBSD.ORG Thu May 17 17:02:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE4961065674; Thu, 17 May 2012 17:02:47 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A6EC8FC0C; Thu, 17 May 2012 17:02:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HH2ltQ007810; Thu, 17 May 2012 17:02:47 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HH2ln6007808; Thu, 17 May 2012 17:02:47 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205171702.q4HH2ln6007808@svn.freebsd.org> From: Michael Tuexen Date: Thu, 17 May 2012 17:02:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235554 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 17:02:47 -0000 Author: tuexen Date: Thu May 17 17:02:47 2012 New Revision: 235554 URL: http://svn.freebsd.org/changeset/base/235554 Log: Support SCTP_EOF also for 1-to-1 style sockets. MFC after: 3 days Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Thu May 17 15:45:00 2012 (r235553) +++ head/sys/netinet/sctp_output.c Thu May 17 17:02:47 2012 (r235554) @@ -13610,8 +13610,7 @@ skip_preblock: dataless_eof: /* EOF thing ? */ if ((srcv->sinfo_flags & SCTP_EOF) && - (got_all_of_the_send == 1) && - (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE)) { + (got_all_of_the_send == 1)) { int cnt; SCTP_STAT_INCR(sctps_sends_with_eof); From owner-svn-src-all@FreeBSD.ORG Thu May 17 17:30:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED0061065672; Thu, 17 May 2012 17:30:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D77B78FC0A; Thu, 17 May 2012 17:30:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HHUGUK008743; Thu, 17 May 2012 17:30:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HHUGgY008741; Thu, 17 May 2012 17:30:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205171730.q4HHUGgY008741@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 17 May 2012 17:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235555 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 17:30:17 -0000 Author: kib Date: Thu May 17 17:30:16 2012 New Revision: 235555 URL: http://svn.freebsd.org/changeset/base/235555 Log: Use singular form for a modifier. Submitted by: alc MFC after: 3 days Modified: head/sys/amd64/amd64/fpu.c Modified: head/sys/amd64/amd64/fpu.c ============================================================================== --- head/sys/amd64/amd64/fpu.c Thu May 17 17:02:47 2012 (r235554) +++ head/sys/amd64/amd64/fpu.c Thu May 17 17:30:16 2012 (r235555) @@ -141,7 +141,7 @@ CTASSERT(sizeof(struct savefpu_ymm) == 8 /* * This requirement is to make it easier for asm code to calculate * offset of the fpu save area from the pcb address. FPU save area - * must be 64-bytes aligned. + * must be 64-byte aligned. */ CTASSERT(sizeof(struct pcb) % XSAVE_AREA_ALIGN == 0); From owner-svn-src-all@FreeBSD.ORG Thu May 17 17:46:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A59D91065674; Thu, 17 May 2012 17:46:47 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 65A728FC1A; Thu, 17 May 2012 17:46:46 +0000 (UTC) Received: by werg1 with SMTP id g1so1745239wer.13 for ; Thu, 17 May 2012 10:46:45 -0700 (PDT) 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=RnMQQdlJf67pouTMhbrPmALDIPZ3JxHbDug33tM9jXk=; b=qCCKLHokW3gg1LJTJvF0cfyn/hG2MLTVL2NoMhAbHxUhVacxmp3Tmfh+6sKV8izAiP rWdngn4XUBHLQjI0MNgdlY0ZyQ576tdcgZJ3O7+kkFH3jOrUSCZQBGCT0gizmgRZYvBP 6Yd8p01XRMNtudjeG6v4MONWqlzcvC3Hek9uDCsmBkv7FDd6cnKfmzlAuketFlsxoO5G s4brWTW0H0NCudcprZYHoCNnbu9YeNCBRppA8j70M5w+gDitwv+9S9EinXSk/U8pxse+ EAFbRssDhJlsmDE4niIPKoK7nLr5Q4i3AiRBamjZS/chbfv028RZsHmTmx+Qz6+uOLFr rWHw== MIME-Version: 1.0 Received: by 10.180.107.99 with SMTP id hb3mr24222196wib.0.1337276805454; Thu, 17 May 2012 10:46:45 -0700 (PDT) Received: by 10.180.7.103 with HTTP; Thu, 17 May 2012 10:46:45 -0700 (PDT) In-Reply-To: <20120517152432.GA94387@onelab2.iet.unipi.it> References: <201205162222.q4GMMqig065119@svn.freebsd.org> <4FB4F639.5070700@FreeBSD.org> <20120517135114.GA93530@onelab2.iet.unipi.it> <20120517152432.GA94387@onelab2.iet.unipi.it> Date: Thu, 17 May 2012 10:46:45 -0700 Message-ID: From: Jack Vogel To: Luigi Rizzo Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: src-committers@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Dimitry Andric , svn-src-stable-9@freebsd.org, Jack F Vogel Subject: Re: svn commit: r235527 - stable/9/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 17:46:47 -0000 Cool, thanks Luigi! Jack On Thu, May 17, 2012 at 8:24 AM, Luigi Rizzo wrote: > On Thu, May 17, 2012 at 03:51:14PM +0200, Luigi Rizzo wrote: > ... > > > Hi Jack, > > > > > > Some of the netmap-related changes in this merge don't work, at least > > > not for the LINT kernels: > > should be fixed now - i have merged the netmap code from HEAD > which was the cause of the LINT failure > > cheers > luigi > From owner-svn-src-all@FreeBSD.ORG Thu May 17 17:58:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA6E1106564A; Thu, 17 May 2012 17:58:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C68D8FC14; Thu, 17 May 2012 17:58:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HHwsja009635; Thu, 17 May 2012 17:58:54 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HHwsCn009629; Thu, 17 May 2012 17:58:54 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205171758.q4HHwsCn009629@svn.freebsd.org> From: John Baldwin Date: Thu, 17 May 2012 17:58:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235556 - in head/sys: amd64/acpica dev/acpica i386/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 17:58:54 -0000 Author: jhb Date: Thu May 17 17:58:53 2012 New Revision: 235556 URL: http://svn.freebsd.org/changeset/base/235556 Log: Centralize declaration of the debug.acpi sysctl node. Modified: head/sys/amd64/acpica/acpi_machdep.c head/sys/dev/acpica/acpi_ec.c head/sys/dev/acpica/acpi_smbat.c head/sys/dev/acpica/acpivar.h head/sys/i386/acpica/acpi_machdep.c Modified: head/sys/amd64/acpica/acpi_machdep.c ============================================================================== --- head/sys/amd64/acpica/acpi_machdep.c Thu May 17 17:30:16 2012 (r235555) +++ head/sys/amd64/acpica/acpi_machdep.c Thu May 17 17:58:53 2012 (r235556) @@ -44,8 +44,6 @@ __FBSDID("$FreeBSD$"); #include -SYSCTL_DECL(_debug_acpi); - int acpi_resume_beep; TUNABLE_INT("debug.acpi.resume_beep", &acpi_resume_beep); SYSCTL_INT(_debug_acpi, OID_AUTO, resume_beep, CTLFLAG_RW, &acpi_resume_beep, Modified: head/sys/dev/acpica/acpi_ec.c ============================================================================== --- head/sys/dev/acpica/acpi_ec.c Thu May 17 17:30:16 2012 (r235555) +++ head/sys/dev/acpica/acpi_ec.c Thu May 17 17:58:53 2012 (r235556) @@ -178,7 +178,6 @@ struct acpi_ec_softc { ACPI_SERIAL_DECL(ec, "ACPI embedded controller"); -SYSCTL_DECL(_debug_acpi); static SYSCTL_NODE(_debug_acpi, OID_AUTO, ec, CTLFLAG_RD, NULL, "EC debugging"); static int ec_burst_mode; Modified: head/sys/dev/acpica/acpi_smbat.c ============================================================================== --- head/sys/dev/acpica/acpi_smbat.c Thu May 17 17:30:16 2012 (r235555) +++ head/sys/dev/acpica/acpi_smbat.c Thu May 17 17:58:53 2012 (r235556) @@ -62,7 +62,6 @@ static int acpi_smbat_get_bst(device_t d ACPI_SERIAL_DECL(smbat, "ACPI Smart Battery"); -SYSCTL_DECL(_debug_acpi); static SYSCTL_NODE(_debug_acpi, OID_AUTO, batt, CTLFLAG_RD, NULL, "Battery debugging"); Modified: head/sys/dev/acpica/acpivar.h ============================================================================== --- head/sys/dev/acpica/acpivar.h Thu May 17 17:30:16 2012 (r235555) +++ head/sys/dev/acpica/acpivar.h Thu May 17 17:58:53 2012 (r235556) @@ -492,5 +492,7 @@ ACPI_HANDLE acpi_GetReference(ACPI_HANDL /* Use the device logging level for ktr(4). */ #define KTR_ACPI KTR_DEV +SYSCTL_DECL(_debug_acpi); + #endif /* _KERNEL */ #endif /* !_ACPIVAR_H_ */ Modified: head/sys/i386/acpica/acpi_machdep.c ============================================================================== --- head/sys/i386/acpica/acpi_machdep.c Thu May 17 17:30:16 2012 (r235555) +++ head/sys/i386/acpica/acpi_machdep.c Thu May 17 17:58:53 2012 (r235556) @@ -44,8 +44,6 @@ __FBSDID("$FreeBSD$"); #include -SYSCTL_DECL(_debug_acpi); - uint32_t acpi_resume_beep; TUNABLE_INT("debug.acpi.resume_beep", &acpi_resume_beep); SYSCTL_UINT(_debug_acpi, OID_AUTO, resume_beep, CTLFLAG_RW, &acpi_resume_beep, From owner-svn-src-all@FreeBSD.ORG Thu May 17 18:12:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9C01106564A; Thu, 17 May 2012 18:12:24 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3F438FC0A; Thu, 17 May 2012 18:12:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HICOtE010144; Thu, 17 May 2012 18:12:24 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HICO7W010141; Thu, 17 May 2012 18:12:24 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205171812.q4HICO7W010141@svn.freebsd.org> From: Michael Tuexen Date: Thu, 17 May 2012 18:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235557 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 18:12:24 -0000 Author: tuexen Date: Thu May 17 18:12:24 2012 New Revision: 235557 URL: http://svn.freebsd.org/changeset/base/235557 Log: Use a default for max_burst of 4 and l2var of 2. This was discussed with rrs@. MFC after: 3 days Modified: head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_sysctl.h Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Thu May 17 17:58:53 2012 (r235556) +++ head/sys/netinet/sctp_constants.h Thu May 17 18:12:24 2012 (r235557) @@ -348,7 +348,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_NO_FR_UNLESS_SEGMENT_SMALLER 1 /* default max I can burst out after a fast retransmit, 0 disables it */ -#define SCTP_DEF_MAX_BURST 0 +#define SCTP_DEF_MAX_BURST 4 #define SCTP_DEF_HBMAX_BURST 4 #define SCTP_DEF_FRMAX_BURST 4 Modified: head/sys/netinet/sctp_sysctl.h ============================================================================== --- head/sys/netinet/sctp_sysctl.h Thu May 17 17:58:53 2012 (r235556) +++ head/sys/netinet/sctp_sysctl.h Thu May 17 18:12:24 2012 (r235557) @@ -377,7 +377,7 @@ struct sctp_sysctl { #define SCTPCTL_ABC_L_VAR_DESC "SCTP ABC max increase per SACK (L)" #define SCTPCTL_ABC_L_VAR_MIN 0 #define SCTPCTL_ABC_L_VAR_MAX 0xFFFFFFFF -#define SCTPCTL_ABC_L_VAR_DEFAULT 1 +#define SCTPCTL_ABC_L_VAR_DEFAULT 2 /* max_chained_mbufs: Default max number of small mbufs on a chain */ #define SCTPCTL_MAX_CHAINED_MBUFS_DESC "Default max number of small mbufs on a chain" From owner-svn-src-all@FreeBSD.ORG Thu May 17 18:40:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97CE21065670; Thu, 17 May 2012 18:40:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82AAE8FC19; Thu, 17 May 2012 18:40:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HIeSZf011043; Thu, 17 May 2012 18:40:28 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HIeSpE011041; Thu, 17 May 2012 18:40:28 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205171840.q4HIeSpE011041@svn.freebsd.org> From: Alexander Motin Date: Thu, 17 May 2012 18:40:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235558 - head/sys/dev/usb/input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 18:40:28 -0000 Author: mav Date: Thu May 17 18:40:27 2012 New Revision: 235558 URL: http://svn.freebsd.org/changeset/base/235558 Log: Add support for writing to HID devices through the interrupt output pipe. Supermicro LCD screen modules seem to not support accessing reports through the control pipes, but working fine with the interrupt pipes. Sponsored by: iXsystems, Inc. MFC after: 1 week Modified: head/sys/dev/usb/input/uhid.c Modified: head/sys/dev/usb/input/uhid.c ============================================================================== --- head/sys/dev/usb/input/uhid.c Thu May 17 18:12:24 2012 (r235557) +++ head/sys/dev/usb/input/uhid.c Thu May 17 18:40:27 2012 (r235558) @@ -87,6 +87,7 @@ SYSCTL_INT(_hw_usb_uhid, OID_AUTO, debug #define UHID_FRAME_NUM 50 /* bytes, frame number */ enum { + UHID_INTR_DT_WR, UHID_INTR_DT_RD, UHID_CTRL_DT_WR, UHID_CTRL_DT_RD, @@ -128,7 +129,8 @@ static device_probe_t uhid_probe; static device_attach_t uhid_attach; static device_detach_t uhid_detach; -static usb_callback_t uhid_intr_callback; +static usb_callback_t uhid_intr_write_callback; +static usb_callback_t uhid_intr_read_callback; static usb_callback_t uhid_write_callback; static usb_callback_t uhid_read_callback; @@ -152,7 +154,36 @@ static struct usb_fifo_methods uhid_fifo }; static void -uhid_intr_callback(struct usb_xfer *xfer, usb_error_t error) +uhid_intr_write_callback(struct usb_xfer *xfer, usb_error_t error) +{ + struct uhid_softc *sc = usbd_xfer_softc(xfer); + struct usb_page_cache *pc; + int actlen; + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + case USB_ST_SETUP: +tr_setup: + pc = usbd_xfer_get_frame(xfer, 0); + if (usb_fifo_get_data(sc->sc_fifo.fp[USB_FIFO_TX], pc, + 0, usbd_xfer_max_len(xfer), &actlen, 0)) { + usbd_xfer_set_frame_len(xfer, 0, actlen); + usbd_transfer_submit(xfer); + } + return; + + default: /* Error */ + if (error != USB_ERR_CANCELLED) { + /* try to clear stall first */ + usbd_xfer_set_stall(xfer); + goto tr_setup; + } + return; + } +} + +static void +uhid_intr_read_callback(struct usb_xfer *xfer, usb_error_t error) { struct uhid_softc *sc = usbd_xfer_softc(xfer); struct usb_page_cache *pc; @@ -327,13 +358,22 @@ uhid_read_callback(struct usb_xfer *xfer static const struct usb_config uhid_config[UHID_N_TRANSFER] = { + [UHID_INTR_DT_WR] = { + .type = UE_INTERRUPT, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .flags = {.pipe_bof = 1, }, + .bufsize = UHID_BSIZE, + .callback = &uhid_intr_write_callback, + }, + [UHID_INTR_DT_RD] = { .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .bufsize = UHID_BSIZE, - .callback = &uhid_intr_callback, + .callback = &uhid_intr_read_callback, }, [UHID_CTRL_DT_WR] = { @@ -381,7 +421,11 @@ uhid_start_write(struct usb_fifo *fifo) { struct uhid_softc *sc = usb_fifo_softc(fifo); - usbd_transfer_start(sc->sc_xfer[UHID_CTRL_DT_WR]); + if (sc->sc_flags & UHID_FLAG_IMMED) { + usbd_transfer_start(sc->sc_xfer[UHID_CTRL_DT_WR]); + } else { + usbd_transfer_start(sc->sc_xfer[UHID_INTR_DT_WR]); + } } static void @@ -390,6 +434,7 @@ uhid_stop_write(struct usb_fifo *fifo) struct uhid_softc *sc = usb_fifo_softc(fifo); usbd_transfer_stop(sc->sc_xfer[UHID_CTRL_DT_WR]); + usbd_transfer_stop(sc->sc_xfer[UHID_INTR_DT_WR]); } static int From owner-svn-src-all@FreeBSD.ORG Thu May 17 19:01:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0FF261065674; Thu, 17 May 2012 19:01:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF0328FC16; Thu, 17 May 2012 19:01:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HJ1D85011759; Thu, 17 May 2012 19:01:13 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HJ1Dr1011756; Thu, 17 May 2012 19:01:13 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205171901.q4HJ1Dr1011756@svn.freebsd.org> From: John Baldwin Date: Thu, 17 May 2012 19:01:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235559 - in stable/9/sys/amd64: amd64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 19:01:14 -0000 Author: jhb Date: Thu May 17 19:01:13 2012 New Revision: 235559 URL: http://svn.freebsd.org/changeset/base/235559 Log: Partial MFC of 232520: For amd64 PT_GETXSTATE and PT_SETXSTATE have been redefined to match the i386 values. The old values are still supported but should no longer be used. Modified: stable/9/sys/amd64/amd64/ptrace_machdep.c stable/9/sys/amd64/include/ptrace.h Modified: stable/9/sys/amd64/amd64/ptrace_machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/ptrace_machdep.c Thu May 17 18:40:27 2012 (r235558) +++ stable/9/sys/amd64/amd64/ptrace_machdep.c Thu May 17 19:01:13 2012 (r235559) @@ -126,6 +126,12 @@ cpu_ptrace(struct thread *td, int req, v return (cpu32_ptrace(td, req, addr, data)); #endif + /* Support old values of PT_GETXSTATE and PT_SETXSTATE. */ + if (req == PT_FIRSTMACH + 0) + req = PT_GETXSTATE; + if (req == PT_FIRSTMACH + 1) + req = PT_SETXSTATE; + switch (req) { case PT_GETXSTATE: case PT_SETXSTATE: Modified: stable/9/sys/amd64/include/ptrace.h ============================================================================== --- stable/9/sys/amd64/include/ptrace.h Thu May 17 18:40:27 2012 (r235558) +++ stable/9/sys/amd64/include/ptrace.h Thu May 17 19:01:13 2012 (r235559) @@ -35,7 +35,14 @@ #define __HAVE_PTRACE_MACHDEP -#define PT_GETXSTATE (PT_FIRSTMACH + 0) -#define PT_SETXSTATE (PT_FIRSTMACH + 1) +/* + * On amd64 (PT_FIRSTMACH + 0) and (PT_FIRSTMACH + 1) are old values for + * PT_GETXSTATE and PT_SETXSTATE. They should not be (re)used. + */ + +#define PT_GETXMMREGS (PT_FIRSTMACH + 0) /* i386 only */ +#define PT_SETXMMREGS (PT_FIRSTMACH + 1) /* i386 only */ +#define PT_GETXSTATE (PT_FIRSTMACH + 2) +#define PT_SETXSTATE (PT_FIRSTMACH + 3) #endif From owner-svn-src-all@FreeBSD.ORG Thu May 17 20:00:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B6831065673; Thu, 17 May 2012 20:00:37 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05DF68FC14; Thu, 17 May 2012 20:00:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HK0Z1w014406; Thu, 17 May 2012 20:00:35 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HK0ZLw014389; Thu, 17 May 2012 20:00:35 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201205172000.q4HK0ZLw014389@svn.freebsd.org> From: Devin Teske Date: Thu, 17 May 2012 20:00:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235560 - head/sys/boot/forth X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 20:00:37 -0000 Author: dteske Date: Thu May 17 20:00:34 2012 New Revision: 235560 URL: http://svn.freebsd.org/changeset/base/235560 Log: Update contact info. PR: N/A (mentor approved) Submitted by: dteske Reviewed by: dteske (mentor approved) Approved by: emaste (mentor) MFC after: 1 week Modified: head/sys/boot/forth/beastie.4th head/sys/boot/forth/beastie.4th.8 head/sys/boot/forth/brand.4th head/sys/boot/forth/brand.4th.8 head/sys/boot/forth/check-password.4th head/sys/boot/forth/check-password.4th.8 head/sys/boot/forth/color.4th head/sys/boot/forth/color.4th.8 head/sys/boot/forth/delay.4th head/sys/boot/forth/delay.4th.8 head/sys/boot/forth/menu-commands.4th head/sys/boot/forth/menu.4th head/sys/boot/forth/menu.4th.8 head/sys/boot/forth/shortcuts.4th head/sys/boot/forth/version.4th head/sys/boot/forth/version.4th.8 Modified: head/sys/boot/forth/beastie.4th ============================================================================== --- head/sys/boot/forth/beastie.4th Thu May 17 19:01:13 2012 (r235559) +++ head/sys/boot/forth/beastie.4th Thu May 17 20:00:34 2012 (r235560) @@ -1,6 +1,6 @@ \ Copyright (c) 2003 Scott Long \ Copyright (c) 2003 Aleksander Fafula -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/beastie.4th.8 ============================================================================== --- head/sys/boot/forth/beastie.4th.8 Thu May 17 19:01:13 2012 (r235559) +++ head/sys/boot/forth/beastie.4th.8 Thu May 17 20:00:34 2012 (r235560) @@ -168,4 +168,4 @@ set of commands was written by .An Scott Long Aq scottl@FreeBSD.org , .An Aleksander Fafula Aq alex@fafula.com and -.An Devin Teske Aq devinteske@hotmail.com . +.An Devin Teske Aq dteske@freebsd.org . Modified: head/sys/boot/forth/brand.4th ============================================================================== --- head/sys/boot/forth/brand.4th Thu May 17 19:01:13 2012 (r235559) +++ head/sys/boot/forth/brand.4th Thu May 17 20:00:34 2012 (r235560) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/brand.4th.8 ============================================================================== --- head/sys/boot/forth/brand.4th.8 Thu May 17 19:01:13 2012 (r235559) +++ head/sys/boot/forth/brand.4th.8 Thu May 17 20:00:34 2012 (r235560) @@ -122,4 +122,4 @@ The .Nm set of commands was written by .An -nosplit -.An Devin Teske Aq devinteske@hotmail.com . +.An Devin Teske Aq dteske@freebsd.org . Modified: head/sys/boot/forth/check-password.4th ============================================================================== --- head/sys/boot/forth/check-password.4th Thu May 17 19:01:13 2012 (r235559) +++ head/sys/boot/forth/check-password.4th Thu May 17 20:00:34 2012 (r235560) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/check-password.4th.8 ============================================================================== --- head/sys/boot/forth/check-password.4th.8 Thu May 17 19:01:13 2012 (r235559) +++ head/sys/boot/forth/check-password.4th.8 Thu May 17 20:00:34 2012 (r235560) @@ -120,4 +120,4 @@ The .Nm set of commands was written by .An -nosplit -.An Devin Teske Aq devinteske@hotmail.com . +.An Devin Teske Aq dteske@freebsd.org . Modified: head/sys/boot/forth/color.4th ============================================================================== --- head/sys/boot/forth/color.4th Thu May 17 19:01:13 2012 (r235559) +++ head/sys/boot/forth/color.4th Thu May 17 20:00:34 2012 (r235560) @@ -1,4 +1,4 @@ -\ Copyright (c) 2011 Devin Teske +\ Copyright (c) 2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/color.4th.8 ============================================================================== --- head/sys/boot/forth/color.4th.8 Thu May 17 19:01:13 2012 (r235559) +++ head/sys/boot/forth/color.4th.8 Thu May 17 20:00:34 2012 (r235560) @@ -114,4 +114,4 @@ The .Nm set of commands was written by .An -nosplit -.An Devin Teske Aq devinteske@hotmail.com . +.An Devin Teske Aq dteske@freebsd.org . Modified: head/sys/boot/forth/delay.4th ============================================================================== --- head/sys/boot/forth/delay.4th Thu May 17 19:01:13 2012 (r235559) +++ head/sys/boot/forth/delay.4th Thu May 17 20:00:34 2012 (r235560) @@ -1,4 +1,4 @@ -\ Copyright (c) 2008-2011 Devin Teske +\ Copyright (c) 2008-2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/delay.4th.8 ============================================================================== --- head/sys/boot/forth/delay.4th.8 Thu May 17 19:01:13 2012 (r235559) +++ head/sys/boot/forth/delay.4th.8 Thu May 17 20:00:34 2012 (r235560) @@ -123,4 +123,4 @@ The .Nm set of commands was written by .An -nosplit -.An Devin Teske Aq devinteske@hotmail.com . +.An Devin Teske Aq dteske@freebsd.org . Modified: head/sys/boot/forth/menu-commands.4th ============================================================================== --- head/sys/boot/forth/menu-commands.4th Thu May 17 19:01:13 2012 (r235559) +++ head/sys/boot/forth/menu-commands.4th Thu May 17 20:00:34 2012 (r235560) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/menu.4th ============================================================================== --- head/sys/boot/forth/menu.4th Thu May 17 19:01:13 2012 (r235559) +++ head/sys/boot/forth/menu.4th Thu May 17 20:00:34 2012 (r235560) @@ -1,6 +1,6 @@ \ Copyright (c) 2003 Scott Long \ Copyright (c) 2003 Aleksander Fafula -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/menu.4th.8 ============================================================================== --- head/sys/boot/forth/menu.4th.8 Thu May 17 19:01:13 2012 (r235559) +++ head/sys/boot/forth/menu.4th.8 Thu May 17 20:00:34 2012 (r235560) @@ -320,4 +320,4 @@ The .Nm set of commands was written by .An -nosplit -.An Devin Teske Aq devinteske@hotmail.com . +.An Devin Teske Aq dteske@freebsd.org . Modified: head/sys/boot/forth/shortcuts.4th ============================================================================== --- head/sys/boot/forth/shortcuts.4th Thu May 17 19:01:13 2012 (r235559) +++ head/sys/boot/forth/shortcuts.4th Thu May 17 20:00:34 2012 (r235560) @@ -1,4 +1,4 @@ -\ Copyright (c) 2008-2011 Devin Teske +\ Copyright (c) 2008-2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/version.4th ============================================================================== --- head/sys/boot/forth/version.4th Thu May 17 19:01:13 2012 (r235559) +++ head/sys/boot/forth/version.4th Thu May 17 20:00:34 2012 (r235560) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/version.4th.8 ============================================================================== --- head/sys/boot/forth/version.4th.8 Thu May 17 19:01:13 2012 (r235559) +++ head/sys/boot/forth/version.4th.8 Thu May 17 20:00:34 2012 (r235560) @@ -123,4 +123,4 @@ The .Nm set of commands was written by .An -nosplit -.An Devin Teske Aq devinteske@hotmail.com . +.An Devin Teske Aq dteske@freebsd.org . From owner-svn-src-all@FreeBSD.ORG Thu May 17 20:04:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 706BA1065672; Thu, 17 May 2012 20:04:25 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 586CE8FC15; Thu, 17 May 2012 20:04:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HK4Pma014801; Thu, 17 May 2012 20:04:25 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HK4PW2014799; Thu, 17 May 2012 20:04:25 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201205172004.q4HK4PW2014799@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 17 May 2012 20:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235561 - stable/9/sys/dev/netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 20:04:25 -0000 Author: luigi Date: Thu May 17 20:04:24 2012 New Revision: 235561 URL: http://svn.freebsd.org/changeset/base/235561 Log: forgot two files in the previous commit... Added: stable/9/sys/dev/netmap/netmap_mem1.c (contents, props changed) stable/9/sys/dev/netmap/netmap_mem2.c (contents, props changed) Added: stable/9/sys/dev/netmap/netmap_mem1.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/dev/netmap/netmap_mem1.c Thu May 17 20:04:24 2012 (r235561) @@ -0,0 +1,521 @@ +/* + * Copyright (C) 2011 Matteo Landi, Luigi Rizzo. 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$ + * + * The original netmap memory allocator, using a single large + * chunk of memory allocated with contigmalloc. + */ + +/* + * Default amount of memory pre-allocated by the module. + * We start with a large size and then shrink our demand + * according to what is avalable when the module is loaded. + */ +#define NETMAP_MEMORY_SIZE (64 * 1024 * PAGE_SIZE) +static void * netmap_malloc(size_t size, const char *msg); +static void netmap_free(void *addr, const char *msg); + +#define netmap_if_malloc(len) netmap_malloc(len, "nifp") +#define netmap_if_free(v) netmap_free((v), "nifp") + +#define netmap_ring_malloc(len) netmap_malloc(len, "ring") +#define netmap_free_rings(na) \ + netmap_free((na)->tx_rings[0].ring, "shadow rings"); + +/* + * Allocator for a pool of packet buffers. For each buffer we have + * one entry in the bitmap to signal the state. Allocation scans + * the bitmap, but since this is done only on attach, we are not + * too worried about performance + * XXX if we need to allocate small blocks, a translation + * table is used both for kernel virtual address and physical + * addresses. + */ +struct netmap_buf_pool { + u_int total_buffers; /* total buffers. */ + u_int free; + u_int bufsize; + char *base; /* buffer base address */ + uint32_t *bitmap; /* one bit per buffer, 1 means free */ +}; +struct netmap_buf_pool nm_buf_pool; +SYSCTL_INT(_dev_netmap, OID_AUTO, total_buffers, + CTLFLAG_RD, &nm_buf_pool.total_buffers, 0, "total_buffers"); +SYSCTL_INT(_dev_netmap, OID_AUTO, free_buffers, + CTLFLAG_RD, &nm_buf_pool.free, 0, "free_buffers"); + + +/* + * Allocate n buffers from the ring, and fill the slot. + * Buffer 0 is the 'junk' buffer. + */ +static void +netmap_new_bufs(struct netmap_if *nifp __unused, + struct netmap_slot *slot, u_int n) +{ + struct netmap_buf_pool *p = &nm_buf_pool; + uint32_t bi = 0; /* index in the bitmap */ + uint32_t mask, j, i = 0; /* slot counter */ + + if (n > p->free) { + D("only %d out of %d buffers available", i, n); + return; + } + /* termination is guaranteed by p->free */ + while (i < n && p->free > 0) { + uint32_t cur = p->bitmap[bi]; + if (cur == 0) { /* bitmask is fully used */ + bi++; + continue; + } + /* locate a slot */ + for (j = 0, mask = 1; (cur & mask) == 0; j++, mask <<= 1) ; + p->bitmap[bi] &= ~mask; /* slot in use */ + p->free--; + slot[i].buf_idx = bi*32+j; + slot[i].len = p->bufsize; + slot[i].flags = NS_BUF_CHANGED; + i++; + } + ND("allocated %d buffers, %d available", n, p->free); +} + + +static void +netmap_free_buf(struct netmap_if *nifp __unused, uint32_t i) +{ + struct netmap_buf_pool *p = &nm_buf_pool; + + uint32_t pos, mask; + if (i >= p->total_buffers) { + D("invalid free index %d", i); + return; + } + pos = i / 32; + mask = 1 << (i % 32); + if (p->bitmap[pos] & mask) { + D("slot %d already free", i); + return; + } + p->bitmap[pos] |= mask; + p->free++; +} + + +/* Descriptor of the memory objects handled by our memory allocator. */ +struct netmap_mem_obj { + TAILQ_ENTRY(netmap_mem_obj) nmo_next; /* next object in the + chain. */ + int nmo_used; /* flag set on used memory objects. */ + size_t nmo_size; /* size of the memory area reserved for the + object. */ + void *nmo_data; /* pointer to the memory area. */ +}; + +/* Wrap our memory objects to make them ``chainable``. */ +TAILQ_HEAD(netmap_mem_obj_h, netmap_mem_obj); + + +/* Descriptor of our custom memory allocator. */ +struct netmap_mem_d { + struct mtx nm_mtx; /* lock used to handle the chain of memory + objects. */ + struct netmap_mem_obj_h nm_molist; /* list of memory objects */ + size_t nm_size; /* total amount of memory used for rings etc. */ + size_t nm_totalsize; /* total amount of allocated memory + (the difference is used for buffers) */ + size_t nm_buf_start; /* offset of packet buffers. + This is page-aligned. */ + size_t nm_buf_len; /* total memory for buffers */ + void *nm_buffer; /* pointer to the whole pre-allocated memory + area. */ +}; + +/* Shorthand to compute a netmap interface offset. */ +#define netmap_if_offset(v) \ + ((char *) (v) - (char *) nm_mem->nm_buffer) +/* .. and get a physical address given a memory offset */ +#define netmap_ofstophys(o) \ + (vtophys(nm_mem->nm_buffer) + (o)) + + +/*------ netmap memory allocator -------*/ +/* + * Request for a chunk of memory. + * + * Memory objects are arranged into a list, hence we need to walk this + * list until we find an object with the needed amount of data free. + * This sounds like a completely inefficient implementation, but given + * the fact that data allocation is done once, we can handle it + * flawlessly. + * + * Return NULL on failure. + */ +static void * +netmap_malloc(size_t size, __unused const char *msg) +{ + struct netmap_mem_obj *mem_obj, *new_mem_obj; + void *ret = NULL; + + NMA_LOCK(); + TAILQ_FOREACH(mem_obj, &nm_mem->nm_molist, nmo_next) { + if (mem_obj->nmo_used != 0 || mem_obj->nmo_size < size) + continue; + + new_mem_obj = malloc(sizeof(struct netmap_mem_obj), M_NETMAP, + M_WAITOK | M_ZERO); + TAILQ_INSERT_BEFORE(mem_obj, new_mem_obj, nmo_next); + + new_mem_obj->nmo_used = 1; + new_mem_obj->nmo_size = size; + new_mem_obj->nmo_data = mem_obj->nmo_data; + memset(new_mem_obj->nmo_data, 0, new_mem_obj->nmo_size); + + mem_obj->nmo_size -= size; + mem_obj->nmo_data = (char *) mem_obj->nmo_data + size; + if (mem_obj->nmo_size == 0) { + TAILQ_REMOVE(&nm_mem->nm_molist, mem_obj, + nmo_next); + free(mem_obj, M_NETMAP); + } + + ret = new_mem_obj->nmo_data; + + break; + } + NMA_UNLOCK(); + ND("%s: %d bytes at %p", msg, size, ret); + + return (ret); +} + +/* + * Return the memory to the allocator. + * + * While freeing a memory object, we try to merge adjacent chunks in + * order to reduce memory fragmentation. + */ +static void +netmap_free(void *addr, const char *msg) +{ + size_t size; + struct netmap_mem_obj *cur, *prev, *next; + + if (addr == NULL) { + D("NULL addr for %s", msg); + return; + } + + NMA_LOCK(); + TAILQ_FOREACH(cur, &nm_mem->nm_molist, nmo_next) { + if (cur->nmo_data == addr && cur->nmo_used) + break; + } + if (cur == NULL) { + NMA_UNLOCK(); + D("invalid addr %s %p", msg, addr); + return; + } + + size = cur->nmo_size; + cur->nmo_used = 0; + + /* merge current chunk of memory with the previous one, + if present. */ + prev = TAILQ_PREV(cur, netmap_mem_obj_h, nmo_next); + if (prev && prev->nmo_used == 0) { + TAILQ_REMOVE(&nm_mem->nm_molist, cur, nmo_next); + prev->nmo_size += cur->nmo_size; + free(cur, M_NETMAP); + cur = prev; + } + + /* merge with the next one */ + next = TAILQ_NEXT(cur, nmo_next); + if (next && next->nmo_used == 0) { + TAILQ_REMOVE(&nm_mem->nm_molist, next, nmo_next); + cur->nmo_size += next->nmo_size; + free(next, M_NETMAP); + } + NMA_UNLOCK(); + ND("freed %s %d bytes at %p", msg, size, addr); +} + + +/* + * Create and return a new ``netmap_if`` object, and possibly also + * rings and packet buffors. + * + * Return NULL on failure. + */ +static void * +netmap_if_new(const char *ifname, struct netmap_adapter *na) +{ + struct netmap_if *nifp; + struct netmap_ring *ring; + struct netmap_kring *kring; + char *buff; + u_int i, len, ofs, numdesc; + u_int nrx = na->num_rx_rings + 1; /* shorthand, include stack queue */ + u_int ntx = na->num_tx_rings + 1; /* shorthand, include stack queue */ + + /* + * the descriptor is followed inline by an array of offsets + * to the tx and rx rings in the shared memory region. + */ + len = sizeof(struct netmap_if) + (nrx + ntx) * sizeof(ssize_t); + nifp = netmap_if_malloc(len); + if (nifp == NULL) + return (NULL); + + /* initialize base fields */ + *(int *)(uintptr_t)&nifp->ni_rx_rings = na->num_rx_rings; + *(int *)(uintptr_t)&nifp->ni_tx_rings = na->num_tx_rings; + strncpy(nifp->ni_name, ifname, IFNAMSIZ); + + (na->refcount)++; /* XXX atomic ? we are under lock */ + if (na->refcount > 1) + goto final; + + /* + * First instance. Allocate the netmap rings + * (one for each hw queue, one pair for the host). + * The rings are contiguous, but have variable size. + * The entire block is reachable at + * na->tx_rings[0] + */ + len = (ntx + nrx) * sizeof(struct netmap_ring) + + (ntx * na->num_tx_desc + nrx * na->num_rx_desc) * + sizeof(struct netmap_slot); + buff = netmap_ring_malloc(len); + if (buff == NULL) { + D("failed to allocate %d bytes for %s shadow ring", + len, ifname); +error: + (na->refcount)--; + netmap_if_free(nifp); + return (NULL); + } + /* Check whether we have enough buffers */ + len = ntx * na->num_tx_desc + nrx * na->num_rx_desc; + NMA_LOCK(); + if (nm_buf_pool.free < len) { + NMA_UNLOCK(); + netmap_free(buff, "not enough bufs"); + goto error; + } + /* + * in the kring, store the pointers to the shared rings + * and initialize the rings. We are under NMA_LOCK(). + */ + ofs = 0; + for (i = 0; i < ntx; i++) { /* Transmit rings */ + kring = &na->tx_rings[i]; + numdesc = na->num_tx_desc; + bzero(kring, sizeof(*kring)); + kring->na = na; + + ring = kring->ring = (struct netmap_ring *)(buff + ofs); + *(ssize_t *)(uintptr_t)&ring->buf_ofs = + nm_buf_pool.base - (char *)ring; + ND("txring[%d] at %p ofs %d", i, ring, ring->buf_ofs); + *(uint32_t *)(uintptr_t)&ring->num_slots = + kring->nkr_num_slots = numdesc; + + /* + * IMPORTANT: + * Always keep one slot empty, so we can detect new + * transmissions comparing cur and nr_hwcur (they are + * the same only if there are no new transmissions). + */ + ring->avail = kring->nr_hwavail = numdesc - 1; + ring->cur = kring->nr_hwcur = 0; + *(uint16_t *)(uintptr_t)&ring->nr_buf_size = NETMAP_BUF_SIZE; + netmap_new_bufs(nifp, ring->slot, numdesc); + + ofs += sizeof(struct netmap_ring) + + numdesc * sizeof(struct netmap_slot); + } + + for (i = 0; i < nrx; i++) { /* Receive rings */ + kring = &na->rx_rings[i]; + numdesc = na->num_rx_desc; + bzero(kring, sizeof(*kring)); + kring->na = na; + + ring = kring->ring = (struct netmap_ring *)(buff + ofs); + *(ssize_t *)(uintptr_t)&ring->buf_ofs = + nm_buf_pool.base - (char *)ring; + ND("rxring[%d] at %p offset %d", i, ring, ring->buf_ofs); + *(uint32_t *)(uintptr_t)&ring->num_slots = + kring->nkr_num_slots = numdesc; + ring->cur = kring->nr_hwcur = 0; + ring->avail = kring->nr_hwavail = 0; /* empty */ + *(uint16_t *)(uintptr_t)&ring->nr_buf_size = NETMAP_BUF_SIZE; + netmap_new_bufs(nifp, ring->slot, numdesc); + ofs += sizeof(struct netmap_ring) + + numdesc * sizeof(struct netmap_slot); + } + NMA_UNLOCK(); + // XXX initialize the selrecord structs. + +final: + /* + * fill the slots for the rx and tx queues. They contain the offset + * between the ring and nifp, so the information is usable in + * userspace to reach the ring from the nifp. + */ + for (i = 0; i < ntx; i++) { + *(ssize_t *)(uintptr_t)&nifp->ring_ofs[i] = + (char *)na->tx_rings[i].ring - (char *)nifp; + } + for (i = 0; i < nrx; i++) { + *(ssize_t *)(uintptr_t)&nifp->ring_ofs[i+ntx] = + (char *)na->rx_rings[i].ring - (char *)nifp; + } + return (nifp); +} + +/* + * Initialize the memory allocator. + * + * Create the descriptor for the memory , allocate the pool of memory + * and initialize the list of memory objects with a single chunk + * containing the whole pre-allocated memory marked as free. + * + * Start with a large size, then halve as needed if we fail to + * allocate the block. While halving, always add one extra page + * because buffers 0 and 1 are used for special purposes. + * Return 0 on success, errno otherwise. + */ +static int +netmap_memory_init(void) +{ + struct netmap_mem_obj *mem_obj; + void *buf = NULL; + int i, n, sz = NETMAP_MEMORY_SIZE; + int extra_sz = 0; // space for rings and two spare buffers + + for (; sz >= 1<<20; sz >>=1) { + extra_sz = sz/200; + extra_sz = (extra_sz + 2*PAGE_SIZE - 1) & ~(PAGE_SIZE-1); + buf = contigmalloc(sz + extra_sz, + M_NETMAP, + M_WAITOK | M_ZERO, + 0, /* low address */ + -1UL, /* high address */ + PAGE_SIZE, /* alignment */ + 0 /* boundary */ + ); + if (buf) + break; + } + if (buf == NULL) + return (ENOMEM); + sz += extra_sz; + nm_mem = malloc(sizeof(struct netmap_mem_d), M_NETMAP, + M_WAITOK | M_ZERO); + mtx_init(&nm_mem->nm_mtx, "netmap memory allocator lock", NULL, + MTX_DEF); + TAILQ_INIT(&nm_mem->nm_molist); + nm_mem->nm_buffer = buf; + nm_mem->nm_totalsize = sz; + + /* + * A buffer takes 2k, a slot takes 8 bytes + ring overhead, + * so the ratio is 200:1. In other words, we can use 1/200 of + * the memory for the rings, and the rest for the buffers, + * and be sure we never run out. + */ + nm_mem->nm_size = sz/200; + nm_mem->nm_buf_start = + (nm_mem->nm_size + PAGE_SIZE - 1) & ~(PAGE_SIZE-1); + nm_mem->nm_buf_len = sz - nm_mem->nm_buf_start; + + nm_buf_pool.base = nm_mem->nm_buffer; + nm_buf_pool.base += nm_mem->nm_buf_start; + netmap_buffer_base = nm_buf_pool.base; + D("netmap_buffer_base %p (offset %d)", + netmap_buffer_base, (int)nm_mem->nm_buf_start); + /* number of buffers, they all start as free */ + + netmap_total_buffers = nm_buf_pool.total_buffers = + nm_mem->nm_buf_len / NETMAP_BUF_SIZE; + nm_buf_pool.bufsize = NETMAP_BUF_SIZE; + + D("Have %d MB, use %dKB for rings, %d buffers at %p", + (sz >> 20), (int)(nm_mem->nm_size >> 10), + nm_buf_pool.total_buffers, nm_buf_pool.base); + + /* allocate and initialize the bitmap. Entry 0 is considered + * always busy (used as default when there are no buffers left). + */ + n = (nm_buf_pool.total_buffers + 31) / 32; + nm_buf_pool.bitmap = malloc(sizeof(uint32_t) * n, M_NETMAP, + M_WAITOK | M_ZERO); + nm_buf_pool.bitmap[0] = ~3; /* slot 0 and 1 always busy */ + for (i = 1; i < n; i++) + nm_buf_pool.bitmap[i] = ~0; + nm_buf_pool.free = nm_buf_pool.total_buffers - 2; + + mem_obj = malloc(sizeof(struct netmap_mem_obj), M_NETMAP, + M_WAITOK | M_ZERO); + TAILQ_INSERT_HEAD(&nm_mem->nm_molist, mem_obj, nmo_next); + mem_obj->nmo_used = 0; + mem_obj->nmo_size = nm_mem->nm_size; + mem_obj->nmo_data = nm_mem->nm_buffer; + + return (0); +} + + +/* + * Finalize the memory allocator. + * + * Free all the memory objects contained inside the list, and deallocate + * the pool of memory; finally free the memory allocator descriptor. + */ +static void +netmap_memory_fini(void) +{ + struct netmap_mem_obj *mem_obj; + + while (!TAILQ_EMPTY(&nm_mem->nm_molist)) { + mem_obj = TAILQ_FIRST(&nm_mem->nm_molist); + TAILQ_REMOVE(&nm_mem->nm_molist, mem_obj, nmo_next); + if (mem_obj->nmo_used == 1) { + printf("netmap: leaked %d bytes at %p\n", + (int)mem_obj->nmo_size, + mem_obj->nmo_data); + } + free(mem_obj, M_NETMAP); + } + contigfree(nm_mem->nm_buffer, nm_mem->nm_totalsize, M_NETMAP); + // XXX mutex_destroy(nm_mtx); + free(nm_mem, M_NETMAP); +} +/*------------- end of memory allocator -----------------*/ Added: stable/9/sys/dev/netmap/netmap_mem2.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/dev/netmap/netmap_mem2.c Thu May 17 20:04:24 2012 (r235561) @@ -0,0 +1,720 @@ +/* + * Copyright (C) 2012 Matteo Landi, Luigi Rizzo. 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$ + * $Id: netmap_mem2.c 10830 2012-03-22 18:06:01Z luigi $ + * + * New memory allocator for netmap + */ + +/* + * The new version allocates three regions: + * nm_if_pool for the struct netmap_if + * nm_ring_pool for the struct netmap_ring + * nm_buf_pool for the packet buffers. + * + * All regions need to be page-sized as we export them to + * userspace through mmap. Only the latter need to be dma-able, + * but for convenience use the same type of allocator for all. + * + * Once mapped, the three regions are exported to userspace + * as a contiguous block, starting from nm_if_pool. Each + * cluster (and pool) is an integral number of pages. + * [ . . . ][ . . . . . .][ . . . . . . . . . .] + * nm_if nm_ring nm_buf + * + * The userspace areas contain offsets of the objects in userspace. + * When (at init time) we write these offsets, we find out the index + * of the object, and from there locate the offset from the beginning + * of the region. + * + * Allocator for a pool of memory objects of the same size. + * The pool is split into smaller clusters, whose size is a + * multiple of the page size. The cluster size is chosen + * to minimize the waste for a given max cluster size + * (we do it by brute force, as we have relatively few object + * per cluster). + * + * To be polite with the cache, objects are aligned to + * the cache line, or 64 bytes. Sizes are rounded to multiple of 64. + * For each object we have + * one entry in the bitmap to signal the state. Allocation scans + * the bitmap, but since this is done only on attach, we are not + * too worried about performance + */ + +/* + * MEMORY SIZES: + * + * (all the parameters below will become tunables) + * + * struct netmap_if is variable size but small. + * Assuming each NIC has 8+2 rings, (4+1 tx, 4+1 rx) the netmap_if + * uses 120 bytes on a 64-bit machine. + * We allocate NETMAP_IF_MAX_SIZE (1024) which should work even for + * cards with 48 ring pairs. + * The total number of 'struct netmap_if' could be slightly larger + * that the total number of rings on all interfaces on the system. + */ +#define NETMAP_IF_MAX_SIZE 1024 +#define NETMAP_IF_MAX_NUM 512 + +/* + * netmap rings are up to 2..4k descriptors, 8 bytes each, + * plus some glue at the beginning (32 bytes). + * We set the default ring size to 9 pages (36K) and enable + * a few hundreds of them. + */ +#define NETMAP_RING_MAX_SIZE (9*PAGE_SIZE) +#define NETMAP_RING_MAX_NUM 200 /* approx 8MB */ + +/* + * Buffers: the more the better. Buffer size is NETMAP_BUF_SIZE, + * 2k or slightly less, aligned to 64 bytes. + * A large 10G interface can have 2k*18 = 36k buffers per interface, + * or about 72MB of memory. Up to us to use more. + */ +#ifndef CONSERVATIVE +#define NETMAP_BUF_MAX_NUM 100000 /* 200MB */ +#else /* CONSERVATIVE */ +#define NETMAP_BUF_MAX_NUM 20000 /* 40MB */ +#endif + + +struct netmap_obj_pool { + char name[16]; /* name of the allocator */ + u_int objtotal; /* actual total number of objects. */ + u_int objfree; /* number of free objects. */ + u_int clustentries; /* actual objects per cluster */ + + /* the total memory space is _numclusters*_clustsize */ + u_int _numclusters; /* how many clusters */ + u_int _clustsize; /* cluster size */ + u_int _objsize; /* actual object size */ + + u_int _memtotal; /* _numclusters*_clustsize */ + struct lut_entry *lut; /* virt,phys addresses, objtotal entries */ + uint32_t *bitmap; /* one bit per buffer, 1 means free */ +}; + +struct netmap_mem_d { + NM_LOCK_T nm_mtx; /* protect the allocator ? */ + u_int nm_totalsize; /* shorthand */ + + /* pointers to the three allocators */ + struct netmap_obj_pool *nm_if_pool; + struct netmap_obj_pool *nm_ring_pool; + struct netmap_obj_pool *nm_buf_pool; +}; + +struct lut_entry *netmap_buffer_lut; /* exported */ + + +/* + * Convert a userspace offset to a phisical address. + * XXX re-do in a simpler way. + * + * The idea here is to hide userspace applications the fact that pre-allocated + * memory is not contiguous, but fragmented across different clusters and + * smaller memory allocators. Consequently, first of all we need to find which + * allocator is owning provided offset, then we need to find out the physical + * address associated to target page (this is done using the look-up table. + */ +static inline vm_paddr_t +netmap_ofstophys(vm_offset_t offset) +{ + const struct netmap_obj_pool *p[] = { + nm_mem->nm_if_pool, + nm_mem->nm_ring_pool, + nm_mem->nm_buf_pool }; + int i; + vm_offset_t o = offset; + + + for (i = 0; i < 3; offset -= p[i]->_memtotal, i++) { + if (offset >= p[i]->_memtotal) + continue; + // XXX now scan the clusters + return p[i]->lut[offset / p[i]->_objsize].paddr + + offset % p[i]->_objsize; + } + D("invalid ofs 0x%x out of 0x%x 0x%x 0x%x", (u_int)o, + p[0]->_memtotal, p[0]->_memtotal + p[1]->_memtotal, + p[0]->_memtotal + p[1]->_memtotal + p[2]->_memtotal); + return 0; // XXX bad address +} + +/* + * we store objects by kernel address, need to find the offset + * within the pool to export the value to userspace. + * Algorithm: scan until we find the cluster, then add the + * actual offset in the cluster + */ +static ssize_t +netmap_obj_offset(struct netmap_obj_pool *p, const void *vaddr) +{ + int i, k = p->clustentries, n = p->objtotal; + ssize_t ofs = 0; + + for (i = 0; i < n; i += k, ofs += p->_clustsize) { + const char *base = p->lut[i].vaddr; + ssize_t relofs = (const char *) vaddr - base; + + if (relofs < 0 || relofs > p->_clustsize) + continue; + + ofs = ofs + relofs; + ND("%s: return offset %d (cluster %d) for pointer %p", + p->name, ofs, i, vaddr); + return ofs; + } + D("address %p is not contained inside any cluster (%s)", + vaddr, p->name); + return 0; /* An error occurred */ +} + +/* Helper functions which convert virtual addresses to offsets */ +#define netmap_if_offset(v) \ + netmap_obj_offset(nm_mem->nm_if_pool, (v)) + +#define netmap_ring_offset(v) \ + (nm_mem->nm_if_pool->_memtotal + \ + netmap_obj_offset(nm_mem->nm_ring_pool, (v))) + +#define netmap_buf_offset(v) \ + (nm_mem->nm_if_pool->_memtotal + \ + nm_mem->nm_ring_pool->_memtotal + \ + netmap_obj_offset(nm_mem->nm_buf_pool, (v))) + + +static void * +netmap_obj_malloc(struct netmap_obj_pool *p, int len) +{ + uint32_t i = 0; /* index in the bitmap */ + uint32_t mask, j; /* slot counter */ + void *vaddr = NULL; + + if (len > p->_objsize) { + D("%s request size %d too large", p->name, len); + // XXX cannot reduce the size + return NULL; + } + + if (p->objfree == 0) { + D("%s allocator: run out of memory", p->name); + return NULL; + } + + /* termination is guaranteed by p->free */ + while (vaddr == NULL) { + uint32_t cur = p->bitmap[i]; + if (cur == 0) { /* bitmask is fully used */ + i++; + continue; + } + /* locate a slot */ + for (j = 0, mask = 1; (cur & mask) == 0; j++, mask <<= 1) + ; + + p->bitmap[i] &= ~mask; /* mark object as in use */ + p->objfree--; + + vaddr = p->lut[i * 32 + j].vaddr; + } + ND("%s allocator: allocated object @ [%d][%d]: vaddr %p", i, j, vaddr); + + return vaddr; +} + + +/* + * free by index, not by address + */ +static void +netmap_obj_free(struct netmap_obj_pool *p, uint32_t j) +{ + if (j >= p->objtotal) { + D("invalid index %u, max %u", j, p->objtotal); + return; + } + p->bitmap[j / 32] |= (1 << (j % 32)); + p->objfree++; + return; +} + +static void +netmap_obj_free_va(struct netmap_obj_pool *p, void *vaddr) +{ + int i, j, n = p->_memtotal / p->_clustsize; + + for (i = 0, j = 0; i < n; i++, j += p->clustentries) { + void *base = p->lut[i * p->clustentries].vaddr; + ssize_t relofs = (ssize_t) vaddr - (ssize_t) base; + + /* Given address, is out of the scope of the current cluster.*/ + if (vaddr < base || relofs > p->_clustsize) + continue; + + j = j + relofs / p->_objsize; + KASSERT(j != 0, ("Cannot free object 0")); + netmap_obj_free(p, j); + return; + } + ND("address %p is not contained inside any cluster (%s)", + vaddr, p->name); +} + +#define netmap_if_malloc(len) netmap_obj_malloc(nm_mem->nm_if_pool, len) +#define netmap_if_free(v) netmap_obj_free_va(nm_mem->nm_if_pool, (v)) +#define netmap_ring_malloc(len) netmap_obj_malloc(nm_mem->nm_ring_pool, len) +#define netmap_buf_malloc() \ + netmap_obj_malloc(nm_mem->nm_buf_pool, NETMAP_BUF_SIZE) + + +/* Return the index associated to the given packet buffer */ +#define netmap_buf_index(v) \ + (netmap_obj_offset(nm_mem->nm_buf_pool, (v)) / nm_mem->nm_buf_pool->_objsize) + + +static void +netmap_new_bufs(struct netmap_if *nifp __unused, + struct netmap_slot *slot, u_int n) +{ + struct netmap_obj_pool *p = nm_mem->nm_buf_pool; + uint32_t i = 0; /* slot counter */ + + for (i = 0; i < n; i++) { + void *vaddr = netmap_buf_malloc(); + if (vaddr == NULL) { + D("unable to locate empty packet buffer"); + goto cleanup; + } + + slot[i].buf_idx = netmap_buf_index(vaddr); + KASSERT(slot[i].buf_idx != 0, + ("Assigning buf_idx=0 to just created slot")); + slot[i].len = p->_objsize; + slot[i].flags = NS_BUF_CHANGED; // XXX GAETANO hack + } + + ND("allocated %d buffers, %d available", n, p->objfree); + return; + +cleanup: + for (i--; i >= 0; i--) { + netmap_obj_free(nm_mem->nm_buf_pool, slot[i].buf_idx); + } +} + + +static void +netmap_free_buf(struct netmap_if *nifp, uint32_t i) +{ + struct netmap_obj_pool *p = nm_mem->nm_buf_pool; + if (i < 2 || i >= p->objtotal) { + D("Cannot free buf#%d: should be in [2, %d[", i, p->objtotal); + return; + } + netmap_obj_free(nm_mem->nm_buf_pool, i); +} + + +/* + * Free all resources related to an allocator. + */ +static void +netmap_destroy_obj_allocator(struct netmap_obj_pool *p) +{ + if (p == NULL) + return; + if (p->bitmap) + free(p->bitmap, M_NETMAP); + if (p->lut) { + int i; + for (i = 0; i < p->objtotal; i += p->clustentries) { + if (p->lut[i].vaddr) + contigfree(p->lut[i].vaddr, p->_clustsize, M_NETMAP); + } + bzero(p->lut, sizeof(struct lut_entry) * p->objtotal); + free(p->lut, M_NETMAP); + } + bzero(p, sizeof(*p)); + free(p, M_NETMAP); +} + +/* + * We receive a request for objtotal objects, of size objsize each. + * Internally we may round up both numbers, as we allocate objects + * in small clusters multiple of the page size. + * In the allocator we don't need to store the objsize, + * but we do need to keep track of objtotal' and clustentries, + * as they are needed when freeing memory. + * + * XXX note -- userspace needs the buffers to be contiguous, + * so we cannot afford gaps at the end of a cluster. + */ +static struct netmap_obj_pool * +netmap_new_obj_allocator(const char *name, u_int objtotal, u_int objsize) +{ + struct netmap_obj_pool *p; + int i, n; + u_int clustsize; /* the cluster size, multiple of page size */ + u_int clustentries; /* how many objects per entry */ + +#define MAX_CLUSTSIZE (1<<17) +#define LINE_ROUND 64 + if (objsize >= MAX_CLUSTSIZE) { + /* we could do it but there is no point */ + D("unsupported allocation for %d bytes", objsize); + return NULL; + } + /* make sure objsize is a multiple of LINE_ROUND */ + i = (objsize & (LINE_ROUND - 1)); + if (i) { + D("XXX aligning object by %d bytes", LINE_ROUND - i); + objsize += LINE_ROUND - i; + } + /* + * Compute number of objects using a brute-force approach: + * given a max cluster size, + * we try to fill it with objects keeping track of the + * wasted space to the next page boundary. + */ + for (clustentries = 0, i = 1;; i++) { + u_int delta, used = i * objsize; + if (used > MAX_CLUSTSIZE) + break; + delta = used % PAGE_SIZE; + if (delta == 0) { // exact solution + clustentries = i; + break; + } + if (delta > ( (clustentries*objsize) % PAGE_SIZE) ) + clustentries = i; + } + // D("XXX --- ouch, delta %d (bad for buffers)", delta); + /* compute clustsize and round to the next page */ + clustsize = clustentries * objsize; + i = (clustsize & (PAGE_SIZE - 1)); + if (i) + clustsize += PAGE_SIZE - i; + D("objsize %d clustsize %d objects %d", + objsize, clustsize, clustentries); + + p = malloc(sizeof(struct netmap_obj_pool), M_NETMAP, + M_WAITOK | M_ZERO); + if (p == NULL) { + D("Unable to create '%s' allocator", name); + return NULL; + } + /* + * Allocate and initialize the lookup table. + * + * The number of clusters is n = ceil(objtotal/clustentries) + * objtotal' = n * clustentries + */ + strncpy(p->name, name, sizeof(p->name)); + p->clustentries = clustentries; + p->_clustsize = clustsize; + n = (objtotal + clustentries - 1) / clustentries; + p->_numclusters = n; + p->objtotal = n * clustentries; + p->objfree = p->objtotal - 2; /* obj 0 and 1 are reserved */ + p->_objsize = objsize; + p->_memtotal = p->_numclusters * p->_clustsize; + + p->lut = malloc(sizeof(struct lut_entry) * p->objtotal, + M_NETMAP, M_WAITOK | M_ZERO); + if (p->lut == NULL) { + D("Unable to create lookup table for '%s' allocator", name); + goto clean; + } + + /* Allocate the bitmap */ + n = (p->objtotal + 31) / 32; + p->bitmap = malloc(sizeof(uint32_t) * n, M_NETMAP, M_WAITOK | M_ZERO); + if (p->bitmap == NULL) { + D("Unable to create bitmap (%d entries) for allocator '%s'", n, + name); + goto clean; + } + + /* + * Allocate clusters, init pointers and bitmap + */ + for (i = 0; i < p->objtotal;) { + int lim = i + clustentries; + char *clust; + + clust = contigmalloc(clustsize, M_NETMAP, M_WAITOK | M_ZERO, + 0, -1UL, PAGE_SIZE, 0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu May 17 20:05:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DAFA106564A; Thu, 17 May 2012 20:05:14 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FB288FC1C; Thu, 17 May 2012 20:05:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HK5EA5014861; Thu, 17 May 2012 20:05:14 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HK5EOi014860; Thu, 17 May 2012 20:05:14 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201205172005.q4HK5EOi014860@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 17 May 2012 20:05:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235562 - head/sys/dev/netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 20:05:14 -0000 Author: luigi Date: Thu May 17 20:05:13 2012 New Revision: 235562 URL: http://svn.freebsd.org/changeset/base/235562 Log: this file is too old and not interesting anymore now that netmap has been MFC'ed. Deleted: head/sys/dev/netmap/head.diff From owner-svn-src-all@FreeBSD.ORG Thu May 17 20:21:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9A1841065675; Thu, 17 May 2012 20:21:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 855BE8FC1A; Thu, 17 May 2012 20:21:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HKLuN2015427; Thu, 17 May 2012 20:21:56 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HKLuGE015425; Thu, 17 May 2012 20:21:56 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205172021.q4HKLuGE015425@svn.freebsd.org> From: John Baldwin Date: Thu, 17 May 2012 20:21:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235563 - head/sys/x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 20:21:56 -0000 Author: jhb Date: Thu May 17 20:21:55 2012 New Revision: 235563 URL: http://svn.freebsd.org/changeset/base/235563 Log: Don't expose i386-only ptrace constants on amd64. This broke gdb with libthread_db on amd64. Reported by: avg Modified: head/sys/x86/include/ptrace.h Modified: head/sys/x86/include/ptrace.h ============================================================================== --- head/sys/x86/include/ptrace.h Thu May 17 20:05:13 2012 (r235562) +++ head/sys/x86/include/ptrace.h Thu May 17 20:21:55 2012 (r235563) @@ -40,8 +40,10 @@ * PT_GETXSTATE and PT_SETXSTATE. They should not be (re)used. */ -#define PT_GETXMMREGS (PT_FIRSTMACH + 0) /* i386 only */ -#define PT_SETXMMREGS (PT_FIRSTMACH + 1) /* i386 only */ +#ifdef __i386__ +#define PT_GETXMMREGS (PT_FIRSTMACH + 0) +#define PT_SETXMMREGS (PT_FIRSTMACH + 1) +#endif #define PT_GETXSTATE (PT_FIRSTMACH + 2) #define PT_SETXSTATE (PT_FIRSTMACH + 3) From owner-svn-src-all@FreeBSD.ORG Thu May 17 20:24:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 4140D1065673; Thu, 17 May 2012 20:24:34 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 68EF42019FF; Thu, 17 May 2012 20:23:36 +0000 (UTC) Message-ID: <4FB55E47.4050202@FreeBSD.org> Date: Thu, 17 May 2012 13:23:35 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120506 Thunderbird/12.0.1 MIME-Version: 1.0 To: Devin Teske References: <201205172000.q4HK0ZLw014389@svn.freebsd.org> In-Reply-To: <201205172000.q4HK0ZLw014389@svn.freebsd.org> X-Enigmail-Version: 1.5pre OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, emaste@FreeBSD.org Subject: Re: svn commit: r235560 - head/sys/boot/forth X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 20:24:34 -0000 On 05/17/2012 13:00, Devin Teske wrote: > Author: dteske > Date: Thu May 17 20:00:34 2012 > New Revision: 235560 > URL: http://svn.freebsd.org/changeset/base/235560 > > Log: > Update contact info. > > PR: N/A (mentor approved) > Submitted by: dteske > Reviewed by: dteske (mentor approved) All of the above is wrong. Your mentor should be helping you understand how to properly do commit messages. > +.An Devin Teske Aq dteske@freebsd.org . In formal contex' we write @FreeBSD.org, FYI. hth, Doug From owner-svn-src-all@FreeBSD.ORG Thu May 17 20:27:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A07F3106564A; Thu, 17 May 2012 20:27:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B20A8FC0C; Thu, 17 May 2012 20:27:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HKRO61015679; Thu, 17 May 2012 20:27:24 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HKRO2x015677; Thu, 17 May 2012 20:27:24 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205172027.q4HKRO2x015677@svn.freebsd.org> From: John Baldwin Date: Thu, 17 May 2012 20:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235564 - in stable/9/sys: amd64/include i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 20:27:24 -0000 Author: jhb Date: Thu May 17 20:27:24 2012 New Revision: 235564 URL: http://svn.freebsd.org/changeset/base/235564 Log: MFC 235563: Don't expose i386-only ptrace constants on amd64. This broke gdb with libthread_db on amd64. Modified: stable/9/sys/amd64/include/ptrace.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/amd64/include/ptrace.h ============================================================================== --- stable/9/sys/amd64/include/ptrace.h Thu May 17 20:21:55 2012 (r235563) +++ stable/9/sys/amd64/include/ptrace.h Thu May 17 20:27:24 2012 (r235564) @@ -40,8 +40,6 @@ * PT_GETXSTATE and PT_SETXSTATE. They should not be (re)used. */ -#define PT_GETXMMREGS (PT_FIRSTMACH + 0) /* i386 only */ -#define PT_SETXMMREGS (PT_FIRSTMACH + 1) /* i386 only */ #define PT_GETXSTATE (PT_FIRSTMACH + 2) #define PT_SETXSTATE (PT_FIRSTMACH + 3) From owner-svn-src-all@FreeBSD.ORG Thu May 17 20:29:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 81DD3106566B; Thu, 17 May 2012 20:29:16 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53A078FC0C; Thu, 17 May 2012 20:29:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HKTGYw015780; Thu, 17 May 2012 20:29:16 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HKTGt3015778; Thu, 17 May 2012 20:29:16 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205172029.q4HKTGt3015778@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 17 May 2012 20:29:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235565 - head/bin/rcp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 20:29:16 -0000 Author: marcel Date: Thu May 17 20:29:15 2012 New Revision: 235565 URL: http://svn.freebsd.org/changeset/base/235565 Log: Remove unused header (libutil.h) Modified: head/bin/rcp/rcp.c Modified: head/bin/rcp/rcp.c ============================================================================== --- head/bin/rcp/rcp.c Thu May 17 20:27:24 2012 (r235564) +++ head/bin/rcp/rcp.c Thu May 17 20:29:15 2012 (r235565) @@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Thu May 17 20:36:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C3979106564A; Thu, 17 May 2012 20:36:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 977BD8FC19; Thu, 17 May 2012 20:36:21 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 65BF2B91A; Thu, 17 May 2012 16:36:20 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Thu, 17 May 2012 16:36:01 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201205172027.q4HKRO2x015677@svn.freebsd.org> In-Reply-To: <201205172027.q4HKRO2x015677@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201205171636.01383.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 17 May 2012 16:36:21 -0400 (EDT) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r235564 - in stable/9/sys: amd64/include i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 20:36:21 -0000 On Thursday, May 17, 2012 4:27:24 pm John Baldwin wrote: > Author: jhb > Date: Thu May 17 20:27:24 2012 > New Revision: 235564 > URL: http://svn.freebsd.org/changeset/base/235564 > > Log: > MFC 235563: > Don't expose i386-only ptrace constants on amd64. This broke gdb with > libthread_db on amd64. I saw Andriy's bug report on IRC about gdb being broken about 15 minutes or so after merging the change that exposed this bug (r235559) to 9. I then had a choice of either reverting 235559 or instant MFC'ing the fix so that stable/9 would only be broken for an hour or so. Given how simple the fix was, I went with merging the fix rather than doing a revert. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu May 17 20:38:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 602CA1065675; Thu, 17 May 2012 20:38:02 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C2848FC16; Thu, 17 May 2012 20:38:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HKc2oj016088; Thu, 17 May 2012 20:38:02 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HKc2HM016086; Thu, 17 May 2012 20:38:02 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205172038.q4HKc2HM016086@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 17 May 2012 20:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235566 - head/gnu/lib/csu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 20:38:02 -0000 Author: marcel Date: Thu May 17 20:38:01 2012 New Revision: 235566 URL: http://svn.freebsd.org/changeset/base/235566 Log: Build the "S" objects with the same name they get installed under. That is, build crtbeginS.o and crtendS.o instead of crtbegin.So and crtend.So. Remove the name substitution during install. Obtained from: Juniper Networks, Inc. Modified: head/gnu/lib/csu/Makefile Modified: head/gnu/lib/csu/Makefile ============================================================================== --- head/gnu/lib/csu/Makefile Thu May 17 20:29:15 2012 (r235565) +++ head/gnu/lib/csu/Makefile Thu May 17 20:38:01 2012 (r235566) @@ -12,7 +12,7 @@ CCDIR= ${.CURDIR}/../../usr.bin/cc SRCS= crtstuff.c tconfig.h tm.h options.h OBJS= crtbegin.o crtend.o crtbeginT.o -SOBJS= crtbegin.So crtend.So +SOBJS= crtbeginS.o crtendS.o CSTD?= gnu89 CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3 CFLAGS+= -finhibit-size-directive -fno-inline-functions \ @@ -55,7 +55,7 @@ crtbeginT.o: ${BEGINSRC} ${CC} ${CFLAGS} -g0 -DCRT_BEGIN -DCRTSTUFFT_O \ -c -o ${.TARGET} ${.ALLSRC:N*.h} -crtbegin.So: ${BEGINSRC} +crtbeginS.o: ${BEGINSRC} ${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \ -c -o ${.TARGET} ${.ALLSRC:N*.h} @@ -63,7 +63,7 @@ crtend.o: ${ENDSRC} ${CC} ${CFLAGS} -g0 -DCRT_END \ -c -o ${.TARGET} ${.ALLSRC:N*.h} -crtend.So: ${ENDSRC} +crtendS.o: ${ENDSRC} ${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \ -c -o ${.TARGET} ${.ALLSRC:N*.h} @@ -74,7 +74,7 @@ tm.h tconfig.h options.h: ${CCDIR}/cc_to realinstall: .for file in ${OBJS} ${SOBJS} ${TGTOBJS} ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${file} ${DESTDIR}${LIBDIR}/${file:S/.So$/S.o/} + ${file} ${DESTDIR}${LIBDIR}/${file} .endfor .include From owner-svn-src-all@FreeBSD.ORG Thu May 17 20:49:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7B01106564A; Thu, 17 May 2012 20:49:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C14338FC16; Thu, 17 May 2012 20:49:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HKninW016544; Thu, 17 May 2012 20:49:44 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HKniGJ016542; Thu, 17 May 2012 20:49:44 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205172049.q4HKniGJ016542@svn.freebsd.org> From: Glen Barber Date: Thu, 17 May 2012 20:49:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235567 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 20:49:44 -0000 Author: gjb (doc committer) Date: Thu May 17 20:49:44 2012 New Revision: 235567 URL: http://svn.freebsd.org/changeset/base/235567 Log: mdoc(7) style/formatting fixes. While here, fix a few nits igor(1) does not like. MFC after: 3 days Modified: head/share/man/man4/siftr.4 Modified: head/share/man/man4/siftr.4 ============================================================================== --- head/share/man/man4/siftr.4 Thu May 17 20:38:01 2012 (r235566) +++ head/share/man/man4/siftr.4 Thu May 17 20:49:44 2012 (r235567) @@ -94,7 +94,7 @@ utilises the .Xr sysctl 8 interface to export its configuration variables to user-space. The following variables are available: -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va net.inet.siftr.enabled controls whether the module performs its measurements or not. @@ -107,7 +107,7 @@ packet filtering hooks are only inserted .Va net.inet.siftr.enabled is set to 1. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va net.inet.siftr.ppl controls how many inbound/outbound packets for a given TCP connection will cause a log message to be generated for the connection. @@ -116,13 +116,13 @@ every packet of every TCP connection. The value can be set to any integer in the range [1,2^32], and can be changed at any time, even while the module is enabled. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va net.inet.siftr.logfile controls the path to the file that the module writes its log messages to. By default, the file /var/log/siftr.log is used. The path can be changed at any time, even while the module is enabled. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va net.inet.siftr.genhashes controls whether a hash is generated for each TCP packet seen by .Nm . @@ -153,36 +153,36 @@ sysname=FreeBSD sysver=604000 ipmo .Ed .Pp Field descriptions are as follows: -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va enable_time_secs time at which the module was enabled, in seconds since the UNIX epoch. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va enable_time_usecs time at which the module was enabled, in microseconds since enable_time_secs. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va siftrver version of .Nm . .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va hz tick rate of the kernel in ticks per second. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va tcp_rtt_scale smoothed RTT estimate scaling factor. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va sysname operating system name. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va sysver operating system version. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va ipmode IP mode as defined at compile time. An ipmode of "4" means IPv6 is not supported and IP addresses are logged in @@ -205,7 +205,7 @@ o,0xbec491a5,1238556193.463551,172.16.7. .Ed .Pp Field descriptions are as follows: -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 1 Direction of packet that triggered the log message. Either @@ -214,77 +214,77 @@ for in, or .Qq o for out. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 2 Hash of the packet that triggered the log message. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 3 Time at which the packet that triggered the log message was processed by the .Xr pfil 9 hook function, in seconds and microseconds since the UNIX epoch. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 4 The IPv4 or IPv6 address of the local host, in dotted quad (IPv4 packet) or colon-separated hex (IPv6 packet) notation. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 5 The TCP port that the local host is communicating via. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 6 The IPv4 or IPv6 address of the foreign host, in dotted quad (IPv4 packet) or colon-separated hex (IPv6 packet) notation. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 7 The TCP port that the foreign host is communicating via. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 8 The slow start threshold for the flow, in bytes. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 9 The current congestion window for the flow, in bytes. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 10 The current bandwidth-controlled window for the flow, in bytes. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 11 The current sending window for the flow, in bytes. The post scaled value is reported, except during the initial handshake (first few packets), during which time the unscaled value is reported. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 12 The current receive window for the flow, in bytes. The post scaled value is always reported. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 13 The current window scaling factor for the sending window. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 14 The current window scaling factor for the receiving window. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 15 The current state of the TCP finite state machine, as defined in .Aq Pa netinet/tcp_fsm.h . .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 16 The maximum segment size for the flow, in bytes. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 17 The current smoothed RTT estimate for the flow, in units of TCP_RTT_SCALE * HZ, where TCP_RTT_SCALE is a define found in tcp_var.h, and HZ is the kernel's tick @@ -292,46 +292,46 @@ timer. Divide by TCP_RTT_SCALE * HZ to get the RTT in secs. TCP_RTT_SCALE and HZ are reported in the enable log message. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 18 SACK enabled indicator. 1 if SACK enabled, 0 otherwise. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 19 The current state of the TCP flags for the flow. See .Aq Pa netinet/tcp_var.h for information about the various flags. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 20 The current retransmission timeout length for the flow, in units of HZ, where HZ is the kernel's tick timer. Divide by HZ to get the timeout length in seconds. HZ is reported in the enable log message. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 21 The current size of the socket send buffer in bytes. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 22 The current number of bytes in the socket send buffer. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 23 The current size of the socket receive buffer in bytes. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 24 The current number of bytes in the socket receive buffer. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 25 The current number of unacknowledged bytes in-flight. Bytes acknowledged via SACK are not excluded from this count. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va 26 The current number of segments in the reassembly queue. .El @@ -353,82 +353,82 @@ flow_list=172.16.7.28;22-172.16.2.5;5593 .Ed .Pp Field descriptions are as follows: -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va disable_time_secs Time at which the module was disabled, in seconds since the UNIX epoch. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va disable_time_usecs Time at which the module was disabled, in microseconds since disable_time_secs. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va num_inbound_tcp_pkts Number of TCP packets that traversed up the network stack. This only includes inbound TCP packets during the periods when .Nm was enabled. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va num_outbound_tcp_pkts Number of TCP packets that traversed down the network stack. This only includes outbound TCP packets during the periods when .Nm was enabled. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va total_tcp_pkts The summation of num_inbound_tcp_pkts and num_outbound_tcp_pkts. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va num_inbound_skipped_pkts_malloc Number of inbound packets that were not processed because of failed malloc() calls. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va num_outbound_skipped_pkts_malloc Number of outbound packets that were not processed because of failed malloc() calls. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va num_inbound_skipped_pkts_mtx Number of inbound packets that were not processed because of failure to add the packet to the packet processing queue. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va num_outbound_skipped_pkts_mtx Number of outbound packets that were not processed because of failure to add the packet to the packet processing queue. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va num_inbound_skipped_pkts_tcb Number of inbound packets that were not processed because of failure to find the TCP control block associated with the packet. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va num_outbound_skipped_pkts_tcb Number of outbound packets that were not processed because of failure to find the TCP control block associated with the packet. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va num_inbound_skipped_pkts_icb Number of inbound packets that were not processed because of failure to find the IP control block associated with the packet. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va num_outbound_skipped_pkts_icb Number of outbound packets that were not processed because of failure to find the IP control block associated with the packet. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va total_skipped_tcp_pkts The summation of all skipped packet counters. .El -.Bl -tag -offset indent +.Bl -tag -offset indent -width Va .It Va flow_list A CSV list of TCP flows that triggered data log messages to be generated since the module was loaded. Each flow entry in the CSV list is formatted as .Qq local_ip;local_port-foreign_ip;foreign_port . -If there are no entries in the list (i.e. no data log messages were generated), +If there are no entries in the list (i.e., no data log messages were generated), the value will be blank. If there is at least one entry in the list, a trailing comma will always be present. @@ -501,10 +501,10 @@ the system to trigger a dump of the stat flow. With the PPL set to 1, we are in effect sampling each TCP flow's control block state as frequently as flow packets enter/leave the system. -For example, setting PPL to 2 halves the sampling rate i.e. every second flow +For example, setting PPL to 2 halves the sampling rate i.e., every second flow packet (inbound OR outbound) causes a dump of the control block state. .Pp -The distinction between interrogating individual packets vs interrogating the +The distinction between interrogating individual packets versus interrogating the control block is important, because .Nm does not remove the need for packet capturing tools like @@ -546,7 +546,7 @@ If one thread holds the lock, the other This does introduce some additional bounded delay into the kernel's packet processing code path. .Pp -In some cases (e.g. low memory, connection termination), TCP packets that enter +In some cases (e.g., low memory, connection termination), TCP packets that enter the .Nm .Xr pfil 9 From owner-svn-src-all@FreeBSD.ORG Thu May 17 21:52:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 893A11065686; Thu, 17 May 2012 21:52:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 747A88FC08; Thu, 17 May 2012 21:52:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HLqIZi018522; Thu, 17 May 2012 21:52:18 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HLqIu0018520; Thu, 17 May 2012 21:52:18 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201205172152.q4HLqIu0018520@svn.freebsd.org> From: Rick Macklem Date: Thu, 17 May 2012 21:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235568 - head/sys/fs/nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 21:52:18 -0000 Author: rmacklem Date: Thu May 17 21:52:17 2012 New Revision: 235568 URL: http://svn.freebsd.org/changeset/base/235568 Log: A problem with the NFSv4 server was reported by Andrew Leonard to freebsd-fs@, where the setfacl of an NFSv4 acl would fail. This was caused by the VOP_ACLCHECK() call for ZFS replying EOPNOTSUPP. After discussion with rwatson@, it was determined that a call to VOP_ACLCHECK() before doing VOP_SETACL() is not required. This patch fixes the problem by deleting the VOP_ACLCHECK() call. Tested by: Andrew Leonard (previous version) MFC after: 1 week Modified: head/sys/fs/nfs/nfs_commonacl.c Modified: head/sys/fs/nfs/nfs_commonacl.c ============================================================================== --- head/sys/fs/nfs/nfs_commonacl.c Thu May 17 20:49:44 2012 (r235567) +++ head/sys/fs/nfs/nfs_commonacl.c Thu May 17 21:52:17 2012 (r235568) @@ -468,9 +468,7 @@ nfsrv_setacl(vnode_t vp, NFSACL_T *aclp, error = NFSERR_ATTRNOTSUPP; goto out; } - error = VOP_ACLCHECK(vp, ACL_TYPE_NFS4, aclp, cred, p); - if (!error) - error = VOP_SETACL(vp, ACL_TYPE_NFS4, aclp, cred, p); + error = VOP_SETACL(vp, ACL_TYPE_NFS4, aclp, cred, p); out: NFSEXITCODE(error); From owner-svn-src-all@FreeBSD.ORG Thu May 17 22:04:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3767A106564A; Thu, 17 May 2012 22:04:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22EB78FC1B; Thu, 17 May 2012 22:04:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HM4HZc019023; Thu, 17 May 2012 22:04:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HM4H2U019021; Thu, 17 May 2012 22:04:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205172204.q4HM4H2U019021@svn.freebsd.org> From: Alexander Motin Date: Thu, 17 May 2012 22:04:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235569 - head/sys/dev/usb/input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 22:04:18 -0000 Author: mav Date: Thu May 17 22:04:17 2012 New Revision: 235569 URL: http://svn.freebsd.org/changeset/base/235569 Log: Fix for the r235558: interrupt output pipe is optional, so fix the driver attach and operation when it is absent. Sponsored by: iXsystems, Inc. MFC after: 1 week Modified: head/sys/dev/usb/input/uhid.c Modified: head/sys/dev/usb/input/uhid.c ============================================================================== --- head/sys/dev/usb/input/uhid.c Thu May 17 21:52:17 2012 (r235568) +++ head/sys/dev/usb/input/uhid.c Thu May 17 22:04:17 2012 (r235569) @@ -362,7 +362,7 @@ static const struct usb_config uhid_conf .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .flags = {.pipe_bof = 1, }, + .flags = {.pipe_bof = 1,.no_pipe_ok = 1, }, .bufsize = UHID_BSIZE, .callback = &uhid_intr_write_callback, }, @@ -421,7 +421,8 @@ uhid_start_write(struct usb_fifo *fifo) { struct uhid_softc *sc = usb_fifo_softc(fifo); - if (sc->sc_flags & UHID_FLAG_IMMED) { + if ((sc->sc_flags & UHID_FLAG_IMMED) || + sc->sc_xfer[UHID_INTR_DT_WR] == NULL) { usbd_transfer_start(sc->sc_xfer[UHID_CTRL_DT_WR]); } else { usbd_transfer_start(sc->sc_xfer[UHID_INTR_DT_WR]); From owner-svn-src-all@FreeBSD.ORG Fri May 18 00:00:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9D2591065678; Fri, 18 May 2012 00:00:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E2D58FC08; Fri, 18 May 2012 00:00:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I00lcW023266; Fri, 18 May 2012 00:00:47 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I00lGh023244; Fri, 18 May 2012 00:00:47 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180000.q4I00lGh023244@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 00:00:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235570 - in stable/9: cddl/contrib/opensolaris/cmd/zstreamdump gnu/usr.bin/binutils/addr2line gnu/usr.bin/binutils/ranlib gnu/usr.bin/binutils/size gnu/usr.bin/binutils/strip gnu/usr.b... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 00:00:47 -0000 Author: gjb (doc committer) Date: Fri May 18 00:00:46 2012 New Revision: 235570 URL: http://svn.freebsd.org/changeset/base/235570 Log: MFC r235211: General mdoc(7) and typo fixes. PR: 167696 Modified: stable/9/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 stable/9/gnu/usr.bin/binutils/addr2line/addr2line.1 stable/9/gnu/usr.bin/binutils/ranlib/ranlib.1 stable/9/gnu/usr.bin/binutils/size/size.1 stable/9/gnu/usr.bin/binutils/strip/strip.1 stable/9/gnu/usr.bin/gdb/gdb/gdb.1 stable/9/sbin/md5/md5.1 stable/9/usr.bin/calendar/calendar.1 stable/9/usr.bin/clang/clang/clang.1 stable/9/usr.bin/clang/tblgen/tblgen.1 stable/9/usr.bin/csup/csup.1 stable/9/usr.bin/fetch/fetch.1 stable/9/usr.bin/gprof/gprof.1 stable/9/usr.bin/ipcrm/ipcrm.1 stable/9/usr.bin/join/join.1 stable/9/usr.bin/limits/limits.1 stable/9/usr.bin/ncplogin/ncplogout.1 stable/9/usr.bin/tftp/tftp.1 stable/9/usr.bin/who/who.1 stable/9/usr.bin/whois/whois.1 stable/9/usr.sbin/pkg_install/updating/pkg_updating.1 Directory Properties: stable/9/cddl/ (props changed) stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/gnu/usr.bin/binutils/ (props changed) stable/9/gnu/usr.bin/gdb/ (props changed) stable/9/sbin/md5/ (props changed) stable/9/usr.bin/calendar/ (props changed) stable/9/usr.bin/clang/ (props changed) stable/9/usr.bin/csup/ (props changed) stable/9/usr.bin/fetch/ (props changed) stable/9/usr.bin/gprof/ (props changed) stable/9/usr.bin/ipcrm/ (props changed) stable/9/usr.bin/join/ (props changed) stable/9/usr.bin/limits/ (props changed) stable/9/usr.bin/ncplogin/ (props changed) stable/9/usr.bin/tftp/ (props changed) stable/9/usr.bin/who/ (props changed) stable/9/usr.bin/whois/ (props changed) stable/9/usr.sbin/pkg_install/ (props changed) stable/9/usr.sbin/pkg_install/updating/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Fri May 18 00:00:46 2012 (r235570) @@ -25,7 +25,7 @@ .Dt ZSTREAMDUMP 8 .Os .Sh NAME -.Nm zdb +.Nm zstreamdump .Nd filter data in zfs send stream .Sh SYNOPSIS .Nm Modified: stable/9/gnu/usr.bin/binutils/addr2line/addr2line.1 ============================================================================== --- stable/9/gnu/usr.bin/binutils/addr2line/addr2line.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/gnu/usr.bin/binutils/addr2line/addr2line.1 Fri May 18 00:00:46 2012 (r235570) @@ -131,7 +131,7 @@ .if n .ad l .nh .SH "NAME" -addr2line \- convert addresses into file names and line numbers. +addr2line \- convert addresses into file names and line numbers .SH "SYNOPSIS" .IX Header "SYNOPSIS" addr2line [\fB\-b\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR] Modified: stable/9/gnu/usr.bin/binutils/ranlib/ranlib.1 ============================================================================== --- stable/9/gnu/usr.bin/binutils/ranlib/ranlib.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/gnu/usr.bin/binutils/ranlib/ranlib.1 Fri May 18 00:00:46 2012 (r235570) @@ -131,7 +131,7 @@ .if n .ad l .nh .SH "NAME" -ranlib \- generate index to archive. +ranlib \- generate index to archive .SH "SYNOPSIS" .IX Header "SYNOPSIS" ranlib [\fB\-vV\fR] \fIarchive\fR Modified: stable/9/gnu/usr.bin/binutils/size/size.1 ============================================================================== --- stable/9/gnu/usr.bin/binutils/size/size.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/gnu/usr.bin/binutils/size/size.1 Fri May 18 00:00:46 2012 (r235570) @@ -131,7 +131,7 @@ .if n .ad l .nh .SH "NAME" -size \- list section sizes and total size. +size \- list section sizes and total size .SH "SYNOPSIS" .IX Header "SYNOPSIS" size [\fB\-A\fR|\fB\-B\fR|\fB\-\-format=\fR\fIcompatibility\fR] Modified: stable/9/gnu/usr.bin/binutils/strip/strip.1 ============================================================================== --- stable/9/gnu/usr.bin/binutils/strip/strip.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/gnu/usr.bin/binutils/strip/strip.1 Fri May 18 00:00:46 2012 (r235570) @@ -131,7 +131,7 @@ .if n .ad l .nh .SH "NAME" -strip \- Discard symbols from object files. +strip \- Discard symbols from object files .SH "SYNOPSIS" .IX Header "SYNOPSIS" strip [\fB\-F\fR \fIbfdname\fR |\fB\-\-target=\fR\fIbfdname\fR] Modified: stable/9/gnu/usr.bin/gdb/gdb/gdb.1 ============================================================================== --- stable/9/gnu/usr.bin/gdb/gdb/gdb.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/gnu/usr.bin/gdb/gdb/gdb.1 Fri May 18 00:00:46 2012 (r235570) @@ -322,11 +322,11 @@ to output the full file name and line nu recognizable fashion each time a stack frame is displayed (which includes each time the program stops). This recognizable format looks like two `\|\c -.B \032\c +.B \e032\c \&\|' characters, followed by the file name, line number and character position separated by colons, and a newline. The Emacs-to-GDB interface program uses the two `\|\c -.B \032\c +.B \e032\c \&\|' characters as a signal to display the source code for the frame. Modified: stable/9/sbin/md5/md5.1 ============================================================================== --- stable/9/sbin/md5/md5.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/sbin/md5/md5.1 Fri May 18 00:00:46 2012 (r235570) @@ -3,7 +3,7 @@ .Dt MD5 1 .Os .Sh NAME -.Nm md5 , sha1 , sha256, rmd160 +.Nm md5 , sha1 , sha256 , rmd160 .Nd calculate a message-digest fingerprint (checksum) for a file .Sh SYNOPSIS .Nm md5 Modified: stable/9/usr.bin/calendar/calendar.1 ============================================================================== --- stable/9/usr.bin/calendar/calendar.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/usr.bin/calendar/calendar.1 Fri May 18 00:00:46 2012 (r235570) @@ -210,7 +210,7 @@ Paskha\fB\et\fROrthodox Easter .Sh FILES .Bl -tag -width calendar.christian -compact .It Pa calendar -file in current directory +file in current directory. .It Pa ~/.calendar .Pa calendar HOME directory. Modified: stable/9/usr.bin/clang/clang/clang.1 ============================================================================== --- stable/9/usr.bin/clang/clang/clang.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/usr.bin/clang/clang/clang.1 Fri May 18 00:00:46 2012 (r235570) @@ -475,7 +475,7 @@ write temporary files used during the co .IX Item "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 delimitor, as used in the \fI\s-1PATH\s0\fR +delimiter is the platform dependent delimiter, as used in the \fI\s-1PATH\s0\fR environment variable. .Sp Empty components in the environment variable are ignored. Modified: stable/9/usr.bin/clang/tblgen/tblgen.1 ============================================================================== --- stable/9/usr.bin/clang/tblgen/tblgen.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/usr.bin/clang/tblgen/tblgen.1 Fri May 18 00:00:46 2012 (r235570) @@ -172,7 +172,7 @@ Print the enumeration list for this clas Print all records to standard output (default). .IP "\fB\-print\-enums\fR" 4 .IX Item "-print-enums" -Print enumeration values for a class +Print enumeration values for a class. .IP "\fB\-gen\-emitter\fR" 4 .IX Item "-gen-emitter" Generate machine code emitter. Modified: stable/9/usr.bin/csup/csup.1 ============================================================================== --- stable/9/usr.bin/csup/csup.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/usr.bin/csup/csup.1 Fri May 18 00:00:46 2012 (r235570) @@ -311,7 +311,7 @@ will not create it. The default .Ar base directory is -.Pa /usr/local/etc/csup . +.Pa /usr/local/etc/cvsup . .It Cm prefix= Ns Ar prefix This is the directory under which updated files will be placed. By default, it is the same as @@ -656,7 +656,7 @@ from that directory is not required then .El .Pp will not work because the file on the server is called -.Ql Makefile,v. +.Ql Makefile,v . A better solution would be .Pp .Bl -item -compact -offset indent Modified: stable/9/usr.bin/fetch/fetch.1 ============================================================================== --- stable/9/usr.bin/fetch/fetch.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/usr.bin/fetch/fetch.1 Fri May 18 00:00:46 2012 (r235570) @@ -249,7 +249,7 @@ for a description of additional environm .Ev HTTP_REFERER , .Ev HTTP_USER_AGENT , .Ev NETRC , -.Ev NO_PROXY and +.Ev NO_PROXY No and .Ev no_proxy . .Sh EXIT STATUS The Modified: stable/9/usr.bin/gprof/gprof.1 ============================================================================== --- stable/9/usr.bin/gprof/gprof.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/usr.bin/gprof/gprof.1 Fri May 18 00:00:46 2012 (r235570) @@ -73,7 +73,7 @@ compiler or linker you can use instead of .Fl l Ns Ar c . Read the given object file (the default is -.Pa a.out) +.Pa a.out ) and establishes the relation between its symbol table and the call graph profile. The default graph profile file name is the name Modified: stable/9/usr.bin/ipcrm/ipcrm.1 ============================================================================== --- stable/9/usr.bin/ipcrm/ipcrm.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/usr.bin/ipcrm/ipcrm.1 Fri May 18 00:00:46 2012 (r235570) @@ -112,7 +112,7 @@ If the identifier or the key is -1, it w .Xr ipcs 1 .Sh HISTORY The wiping of all System V IPC objects was first implemented in -.Fx 6.4 and 7.1. +.Fx 6.4 No and 7.1. .Sh AUTHORS The original author was Adam Glass. The wiping of all System V IPC objects was thought up by Callum Modified: stable/9/usr.bin/join/join.1 ============================================================================== --- stable/9/usr.bin/join/join.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/usr.bin/join/join.1 Fri May 18 00:00:46 2012 (r235570) @@ -107,7 +107,7 @@ representing the join field. The elements of list must be either comma .Pq Ql \&, or whitespace separated. -(The latter requires quoting to protect it from the shell, or, a simpler +(The letter requires quoting to protect it from the shell, or, a simpler approach is to use multiple .Fl o options.) Modified: stable/9/usr.bin/limits/limits.1 ============================================================================== --- stable/9/usr.bin/limits/limits.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/usr.bin/limits/limits.1 Fri May 18 00:00:46 2012 (r235570) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 23, 2011 +.Dd January 23, 2012 .Dt LIMITS 1 .Os .Sh NAME @@ -179,7 +179,7 @@ limits are affected until overridden lat or .Fl H options. -.Fl e +.It Fl e Select .Dq "eval mode" formatting for output. Modified: stable/9/usr.bin/ncplogin/ncplogout.1 ============================================================================== --- stable/9/usr.bin/ncplogin/ncplogout.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/usr.bin/ncplogin/ncplogout.1 Fri May 18 00:00:46 2012 (r235570) @@ -30,7 +30,7 @@ The options are: .Bl -tag -width indent .It Fl S Ar server Specify the name of the -.Tn Netware +.Tn NetWare server to which the connection should be terminated. Can be omitted if there is only one connection active. Modified: stable/9/usr.bin/tftp/tftp.1 ============================================================================== --- stable/9/usr.bin/tftp/tftp.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/usr.bin/tftp/tftp.1 Fri May 18 00:00:46 2012 (r235570) @@ -112,9 +112,9 @@ commands. Enable or disable debugging levels during verbose output. The value of .Ar level can be one of -.Cm packet, simple, options, +.Cm packet , simple , options , or -.Cm access. +.Cm access . .Pp .It Cm get Oo Ar host : Oc Ns Ar file Op Ar localname .It Cm get Xo Modified: stable/9/usr.bin/who/who.1 ============================================================================== --- stable/9/usr.bin/who/who.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/usr.bin/who/who.1 Fri May 18 00:00:46 2012 (r235570) @@ -75,7 +75,7 @@ An error occurred. Show idle time for each user in hours and minutes as .Ar hh Ns : Ns Ar mm , .Ql \&. -if the user has been idle less that a minute, and +if the user has been idle less than a minute, and .Dq Li old if the user has been idle more than 24 hours. .It Cm am I Modified: stable/9/usr.bin/whois/whois.1 ============================================================================== --- stable/9/usr.bin/whois/whois.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/usr.bin/whois/whois.1 Fri May 18 00:00:46 2012 (r235570) @@ -203,12 +203,12 @@ This option is deprecated; use the option with an argument of .Qq Li RU instead. +.El .Pp The operands specified to .Nm are treated independently and may be used as queries on different whois servers. -.El .Sh EXIT STATUS .Ex -std .Sh EXAMPLES Modified: stable/9/usr.sbin/pkg_install/updating/pkg_updating.1 ============================================================================== --- stable/9/usr.sbin/pkg_install/updating/pkg_updating.1 Thu May 17 22:04:17 2012 (r235569) +++ stable/9/usr.sbin/pkg_install/updating/pkg_updating.1 Fri May 18 00:00:46 2012 (r235570) @@ -55,7 +55,7 @@ Location of the ports tree. .It Pa /var/db/pkg Default location of the installed package database. .It Pa /usr/ports -The default ports directory and default location of the UPDATING file +The default ports directory and default location of the UPDATING file. .El .Sh EXAMPLES Shows all entries of all installed ports: From owner-svn-src-all@FreeBSD.ORG Fri May 18 00:02:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AB93106566C; Fri, 18 May 2012 00:02:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 415888FC18; Fri, 18 May 2012 00:02:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I02CsV023356; Fri, 18 May 2012 00:02:12 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I02B6p023341; Fri, 18 May 2012 00:02:11 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180002.q4I02B6p023341@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 00:02:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235571 - in stable/8: cddl/contrib/opensolaris/cmd/zstreamdump sbin/md5 usr.bin/calendar usr.bin/csup usr.bin/fetch usr.bin/gprof usr.bin/ipcrm usr.bin/join usr.bin/limits usr.bin/ncpl... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 00:02:12 -0000 Author: gjb (doc committer) Date: Fri May 18 00:02:11 2012 New Revision: 235571 URL: http://svn.freebsd.org/changeset/base/235571 Log: MFC r235211: General mdoc(7) and typo fixes. PR: 167696 Modified: stable/8/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 stable/8/sbin/md5/md5.1 stable/8/usr.bin/calendar/calendar.1 stable/8/usr.bin/csup/csup.1 stable/8/usr.bin/fetch/fetch.1 stable/8/usr.bin/gprof/gprof.1 stable/8/usr.bin/ipcrm/ipcrm.1 stable/8/usr.bin/join/join.1 stable/8/usr.bin/limits/limits.1 stable/8/usr.bin/ncplogin/ncplogout.1 stable/8/usr.bin/tftp/tftp.1 stable/8/usr.bin/who/who.1 stable/8/usr.bin/whois/whois.1 stable/8/usr.sbin/pkg_install/updating/pkg_updating.1 Directory Properties: stable/8/cddl/ (props changed) stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/sbin/md5/ (props changed) stable/8/usr.bin/calendar/ (props changed) stable/8/usr.bin/csup/ (props changed) stable/8/usr.bin/fetch/ (props changed) stable/8/usr.bin/gprof/ (props changed) stable/8/usr.bin/ipcrm/ (props changed) stable/8/usr.bin/join/ (props changed) stable/8/usr.bin/limits/ (props changed) stable/8/usr.bin/ncplogin/ (props changed) stable/8/usr.bin/tftp/ (props changed) stable/8/usr.bin/who/ (props changed) stable/8/usr.bin/whois/ (props changed) stable/8/usr.sbin/pkg_install/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Fri May 18 00:00:46 2012 (r235570) +++ stable/8/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Fri May 18 00:02:11 2012 (r235571) @@ -25,7 +25,7 @@ .Dt ZSTREAMDUMP 8 .Os .Sh NAME -.Nm zdb +.Nm zstreamdump .Nd filter data in zfs send stream .Sh SYNOPSIS .Nm Modified: stable/8/sbin/md5/md5.1 ============================================================================== --- stable/8/sbin/md5/md5.1 Fri May 18 00:00:46 2012 (r235570) +++ stable/8/sbin/md5/md5.1 Fri May 18 00:02:11 2012 (r235571) @@ -3,7 +3,7 @@ .Dt MD5 1 .Os .Sh NAME -.Nm md5 , sha1 , sha256, rmd160 +.Nm md5 , sha1 , sha256 , rmd160 .Nd calculate a message-digest fingerprint (checksum) for a file .Sh SYNOPSIS .Nm md5 Modified: stable/8/usr.bin/calendar/calendar.1 ============================================================================== --- stable/8/usr.bin/calendar/calendar.1 Fri May 18 00:00:46 2012 (r235570) +++ stable/8/usr.bin/calendar/calendar.1 Fri May 18 00:02:11 2012 (r235571) @@ -210,7 +210,7 @@ Paskha\fB\et\fROrthodox Easter .Sh FILES .Bl -tag -width calendar.christian -compact .It Pa calendar -file in current directory +file in current directory. .It Pa ~/.calendar .Pa calendar HOME directory. Modified: stable/8/usr.bin/csup/csup.1 ============================================================================== --- stable/8/usr.bin/csup/csup.1 Fri May 18 00:00:46 2012 (r235570) +++ stable/8/usr.bin/csup/csup.1 Fri May 18 00:02:11 2012 (r235571) @@ -311,7 +311,7 @@ will not create it. The default .Ar base directory is -.Pa /usr/local/etc/csup . +.Pa /usr/local/etc/cvsup . .It Cm prefix= Ns Ar prefix This is the directory under which updated files will be placed. By default, it is the same as @@ -656,7 +656,7 @@ from that directory is not required then .El .Pp will not work because the file on the server is called -.Ql Makefile,v. +.Ql Makefile,v . A better solution would be .Pp .Bl -item -compact -offset indent Modified: stable/8/usr.bin/fetch/fetch.1 ============================================================================== --- stable/8/usr.bin/fetch/fetch.1 Fri May 18 00:00:46 2012 (r235570) +++ stable/8/usr.bin/fetch/fetch.1 Fri May 18 00:02:11 2012 (r235571) @@ -247,7 +247,7 @@ for a description of additional environm .Ev HTTP_REFERER , .Ev HTTP_USER_AGENT , .Ev NETRC , -.Ev NO_PROXY and +.Ev NO_PROXY No and .Ev no_proxy . .Sh EXIT STATUS The Modified: stable/8/usr.bin/gprof/gprof.1 ============================================================================== --- stable/8/usr.bin/gprof/gprof.1 Fri May 18 00:00:46 2012 (r235570) +++ stable/8/usr.bin/gprof/gprof.1 Fri May 18 00:02:11 2012 (r235571) @@ -77,7 +77,7 @@ compiler or linker you can use instead of .Fl l Ns Ar c . Read the given object file (the default is -.Pa a.out) +.Pa a.out ) and establishes the relation between its symbol table and the call graph profile. The default graph profile file name is the name Modified: stable/8/usr.bin/ipcrm/ipcrm.1 ============================================================================== --- stable/8/usr.bin/ipcrm/ipcrm.1 Fri May 18 00:00:46 2012 (r235570) +++ stable/8/usr.bin/ipcrm/ipcrm.1 Fri May 18 00:02:11 2012 (r235571) @@ -112,7 +112,7 @@ If the identifier or the key is -1, it w .Xr ipcs 1 .Sh HISTORY The wiping of all System V IPC objects was first implemented in -.Fx 6.4 and 7.1. +.Fx 6.4 No and 7.1. .Sh AUTHORS The original author was Adam Glass. The wiping of all System V IPC objects was thought up by Callum Modified: stable/8/usr.bin/join/join.1 ============================================================================== --- stable/8/usr.bin/join/join.1 Fri May 18 00:00:46 2012 (r235570) +++ stable/8/usr.bin/join/join.1 Fri May 18 00:02:11 2012 (r235571) @@ -113,7 +113,7 @@ representing the join field. The elements of list must be either comma .Pq Ql \&, or whitespace separated. -(The latter requires quoting to protect it from the shell, or, a simpler +(The letter requires quoting to protect it from the shell, or, a simpler approach is to use multiple .Fl o options.) Modified: stable/8/usr.bin/limits/limits.1 ============================================================================== --- stable/8/usr.bin/limits/limits.1 Fri May 18 00:00:46 2012 (r235570) +++ stable/8/usr.bin/limits/limits.1 Fri May 18 00:02:11 2012 (r235571) @@ -176,7 +176,7 @@ limits are affected until overridden lat or .Fl H options. -.Fl e +.It Fl e Select .Dq "eval mode" formatting for output. Modified: stable/8/usr.bin/ncplogin/ncplogout.1 ============================================================================== --- stable/8/usr.bin/ncplogin/ncplogout.1 Fri May 18 00:00:46 2012 (r235570) +++ stable/8/usr.bin/ncplogin/ncplogout.1 Fri May 18 00:02:11 2012 (r235571) @@ -30,7 +30,7 @@ The options are: .Bl -tag -width indent .It Fl S Ar server Specify the name of the -.Tn Netware +.Tn NetWare server to which the connection should be terminated. Can be omitted if there is only one connection active. Modified: stable/8/usr.bin/tftp/tftp.1 ============================================================================== --- stable/8/usr.bin/tftp/tftp.1 Fri May 18 00:00:46 2012 (r235570) +++ stable/8/usr.bin/tftp/tftp.1 Fri May 18 00:02:11 2012 (r235571) @@ -112,9 +112,9 @@ commands. Enable or disable debugging levels during verbose output. The value of .Ar level can be one of -.Cm packet, simple, options, +.Cm packet , simple , options , or -.Cm access. +.Cm access . .Pp .It Cm get Oo Ar host : Oc Ns Ar file Op Ar localname .It Cm get Xo Modified: stable/8/usr.bin/who/who.1 ============================================================================== --- stable/8/usr.bin/who/who.1 Fri May 18 00:00:46 2012 (r235570) +++ stable/8/usr.bin/who/who.1 Fri May 18 00:02:11 2012 (r235571) @@ -79,7 +79,7 @@ An error occurred. Show idle time for each user in hours and minutes as .Ar hh Ns : Ns Ar mm , .Ql \&. -if the user has been idle less that a minute, and +if the user has been idle less than a minute, and .Dq Li old if the user has been idle more than 24 hours. .It Cm am I Modified: stable/8/usr.bin/whois/whois.1 ============================================================================== --- stable/8/usr.bin/whois/whois.1 Fri May 18 00:00:46 2012 (r235570) +++ stable/8/usr.bin/whois/whois.1 Fri May 18 00:02:11 2012 (r235571) @@ -207,12 +207,12 @@ This option is deprecated; use the option with an argument of .Qq Li RU instead. +.El .Pp The operands specified to .Nm are treated independently and may be used as queries on different whois servers. -.El .Sh EXIT STATUS .Ex -std .Sh EXAMPLES Modified: stable/8/usr.sbin/pkg_install/updating/pkg_updating.1 ============================================================================== --- stable/8/usr.sbin/pkg_install/updating/pkg_updating.1 Fri May 18 00:00:46 2012 (r235570) +++ stable/8/usr.sbin/pkg_install/updating/pkg_updating.1 Fri May 18 00:02:11 2012 (r235571) @@ -79,7 +79,7 @@ Location of the ports tree. .It Pa /var/db/pkg Default location of the installed package database. .It Pa /usr/ports -The default ports directory and default location of the UPDATING file +The default ports directory and default location of the UPDATING file. .El .Sh SEE ALSO .Xr pkg_add 1 , From owner-svn-src-all@FreeBSD.ORG Fri May 18 00:03:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BB0C51065672; Fri, 18 May 2012 00:03:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A16E68FC22; Fri, 18 May 2012 00:03:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I03Epc023431; Fri, 18 May 2012 00:03:14 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I03Eev023418; Fri, 18 May 2012 00:03:14 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180003.q4I03Eev023418@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 00:03:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235572 - in stable/7: sbin/md5 usr.bin/calendar usr.bin/fetch usr.bin/gprof usr.bin/ipcrm usr.bin/join usr.bin/limits usr.bin/ncplogin usr.bin/tftp usr.bin/who usr.bin/whois usr.sbin/p... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 00:03:14 -0000 Author: gjb (doc committer) Date: Fri May 18 00:03:13 2012 New Revision: 235572 URL: http://svn.freebsd.org/changeset/base/235572 Log: MFC r235211: General mdoc(7) and typo fixes. PR: 167696 Modified: stable/7/sbin/md5/md5.1 stable/7/usr.bin/calendar/calendar.1 stable/7/usr.bin/fetch/fetch.1 stable/7/usr.bin/gprof/gprof.1 stable/7/usr.bin/ipcrm/ipcrm.1 stable/7/usr.bin/join/join.1 stable/7/usr.bin/limits/limits.1 stable/7/usr.bin/ncplogin/ncplogout.1 stable/7/usr.bin/tftp/tftp.1 stable/7/usr.bin/who/who.1 stable/7/usr.bin/whois/whois.1 stable/7/usr.sbin/pkg_install/updating/pkg_updating.1 Directory Properties: stable/7/sbin/md5/ (props changed) stable/7/usr.bin/calendar/ (props changed) stable/7/usr.bin/fetch/ (props changed) stable/7/usr.bin/gprof/ (props changed) stable/7/usr.bin/ipcrm/ (props changed) stable/7/usr.bin/join/ (props changed) stable/7/usr.bin/limits/ (props changed) stable/7/usr.bin/ncplogin/ (props changed) stable/7/usr.bin/tftp/ (props changed) stable/7/usr.bin/who/ (props changed) stable/7/usr.bin/whois/ (props changed) stable/7/usr.sbin/pkg_install/ (props changed) Modified: stable/7/sbin/md5/md5.1 ============================================================================== --- stable/7/sbin/md5/md5.1 Fri May 18 00:02:11 2012 (r235571) +++ stable/7/sbin/md5/md5.1 Fri May 18 00:03:13 2012 (r235572) @@ -3,7 +3,7 @@ .Dt MD5 1 .Os .Sh NAME -.Nm md5 , sha1 , sha256, rmd160 +.Nm md5 , sha1 , sha256 , rmd160 .Nd calculate a message-digest fingerprint (checksum) for a file .Sh SYNOPSIS .Nm md5 Modified: stable/7/usr.bin/calendar/calendar.1 ============================================================================== --- stable/7/usr.bin/calendar/calendar.1 Fri May 18 00:02:11 2012 (r235571) +++ stable/7/usr.bin/calendar/calendar.1 Fri May 18 00:03:13 2012 (r235572) @@ -180,7 +180,7 @@ Paskha\fB\et\fROrthodox Easter .Sh FILES .Bl -tag -width calendar.christian -compact .It Pa calendar -file in current directory +file in current directory. .It Pa ~/.calendar .Pa calendar HOME directory. Modified: stable/7/usr.bin/fetch/fetch.1 ============================================================================== --- stable/7/usr.bin/fetch/fetch.1 Fri May 18 00:02:11 2012 (r235571) +++ stable/7/usr.bin/fetch/fetch.1 Fri May 18 00:03:13 2012 (r235572) @@ -247,7 +247,7 @@ for a description of additional environm .Ev HTTP_REFERER , .Ev HTTP_USER_AGENT , .Ev NETRC , -.Ev NO_PROXY and +.Ev NO_PROXY No and .Ev no_proxy . .Sh EXIT STATUS The Modified: stable/7/usr.bin/gprof/gprof.1 ============================================================================== --- stable/7/usr.bin/gprof/gprof.1 Fri May 18 00:02:11 2012 (r235571) +++ stable/7/usr.bin/gprof/gprof.1 Fri May 18 00:03:13 2012 (r235572) @@ -77,7 +77,7 @@ compiler or linker you can use instead of .Fl l Ns Ar c . Read the given object file (the default is -.Pa a.out) +.Pa a.out ) and establishes the relation between its symbol table and the call graph profile. The default graph profile file name is the name Modified: stable/7/usr.bin/ipcrm/ipcrm.1 ============================================================================== --- stable/7/usr.bin/ipcrm/ipcrm.1 Fri May 18 00:02:11 2012 (r235571) +++ stable/7/usr.bin/ipcrm/ipcrm.1 Fri May 18 00:03:13 2012 (r235572) @@ -112,7 +112,7 @@ If the identifier or the key is -1, it w .Xr ipcs 1 .Sh HISTORY The wiping of all System V IPC objects was first implemented in -.Fx 6.4 and 7.1. +.Fx 6.4 No and 7.1. .Sh AUTHORS The original author was Adam Glass. The wiping of all System V IPC objects was thought up by Callum Modified: stable/7/usr.bin/join/join.1 ============================================================================== --- stable/7/usr.bin/join/join.1 Fri May 18 00:02:11 2012 (r235571) +++ stable/7/usr.bin/join/join.1 Fri May 18 00:03:13 2012 (r235572) @@ -113,7 +113,7 @@ representing the join field. The elements of list must be either comma .Pq Ql \&, or whitespace separated. -(The latter requires quoting to protect it from the shell, or, a simpler +(The letter requires quoting to protect it from the shell, or, a simpler approach is to use multiple .Fl o options.) Modified: stable/7/usr.bin/limits/limits.1 ============================================================================== --- stable/7/usr.bin/limits/limits.1 Fri May 18 00:02:11 2012 (r235571) +++ stable/7/usr.bin/limits/limits.1 Fri May 18 00:03:13 2012 (r235572) @@ -176,7 +176,7 @@ limits are affected until overridden lat or .Fl H options. -.Fl e +.It Fl e Select .Dq "eval mode" formatting for output. Modified: stable/7/usr.bin/ncplogin/ncplogout.1 ============================================================================== --- stable/7/usr.bin/ncplogin/ncplogout.1 Fri May 18 00:02:11 2012 (r235571) +++ stable/7/usr.bin/ncplogin/ncplogout.1 Fri May 18 00:03:13 2012 (r235572) @@ -30,7 +30,7 @@ The options are: .Bl -tag -width indent .It Fl S Ar server Specify the name of the -.Tn Netware +.Tn NetWare server to which the connection should be terminated. Can be omitted if there is only one connection active. Modified: stable/7/usr.bin/tftp/tftp.1 ============================================================================== --- stable/7/usr.bin/tftp/tftp.1 Fri May 18 00:02:11 2012 (r235571) +++ stable/7/usr.bin/tftp/tftp.1 Fri May 18 00:03:13 2012 (r235572) @@ -112,9 +112,9 @@ commands. Enable or disable debugging levels during verbose output. The value of .Ar level can be one of -.Cm packet, simple, options, +.Cm packet , simple , options , or -.Cm access. +.Cm access . .Pp .It Cm get Oo Ar host : Oc Ns Ar file Op Ar localname .It Cm get Xo Modified: stable/7/usr.bin/who/who.1 ============================================================================== --- stable/7/usr.bin/who/who.1 Fri May 18 00:02:11 2012 (r235571) +++ stable/7/usr.bin/who/who.1 Fri May 18 00:03:13 2012 (r235572) @@ -79,7 +79,7 @@ An error occurred. Show idle time for each user in hours and minutes as .Ar hh Ns : Ns Ar mm , .Ql \&. -if the user has been idle less that a minute, and +if the user has been idle less than a minute, and .Dq Li old if the user has been idle more than 24 hours. .It Cm am I Modified: stable/7/usr.bin/whois/whois.1 ============================================================================== --- stable/7/usr.bin/whois/whois.1 Fri May 18 00:02:11 2012 (r235571) +++ stable/7/usr.bin/whois/whois.1 Fri May 18 00:03:13 2012 (r235572) @@ -207,12 +207,12 @@ This option is deprecated; use the option with an argument of .Qq Li RU instead. +.El .Pp The operands specified to .Nm are treated independently and may be used as queries on different whois servers. -.El .Sh EXIT STATUS .Ex -std .Sh EXAMPLES Modified: stable/7/usr.sbin/pkg_install/updating/pkg_updating.1 ============================================================================== --- stable/7/usr.sbin/pkg_install/updating/pkg_updating.1 Fri May 18 00:02:11 2012 (r235571) +++ stable/7/usr.sbin/pkg_install/updating/pkg_updating.1 Fri May 18 00:03:13 2012 (r235572) @@ -79,7 +79,7 @@ Location of the ports tree. .It Pa /var/db/pkg Default location of the installed package database. .It Pa /usr/ports -The default ports directory and default location of the UPDATING file +The default ports directory and default location of the UPDATING file. .El .Sh SEE ALSO .Xr pkg_add 1 , From owner-svn-src-all@FreeBSD.ORG Fri May 18 00:07:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EEA531065670; Fri, 18 May 2012 00:07:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8FCB8FC08; Fri, 18 May 2012 00:07:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I07mPM023642; Fri, 18 May 2012 00:07:48 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I07mUZ023640; Fri, 18 May 2012 00:07:48 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180007.q4I07mUZ023640@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 00:07:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235573 - stable/9/usr.bin/unzip X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 00:07:49 -0000 Author: gjb (doc committer) Date: Fri May 18 00:07:48 2012 New Revision: 235573 URL: http://svn.freebsd.org/changeset/base/235573 Log: MFC r235252: Document the unzip(1) '-Z' option implemented in r234206. Modified: stable/9/usr.bin/unzip/unzip.1 Directory Properties: stable/9/usr.bin/unzip/ (props changed) Modified: stable/9/usr.bin/unzip/unzip.1 ============================================================================== --- stable/9/usr.bin/unzip/unzip.1 Fri May 18 00:03:13 2012 (r235572) +++ stable/9/usr.bin/unzip/unzip.1 Fri May 18 00:07:48 2012 (r235573) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 21, 2010 +.Dd May 10, 2012 .Dt UNZIP 1 .Os .Sh NAME @@ -103,6 +103,16 @@ content of the archive. .It Fl x Ar pattern Exclude files matching the pattern .Ar pattern . +.It Fl Z Ar mode +Emulate +.Xr zipinfo 1L +mode. +Enabling +.Xr zipinfo 1L +mode changes the way in which additional arguments are parsed. +Currently only +.Xr zipinfo 1L +mode 1 is supported, which lists the file names one per line. .El .Pp Note that only one of From owner-svn-src-all@FreeBSD.ORG Fri May 18 00:08:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2BCD810656D7; Fri, 18 May 2012 00:08:10 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 15E848FC17; Fri, 18 May 2012 00:08:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I0899s023691; Fri, 18 May 2012 00:08:09 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I089Q7023689; Fri, 18 May 2012 00:08:09 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180008.q4I089Q7023689@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 00:08:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235574 - stable/8/usr.bin/unzip X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 00:08:10 -0000 Author: gjb (doc committer) Date: Fri May 18 00:08:09 2012 New Revision: 235574 URL: http://svn.freebsd.org/changeset/base/235574 Log: MFC r235252: Document the unzip(1) '-Z' option implemented in r234206. Modified: stable/8/usr.bin/unzip/unzip.1 Directory Properties: stable/8/usr.bin/unzip/ (props changed) Modified: stable/8/usr.bin/unzip/unzip.1 ============================================================================== --- stable/8/usr.bin/unzip/unzip.1 Fri May 18 00:07:48 2012 (r235573) +++ stable/8/usr.bin/unzip/unzip.1 Fri May 18 00:08:09 2012 (r235574) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 16, 2010 +.Dd May 10, 2012 .Dt UNZIP 1 .Os .Sh NAME @@ -103,6 +103,16 @@ content of the archive. .It Fl x Ar pattern Exclude files matching the pattern .Ar pattern . +.It Fl Z Ar mode +Emulate +.Xr zipinfo 1L +mode. +Enabling +.Xr zipinfo 1L +mode changes the way in which additional arguments are parsed. +Currently only +.Xr zipinfo 1L +mode 1 is supported, which lists the file names one per line. .El .Pp Note that only one of From owner-svn-src-all@FreeBSD.ORG Fri May 18 00:31:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F0D611065670; Fri, 18 May 2012 00:31:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D759A8FC08; Fri, 18 May 2012 00:31:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I0VLOf024767; Fri, 18 May 2012 00:31:21 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I0VLQg024737; Fri, 18 May 2012 00:31:21 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180031.q4I0VLQg024737@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 00:31:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235575 - in stable/9: contrib/bsnmp/snmp_usm contrib/bsnmp/snmp_vacm lib/libbluetooth lib/libc/net lib/libc/posix1e lib/libc/rpc lib/libc/stdlib lib/libc/string lib/libelf lib/libgpib ... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 00:31:22 -0000 Author: gjb (doc committer) Date: Fri May 18 00:31:20 2012 New Revision: 235575 URL: http://svn.freebsd.org/changeset/base/235575 Log: MFC r235286: General mdoc(7) and typo fixes. PR: 167734 Modified: stable/9/contrib/bsnmp/snmp_usm/snmp_usm.3 stable/9/contrib/bsnmp/snmp_vacm/snmp_vacm.3 stable/9/lib/libbluetooth/bluetooth.3 stable/9/lib/libc/net/sctp_connectx.3 stable/9/lib/libc/net/sctp_recvmsg.3 stable/9/lib/libc/net/sourcefilter.3 stable/9/lib/libc/posix1e/acl_delete_entry.3 stable/9/lib/libc/rpc/publickey.3 stable/9/lib/libc/stdlib/getenv.3 stable/9/lib/libc/stdlib/strfmon.3 stable/9/lib/libc/string/strlcpy.3 stable/9/lib/libelf/elf_getdata.3 stable/9/lib/libelf/elf_strptr.3 stable/9/lib/libelf/gelf_getphdr.3 stable/9/lib/libelf/gelf_newehdr.3 stable/9/lib/libgpib/gpib.3 stable/9/lib/libkvm/kvm_getpcpu.3 stable/9/lib/libprocstat/libprocstat.3 stable/9/lib/libradius/libradius.3 stable/9/lib/libtacplus/libtacplus.3 stable/9/lib/libusb/libusb.3 stable/9/lib/libusb/libusb20.3 stable/9/lib/msun/man/cexp.3 stable/9/lib/msun/man/complex.3 stable/9/share/man/man3/pthread.3 stable/9/share/man/man3/pthread_condattr.3 stable/9/sys/netinet/libalias/libalias.3 stable/9/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.3 stable/9/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 Directory Properties: stable/9/contrib/bsnmp/ (props changed) stable/9/lib/libbluetooth/ (props changed) stable/9/lib/libc/ (props changed) stable/9/lib/libelf/ (props changed) stable/9/lib/libgpib/ (props changed) stable/9/lib/libkvm/ (props changed) stable/9/lib/libprocstat/ (props changed) stable/9/lib/libradius/ (props changed) stable/9/lib/libtacplus/ (props changed) stable/9/lib/libusb/ (props changed) stable/9/lib/msun/ (props changed) stable/9/share/man/man3/ (props changed) stable/9/sys/ (props changed) stable/9/usr.sbin/bsnmpd/ (props changed) stable/9/usr.sbin/bsnmpd/modules/snmp_wlan/ (props changed) Modified: stable/9/contrib/bsnmp/snmp_usm/snmp_usm.3 ============================================================================== --- stable/9/contrib/bsnmp/snmp_usm/snmp_usm.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/contrib/bsnmp/snmp_usm/snmp_usm.3 Fri May 18 00:31:20 2012 (r235575) @@ -57,7 +57,7 @@ An advisory lock used to coordinate seve altering the SNMP USM users. .It Va usmUserTable The table contains all SNMP USM users configured in -.Nm bsnmpd. +.Nm bsnmpd . The table contains the following objects .Bl -tag -width ".It Va usmUserEngineID" .It Va usmUserEngineID @@ -102,7 +102,7 @@ module These columns may be used to change the user's privacy key. .It Va usmUserPublic An arbitrary octet string that may be modified to confirm a SET operation on any -of the columns was successfull. +of the columns was successful. .It Va usmUserStorageType This column always has either of two values. Entries created via .Nm bsnmpd's Modified: stable/9/contrib/bsnmp/snmp_vacm/snmp_vacm.3 ============================================================================== --- stable/9/contrib/bsnmp/snmp_vacm/snmp_vacm.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/contrib/bsnmp/snmp_vacm/snmp_vacm.3 Fri May 18 00:31:20 2012 (r235575) @@ -76,7 +76,7 @@ objects under the subtree in the relevan .It Va vacmViewTreeFamilyTable The table contains a list of SNMP views, i.e. entries specifying the OID of a MIB subtree and whether access to the objects under this subtree is to be -allowed or forbiden. +allowed or forbidden. .El .Sh FILES .Bl -tag -width "XXXXXXXXX" Modified: stable/9/lib/libbluetooth/bluetooth.3 ============================================================================== --- stable/9/lib/libbluetooth/bluetooth.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libbluetooth/bluetooth.3 Fri May 18 00:31:20 2012 (r235575) @@ -494,7 +494,8 @@ previously obtained with .Xr bt_devopen 3 . Filtering can be done on packet types, i.e. .Dv ACL , -.Dv SCO or +.Dv SCO +or .Dv HCI , command and event packets, and, in addition, on .Dv HCI Modified: stable/9/lib/libc/net/sctp_connectx.3 ============================================================================== --- stable/9/lib/libc/net/sctp_connectx.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libc/net/sctp_connectx.3 Fri May 18 00:31:20 2012 (r235575) @@ -36,7 +36,7 @@ .Os .Sh NAME .Nm sctp_connectx -.Nd connect an SCTP socket with multiple destination addresses. +.Nd connect an SCTP socket with multiple destination addresses .Sh LIBRARY .Lb libc .Sh SYNOPSIS Modified: stable/9/lib/libc/net/sctp_recvmsg.3 ============================================================================== --- stable/9/lib/libc/net/sctp_recvmsg.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libc/net/sctp_recvmsg.3 Fri May 18 00:31:20 2012 (r235575) @@ -66,7 +66,7 @@ For a one-to-many (SOCK_SEQPACKET) type .Fn sctp_recvmsg after having implicitly started an association via one of the send calls including -.Fn sctp_sendmsg +.Fn sctp_sendmsg , .Fn sendto and .Fn sendmsg . Modified: stable/9/lib/libc/net/sourcefilter.3 ============================================================================== --- stable/9/lib/libc/net/sourcefilter.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libc/net/sourcefilter.3 Fri May 18 00:31:20 2012 (r235575) @@ -158,7 +158,7 @@ For the protocol-independent functions .Fn getsourcefilter and .Fn setsourcefilter , -the argument +the .Fa grouplen argument specifies the size of the structure pointed to by .Fa group . @@ -220,7 +220,7 @@ operation. .Sh SEE ALSO .Xr ip 4 , .Xr ip6 4 , -.Xr multicast 4, +.Xr multicast 4 , .Xr ifmcstat 8 .Rs .%A D. Thaler Modified: stable/9/lib/libc/posix1e/acl_delete_entry.3 ============================================================================== --- stable/9/lib/libc/posix1e/acl_delete_entry.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libc/posix1e/acl_delete_entry.3 Fri May 18 00:31:20 2012 (r235575) @@ -30,7 +30,7 @@ .Os .Sh NAME .Nm acl_delete_entry , -.Nm acl_delete_entry_np , +.Nm acl_delete_entry_np .Nd delete an ACL entry from an ACL .Sh LIBRARY .Lb libc Modified: stable/9/lib/libc/rpc/publickey.3 ============================================================================== --- stable/9/lib/libc/rpc/publickey.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libc/rpc/publickey.3 Fri May 18 00:31:20 2012 (r235575) @@ -35,14 +35,14 @@ has an extra argument, which is used to decrypt the encrypted secret key stored in the database. Both routines return 1 if they are successful in finding the key, 0 otherwise. The keys are returned as -.Dv NULL Ns \-terminated , +.Dv NUL Ns \-terminated , hexadecimal strings. If the password supplied to .Fn getsecretkey fails to decrypt the secret key, the routine will return 1 but the .Fa secretkey argument will be a -.Dv NULL +.Dv NUL string .Pq Dq . .Sh SEE ALSO Modified: stable/9/lib/libc/stdlib/getenv.3 ============================================================================== --- stable/9/lib/libc/stdlib/getenv.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libc/stdlib/getenv.3 Fri May 18 00:31:20 2012 (r235575) @@ -152,7 +152,8 @@ failed because is a .Dv NULL pointer, -.Fa string is without an +.Fa string +is without an .Dq Li \&= character or .Dq Li \&= Modified: stable/9/lib/libc/stdlib/strfmon.3 ============================================================================== --- stable/9/lib/libc/stdlib/strfmon.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libc/stdlib/strfmon.3 Fri May 18 00:31:20 2012 (r235575) @@ -115,14 +115,14 @@ character is written. .El .Sh RETURN VALUES If the total number of resulting bytes including the terminating -.Dv NULL +.Dv NUL byte is not more than .Fa maxsize , .Fn strfmon returns the number of bytes placed into the array pointed to by .Fa s , not including the terminating -.Dv NULL +.Dv NUL byte. Otherwise, \-1 is returned, the contents of the array are indeterminate, Modified: stable/9/lib/libc/string/strlcpy.3 ============================================================================== --- stable/9/lib/libc/string/strlcpy.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libc/string/strlcpy.3 Fri May 18 00:31:20 2012 (r235575) @@ -169,7 +169,7 @@ if (strlcat(pname, file, sizeof(pname)) .Ed .Pp Since it is known how many characters were copied the first time, things -can be sped up a bit by using a copy instead of an append +can be sped up a bit by using a copy instead of an append. .Bd -literal -offset indent char *dir, *file, pname[MAXPATHLEN]; size_t n; Modified: stable/9/lib/libelf/elf_getdata.3 ============================================================================== --- stable/9/lib/libelf/elf_getdata.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libelf/elf_getdata.3 Fri May 18 00:31:20 2012 (r235575) @@ -144,7 +144,7 @@ structures of type .Dv ELF_T_BYTE . .Ss Special handling of zero-sized and SHT_NOBITS sections For sections of type -.Dv SHT_NOBITS, +.Dv SHT_NOBITS , and for zero-sized sections, the functions .Fn elf_getdata Modified: stable/9/lib/libelf/elf_strptr.3 ============================================================================== --- stable/9/lib/libelf/elf_strptr.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libelf/elf_strptr.3 Fri May 18 00:31:20 2012 (r235575) @@ -64,7 +64,7 @@ encountered. .It Bq Er ELF_E_ARGUMENT Argument .Ar elf -was NULL +was NULL. .It Bq Er ELF_E_ARGUMENT Argument .Ar elf Modified: stable/9/lib/libelf/gelf_getphdr.3 ============================================================================== --- stable/9/lib/libelf/gelf_getphdr.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libelf/gelf_getphdr.3 Fri May 18 00:31:20 2012 (r235575) @@ -66,7 +66,7 @@ Function will retrieve the program header table entry at index .Ar index from ELF descriptor -.Ar elf. +.Ar elf . The translated program header table entry will be written to the address pointed to be argument .Ar dst . Modified: stable/9/lib/libelf/gelf_newehdr.3 ============================================================================== --- stable/9/lib/libelf/gelf_newehdr.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libelf/gelf_newehdr.3 Fri May 18 00:31:20 2012 (r235575) @@ -58,7 +58,8 @@ structure. Function .Fn elf64_newehdr returns a pointer to a 64 bit -.Vt Elf64_Ehdr structure. +.Vt Elf64_Ehdr +structure. .Pp When argument .Ar elfclass Modified: stable/9/lib/libgpib/gpib.3 ============================================================================== --- stable/9/lib/libgpib/gpib.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libgpib/gpib.3 Fri May 18 00:31:20 2012 (r235575) @@ -667,7 +667,7 @@ and sends its contents to the device. .Pp The function .Fn ibwrtkey -is obsolete, and not implemented +is obsolete, and not implemented. .Pp The function .Fn ibxtrc Modified: stable/9/lib/libkvm/kvm_getpcpu.3 ============================================================================== --- stable/9/lib/libkvm/kvm_getpcpu.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libkvm/kvm_getpcpu.3 Fri May 18 00:31:20 2012 (r235575) @@ -114,7 +114,7 @@ it returns -1 instead. On success, the .Fn kvm_getpcpu function returns a pointer to an allocated buffer or -.Dv NULL. +.Dv NULL . If an error occurs, it returns -1 instead. .Pp @@ -124,7 +124,7 @@ call returns 0; if an error occurs, it r .Pp If any function encounters an error, then an error message may be retrieved via -.Xr kvm_geterr 3. +.Xr kvm_geterr 3 . .Sh SEE ALSO .Xr free 3 , .Xr kvm 3 Modified: stable/9/lib/libprocstat/libprocstat.3 ============================================================================== --- stable/9/lib/libprocstat/libprocstat.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libprocstat/libprocstat.3 Fri May 18 00:31:20 2012 (r235575) @@ -194,7 +194,7 @@ The .Fn procstat_get_socket_info and .Fn procstat_get_vnode_info -functions are used to retrive information about pipes, pseudo-terminals, +functions are used to retrieve information about pipes, pseudo-terminals, sockets, and vnodes, respectively. Each of them have a similar interface API. The Modified: stable/9/lib/libradius/libradius.3 ============================================================================== --- stable/9/lib/libradius/libradius.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libradius/libradius.3 Fri May 18 00:31:20 2012 (r235575) @@ -108,8 +108,7 @@ allows clients to perform authentication network requests to remote servers. .Ss Initialization To use the library, an application must first call -.Fn rad_auth_open -, +.Fn rad_auth_open , .Fn rad_acct_open or .Fn rad_server_open @@ -119,8 +118,7 @@ which provides the context for subsequen The former function is used for RADIUS authentication and the latter is used for RADIUS accounting. Calls to -.Fn rad_auth_open -, +.Fn rad_auth_open , .Fn rad_acct_open and .Fn rad_server_open @@ -487,7 +485,7 @@ To respond to the request you should cal .Fn rad_create_response and fill response content with same packet writing functions as for client. When packet is ready, it should be sent with -.Fn rad_send_response +.Fn rad_send_response . .Sh RETURN VALUES The following functions return a non-negative value on success. If Modified: stable/9/lib/libtacplus/libtacplus.3 ============================================================================== --- stable/9/lib/libtacplus/libtacplus.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libtacplus/libtacplus.3 Fri May 18 00:31:20 2012 (r235575) @@ -380,7 +380,7 @@ the request, and waits for a reply. On failure, .Fn tac_send_acct returns \-1. -Otherwise, it returns the TACACS+ status code +Otherwise, it returns the TACACS+ status code. Possible status codes, defined in .In taclib.h , include: Modified: stable/9/lib/libusb/libusb.3 ============================================================================== --- stable/9/lib/libusb/libusb.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libusb/libusb.3 Fri May 18 00:31:20 2012 (r235575) @@ -100,12 +100,12 @@ counter decremented once. .Ft uint8_t .Fn libusb_get_bus_number "libusb_device *dev" Returns the number of the bus contained by the device -.Fa dev. +.Fa dev . .Pp .Ft uint8_t .Fn libusb_get_device_address "libusb_device *dev" Returns the device_address contained by the device -.Fa dev. +.Fa dev . .Pp .Ft enum libusb_speed .Fn libusb_get_device_speed "libusb_device *dev" @@ -127,12 +127,12 @@ LIBUSB_ERROR_OTHERS on other failure. .Ft libusb_device * .Fn libusb_ref_device "libusb_device *dev" Increment the reference counter of the device -.Fa dev. +.Fa dev . .Pp .Ft void .Fn libusb_unref_device "libusb_device *dev" Decrement the reference counter of the device -.Fa dev. +.Fa dev . .Pp .Ft int .Fn libusb_open "libusb_device *dev" "libusb_device_handle **devh" @@ -147,7 +147,7 @@ disconnected and a LIBUSB_ERROR code on A convenience function to open a device by vendor and product IDs .Fa vid and -.Fa pid. +.Fa pid . Returns NULL on error. .Pp .Ft void @@ -161,7 +161,7 @@ Returns NULL on error. .Pp .Ft int .Fn libusb_get_configuration "libusb_device_handle *devh" "int *config" -Returns the bConfiguration value of the current configuration. +Returns the value of the current configuration. Returns 0 on success, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and a LIBUSB_ERROR code on error. @@ -171,7 +171,7 @@ and a LIBUSB_ERROR code on error. Set the active configuration to .Fa config for the device contained by -.Fa devh. +.Fa devh . This function returns 0 on success, LIBUSB_ERROR_NOT_FOUND if the requested configuration does not exist, LIBUSB_ERROR_BUSY if the interfaces are currently claimed, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and a @@ -180,7 +180,7 @@ LIBUSB_ERROR code on failure. .Ft int .Fn libusb_claim_interface "libusb_device_handle *devh" "int interface_number" Claim an interface in a given libusb_handle -.Fa devh. +.Fa devh . This is a non-blocking function. It returns 0 on success, LIBUSB_ERROR_NOT_FOUND if the requested interface does not exist, LIBUSB_ERROR_BUSY if a program or @@ -279,7 +279,7 @@ LIBUSB_ERROR code on failure. .Ft int .Fn libusb_get_device_descriptor "libusb_device *dev" "libusb_device_descriptor *desc" Get the USB device descriptor for the device -.Fa dev. +.Fa dev . This is a non-blocking function. Returns 0 on success and a LIBUSB_ERROR code on failure. @@ -324,11 +324,11 @@ on success and a LIBUSB_ERROR code on fa This function parses the USB 3.0 endpoint companion descriptor in host endian format pointed to by .Fa buf and having a length of -.Fa len. +.Fa len . Typically these arguments are the extra and extra_length fields of the endpoint descriptor. On success the pointer to resulting descriptor is stored at the location given by -.Fa ep_comp. +.Fa ep_comp . Returns zero on success and a LIBUSB_ERROR code on failure. On success the parsed USB 3.0 endpoint companion descriptor must be freed using the libusb_free_ss_endpoint_comp function. @@ -342,9 +342,9 @@ This function is NULL safe and frees a p This function parses a Binary Object Store, BOS, descriptor into host endian format pointed to by .Fa buf and having a length of -.Fa len. +.Fa len . On success the pointer to resulting descriptor is stored at the location given by -.Fa bos. +.Fa bos . Returns zero on success and a LIBUSB_ERROR code on failure. On success the parsed BOS descriptor must be freed using the libusb_free_bos_descriptor function. Modified: stable/9/lib/libusb/libusb20.3 ============================================================================== --- stable/9/lib/libusb/libusb20.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/libusb/libusb20.3 Fri May 18 00:31:20 2012 (r235575) @@ -331,7 +331,7 @@ packets are avoided for proxy buffers. .Pp . .Fn libusb20_tr_get_max_total_length -function will return the maximum value for the data length sum of all USB +will return the maximum value for the data length sum of all USB frames associated with an USB transfer. In case of control transfers the value returned does not include the length of the SETUP packet, 8 bytes, which is part of frame zero. @@ -815,7 +815,7 @@ returns the current speed of the given U .Pp . .Fn libusb20_dev_get_config_index -This function returns the currently select config index for the given +returns the currently selected config index for the given USB device. . .Pp @@ -832,7 +832,7 @@ will set the debug level for the given U .Pp . .Fn libusb20_dev_wait_process -function will wait until a pending USB transfer has completed on +will wait until a pending USB transfer has completed on the given USB device. . A timeout value can be specified which is passed on to the @@ -866,7 +866,7 @@ returned. .Pp . .Fn libusb20_be_get_dev_quirk -This function will return the device quirk according to +will return the device quirk according to .Fa index into the libusb20_quirk structure pointed to by .Fa pq . @@ -948,7 +948,7 @@ Dequeued USB devices will not be freed w .Pp . .Fn libusb20_be_enqueue_device -This function will enqueue the given USB device pointer in the backend USB device list. +will enqueue the given USB device pointer in the backend USB device list. . Enqueued USB devices will get freed when the backend is freed. . Modified: stable/9/lib/msun/man/cexp.3 ============================================================================== --- stable/9/lib/msun/man/cexp.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/msun/man/cexp.3 Fri May 18 00:31:20 2012 (r235575) @@ -48,7 +48,7 @@ functions compute the complex exponentia .Fa z , also known as .Em cis Ns ( Ns -.Fa z Ns ) +.Fa z Ns ) . .Sh RETURN VALUES For real numbers .Fa x Modified: stable/9/lib/msun/man/complex.3 ============================================================================== --- stable/9/lib/msun/man/complex.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/lib/msun/man/complex.3 Fri May 18 00:31:20 2012 (r235575) @@ -101,7 +101,7 @@ The functions described here conform to .St -isoC-99 . .Sh BUGS -The trigonmetric and hyperbolic functions +The inverse trigonometric and hyperbolic functions .Fn cacos , .Fn cacosh , .Fn casin , Modified: stable/9/share/man/man3/pthread.3 ============================================================================== --- stable/9/share/man/man3/pthread.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/share/man/man3/pthread.3 Fri May 18 00:31:20 2012 (r235575) @@ -452,7 +452,7 @@ Set the thread-specific value for the sp .Fa "void \*[lp]*child\*[rp]\*[lp]void\*[rp]" .Fc .Xc -Register fork handlers +Register fork handlers. .It Xo .Ft void .Fn pthread_cleanup_pop "int execute" Modified: stable/9/share/man/man3/pthread_condattr.3 ============================================================================== --- stable/9/share/man/man3/pthread_condattr.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/share/man/man3/pthread_condattr.3 Fri May 18 00:31:20 2012 (r235575) @@ -35,7 +35,7 @@ .Nm pthread_condattr_getclock , .Nm pthread_condattr_setclock , .Nm pthread_condattr_getpshared , -.Nm pthread_condattr_setpshared , +.Nm pthread_condattr_setpshared .Nd condition attribute operations .Sh LIBRARY .Lb libpthread Modified: stable/9/sys/netinet/libalias/libalias.3 ============================================================================== --- stable/9/sys/netinet/libalias/libalias.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/sys/netinet/libalias/libalias.3 Fri May 18 00:31:20 2012 (r235575) @@ -919,7 +919,7 @@ added support for PPTP and LSNAT as well .An Paolo Pisati Aq piso@FreeBSD.org made the library modular, moving support for all protocols (except for IP, TCP and UDP) to external modules. -.Sh ACKNOWLEDGMENTS +.Sh ACKNOWLEDGEMENTS Listed below, in approximate chronological order, are individuals who have provided valuable comments and/or debugging assistance. .Bd -ragged -offset indent @@ -1277,10 +1277,10 @@ struct dll { .Ed .Bl -inset .It Va name -is the name of the module +is the name of the module. .It Va handle is a pointer to the module obtained through -.Xr dlopen 3 +.Xr dlopen 3 . .El Whenever a module is loaded in userland, an entry is added to .Va dll_chain , Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.3 ============================================================================== --- stable/9/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.3 Fri May 18 00:31:20 2012 (r235575) @@ -306,7 +306,7 @@ This buffer should be at least .Li NG_NODESIZ bytes long. The function returns the node id or 0 if the -node is not found +node is not found. .Pp The function .Fn ng_node_type @@ -397,7 +397,8 @@ of the node with id .Fa peer . The functions return 0 on success or -1 otherwise. The function -.Fn ng_connect2_tee_id does the same as +.Fn ng_connect2_tee_id +does the same as .Fn ng_connect2_id except, that it puts an unnamed tee node between the two nodes. .Pp Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 ============================================================================== --- stable/9/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 Fri May 18 00:08:09 2012 (r235574) +++ stable/9/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 Fri May 18 00:31:20 2012 (r235575) @@ -61,8 +61,8 @@ via .Va wlanParentIfName column. Any optional parameters may be set via the -.Va wlanIfaceOperatingMode, -.Va wlanIfaceFlags, +.Va wlanIfaceOperatingMode , +.Va wlanIfaceFlags , .Va wlanIfaceBssid and .Va wlanIfaceLocalAddress From owner-svn-src-all@FreeBSD.ORG Fri May 18 00:32:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11303106567D; Fri, 18 May 2012 00:32:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E53B48FC1F; Fri, 18 May 2012 00:32:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I0WTf3024864; Fri, 18 May 2012 00:32:29 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I0WTFg024840; Fri, 18 May 2012 00:32:29 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180032.q4I0WTFg024840@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 00:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235576 - in stable/8: lib/libbluetooth lib/libc/net lib/libc/posix1e lib/libc/rpc lib/libc/stdlib lib/libc/string lib/libelf lib/libgpib lib/libkvm lib/libradius lib/libusb lib/msun/ma... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 00:32:30 -0000 Author: gjb (doc committer) Date: Fri May 18 00:32:29 2012 New Revision: 235576 URL: http://svn.freebsd.org/changeset/base/235576 Log: MFC r235286: General mdoc(7) and typo fixes. PR: 167734 Modified: stable/8/lib/libbluetooth/bluetooth.3 stable/8/lib/libc/net/sctp_connectx.3 stable/8/lib/libc/net/sctp_recvmsg.3 stable/8/lib/libc/net/sourcefilter.3 stable/8/lib/libc/posix1e/acl_delete_entry.3 stable/8/lib/libc/rpc/publickey.3 stable/8/lib/libc/stdlib/getenv.3 stable/8/lib/libc/stdlib/strfmon.3 stable/8/lib/libc/string/strlcpy.3 stable/8/lib/libelf/elf_getdata.3 stable/8/lib/libelf/elf_strptr.3 stable/8/lib/libelf/gelf_getphdr.3 stable/8/lib/libelf/gelf_newehdr.3 stable/8/lib/libgpib/gpib.3 stable/8/lib/libkvm/kvm_getpcpu.3 stable/8/lib/libradius/libradius.3 stable/8/lib/libusb/libusb.3 stable/8/lib/libusb/libusb20.3 stable/8/lib/msun/man/complex.3 stable/8/share/man/man3/pthread.3 stable/8/share/man/man3/pthread_condattr.3 stable/8/sys/netinet/libalias/libalias.3 stable/8/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.3 Directory Properties: stable/8/lib/libbluetooth/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libelf/ (props changed) stable/8/lib/libgpib/ (props changed) stable/8/lib/libkvm/ (props changed) stable/8/lib/libradius/ (props changed) stable/8/lib/libusb/ (props changed) stable/8/lib/msun/ (props changed) stable/8/share/man/man3/ (props changed) stable/8/sys/ (props changed) stable/8/usr.sbin/bsnmpd/ (props changed) Modified: stable/8/lib/libbluetooth/bluetooth.3 ============================================================================== --- stable/8/lib/libbluetooth/bluetooth.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libbluetooth/bluetooth.3 Fri May 18 00:32:29 2012 (r235576) @@ -494,7 +494,8 @@ previously obtained with .Xr bt_devopen 3 . Filtering can be done on packet types, i.e. .Dv ACL , -.Dv SCO or +.Dv SCO +or .Dv HCI , command and event packets, and, in addition, on .Dv HCI Modified: stable/8/lib/libc/net/sctp_connectx.3 ============================================================================== --- stable/8/lib/libc/net/sctp_connectx.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libc/net/sctp_connectx.3 Fri May 18 00:32:29 2012 (r235576) @@ -36,7 +36,7 @@ .Os .Sh NAME .Nm sctp_connectx -.Nd connect an SCTP socket with multiple destination addresses. +.Nd connect an SCTP socket with multiple destination addresses .Sh LIBRARY .Lb libc .Sh SYNOPSIS Modified: stable/8/lib/libc/net/sctp_recvmsg.3 ============================================================================== --- stable/8/lib/libc/net/sctp_recvmsg.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libc/net/sctp_recvmsg.3 Fri May 18 00:32:29 2012 (r235576) @@ -66,7 +66,7 @@ For a one-to-many (SOCK_SEQPACKET) type .Fn sctp_recvmsg after having implicitly started an association via one of the send calls including -.Fn sctp_sendmsg +.Fn sctp_sendmsg , .Fn sendto and .Fn sendmsg . Modified: stable/8/lib/libc/net/sourcefilter.3 ============================================================================== --- stable/8/lib/libc/net/sourcefilter.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libc/net/sourcefilter.3 Fri May 18 00:32:29 2012 (r235576) @@ -158,7 +158,7 @@ For the protocol-independent functions .Fn getsourcefilter and .Fn setsourcefilter , -the argument +the .Fa grouplen argument specifies the size of the structure pointed to by .Fa group . @@ -220,7 +220,7 @@ operation. .Sh SEE ALSO .Xr ip 4 , .Xr ip6 4 , -.Xr multicast 4, +.Xr multicast 4 , .Xr ifmcstat 8 .Rs .%A D. Thaler Modified: stable/8/lib/libc/posix1e/acl_delete_entry.3 ============================================================================== --- stable/8/lib/libc/posix1e/acl_delete_entry.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libc/posix1e/acl_delete_entry.3 Fri May 18 00:32:29 2012 (r235576) @@ -30,7 +30,7 @@ .Os .Sh NAME .Nm acl_delete_entry , -.Nm acl_delete_entry_np , +.Nm acl_delete_entry_np .Nd delete an ACL entry from an ACL .Sh LIBRARY .Lb libc Modified: stable/8/lib/libc/rpc/publickey.3 ============================================================================== --- stable/8/lib/libc/rpc/publickey.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libc/rpc/publickey.3 Fri May 18 00:32:29 2012 (r235576) @@ -35,14 +35,14 @@ has an extra argument, which is used to decrypt the encrypted secret key stored in the database. Both routines return 1 if they are successful in finding the key, 0 otherwise. The keys are returned as -.Dv NULL Ns \-terminated , +.Dv NUL Ns \-terminated , hexadecimal strings. If the password supplied to .Fn getsecretkey fails to decrypt the secret key, the routine will return 1 but the .Fa secretkey argument will be a -.Dv NULL +.Dv NUL string .Pq Dq . .Sh SEE ALSO Modified: stable/8/lib/libc/stdlib/getenv.3 ============================================================================== --- stable/8/lib/libc/stdlib/getenv.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libc/stdlib/getenv.3 Fri May 18 00:32:29 2012 (r235576) @@ -143,7 +143,8 @@ failed because is a .Dv NULL pointer, -.Fa string is without an +.Fa string +is without an .Dq Li \&= character or .Dq Li \&= Modified: stable/8/lib/libc/stdlib/strfmon.3 ============================================================================== --- stable/8/lib/libc/stdlib/strfmon.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libc/stdlib/strfmon.3 Fri May 18 00:32:29 2012 (r235576) @@ -115,14 +115,14 @@ character is written. .El .Sh RETURN VALUES If the total number of resulting bytes including the terminating -.Dv NULL +.Dv NUL byte is not more than .Fa maxsize , .Fn strfmon returns the number of bytes placed into the array pointed to by .Fa s , not including the terminating -.Dv NULL +.Dv NUL byte. Otherwise, \-1 is returned, the contents of the array are indeterminate, Modified: stable/8/lib/libc/string/strlcpy.3 ============================================================================== --- stable/8/lib/libc/string/strlcpy.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libc/string/strlcpy.3 Fri May 18 00:32:29 2012 (r235576) @@ -169,7 +169,7 @@ if (strlcat(pname, file, sizeof(pname)) .Ed .Pp Since it is known how many characters were copied the first time, things -can be sped up a bit by using a copy instead of an append +can be sped up a bit by using a copy instead of an append. .Bd -literal -offset indent char *dir, *file, pname[MAXPATHLEN]; size_t n; Modified: stable/8/lib/libelf/elf_getdata.3 ============================================================================== --- stable/8/lib/libelf/elf_getdata.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libelf/elf_getdata.3 Fri May 18 00:32:29 2012 (r235576) @@ -144,7 +144,7 @@ structures of type .Dv ELF_T_BYTE . .Ss Special handling of zero-sized and SHT_NOBITS sections For sections of type -.Dv SHT_NOBITS, +.Dv SHT_NOBITS , and for zero-sized sections, the functions .Fn elf_getdata Modified: stable/8/lib/libelf/elf_strptr.3 ============================================================================== --- stable/8/lib/libelf/elf_strptr.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libelf/elf_strptr.3 Fri May 18 00:32:29 2012 (r235576) @@ -64,7 +64,7 @@ encountered. .It Bq Er ELF_E_ARGUMENT Argument .Ar elf -was NULL +was NULL. .It Bq Er ELF_E_ARGUMENT Argument .Ar elf Modified: stable/8/lib/libelf/gelf_getphdr.3 ============================================================================== --- stable/8/lib/libelf/gelf_getphdr.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libelf/gelf_getphdr.3 Fri May 18 00:32:29 2012 (r235576) @@ -66,7 +66,7 @@ Function will retrieve the program header table entry at index .Ar index from ELF descriptor -.Ar elf. +.Ar elf . The translated program header table entry will be written to the address pointed to be argument .Ar dst . Modified: stable/8/lib/libelf/gelf_newehdr.3 ============================================================================== --- stable/8/lib/libelf/gelf_newehdr.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libelf/gelf_newehdr.3 Fri May 18 00:32:29 2012 (r235576) @@ -58,7 +58,8 @@ structure. Function .Fn elf64_newehdr returns a pointer to a 64 bit -.Vt Elf64_Ehdr structure. +.Vt Elf64_Ehdr +structure. .Pp When argument .Ar elfclass Modified: stable/8/lib/libgpib/gpib.3 ============================================================================== --- stable/8/lib/libgpib/gpib.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libgpib/gpib.3 Fri May 18 00:32:29 2012 (r235576) @@ -667,7 +667,7 @@ and sends its contents to the device. .Pp The function .Fn ibwrtkey -is obsolete, and not implemented +is obsolete, and not implemented. .Pp The function .Fn ibxtrc Modified: stable/8/lib/libkvm/kvm_getpcpu.3 ============================================================================== --- stable/8/lib/libkvm/kvm_getpcpu.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libkvm/kvm_getpcpu.3 Fri May 18 00:32:29 2012 (r235576) @@ -114,7 +114,7 @@ it returns -1 instead. On success, the .Fn kvm_getpcpu function returns a pointer to an allocated buffer or -.Dv NULL. +.Dv NULL . If an error occurs, it returns -1 instead. .Pp @@ -124,7 +124,7 @@ call returns 0; if an error occurs, it r .Pp If any function encounters an error, then an error message may be retrieved via -.Xr kvm_geterr 3. +.Xr kvm_geterr 3 . .Sh SEE ALSO .Xr free 3 , .Xr kvm 3 Modified: stable/8/lib/libradius/libradius.3 ============================================================================== --- stable/8/lib/libradius/libradius.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libradius/libradius.3 Fri May 18 00:32:29 2012 (r235576) @@ -108,8 +108,7 @@ allows clients to perform authentication network requests to remote servers. .Ss Initialization To use the library, an application must first call -.Fn rad_auth_open -, +.Fn rad_auth_open , .Fn rad_acct_open or .Fn rad_server_open @@ -119,8 +118,7 @@ which provides the context for subsequen The former function is used for RADIUS authentication and the latter is used for RADIUS accounting. Calls to -.Fn rad_auth_open -, +.Fn rad_auth_open , .Fn rad_acct_open and .Fn rad_server_open @@ -487,7 +485,7 @@ To respond to the request you should cal .Fn rad_create_response and fill response content with same packet writing functions as for client. When packet is ready, it should be sent with -.Fn rad_send_response +.Fn rad_send_response . .Sh RETURN VALUES The following functions return a non-negative value on success. If Modified: stable/8/lib/libusb/libusb.3 ============================================================================== --- stable/8/lib/libusb/libusb.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libusb/libusb.3 Fri May 18 00:32:29 2012 (r235576) @@ -100,12 +100,12 @@ counter decremented once. .Ft uint8_t .Fn libusb_get_bus_number "libusb_device *dev" Returns the number of the bus contained by the device -.Fa dev. +.Fa dev . .Pp .Ft uint8_t .Fn libusb_get_device_address "libusb_device *dev" Returns the device_address contained by the device -.Fa dev. +.Fa dev . .Pp .Ft enum libusb_speed .Fn libusb_get_device_speed "libusb_device *dev" @@ -127,12 +127,12 @@ LIBUSB_ERROR_OTHERS on other failure. .Ft libusb_device * .Fn libusb_ref_device "libusb_device *dev" Increment the reference counter of the device -.Fa dev. +.Fa dev . .Pp .Ft void .Fn libusb_unref_device "libusb_device *dev" Decrement the reference counter of the device -.Fa dev. +.Fa dev . .Pp .Ft int .Fn libusb_open "libusb_device *dev" "libusb_device_handle **devh" @@ -147,7 +147,7 @@ disconnected and a LIBUSB_ERROR code on A convenience function to open a device by vendor and product IDs .Fa vid and -.Fa pid. +.Fa pid . Returns NULL on error. .Pp .Ft void @@ -161,7 +161,7 @@ Returns NULL on error. .Pp .Ft int .Fn libusb_get_configuration "libusb_device_handle *devh" "int *config" -Returns the bConfiguration value of the current configuration. +Returns the value of the current configuration. Returns 0 on success, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and a LIBUSB_ERROR code on error. @@ -171,7 +171,7 @@ and a LIBUSB_ERROR code on error. Set the active configuration to .Fa config for the device contained by -.Fa devh. +.Fa devh . This function returns 0 on success, LIBUSB_ERROR_NOT_FOUND if the requested configuration does not exist, LIBUSB_ERROR_BUSY if the interfaces are currently claimed, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and a @@ -180,7 +180,7 @@ LIBUSB_ERROR code on failure. .Ft int .Fn libusb_claim_interface "libusb_device_handle *devh" "int interface_number" Claim an interface in a given libusb_handle -.Fa devh. +.Fa devh . This is a non-blocking function. It returns 0 on success, LIBUSB_ERROR_NOT_FOUND if the requested interface does not exist, LIBUSB_ERROR_BUSY if a program or @@ -279,7 +279,7 @@ LIBUSB_ERROR code on failure. .Ft int .Fn libusb_get_device_descriptor "libusb_device *dev" "libusb_device_descriptor *desc" Get the USB device descriptor for the device -.Fa dev. +.Fa dev . This is a non-blocking function. Returns 0 on success and a LIBUSB_ERROR code on failure. @@ -324,11 +324,11 @@ on success and a LIBUSB_ERROR code on fa This function parses the USB 3.0 endpoint companion descriptor in host endian format pointed to by .Fa buf and having a length of -.Fa len. +.Fa len . Typically these arguments are the extra and extra_length fields of the endpoint descriptor. On success the pointer to resulting descriptor is stored at the location given by -.Fa ep_comp. +.Fa ep_comp . Returns zero on success and a LIBUSB_ERROR code on failure. On success the parsed USB 3.0 endpoint companion descriptor must be freed using the libusb_free_ss_endpoint_comp function. @@ -342,9 +342,9 @@ This function is NULL safe and frees a p This function parses a Binary Object Store, BOS, descriptor into host endian format pointed to by .Fa buf and having a length of -.Fa len. +.Fa len . On success the pointer to resulting descriptor is stored at the location given by -.Fa bos. +.Fa bos . Returns zero on success and a LIBUSB_ERROR code on failure. On success the parsed BOS descriptor must be freed using the libusb_free_bos_descriptor function. Modified: stable/8/lib/libusb/libusb20.3 ============================================================================== --- stable/8/lib/libusb/libusb20.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/libusb/libusb20.3 Fri May 18 00:32:29 2012 (r235576) @@ -331,7 +331,7 @@ packets are avoided for proxy buffers. .Pp . .Fn libusb20_tr_get_max_total_length -function will return the maximum value for the data length sum of all USB +will return the maximum value for the data length sum of all USB frames associated with an USB transfer. In case of control transfers the value returned does not include the length of the SETUP packet, 8 bytes, which is part of frame zero. @@ -815,7 +815,7 @@ returns the current speed of the given U .Pp . .Fn libusb20_dev_get_config_index -This function returns the currently select config index for the given +returns the currently selected config index for the given USB device. . .Pp @@ -832,7 +832,7 @@ will set the debug level for the given U .Pp . .Fn libusb20_dev_wait_process -function will wait until a pending USB transfer has completed on +will wait until a pending USB transfer has completed on the given USB device. . A timeout value can be specified which is passed on to the @@ -866,7 +866,7 @@ returned. .Pp . .Fn libusb20_be_get_dev_quirk -This function will return the device quirk according to +will return the device quirk according to .Fa index into the libusb20_quirk structure pointed to by .Fa pq . @@ -948,7 +948,7 @@ Dequeued USB devices will not be freed w .Pp . .Fn libusb20_be_enqueue_device -This function will enqueue the given USB device pointer in the backend USB device list. +will enqueue the given USB device pointer in the backend USB device list. . Enqueued USB devices will get freed when the backend is freed. . Modified: stable/8/lib/msun/man/complex.3 ============================================================================== --- stable/8/lib/msun/man/complex.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/lib/msun/man/complex.3 Fri May 18 00:32:29 2012 (r235576) @@ -97,7 +97,7 @@ The functions described here conform to .St -isoC-99 . .Sh BUGS -The trigonmetric functions +The inverse trigonometric and hyperbolic functions .Fn cacos , .Fn casin , .Fn catan , Modified: stable/8/share/man/man3/pthread.3 ============================================================================== --- stable/8/share/man/man3/pthread.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/share/man/man3/pthread.3 Fri May 18 00:32:29 2012 (r235576) @@ -452,7 +452,7 @@ Set the thread-specific value for the sp .Fa "void \*[lp]*child\*[rp]\*[lp]void\*[rp]" .Fc .Xc -Register fork handlers +Register fork handlers. .It Xo .Ft void .Fn pthread_cleanup_pop "int execute" Modified: stable/8/share/man/man3/pthread_condattr.3 ============================================================================== --- stable/8/share/man/man3/pthread_condattr.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/share/man/man3/pthread_condattr.3 Fri May 18 00:32:29 2012 (r235576) @@ -35,7 +35,7 @@ .Nm pthread_condattr_getclock , .Nm pthread_condattr_setclock , .Nm pthread_condattr_getpshared , -.Nm pthread_condattr_setpshared , +.Nm pthread_condattr_setpshared .Nd condition attribute operations .Sh LIBRARY .Lb libpthread Modified: stable/8/sys/netinet/libalias/libalias.3 ============================================================================== --- stable/8/sys/netinet/libalias/libalias.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/sys/netinet/libalias/libalias.3 Fri May 18 00:32:29 2012 (r235576) @@ -905,7 +905,7 @@ added support for PPTP and LSNAT as well .An Paolo Pisati Aq piso@FreeBSD.org made the library modular, moving support for all protocols (except for IP, TCP and UDP) to external modules. -.Sh ACKNOWLEDGMENTS +.Sh ACKNOWLEDGEMENTS Listed below, in approximate chronological order, are individuals who have provided valuable comments and/or debugging assistance. .Pp @@ -1264,10 +1264,10 @@ struct dll { .Ed .Bl -inset .It Va name -is the name of the module +is the name of the module. .It Va handle is a pointer to the module obtained through -.Xr dlopen 3 +.Xr dlopen 3 . .El Whenever a module is loaded in userland, an entry is added to .Va dll_chain , Modified: stable/8/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.3 ============================================================================== --- stable/8/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.3 Fri May 18 00:31:20 2012 (r235575) +++ stable/8/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.3 Fri May 18 00:32:29 2012 (r235576) @@ -306,7 +306,7 @@ This buffer should be at least .Li NG_NODESIZ bytes long. The function returns the node id or 0 if the -node is not found +node is not found. .Pp The function .Fn ng_node_type @@ -397,7 +397,8 @@ of the node with id .Fa peer . The functions return 0 on success or -1 otherwise. The function -.Fn ng_connect2_tee_id does the same as +.Fn ng_connect2_tee_id +does the same as .Fn ng_connect2_id except, that it puts an unnamed tee node between the two nodes. .Pp From owner-svn-src-all@FreeBSD.ORG Fri May 18 00:40:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54206106566B; Fri, 18 May 2012 00:40:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E2408FC08; Fri, 18 May 2012 00:40:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I0eot1025278; Fri, 18 May 2012 00:40:50 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I0eorP025276; Fri, 18 May 2012 00:40:50 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201205180040.q4I0eorP025276@svn.freebsd.org> From: Xin LI Date: Fri, 18 May 2012 00:40:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235577 - stable/9/usr.sbin/rtprio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 00:40:50 -0000 Author: delphij Date: Fri May 18 00:40:49 2012 New Revision: 235577 URL: http://svn.freebsd.org/changeset/base/235577 Log: MFC r228917: - Fail when the utility is not invoked as rtprio nor idprio. - use warnx() to tell the user whether a process is running in normal, idle or realtime priority. with the old code it would have been possible for another process to send data to stdout between printf("%s: ", p); and printf("* priority\n"); and thus break the formatting. - 'rtprio 10 -0' triggeres non-intuitive behavior. It would first set the priority of itself to 10 *and* would then try to execute '-0'. Of course, setting the priority of [id|rt]prio itself doesn't make a lot of sense, but it is intuitive compared to the previous behavior. - 'rtprio -t --1' will actually pass over the '-1' to rtprio(). Now invoking rtprio like this will catch the wrong usage before passing over the invalid argument to rtprio(). - Garrett Cooper suggested to add further diagnostics where the failure occures, if execvp fails. PR: bin/154042 Submitted by: arundel MFC r235293: Fix the case where the utility is being used to run a command directly, this is a regression introduced with r228917. PR: bin/154042 Submitted by: Bugs Beastie Modified: stable/9/usr.sbin/rtprio/rtprio.c Directory Properties: stable/9/usr.sbin/rtprio/ (props changed) Modified: stable/9/usr.sbin/rtprio/rtprio.c ============================================================================== --- stable/9/usr.sbin/rtprio/rtprio.c Fri May 18 00:32:29 2012 (r235576) +++ stable/9/usr.sbin/rtprio/rtprio.c Fri May 18 00:40:49 2012 (r235577) @@ -53,20 +53,17 @@ int main(int argc, char *argv[]) { struct rtprio rtp; - char *p; - pid_t proc; + const char *progname; + pid_t proc = 0; - /* find basename */ - if ((p = rindex(argv[0], '/')) == NULL) - p = argv[0]; - else - ++p; - proc = 0; + progname = getprogname(); - if (!strcmp(p, "rtprio")) + if (strcmp(progname, "rtprio") == 0) rtp.type = RTP_PRIO_REALTIME; - else if (!strcmp(p, "idprio")) + else if (strcmp(progname, "idprio") == 0) rtp.type = RTP_PRIO_IDLE; + else + errx(1, "invalid progname"); switch (argc) { case 2: @@ -76,20 +73,19 @@ main(int argc, char *argv[]) case 1: if (rtprio(RTP_LOOKUP, proc, &rtp) != 0) err(1, "RTP_LOOKUP"); - printf("%s: ", p); switch (rtp.type) { case RTP_PRIO_REALTIME: case RTP_PRIO_FIFO: - printf("realtime priority %d\n", rtp.prio); + warnx("realtime priority %d", rtp.prio); break; case RTP_PRIO_NORMAL: - printf("normal priority\n"); + warnx("normal priority"); break; case RTP_PRIO_IDLE: - printf("idle priority %d\n", rtp.prio); + warnx("idle priority %d", rtp.prio); break; default: - printf("invalid priority type %d\n", rtp.type); + errx(1, "invalid priority type %d", rtp.type); break; } exit(0); @@ -110,18 +106,21 @@ main(int argc, char *argv[]) break; } - if (argv[2][0] == '-') - proc = parseint(argv[2] + 1, "pid"); + if (argv[2][0] == '-') { + proc = parseint(argv[2], "pid"); + proc = abs(proc); + } + if (rtprio(RTP_SET, proc, &rtp) != 0) err(1, "RTP_SET"); if (proc == 0) { execvp(argv[2], &argv[2]); - err(1, "%s", argv[2]); + err(1, "execvp: %s", argv[2]); } exit(0); } - exit(1); + /* NOTREACHED */ } static int From owner-svn-src-all@FreeBSD.ORG Fri May 18 00:55:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 23A431065672; Fri, 18 May 2012 00:55:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BD1D8FC08; Fri, 18 May 2012 00:55:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I0tm5x025838; Fri, 18 May 2012 00:55:48 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I0tmhB025775; Fri, 18 May 2012 00:55:48 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180055.q4I0tmhB025775@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 00:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235578 - stable/9/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 00:55:49 -0000 Author: gjb (doc committer) Date: Fri May 18 00:55:47 2012 New Revision: 235578 URL: http://svn.freebsd.org/changeset/base/235578 Log: MFC r235317: General mdoc(7) and typo fixes. PR: 167776 Modified: stable/9/share/man/man4/acpi_hp.4 stable/9/share/man/man4/acpi_wmi.4 stable/9/share/man/man4/ahci.4 stable/9/share/man/man4/ath.4 stable/9/share/man/man4/atp.4 stable/9/share/man/man4/bpf.4 stable/9/share/man/man4/bridge.4 stable/9/share/man/man4/capsicum.4 stable/9/share/man/man4/ch.4 stable/9/share/man/man4/cpuctl.4 stable/9/share/man/man4/cxgbe.4 stable/9/share/man/man4/dcons.4 stable/9/share/man/man4/ddb.4 stable/9/share/man/man4/epair.4 stable/9/share/man/man4/fdt.4 stable/9/share/man/man4/fdtbus.4 stable/9/share/man/man4/gdb.4 stable/9/share/man/man4/ip.4 stable/9/share/man/man4/ipmi.4 stable/9/share/man/man4/ipw.4 stable/9/share/man/man4/isci.4 stable/9/share/man/man4/isp.4 stable/9/share/man/man4/iwn.4 stable/9/share/man/man4/mac_none.4 stable/9/share/man/man4/mac_stub.4 stable/9/share/man/man4/mps.4 stable/9/share/man/man4/net80211.4 stable/9/share/man/man4/netmap.4 stable/9/share/man/man4/ng_etf.4 stable/9/share/man/man4/ng_nat.4 stable/9/share/man/man4/ng_netflow.4 stable/9/share/man/man4/ng_socket.4 stable/9/share/man/man4/pcm.4 stable/9/share/man/man4/pcn.4 stable/9/share/man/man4/psm.4 stable/9/share/man/man4/rl.4 stable/9/share/man/man4/run.4 stable/9/share/man/man4/ses.4 stable/9/share/man/man4/siftr.4 stable/9/share/man/man4/simplebus.4 stable/9/share/man/man4/sis.4 stable/9/share/man/man4/sk.4 stable/9/share/man/man4/snd_hda.4 stable/9/share/man/man4/snd_hdspe.4 stable/9/share/man/man4/splash.4 stable/9/share/man/man4/ste.4 stable/9/share/man/man4/termios.4 stable/9/share/man/man4/ti.4 stable/9/share/man/man4/tl.4 stable/9/share/man/man4/tws.4 stable/9/share/man/man4/uhso.4 stable/9/share/man/man4/umcs.4 stable/9/share/man/man4/uslcom.4 stable/9/share/man/man4/vr.4 stable/9/share/man/man4/watchdog.4 stable/9/share/man/man4/wb.4 stable/9/share/man/man4/wpi.4 stable/9/share/man/man4/xl.4 stable/9/share/man/man4/xnb.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/acpi_hp.4 ============================================================================== --- stable/9/share/man/man4/acpi_hp.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/acpi_hp.4 Fri May 18 00:55:47 2012 (r235578) @@ -262,7 +262,7 @@ device driver first appeared in The .Nm driver was written by -.An Michael Gmelin Aq freebsd@grem.de +.An Michael Gmelin Aq freebsd@grem.de . .Pp It has been inspired by hp-wmi driver, which implements a subset of these features (hotkeys) on Linux. @@ -276,7 +276,7 @@ http://www.microsoft.com/whdc/system/pnp .El .Pp This manual page was written by -.An Michael Gmelin Aq freebsd@grem.de +.An Michael Gmelin Aq freebsd@grem.de . .Sh BUGS This driver is experimental and has only been tested on i386 on an HP Compaq 8510p which featured all supported wireless devices (WWAN/BT/WLAN). Modified: stable/9/share/man/man4/acpi_wmi.4 ============================================================================== --- stable/9/share/man/man4/acpi_wmi.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/acpi_wmi.4 Fri May 18 00:55:47 2012 (r235578) @@ -85,12 +85,12 @@ device driver first appeared in The .Nm driver was written by -.An Michael Gmelin Aq freebsd@grem.de +.An Michael Gmelin Aq freebsd@grem.de . .Pp -Work has been inspired by the Linux acpi-wmi driver written by Carlos Corbacho +Work has been inspired by the Linux acpi-wmi driver written by Carlos Corbacho. .Pp See http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx for the specification of ACPI-WMI. .Pp This manual page was written by -.An Michael Gmelin Aq freebsd@grem.de +.An Michael Gmelin Aq freebsd@grem.de . Modified: stable/9/share/man/man4/ahci.4 ============================================================================== --- stable/9/share/man/man4/ahci.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/ahci.4 Fri May 18 00:55:47 2012 (r235578) @@ -51,7 +51,7 @@ The following tunables are settable from .Xr loader 8 : .Bl -ohang .It Va hint.ahci. Ns Ar X Ns Va .msi -controls Message Signaled Interrupts (MSI) usage by the specified controller +controls Message Signaled Interrupts (MSI) usage by the specified controller. .Bl -tag -compact .It 0 MSI disabled; Modified: stable/9/share/man/man4/ath.4 ============================================================================== --- stable/9/share/man/man4/ath.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/ath.4 Fri May 18 00:55:47 2012 (r235578) @@ -186,7 +186,7 @@ ifconfig wlan0 meshid my_mesh mode 11a i .Ed .Pp Create two virtual 802.11a host-based access points, one with -with WEP enabled and one with no security, and bridge them to +WEP enabled and one with no security, and bridge them to the fxp0 (wired) device: .Bd -literal -offset indent ifconfig wlan0 create wlandev ath0 wlanmode hostap \e @@ -221,7 +221,7 @@ data frames failed. This should not happen. .It "ath%d: unable to setup a beacon xmit queue!" The request to the HAL to set up the transmit queue for 802.11 beacon frames -frames failed. +failed. This should not happen. .It "ath%d: 802.11 address: %s" The MAC address programmed in the EEPROM is displayed. Modified: stable/9/share/man/man4/atp.4 ============================================================================== --- stable/9/share/man/man4/atp.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/atp.4 Fri May 18 00:55:47 2012 (r235578) @@ -171,10 +171,10 @@ consoles as well as in X change it to: .Xr loader.conf 5 , .Xr xorg.conf 5 Pq Pa ports/x11/xorg , .Xr moused 8 , -.Xr sysctl 8 . +.Xr sysctl 8 .Sh AUTHORS .An -nosplit The .Nm driver was written by -.An Rohit Grover Aq rgrover1@gmail.com +.An Rohit Grover Aq rgrover1@gmail.com . Modified: stable/9/share/man/man4/bpf.4 ============================================================================== --- stable/9/share/man/man4/bpf.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/bpf.4 Fri May 18 00:55:47 2012 (r235578) @@ -642,7 +642,7 @@ struct bpf_xhdr { uint32_t bh_caplen; /* length of captured portion */ uint32_t bh_datalen; /* original length of packet */ u_short bh_hdrlen; /* length of bpf header (this struct - plus alignment padding */ + plus alignment padding) */ }; struct bpf_hdr { @@ -650,7 +650,7 @@ struct bpf_hdr { uint32_t bh_caplen; /* length of captured portion */ uint32_t bh_datalen; /* original length of packet */ u_short bh_hdrlen; /* length of bpf header (this struct - plus alignment padding */ + plus alignment padding) */ }; .Ed .Pp Modified: stable/9/share/man/man4/bridge.4 ============================================================================== --- stable/9/share/man/man4/bridge.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/bridge.4 Fri May 18 00:55:47 2012 (r235578) @@ -411,7 +411,8 @@ Note that .Fx 6.1, 6.2, 6.3, 7.0, 7.1, and 7.2 have a bug in the EtherIP protocol. For more details and workaround, see -.Xr gif 4 manual page. +.Xr gif 4 +manual page. .Sh SEE ALSO .Xr gif 4 , .Xr ipf 4 , Modified: stable/9/share/man/man4/capsicum.4 ============================================================================== --- stable/9/share/man/man4/capsicum.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/capsicum.4 Fri May 18 00:55:47 2012 (r235578) @@ -55,7 +55,7 @@ A process mode, entered by invoking in which access to global OS namespaces (such as the file system and PID namespaces) is restricted; only explicitly delegated rights, referenced by memory mappings or file descriptors, may be used. -Once set, the flag is inherited by future children proceses, and may not be +Once set, the flag is inherited by future children processes, and may not be cleared. .It capabilities File descriptors that wrap other file descriptors, masking operations that can Modified: stable/9/share/man/man4/ch.4 ============================================================================== --- stable/9/share/man/man4/ch.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/ch.4 Fri May 18 00:55:47 2012 (r235578) @@ -187,7 +187,7 @@ u_int cp_ndrives; /* number of drives * This call can be used by applications to query the dimensions of the jukebox before using the .Dv CHIGSTATUS -ioctl to query the jukebox' status. +ioctl to query the jukebox status. .It Dv CHIOIELEM Perform the .Sy INITIALIZE ELEMENT STATUS @@ -230,7 +230,8 @@ base address and number of elements for returned in the array of .Vt changer_element_status structures pointed to by the -.Va cesr_element_status field . +.Va cesr_element_status +field. The application must allocate enough memory for .Va cesr_element_count Modified: stable/9/share/man/man4/cpuctl.4 ============================================================================== --- stable/9/share/man/man4/cpuctl.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/cpuctl.4 Fri May 18 00:55:47 2012 (r235578) @@ -124,8 +124,8 @@ For additional information refer to .Sh RETURN VALUES .Bl -tag -width Er .It Bq Er ENXIO -The operation requested is not supported by the device (e.g. unsupported -architecture or the CPU is disabled) +The operation requested is not supported by the device (e.g., unsupported +architecture or the CPU is disabled). .It Bq Er EINVAL Incorrect request was supplied, or microcode image is not correct. .It Bq Er ENOMEM Modified: stable/9/share/man/man4/cxgbe.4 ============================================================================== --- stable/9/share/man/man4/cxgbe.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/cxgbe.4 Fri May 18 00:55:47 2012 (r235578) @@ -221,7 +221,7 @@ email all the specific information relat The .Nm device driver first appeared in -.Fx 9.0 +.Fx 9.0 . .Sh AUTHORS .An -nosplit The Modified: stable/9/share/man/man4/dcons.4 ============================================================================== --- stable/9/share/man/man4/dcons.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/dcons.4 Fri May 18 00:55:47 2012 (r235578) @@ -104,7 +104,7 @@ If you want to use as a .Xr gdb 1 port, add the following line into -.Xr loader.conf 5 +.Xr loader.conf 5 : .Bd -literal -offset indent dcons_gdb="1" .Ed Modified: stable/9/share/man/man4/ddb.4 ============================================================================== --- stable/9/share/man/man4/ddb.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/ddb.4 Fri May 18 00:55:47 2012 (r235578) @@ -1031,14 +1031,14 @@ Number of allocations requests to the gi .Pp The very same information might be gathered in the userspace with the help of -.Dq Nm vmstat Fl z +.Dq Nm vmstat Fl z . .\" .Pp .It Ic show Cm unpcb Ar addr Shows UNIX domain socket private control block .Vt struct unpcb present at the address -.Ar addr +.Ar addr . .\" .Pp .It Ic show Cm vmochk Modified: stable/9/share/man/man4/epair.4 ============================================================================== --- stable/9/share/man/man4/epair.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/epair.4 Fri May 18 00:55:47 2012 (r235578) @@ -33,7 +33,7 @@ .Os .Sh NAME .Nm epair -.Nd A pair of virtual back-to-back connected Ethernet interfaces. +.Nd A pair of virtual back-to-back connected Ethernet interfaces .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your Modified: stable/9/share/man/man4/fdt.4 ============================================================================== --- stable/9/share/man/man4/fdt.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/fdt.4 Fri May 18 00:55:47 2012 (r235578) @@ -143,8 +143,10 @@ The primary option for enabling support in the kernel. It covers all low-level and infrastructure parts of .Nm kernel support, which primarily are the -.Xr fdtbus 4 and -.Xr simplebus 4 drivers, as well as helper routines and libraries. +.Xr fdtbus 4 +and +.Xr simplebus 4 +drivers, as well as helper routines and libraries. .It Va makeoptions FDT_DTS_FILE=.dts Specifies a preferred (default) device tree source (DTS) file for a given kernel. The indicated DTS file will be converted (compiled) into a binary form @@ -163,7 +165,7 @@ specified in order to embed it into the .Sh SEE ALSO .Xr fdtbus 4 , .Xr openfirm 4 , -.Xr simplebus 4 , +.Xr simplebus 4 .Sh STANDARDS IEEE Std 1275: IEEE Standard for Boot (Initialization Configuration) Firmware: Core Requirements and Practices Modified: stable/9/share/man/man4/fdtbus.4 ============================================================================== --- stable/9/share/man/man4/fdtbus.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/fdtbus.4 Fri May 18 00:55:47 2012 (r235578) @@ -51,7 +51,8 @@ represents peripherals typically found o The .Nm driver provides generic, common infrastructure for all -.Xr fdt 4 oriented device drivers, and its main responsibilities are the +.Xr fdt 4 +oriented device drivers, and its main responsibilities are the following: .Bl -bullet .It @@ -66,7 +67,7 @@ Managing SYS_RES_MEMORY, SYS_RES_IOPORT .Sh SEE ALSO .Xr fdt 4 , .Xr openfirm 4 , -.Xr simplebus 4 , +.Xr simplebus 4 .Sh STANDARDS IEEE Std 1275: IEEE Standard for Boot (Initialization Configuration) Firmware: Core Requirements and Practices Modified: stable/9/share/man/man4/gdb.4 ============================================================================== --- stable/9/share/man/man4/gdb.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/gdb.4 Fri May 18 00:55:47 2012 (r235578) @@ -508,7 +508,7 @@ pointed to by the local variable .It Ic checkmem Check unallocated memory for modifications. This assumes that the kernel has been compiled with -.Cd "options DIAGNOSTIC" +.Cd "options DIAGNOSTIC" . This causes the contents of free memory to be set to .Li 0xdeadc0de . .It Ic dmesg @@ -595,7 +595,7 @@ run the link at more than 9600 bps. Firewire connections do not have this problem. .Pp The debugging macros -.Dq "just growed" . +.Dq "just grown" . In general, the person who wrote them did so while looking for a specific problem, so they may not be general enough, and they may behave badly when used in ways for which they were not intended, even if those ways make sense. Modified: stable/9/share/man/man4/ip.4 ============================================================================== --- stable/9/share/man/man4/ip.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/ip.4 Fri May 18 00:55:47 2012 (r235578) @@ -215,7 +215,8 @@ before transmission. This is in contrast to the default behavior of the system, which is to transmit undirected broadcasts via the first network interface with the -.Dv IFF_BROADCAST flag set. +.Dv IFF_BROADCAST +flag set. .Pp This option allows applications to choose which interface is used to transmit an undirected broadcast @@ -235,12 +236,14 @@ sendto(s, msg, sizeof(msg), 0, &sin, siz .Ed .Pp It is the application's responsibility to set the -.Dv IP_TTL option +.Dv IP_TTL +option to an appropriate value in order to prevent broadcast storms. The application must have sufficient credentials to set the .Dv SO_BROADCAST socket level option, otherwise the -.Dv IP_ONESBCAST option has no effect. +.Dv IP_ONESBCAST +option has no effect. .Pp If the .Dv IP_BINDANY Modified: stable/9/share/man/man4/ipmi.4 ============================================================================== --- stable/9/share/man/man4/ipmi.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/ipmi.4 Fri May 18 00:55:47 2012 (r235578) @@ -130,7 +130,7 @@ Send a message to the interface. Possible error values: .Bl -tag -width Er .It Bq Er EFAULT -An address supplied was invalid +An address supplied was invalid. .It Bq Er ENOMEM Buffers could not be allowed for the command, out of memory. .El @@ -146,7 +146,7 @@ Get the slave LUN for source messages. .Ss Unimplemented Ioctls .Bl -tag -width indent .It Dv IPMICTL_REGISTER_FOR_CMD Pq Vt "struct ipmi_cmdspec" -Register to receive a specific command +Register to receive a specific command. Possible error values: .Bl -tag -width Er .It Bq Er EFAULT @@ -157,7 +157,7 @@ The network function/command is already Could not allocate memory. .El .It Dv IPMICTL_UNREGISTER_FOR_CMD Pq Vt "struct ipmi_cmdspec" -Unregister to receive a specific command +Unregister to receive a specific command. Possible error values: .Bl -tag -width Er .It Bq Er EFAULT Modified: stable/9/share/man/man4/ipw.4 ============================================================================== --- stable/9/share/man/man4/ipw.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/ipw.4 Fri May 18 00:55:47 2012 (r235578) @@ -147,9 +147,9 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr ifconfig 8 , -.Xr wpa_supplicant 8 . +.Xr wpa_supplicant 8 .Sh AUTHORS The original .Nm driver was written by -.An Damien Bergamini Aq damien.bergamini@free.fr +.An Damien Bergamini Aq damien.bergamini@free.fr . Modified: stable/9/share/man/man4/isci.4 ============================================================================== --- stable/9/share/man/man4/isci.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/isci.4 Fri May 18 00:55:47 2012 (r235578) @@ -98,7 +98,8 @@ to the kernel configuration file. The .Nm driver first appeared in -.Fx 8.3 and 9.1 . +.Fx 8.3 +and 9.1. .Sh AUTHORS .An -nosplit The Modified: stable/9/share/man/man4/isp.4 ============================================================================== --- stable/9/share/man/man4/isp.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/isp.4 Fri May 18 00:55:47 2012 (r235578) @@ -64,7 +64,7 @@ Ultra2 LVD (for the ISP1080 and ISP1280) ISP12160). .Pp Fibre Channel support uses FCP SCSI profile for -.Tn FibreChannel . +.Tn FibreChannel , and utilizes Class 3 and Class 2 connections (Qlogic 2100 is Class 3 only, minor patches to the Qlogic 2200 to force Class 2 mode). Support is available for Public and Private loops, and for Modified: stable/9/share/man/man4/iwn.4 ============================================================================== --- stable/9/share/man/man4/iwn.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/iwn.4 Fri May 18 00:55:47 2012 (r235578) @@ -179,4 +179,4 @@ This should not happen. The original .Nm driver was written by -.An Damien Bergamini Aq damien.bergamini@free.fr +.An Damien Bergamini Aq damien.bergamini@free.fr . Modified: stable/9/share/man/man4/mac_none.4 ============================================================================== --- stable/9/share/man/man4/mac_none.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/mac_none.4 Fri May 18 00:55:47 2012 (r235578) @@ -45,7 +45,7 @@ configuration file: .Cd "options MAC_NONE" .Ed .Pp -Alternately, to load the sample module at boot time, place the following line +Alternately, to load the none module at boot time, place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "options MAC" @@ -59,7 +59,7 @@ mac_none_load="YES" .Sh DESCRIPTION The .Nm -policy module implements a sample MAC policy that has no effect on +policy module implements a none MAC policy that has no effect on access control in the system. Unlike .Xr mac_stub 4 , Modified: stable/9/share/man/man4/mac_stub.4 ============================================================================== --- stable/9/share/man/man4/mac_stub.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/mac_stub.4 Fri May 18 00:55:47 2012 (r235578) @@ -37,7 +37,7 @@ .Nm mac_stub .Nd "MAC policy stub module" .Sh SYNOPSIS -To compile the sample policy +To compile the stub policy into your kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent @@ -45,7 +45,7 @@ configuration file: .Cd "options MAC_STUB" .Ed .Pp -Alternately, to load the sample module at boot time, place the following line +Alternately, to load the stub module at boot time, place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "options MAC" @@ -59,7 +59,7 @@ mac_stub_load="YES" .Sh DESCRIPTION The .Nm -policy module implements a sample MAC policy that has no effect on +policy module implements a stub MAC policy that has no effect on access control in the system. Unlike .Xr mac_none 4 , Modified: stable/9/share/man/man4/mps.4 ============================================================================== --- stable/9/share/man/man4/mps.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/mps.4 Fri May 18 00:55:47 2012 (r235578) @@ -209,7 +209,7 @@ Not endian safe. It only works on little endian machines (e.g. amd64 and i386). .It No userland utility available (e.g. -.Xr mptutil 8) +.Xr mptutil 8 ) . .It The driver probes devices sequentially. If your system has a large number of devices, the probe will take a while. Modified: stable/9/share/man/man4/net80211.4 ============================================================================== --- stable/9/share/man/man4/net80211.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/net80211.4 Fri May 18 00:55:47 2012 (r235578) @@ -366,7 +366,7 @@ Valid values are: 0 (do not promote, use legacy), 1 (promote to HT20), and -2 (promote to HT40), +2 (promote to HT40). .It Dv IEEE80211_IOC_HTPROTMODE Return, in .Va i_val , @@ -447,7 +447,7 @@ Return the number of SSIDs supported in .Va i_val . .It Dv IEEE80211_IOC_NUMWEPKEYS Return the number of WEP keys supported in -.Va i_val +.Va i_val . .It Dv IEEE80211_IOC_POWERSAVE Return the current powersaving mode in .Va i_val . @@ -923,8 +923,8 @@ using the value in .Va i_val . .It Dv IEEE80211_IOC_DTIM_PERIOD Set the period (in beacon intervals) between DTIM events to the value in -This request causes a running interface to be restarted. .Va i_val . +This request causes a running interface to be restarted. .It Dv IEEE80211_IOC_DWDS Set whether or not Dynamic WDS support is enabled using the value in .Va i_val . Modified: stable/9/share/man/man4/netmap.4 ============================================================================== --- stable/9/share/man/man4/netmap.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/netmap.4 Fri May 18 00:55:47 2012 (r235578) @@ -46,7 +46,7 @@ uses memory mapped buffers and metadata which is in charge of validating information through .Pa ioctl() and -.Pa select()/poll(). +.Pa select()/poll() . .Nm can exploit the parallelism in multiqueue devices and multicore systems. Modified: stable/9/share/man/man4/ng_etf.4 ============================================================================== --- stable/9/share/man/man4/ng_etf.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/ng_etf.4 Fri May 18 00:55:47 2012 (r235578) @@ -135,7 +135,6 @@ nghook -a etf: newproto & # Filter two random ethertypes to that hook. ngctl 'msg etf: setfilter { matchhook="newproto" ethertype=${MATCH1} } ngctl 'msg etf: setfilter { matchhook="newproto" ethertype=${MATCH2} } -DONE .Ed .Sh SHUTDOWN This node shuts down upon receipt of a Modified: stable/9/share/man/man4/ng_nat.4 ============================================================================== --- stable/9/share/man/man4/ng_nat.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/ng_nat.4 Fri May 18 00:55:47 2012 (r235578) @@ -61,7 +61,7 @@ After both hooks have been connected and a node is ready for aliasing operation. .It Dv NGM_NAT_SET_MODE Pq Li setmode Set node's operation mode using supplied -.Vt "struct ng_nat_mode". +.Vt "struct ng_nat_mode" . .Bd -literal struct ng_nat_mode { uint32_t flags; @@ -193,7 +193,7 @@ are also ignored after was used (they are effectively replaced by server pool). .It Dv NGM_NAT_LIST_REDIRECTS Pq Li listredirects Return list of configured static redirects as -.Vt "struct ng_nat_list_redirects". +.Vt "struct ng_nat_list_redirects" . .Bd -literal struct ng_nat_listrdrs_entry { uint32_t id; /* Anything except zero */ Modified: stable/9/share/man/man4/ng_netflow.4 ============================================================================== --- stable/9/share/man/man4/ng_netflow.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/ng_netflow.4 Fri May 18 00:55:47 2012 (r235578) @@ -219,7 +219,7 @@ struct ng_netflow_settemtu { }; .Ed .Pp -Default is 1500 bytes +Default is 1500 bytes. .It Dv NGM_NETFLOW_SHOW This control message asks a node to dump the entire contents of the flow cache. It is called from @@ -285,7 +285,7 @@ node in this example is connected to The latter sends us a copy of IP packets, which we analyze and free. On .Va fxp0: -we do not use tee, but send packets back to ether node. +we do not use tee, but send packets back to either node. .Bd -literal -offset indent /usr/sbin/ngctl -f- <<-SEQ # connect ng0's tee to iface0 hook Modified: stable/9/share/man/man4/ng_socket.4 ============================================================================== --- stable/9/share/man/man4/ng_socket.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/ng_socket.4 Fri May 18 00:55:47 2012 (r235578) @@ -93,7 +93,8 @@ socket must also be created using and associated with a .Nm node. -.Dv NG_DATA sockets do not automatically +.Dv NG_DATA +sockets do not automatically have nodes associated with them; they are bound to a specific node via the .Xr connect 2 system call. Modified: stable/9/share/man/man4/pcm.4 ============================================================================== --- stable/9/share/man/man4/pcm.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/pcm.4 Fri May 18 00:55:47 2012 (r235578) @@ -381,7 +381,7 @@ Quality values are 100dB stopband, 8 tap Continuation of the bandlimited SINC interpolator, with 100dB stopband, 36 taps and 90% bandwidth as quality values. .It 4 -Continuation of the bandlimited SINC inteprolator, with 100dB stopband, 164 +Continuation of the bandlimited SINC interprolator, with 100dB stopband, 164 taps and 97% bandwidth as quality values. .El .It Va hw.snd.feeder_rate_round @@ -510,7 +510,7 @@ By default only 2 channels are enabled. Available options include: .Bl -tag -width 2n .It s16le:1.0 -Mono +Mono. .It s16le:2.0 Stereo, 2 channels (left, right). .It s16le:2.1 Modified: stable/9/share/man/man4/pcn.4 ============================================================================== --- stable/9/share/man/man4/pcn.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/pcn.4 Fri May 18 00:55:47 2012 (r235578) @@ -104,7 +104,7 @@ The driver supports the following media options: .Bl -tag -width full-duplex .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: stable/9/share/man/man4/psm.4 ============================================================================== --- stable/9/share/man/man4/psm.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/psm.4 Fri May 18 00:55:47 2012 (r235578) @@ -725,7 +725,7 @@ psm0: syncmask:xx, syncbits:yy .Pp The first line shows the command byte value of the keyboard controller just before the auxiliary port is probed. -It usually is 4D, 45, 47 or 65, depending on how the motherboard BIOS +It usually is 40, 45, 47 or 65, depending on how the motherboard BIOS initialized the keyboard controller upon power-up. .Pp The second line shows the result of the keyboard controller's Modified: stable/9/share/man/man4/rl.4 ============================================================================== --- stable/9/share/man/man4/rl.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/rl.4 Fri May 18 00:55:47 2012 (r235578) @@ -119,7 +119,7 @@ The driver supports the following media options: .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: stable/9/share/man/man4/run.4 ============================================================================== --- stable/9/share/man/man4/run.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/run.4 Fri May 18 00:55:47 2012 (r235578) @@ -208,7 +208,7 @@ This should not happen. .Xr wlan_xauth 4 , .Xr ifconfig 8 , .Xr hostapd 8 , -.Xr wpa_supplicant 8 . +.Xr wpa_supplicant 8 .Pp Ralink Technology: .Pa http://www.ralinktech.com/ Modified: stable/9/share/man/man4/ses.4 ============================================================================== --- stable/9/share/man/man4/ses.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/ses.4 Fri May 18 00:55:47 2012 (r235578) @@ -101,7 +101,7 @@ Set the status of a particular object. Get the associated help text for an object (not yet implemented). .Nm devices often have descriptive text for an object which can tell -you things like location (e.g, "left power supply"). +you things like location (e.g., "left power supply"). .It Dv SESIOC_INIT Initialize the enclosure. .El Modified: stable/9/share/man/man4/siftr.4 ============================================================================== --- stable/9/share/man/man4/siftr.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/siftr.4 Fri May 18 00:55:47 2012 (r235578) @@ -137,7 +137,7 @@ All messages are written in plain ASCII Note: The .Qq \e present in the example log messages in this section indicates a -line continuation and is not part of the actual log message +line continuation and is not part of the actual log message. .Pp The first type of log message is written to the file when the module is enabled and starts collecting data from the running kernel. The text below @@ -169,15 +169,15 @@ tick rate of the kernel in ticks per sec .El .Bl -tag -offset indent .It Va tcp_rtt_scale -smoothed RTT estimate scaling factor +smoothed RTT estimate scaling factor. .El .Bl -tag -offset indent .It Va sysname -operating system name +operating system name. .El .Bl -tag -offset indent .It Va sysver -operating system version +operating system version. .El .Bl -tag -offset indent .It Va ipmode Modified: stable/9/share/man/man4/simplebus.4 ============================================================================== --- stable/9/share/man/man4/simplebus.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/simplebus.4 Fri May 18 00:55:47 2012 (r235578) @@ -60,11 +60,12 @@ configuration data retrieved from the no Note the .Nm does not manage device resources and passes through any requests to the -.Xr fdtbus 4 layer. +.Xr fdtbus 4 +layer. .Sh SEE ALSO .Xr fdt 4 , .Xr fdtbus 4 , -.Xr openfirm 4 , +.Xr openfirm 4 .Sh STANDARDS Power.org Standard for Embedded Power Architecture Platform Requirements .Pq Vt ePAPR . Modified: stable/9/share/man/man4/sis.4 ============================================================================== --- stable/9/share/man/man4/sis.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/sis.4 Fri May 18 00:55:47 2012 (r235578) @@ -113,7 +113,7 @@ The driver supports the following media options: .Bl -tag -width full-duplex .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: stable/9/share/man/man4/sk.4 ============================================================================== --- stable/9/share/man/man4/sk.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/sk.4 Fri May 18 00:55:47 2012 (r235578) @@ -127,7 +127,7 @@ The driver supports the following media options: .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: stable/9/share/man/man4/snd_hda.4 ============================================================================== --- stable/9/share/man/man4/snd_hda.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/snd_hda.4 Fri May 18 00:55:47 2012 (r235578) @@ -235,10 +235,10 @@ first pin in that association. .Pp The sequence numbers 14 and 15 has a special meaning for input associations. Their presence in association defines it as multiplexed or mixed respectively. -If none of them present and there are more then one pin in association, +If none of them are present and there are more than one pin in association, the association will provide multichannel input. .Pp -For multichannel input/output assotiations sequence numbers encode +For multichannel input/output associations sequence numbers encode channel pairs positions: 0 - Front, 1 - Center/LFE, 2 - Back, 3 - Front Wide Center, 4 - Side. Standard combinations are: (0) - Stereo; (0, 2), (0, 4) - Quadro; @@ -368,7 +368,7 @@ Original pin configuration written by BI .It Va dev.hdaa.%d.reconfig Setting this to a non-zero value makes driver to destroy existing pcm devices and process new pins configuration set via -.Va dev.hdaa.%d.nid%d_config. +.Va dev.hdaa.%d.nid%d_config . .It Va dev.pcm.%d.play.32bit , dev.pcm.%d.rec.32bit HDA controller uses 32bit representation for all samples of more then 16 bits. These variables allow to specify how many bits of these 32 should be @@ -589,7 +589,7 @@ subclass 3 (HDA), compatible with Intel .Pp The .Nm -driver supports more then two hundred different controllers and CODECs. +driver supports more than two hundred different controllers and CODECs. There is no sense to list all of them here, as in most cases specific CODEC configuration and wiring are more important then type of the CODEC itself. .Sh SEE ALSO Modified: stable/9/share/man/man4/snd_hdspe.4 ============================================================================== --- stable/9/share/man/man4/snd_hdspe.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/snd_hdspe.4 Fri May 18 00:55:47 2012 (r235578) @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm snd_hdspe -.Nd "RME HDSPe brigde device driver" +.Nd "RME HDSPe bridge device driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: Modified: stable/9/share/man/man4/splash.4 ============================================================================== --- stable/9/share/man/man4/splash.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/splash.4 Fri May 18 00:55:47 2012 (r235578) @@ -234,8 +234,7 @@ first example above. .Pp To load a binary ASCII drawing and display this while booting, include the following into your -.Pa /boot/loader.conf -: +.Pa /boot/loader.conf : .Bd -literal -offset indent splash_txt_load="YES" bitmap_load="YES" Modified: stable/9/share/man/man4/ste.4 ============================================================================== --- stable/9/share/man/man4/ste.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/ste.4 Fri May 18 00:55:47 2012 (r235578) @@ -103,7 +103,7 @@ The driver supports the following media options: .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: stable/9/share/man/man4/termios.4 ============================================================================== --- stable/9/share/man/man4/termios.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/termios.4 Fri May 18 00:55:47 2012 (r235578) @@ -197,7 +197,8 @@ signal, or if the process group of the r process is orphaned, the .Xr read 2 returns -1 with -.Va errno set to +.Va errno +set to .Er EIO and no signal is sent. Modified: stable/9/share/man/man4/ti.4 ============================================================================== --- stable/9/share/man/man4/ti.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/ti.4 Fri May 18 00:55:47 2012 (r235578) @@ -144,7 +144,7 @@ or modes. .It 1000baseSX Set 1000Mbps (Gigabit Ethernet) operation. -Only full +Only .Ar full-duplex mode is supported at this speed. .El @@ -154,7 +154,7 @@ The driver supports the following media options: .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full-duplex operation. .It half-duplex Force half duplex operation. .El @@ -240,14 +240,14 @@ when either of the thresholds is exceede A value of 0 means that this parameter is ignored and receive BDs will only be returned when the receive max coalesced BDs value is reached. -The default valus is 170. +The default value is 170. .It Va dev.ti.%d.rx_max_coal_bds This value, receive max coalesced BDs, controls the number of receive buffer descriptors that will be coalesced before the NIC updates the receive return ring producer index. If this value is set to 0 it will disable receive buffer descriptor coalescing. -The default valus is 64. +The default value is 64. .It Va dev.ti.%d.ti_tx_coal_ticks This value, send coalesced ticks, controls the number of clock ticks (of 1 microseconds each) that must elapse before the NIC DMAs @@ -263,9 +263,9 @@ The default value is 2000. This value, send max coalesced BDs, controls the number of send buffer descriptors that will be coalesced before the NIC updates the send consumer index. -If this valus is set to 0 it will disable send buffer descriptor +If this value is set to 0 it will disable send buffer descriptor coalescing. -The default valus is 32. +The default value is 32. .It Va dev.ti.%d.tx_buf_ratio This value controls the ratio of the remaining memory in the NIC that should be devoted to transmit buffer vs. receive buffer. @@ -348,7 +348,7 @@ Write to the requested memory region on The argument is .Vt "struct tg_mem" . .It Dv ALT_READ_TG_REG -Read the requested register on the Tigon board. +Read the requested register from the Tigon board. The argument is .Vt "struct tg_reg" . .It Dv ALT_WRITE_TG_REG Modified: stable/9/share/man/man4/tl.4 ============================================================================== --- stable/9/share/man/man4/tl.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/tl.4 Fri May 18 00:55:47 2012 (r235578) @@ -82,9 +82,9 @@ option is only available on those PHYs t Also, the PHY will not advertise those modes that have been explicitly disabled using the following media options. .It 10baseT/UTP -Set 10Mbps operation +Set 10Mbps operation. .It 100baseTX -Set 100Mbps (Fast Ethernet) operation +Set 100Mbps (Fast Ethernet) operation. .It 10base5/AUI Enable AUI/BNC interface (useful only with the built-in PHY). .El @@ -94,7 +94,7 @@ The driver supports the following media options: .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .It hw-loopback Modified: stable/9/share/man/man4/tws.4 ============================================================================== --- stable/9/share/man/man4/tws.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/tws.4 Fri May 18 00:55:47 2012 (r235578) @@ -74,13 +74,13 @@ prompt before booting the kernel or stor .Xr loader.conf 5 . .Bl -tag -width "hw.tws.use_32bit_sgls" .It Va hw.tws.cam_depth -The maximium queued CAM SIM requests for one controller. +The maximum queued CAM SIM requests for one controller. The default value is 256. .It Va hw.tws.enable_msi This tunable enables MSI support on the controller if set to a non-zero value. The default value is 0. .It Va hw.tws.queue_depth -The maximium queued requests for one controller. +The maximum queued requests for one controller. .It Va hw.tws.use_32bit_sgls Limit the driver to use only 32-bit SG elements regardless whether the operating system is running in 64-bit mode. Modified: stable/9/share/man/man4/uhso.4 ============================================================================== --- stable/9/share/man/man4/uhso.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/uhso.4 Fri May 18 00:55:47 2012 (r235578) @@ -100,7 +100,7 @@ mode to modem mode. This behavior can be disabled by setting .Va hw.usb.uhso.auto_switch to 0 using -.Xr sysctl 8 +.Xr sysctl 8 . .Sh FILES .Bl -tag -width "XXXXXX" .It Pa /dev/cuaU?.? Modified: stable/9/share/man/man4/umcs.4 ============================================================================== --- stable/9/share/man/man4/umcs.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/umcs.4 Fri May 18 00:55:47 2012 (r235578) @@ -66,7 +66,7 @@ driver which makes it behave like a Different ports on device are presented as sub-units, like .Pa /dev/ttyU0.1 and -.Pa /dev/ttyU0.2 +.Pa /dev/ttyU0.2 . .Sh HARDWARE The .Nm Modified: stable/9/share/man/man4/uslcom.4 ============================================================================== --- stable/9/share/man/man4/uslcom.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/uslcom.4 Fri May 18 00:55:47 2012 (r235578) @@ -39,7 +39,7 @@ uslcom_load="YES" .Sh DESCRIPTION The .Nm -driver supports Silicon Laboratories CP2101/CP2102 based serial adapters. +driver supports Silicon Laboratories CP2101/CP2102 based USB serial adapters. .Sh HARDWARE The following devices should work with the .Nm Modified: stable/9/share/man/man4/vr.4 ============================================================================== --- stable/9/share/man/man4/vr.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/vr.4 Fri May 18 00:55:47 2012 (r235578) @@ -109,7 +109,7 @@ The driver supports the following media options: .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: stable/9/share/man/man4/watchdog.4 ============================================================================== --- stable/9/share/man/man4/watchdog.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/watchdog.4 Fri May 18 00:55:47 2012 (r235578) @@ -38,6 +38,7 @@ The .Nm facility is used for controlling hardware and software watchdogs. .Pp +The device .Pa /dev/fido responds to a single .Xr ioctl 2 Modified: stable/9/share/man/man4/wb.4 ============================================================================== --- stable/9/share/man/man4/wb.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/wb.4 Fri May 18 00:55:47 2012 (r235578) @@ -108,7 +108,7 @@ The driver supports the following media options: .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: stable/9/share/man/man4/wpi.4 ============================================================================== --- stable/9/share/man/man4/wpi.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/wpi.4 Fri May 18 00:55:47 2012 (r235578) @@ -56,7 +56,7 @@ The .Nm driver provides support for the .Tn Intel -3945ABG Wireless network adapter +3945ABG Wireless network adapter. .Nm supports .Cm station , @@ -124,7 +124,7 @@ Data transmission is not possible in thi .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr ifconfig 8 , -.Xr wpa_supplicant 8 . +.Xr wpa_supplicant 8 .Sh AUTHORS .An -nosplit The original Modified: stable/9/share/man/man4/xl.4 ============================================================================== --- stable/9/share/man/man4/xl.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/xl.4 Fri May 18 00:55:47 2012 (r235578) @@ -115,7 +115,7 @@ The driver supports the following media options: .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: stable/9/share/man/man4/xnb.4 ============================================================================== --- stable/9/share/man/man4/xnb.4 Fri May 18 00:40:49 2012 (r235577) +++ stable/9/share/man/man4/xnb.4 Fri May 18 00:55:47 2012 (r235578) @@ -125,7 +125,7 @@ driver was written by .Aq alans@spectralogic.com and .An John Suykerbuyk -.Aq johns@spectralogic.com +.Aq johns@spectralogic.com . .Sh BUGS The .Nm From owner-svn-src-all@FreeBSD.ORG Fri May 18 00:56:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E516E1065784; Fri, 18 May 2012 00:56:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE98C8FC15; Fri, 18 May 2012 00:56:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I0uDvF025942; Fri, 18 May 2012 00:56:13 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I0uDti025891; Fri, 18 May 2012 00:56:13 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180056.q4I0uDti025891@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 00:56:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235579 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 00:56:14 -0000 Author: gjb (doc committer) Date: Fri May 18 00:56:12 2012 New Revision: 235579 URL: http://svn.freebsd.org/changeset/base/235579 Log: MFC r235317: General mdoc(7) and typo fixes. PR: 167776 Modified: stable/8/share/man/man4/acpi_hp.4 stable/8/share/man/man4/acpi_wmi.4 stable/8/share/man/man4/ahci.4 stable/8/share/man/man4/ath.4 stable/8/share/man/man4/bridge.4 stable/8/share/man/man4/ch.4 stable/8/share/man/man4/cpuctl.4 stable/8/share/man/man4/cxgbe.4 stable/8/share/man/man4/dcons.4 stable/8/share/man/man4/ddb.4 stable/8/share/man/man4/epair.4 stable/8/share/man/man4/gdb.4 stable/8/share/man/man4/ip.4 stable/8/share/man/man4/ipmi.4 stable/8/share/man/man4/ipw.4 stable/8/share/man/man4/isci.4 stable/8/share/man/man4/isp.4 stable/8/share/man/man4/iwn.4 stable/8/share/man/man4/mac_none.4 stable/8/share/man/man4/mac_stub.4 stable/8/share/man/man4/mps.4 stable/8/share/man/man4/net80211.4 stable/8/share/man/man4/netmap.4 stable/8/share/man/man4/ng_etf.4 stable/8/share/man/man4/ng_nat.4 stable/8/share/man/man4/ng_netflow.4 stable/8/share/man/man4/ng_socket.4 stable/8/share/man/man4/pcm.4 stable/8/share/man/man4/pcn.4 stable/8/share/man/man4/psm.4 stable/8/share/man/man4/rl.4 stable/8/share/man/man4/run.4 stable/8/share/man/man4/ses.4 stable/8/share/man/man4/siftr.4 stable/8/share/man/man4/sis.4 stable/8/share/man/man4/sk.4 stable/8/share/man/man4/ste.4 stable/8/share/man/man4/termios.4 stable/8/share/man/man4/ti.4 stable/8/share/man/man4/tl.4 stable/8/share/man/man4/tws.4 stable/8/share/man/man4/uhso.4 stable/8/share/man/man4/umcs.4 stable/8/share/man/man4/uslcom.4 stable/8/share/man/man4/vr.4 stable/8/share/man/man4/watchdog.4 stable/8/share/man/man4/wb.4 stable/8/share/man/man4/wpi.4 stable/8/share/man/man4/xl.4 stable/8/share/man/man4/xnb.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/acpi_hp.4 ============================================================================== --- stable/8/share/man/man4/acpi_hp.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/acpi_hp.4 Fri May 18 00:56:12 2012 (r235579) @@ -262,7 +262,7 @@ device driver first appeared in The .Nm driver was written by -.An Michael Gmelin Aq freebsd@grem.de +.An Michael Gmelin Aq freebsd@grem.de . .Pp It has been inspired by hp-wmi driver, which implements a subset of these features (hotkeys) on Linux. @@ -277,7 +277,7 @@ http://www.microsoft.com/whdc/system/pnp .El .Pp This manual page was written by -.An Michael Gmelin Aq freebsd@grem.de +.An Michael Gmelin Aq freebsd@grem.de . .Sh BUGS This driver is experimental and has only been tested on i386 on an HP Compaq 8510p which featured all supported wireless devices (WWAN/BT/WLAN). Modified: stable/8/share/man/man4/acpi_wmi.4 ============================================================================== --- stable/8/share/man/man4/acpi_wmi.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/acpi_wmi.4 Fri May 18 00:56:12 2012 (r235579) @@ -85,12 +85,12 @@ device driver first appeared in The .Nm driver was written by -.An Michael Gmelin Aq freebsd@grem.de +.An Michael Gmelin Aq freebsd@grem.de . .Pp -Work has been inspired by the Linux acpi-wmi driver written by Carlos Corbacho +Work has been inspired by the Linux acpi-wmi driver written by Carlos Corbacho. .Pp See http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx for the specification of ACPI-WMI. .Pp This manual page was written by -.An Michael Gmelin Aq freebsd@grem.de +.An Michael Gmelin Aq freebsd@grem.de . Modified: stable/8/share/man/man4/ahci.4 ============================================================================== --- stable/8/share/man/man4/ahci.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/ahci.4 Fri May 18 00:56:12 2012 (r235579) @@ -52,7 +52,7 @@ The following tunables are settable from .Xr loader 8 : .Bl -ohang .It Va hint.ahci. Ns Ar X Ns Va .msi -controls Message Signaled Interrupts (MSI) usage by the specified controller +controls Message Signaled Interrupts (MSI) usage by the specified controller. .Bl -tag -compact .It 0 MSI disabled; Modified: stable/8/share/man/man4/ath.4 ============================================================================== --- stable/8/share/man/man4/ath.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/ath.4 Fri May 18 00:56:12 2012 (r235579) @@ -180,7 +180,7 @@ ifconfig wlan0 meshid my_mesh mode 11a i .Ed .Pp Create two virtual 802.11a host-based access points, one with -with WEP enabled and one with no security, and bridge them to +WEP enabled and one with no security, and bridge them to the fxp0 (wired) device: .Bd -literal -offset indent ifconfig wlan0 create wlandev ath0 wlanmode hostap \e @@ -215,7 +215,7 @@ data frames failed. This should not happen. .It "ath%d: unable to setup a beacon xmit queue!" The request to the HAL to set up the transmit queue for 802.11 beacon frames -frames failed. +failed. This should not happen. .It "ath%d: 802.11 address: %s" The MAC address programmed in the EEPROM is displayed. Modified: stable/8/share/man/man4/bridge.4 ============================================================================== --- stable/8/share/man/man4/bridge.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/bridge.4 Fri May 18 00:56:12 2012 (r235579) @@ -411,7 +411,8 @@ Note that .Fx 6.1, 6.2, 6.3, 7.0, 7.1, and 7.2 have a bug in the EtherIP protocol. For more details and workaround, see -.Xr gif 4 manual page. +.Xr gif 4 +manual page. .Sh SEE ALSO .Xr gif 4 , .Xr ipf 4 , Modified: stable/8/share/man/man4/ch.4 ============================================================================== --- stable/8/share/man/man4/ch.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/ch.4 Fri May 18 00:56:12 2012 (r235579) @@ -188,7 +188,7 @@ u_int cp_ndrives; /* number of drives * This call can be used by applications to query the dimensions of the jukebox before using the .Dv CHIGSTATUS -ioctl to query the jukebox' status. +ioctl to query the jukebox status. .It Dv CHIOIELEM Perform the .Sy INITIALIZE ELEMENT STATUS @@ -231,7 +231,8 @@ base address and number of elements for returned in the array of .Vt changer_element_status structures pointed to by the -.Va cesr_element_status field . +.Va cesr_element_status +field. The application must allocate enough memory for .Va cesr_element_count Modified: stable/8/share/man/man4/cpuctl.4 ============================================================================== --- stable/8/share/man/man4/cpuctl.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/cpuctl.4 Fri May 18 00:56:12 2012 (r235579) @@ -127,8 +127,8 @@ For additional information refer to .Sh RETURN VALUES .Bl -tag -width Er .It Bq Er ENXIO -The operation requested is not supported by the device (e.g. unsupported -architecture or the CPU is disabled) +The operation requested is not supported by the device (e.g., unsupported +architecture or the CPU is disabled). .It Bq Er EINVAL Incorrect request was supplied, or microcode image is not correct. .It Bq Er ENOMEM Modified: stable/8/share/man/man4/cxgbe.4 ============================================================================== --- stable/8/share/man/man4/cxgbe.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/cxgbe.4 Fri May 18 00:56:12 2012 (r235579) @@ -221,7 +221,7 @@ email all the specific information relat The .Nm device driver first appeared in -.Fx 9.0 +.Fx 9.0 . .Sh AUTHORS .An -nosplit The Modified: stable/8/share/man/man4/dcons.4 ============================================================================== --- stable/8/share/man/man4/dcons.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/dcons.4 Fri May 18 00:56:12 2012 (r235579) @@ -104,7 +104,7 @@ If you want to use as a .Xr gdb 1 port, add the following line into -.Xr loader.conf 5 +.Xr loader.conf 5 : .Bd -literal -offset indent dcons_gdb="1" .Ed Modified: stable/8/share/man/man4/ddb.4 ============================================================================== --- stable/8/share/man/man4/ddb.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/ddb.4 Fri May 18 00:56:12 2012 (r235579) @@ -1022,14 +1022,14 @@ Number of allocations requests to the gi .Pp The very same information might be gathered in the userspace with the help of -.Dq Nm vmstat Fl z +.Dq Nm vmstat Fl z . .\" .Pp .It Ic show Cm unpcb Ar addr Shows UNIX domain socket private control block .Vt struct unpcb present at the address -.Ar addr +.Ar addr . .\" .Pp .It Ic show Cm vmochk Modified: stable/8/share/man/man4/epair.4 ============================================================================== --- stable/8/share/man/man4/epair.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/epair.4 Fri May 18 00:56:12 2012 (r235579) @@ -33,7 +33,7 @@ .Os .Sh NAME .Nm epair -.Nd A pair of virtual back-to-back connected Ethernet interfaces. +.Nd A pair of virtual back-to-back connected Ethernet interfaces .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your Modified: stable/8/share/man/man4/gdb.4 ============================================================================== --- stable/8/share/man/man4/gdb.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/gdb.4 Fri May 18 00:56:12 2012 (r235579) @@ -508,7 +508,7 @@ pointed to by the local variable .It Ic checkmem Check unallocated memory for modifications. This assumes that the kernel has been compiled with -.Cd "options DIAGNOSTIC" +.Cd "options DIAGNOSTIC" . This causes the contents of free memory to be set to .Li 0xdeadc0de . .It Ic dmesg @@ -595,7 +595,7 @@ run the link at more than 9600 bps. Firewire connections do not have this problem. .Pp The debugging macros -.Dq "just growed" . +.Dq "just grown" . In general, the person who wrote them did so while looking for a specific problem, so they may not be general enough, and they may behave badly when used in ways for which they were not intended, even if those ways make sense. Modified: stable/8/share/man/man4/ip.4 ============================================================================== --- stable/8/share/man/man4/ip.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/ip.4 Fri May 18 00:56:12 2012 (r235579) @@ -215,7 +215,8 @@ before transmission. This is in contrast to the default behavior of the system, which is to transmit undirected broadcasts via the first network interface with the -.Dv IFF_BROADCAST flag set. +.Dv IFF_BROADCAST +flag set. .Pp This option allows applications to choose which interface is used to transmit an undirected broadcast @@ -235,12 +236,14 @@ sendto(s, msg, sizeof(msg), 0, &sin, siz .Ed .Pp It is the application's responsibility to set the -.Dv IP_TTL option +.Dv IP_TTL +option to an appropriate value in order to prevent broadcast storms. The application must have sufficient credentials to set the .Dv SO_BROADCAST socket level option, otherwise the -.Dv IP_ONESBCAST option has no effect. +.Dv IP_ONESBCAST +option has no effect. .Pp If the .Dv IP_BINDANY Modified: stable/8/share/man/man4/ipmi.4 ============================================================================== --- stable/8/share/man/man4/ipmi.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/ipmi.4 Fri May 18 00:56:12 2012 (r235579) @@ -130,7 +130,7 @@ Send a message to the interface. Possible error values: .Bl -tag -width Er .It Bq Er EFAULT -An address supplied was invalid +An address supplied was invalid. .It Bq Er ENOMEM Buffers could not be allowed for the command, out of memory. .El @@ -146,7 +146,7 @@ Get the slave LUN for source messages. .Ss Unimplemented Ioctls .Bl -tag -width indent .It Dv IPMICTL_REGISTER_FOR_CMD Pq Vt "struct ipmi_cmdspec" -Register to receive a specific command +Register to receive a specific command. Possible error values: .Bl -tag -width Er .It Bq Er EFAULT @@ -157,7 +157,7 @@ The network function/command is already Could not allocate memory. .El .It Dv IPMICTL_UNREGISTER_FOR_CMD Pq Vt "struct ipmi_cmdspec" -Unregister to receive a specific command +Unregister to receive a specific command. Possible error values: .Bl -tag -width Er .It Bq Er EFAULT Modified: stable/8/share/man/man4/ipw.4 ============================================================================== --- stable/8/share/man/man4/ipw.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/ipw.4 Fri May 18 00:56:12 2012 (r235579) @@ -148,9 +148,9 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr ifconfig 8 , -.Xr wpa_supplicant 8 . +.Xr wpa_supplicant 8 .Sh AUTHORS The original .Nm driver was written by -.An Damien Bergamini Aq damien.bergamini@free.fr +.An Damien Bergamini Aq damien.bergamini@free.fr . Modified: stable/8/share/man/man4/isci.4 ============================================================================== --- stable/8/share/man/man4/isci.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/isci.4 Fri May 18 00:56:12 2012 (r235579) @@ -98,7 +98,8 @@ to the kernel configuration file. The .Nm driver first appeared in -.Fx 8.3 and 9.1 . +.Fx 8.3 +and 9.1. .Sh AUTHORS .An -nosplit The Modified: stable/8/share/man/man4/isp.4 ============================================================================== --- stable/8/share/man/man4/isp.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/isp.4 Fri May 18 00:56:12 2012 (r235579) @@ -64,7 +64,7 @@ Ultra2 LVD (for the ISP1080 and ISP1280) ISP12160). .Pp Fibre Channel support uses FCP SCSI profile for -.Tn FibreChannel . +.Tn FibreChannel , and utilizes Class 3 and Class 2 connections (Qlogic 2100 is Class 3 only, minor patches to the Qlogic 2200 to force Class 2 mode). Support is available for Public and Private loops, and for Modified: stable/8/share/man/man4/iwn.4 ============================================================================== --- stable/8/share/man/man4/iwn.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/iwn.4 Fri May 18 00:56:12 2012 (r235579) @@ -180,4 +180,4 @@ This should not happen. The original .Nm driver was written by -.An Damien Bergamini Aq damien.bergamini@free.fr +.An Damien Bergamini Aq damien.bergamini@free.fr . Modified: stable/8/share/man/man4/mac_none.4 ============================================================================== --- stable/8/share/man/man4/mac_none.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/mac_none.4 Fri May 18 00:56:12 2012 (r235579) @@ -45,7 +45,7 @@ configuration file: .Cd "options MAC_NONE" .Ed .Pp -Alternately, to load the sample module at boot time, place the following line +Alternately, to load the none module at boot time, place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "options MAC" @@ -59,7 +59,7 @@ mac_none_load="YES" .Sh DESCRIPTION The .Nm -policy module implements a sample MAC policy that has no effect on +policy module implements a none MAC policy that has no effect on access control in the system. Unlike .Xr mac_stub 4 , Modified: stable/8/share/man/man4/mac_stub.4 ============================================================================== --- stable/8/share/man/man4/mac_stub.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/mac_stub.4 Fri May 18 00:56:12 2012 (r235579) @@ -37,7 +37,7 @@ .Nm mac_stub .Nd "MAC policy stub module" .Sh SYNOPSIS -To compile the sample policy +To compile the stub policy into your kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent @@ -45,7 +45,7 @@ configuration file: .Cd "options MAC_STUB" .Ed .Pp -Alternately, to load the sample module at boot time, place the following line +Alternately, to load the stub module at boot time, place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "options MAC" @@ -59,7 +59,7 @@ mac_stub_load="YES" .Sh DESCRIPTION The .Nm -policy module implements a sample MAC policy that has no effect on +policy module implements a stub MAC policy that has no effect on access control in the system. Unlike .Xr mac_none 4 , Modified: stable/8/share/man/man4/mps.4 ============================================================================== --- stable/8/share/man/man4/mps.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/mps.4 Fri May 18 00:56:12 2012 (r235579) @@ -209,7 +209,7 @@ Not endian safe. It only works on little endian machines (e.g. amd64 and i386). .It No userland utility available (e.g. -.Xr mptutil 8) +.Xr mptutil 8 ) . .It The driver probes devices sequentially. If your system has a large number of devices, the probe will take a while. Modified: stable/8/share/man/man4/net80211.4 ============================================================================== --- stable/8/share/man/man4/net80211.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/net80211.4 Fri May 18 00:56:12 2012 (r235579) @@ -366,7 +366,7 @@ Valid values are: 0 (do not promote, use legacy), 1 (promote to HT20), and -2 (promote to HT40), +2 (promote to HT40). .It Dv IEEE80211_IOC_HTPROTMODE Return, in .Va i_val , @@ -447,7 +447,7 @@ Return the number of SSIDs supported in .Va i_val . .It Dv IEEE80211_IOC_NUMWEPKEYS Return the number of WEP keys supported in -.Va i_val +.Va i_val . .It Dv IEEE80211_IOC_POWERSAVE Return the current powersaving mode in .Va i_val . @@ -923,8 +923,8 @@ using the value in .Va i_val . .It Dv IEEE80211_IOC_DTIM_PERIOD Set the period (in beacon intervals) between DTIM events to the value in -This request causes a running interface to be restarted. .Va i_val . +This request causes a running interface to be restarted. .It Dv IEEE80211_IOC_DWDS Set whether or not Dynamic WDS support is enabled using the value in .Va i_val . Modified: stable/8/share/man/man4/netmap.4 ============================================================================== --- stable/8/share/man/man4/netmap.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/netmap.4 Fri May 18 00:56:12 2012 (r235579) @@ -46,7 +46,7 @@ uses memory mapped buffers and metadata which is in charge of validating information through .Pa ioctl() and -.Pa select()/poll(). +.Pa select()/poll() . .Nm can exploit the parallelism in multiqueue devices and multicore systems. Modified: stable/8/share/man/man4/ng_etf.4 ============================================================================== --- stable/8/share/man/man4/ng_etf.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/ng_etf.4 Fri May 18 00:56:12 2012 (r235579) @@ -135,7 +135,6 @@ nghook -a etf: newproto & # Filter two random ethertypes to that hook. ngctl 'msg etf: setfilter { matchhook="newproto" ethertype=${MATCH1} } ngctl 'msg etf: setfilter { matchhook="newproto" ethertype=${MATCH2} } -DONE .Ed .Sh SHUTDOWN This node shuts down upon receipt of a Modified: stable/8/share/man/man4/ng_nat.4 ============================================================================== --- stable/8/share/man/man4/ng_nat.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/ng_nat.4 Fri May 18 00:56:12 2012 (r235579) @@ -61,7 +61,7 @@ After both hooks have been connected and a node is ready for aliasing operation. .It Dv NGM_NAT_SET_MODE Pq Li setmode Set node's operation mode using supplied -.Vt "struct ng_nat_mode". +.Vt "struct ng_nat_mode" . .Bd -literal struct ng_nat_mode { uint32_t flags; @@ -193,7 +193,7 @@ are also ignored after was used (they are effectively replaced by server pool). .It Dv NGM_NAT_LIST_REDIRECTS Pq Li listredirects Return list of configured static redirects as -.Vt "struct ng_nat_list_redirects". +.Vt "struct ng_nat_list_redirects" . .Bd -literal struct ng_nat_listrdrs_entry { uint32_t id; /* Anything except zero */ Modified: stable/8/share/man/man4/ng_netflow.4 ============================================================================== --- stable/8/share/man/man4/ng_netflow.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/ng_netflow.4 Fri May 18 00:56:12 2012 (r235579) @@ -249,7 +249,7 @@ node in this example is connected to The latter sends us a copy of IP packets, which we analyze and free. On .Va fxp0: -we do not use tee, but send packets back to ether node. +we do not use tee, but send packets back to either node. .Bd -literal -offset indent /usr/sbin/ngctl -f- <<-SEQ # connect ng0's tee to iface0 hook Modified: stable/8/share/man/man4/ng_socket.4 ============================================================================== --- stable/8/share/man/man4/ng_socket.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/ng_socket.4 Fri May 18 00:56:12 2012 (r235579) @@ -93,7 +93,8 @@ socket must also be created using and associated with a .Nm node. -.Dv NG_DATA sockets do not automatically +.Dv NG_DATA +sockets do not automatically have nodes associated with them; they are bound to a specific node via the .Xr connect 2 system call. Modified: stable/8/share/man/man4/pcm.4 ============================================================================== --- stable/8/share/man/man4/pcm.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/pcm.4 Fri May 18 00:56:12 2012 (r235579) @@ -307,7 +307,7 @@ Quality values are 100dB stopband, 8 tap Continuation of the bandlimited SINC interpolator, with 100dB stopband, 36 taps and 90% bandwidth as quality values. .It 4 -Continuation of the bandlimited SINC inteprolator, with 100dB stopband, 164 +Continuation of the bandlimited SINC interprolator, with 100dB stopband, 164 taps and 97% bandwidth as quality values. .El .It Va hw.snd.feeder_rate_round @@ -436,7 +436,7 @@ By default only 2 channels are enabled. Available options include: .Bl -tag -width 2n .It s16le:1.0 -Mono +Mono. .It s16le:2.0 Stereo, 2 channels (left, right). .It s16le:2.1 Modified: stable/8/share/man/man4/pcn.4 ============================================================================== --- stable/8/share/man/man4/pcn.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/pcn.4 Fri May 18 00:56:12 2012 (r235579) @@ -106,7 +106,7 @@ driver supports the following media opti .Pp .Bl -tag -width full-duplex .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: stable/8/share/man/man4/psm.4 ============================================================================== --- stable/8/share/man/man4/psm.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/psm.4 Fri May 18 00:56:12 2012 (r235579) @@ -719,7 +719,7 @@ psm0: syncmask:xx, syncbits:yy .Pp The first line shows the command byte value of the keyboard controller just before the auxiliary port is probed. -It usually is 4D, 45, 47 or 65, depending on how the motherboard BIOS +It usually is 40, 45, 47 or 65, depending on how the motherboard BIOS initialized the keyboard controller upon power-up. .Pp The second line shows the result of the keyboard controller's Modified: stable/8/share/man/man4/rl.4 ============================================================================== --- stable/8/share/man/man4/rl.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/rl.4 Fri May 18 00:56:12 2012 (r235579) @@ -121,7 +121,7 @@ driver supports the following media opti .Pp .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: stable/8/share/man/man4/run.4 ============================================================================== --- stable/8/share/man/man4/run.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/run.4 Fri May 18 00:56:12 2012 (r235579) @@ -208,7 +208,7 @@ This should not happen. .Xr wlan_xauth 4 , .Xr ifconfig 8 , .Xr hostapd 8 , -.Xr wpa_supplicant 8 . +.Xr wpa_supplicant 8 .Pp Ralink Technology: .Pa http://www.ralinktech.com/ Modified: stable/8/share/man/man4/ses.4 ============================================================================== --- stable/8/share/man/man4/ses.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/ses.4 Fri May 18 00:56:12 2012 (r235579) @@ -102,7 +102,7 @@ Set the status of a particular object. Get the associated help text for an object (not yet implemented). .Nm devices often have descriptive text for an object which can tell -you things like location (e.g, "left power supply"). +you things like location (e.g., "left power supply"). .It Dv SESIOC_INIT Initialize the enclosure. .El Modified: stable/8/share/man/man4/siftr.4 ============================================================================== --- stable/8/share/man/man4/siftr.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/siftr.4 Fri May 18 00:56:12 2012 (r235579) @@ -137,7 +137,7 @@ All messages are written in plain ASCII Note: The .Qq \e present in the example log messages in this section indicates a -line continuation and is not part of the actual log message +line continuation and is not part of the actual log message. .Pp The first type of log message is written to the file when the module is enabled and starts collecting data from the running kernel. The text below @@ -169,15 +169,15 @@ tick rate of the kernel in ticks per sec .El .Bl -tag -offset indent .It Va tcp_rtt_scale -smoothed RTT estimate scaling factor +smoothed RTT estimate scaling factor. .El .Bl -tag -offset indent .It Va sysname -operating system name +operating system name. .El .Bl -tag -offset indent .It Va sysver -operating system version +operating system version. .El .Bl -tag -offset indent .It Va ipmode Modified: stable/8/share/man/man4/sis.4 ============================================================================== --- stable/8/share/man/man4/sis.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/sis.4 Fri May 18 00:56:12 2012 (r235579) @@ -115,7 +115,7 @@ driver supports the following media opti .Pp .Bl -tag -width full-duplex .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: stable/8/share/man/man4/sk.4 ============================================================================== --- stable/8/share/man/man4/sk.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/sk.4 Fri May 18 00:56:12 2012 (r235579) @@ -129,7 +129,7 @@ driver supports the following media opti .Pp .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: stable/8/share/man/man4/ste.4 ============================================================================== --- stable/8/share/man/man4/ste.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/ste.4 Fri May 18 00:56:12 2012 (r235579) @@ -105,7 +105,7 @@ driver supports the following media opti .Pp .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: stable/8/share/man/man4/termios.4 ============================================================================== --- stable/8/share/man/man4/termios.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/termios.4 Fri May 18 00:56:12 2012 (r235579) @@ -197,7 +197,8 @@ signal, or if the process group of the r process is orphaned, the .Xr read 2 returns -1 with -.Va errno set to +.Va errno +set to .Er EIO and no signal is sent. Modified: stable/8/share/man/man4/ti.4 ============================================================================== --- stable/8/share/man/man4/ti.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/ti.4 Fri May 18 00:56:12 2012 (r235579) @@ -145,7 +145,7 @@ or modes. .It 1000baseSX Set 1000Mbps (Gigabit Ethernet) operation. -Only full +Only .Ar full-duplex mode is supported at this speed. .El @@ -156,7 +156,7 @@ driver supports the following media opti .Pp .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full-duplex operation. .It half-duplex Force half duplex operation. .El @@ -242,14 +242,14 @@ when either of the thresholds is exceede A value of 0 means that this parameter is ignored and receive BDs will only be returned when the receive max coalesced BDs value is reached. -The default valus is 170. +The default value is 170. .It Va dev.ti.%d.rx_max_coal_bds This value, receive max coalesced BDs, controls the number of receive buffer descriptors that will be coalesced before the NIC updates the receive return ring producer index. If this value is set to 0 it will disable receive buffer descriptor coalescing. -The default valus is 64. +The default value is 64. .It Va dev.ti.%d.ti_tx_coal_ticks This value, send coalesced ticks, controls the number of clock ticks (of 1 microseconds each) that must elapse before the NIC DMAs @@ -265,9 +265,9 @@ The default value is 2000. This value, send max coalesced BDs, controls the number of send buffer descriptors that will be coalesced before the NIC updates the send consumer index. -If this valus is set to 0 it will disable send buffer descriptor +If this value is set to 0 it will disable send buffer descriptor coalescing. -The default valus is 32. +The default value is 32. .It Va dev.ti.%d.tx_buf_ratio This value controls the ratio of the remaining memory in the NIC that should be devoted to transmit buffer vs. receive buffer. @@ -350,7 +350,7 @@ Write to the requested memory region on The argument is .Vt "struct tg_mem" . .It Dv ALT_READ_TG_REG -Read the requested register on the Tigon board. +Read the requested register from the Tigon board. The argument is .Vt "struct tg_reg" . .It Dv ALT_WRITE_TG_REG Modified: stable/8/share/man/man4/tl.4 ============================================================================== --- stable/8/share/man/man4/tl.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/tl.4 Fri May 18 00:56:12 2012 (r235579) @@ -83,9 +83,9 @@ option is only available on those PHYs t Also, the PHY will not advertise those modes that have been explicitly disabled using the following media options. .It 10baseT/UTP -Set 10Mbps operation +Set 10Mbps operation. .It 100baseTX -Set 100Mbps (Fast Ethernet) operation +Set 100Mbps (Fast Ethernet) operation. .It 10base5/AUI Enable AUI/BNC interface (useful only with the built-in PHY). .El @@ -96,7 +96,7 @@ driver supports the following media opti .Pp .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .It hw-loopback Modified: stable/8/share/man/man4/tws.4 ============================================================================== --- stable/8/share/man/man4/tws.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/tws.4 Fri May 18 00:56:12 2012 (r235579) @@ -74,13 +74,13 @@ prompt before booting the kernel or stor .Xr loader.conf 5 . .Bl -tag -width "hw.tws.use_32bit_sgls" .It Va hw.tws.cam_depth -The maximium queued CAM SIM requests for one controller. +The maximum queued CAM SIM requests for one controller. The default value is 256. .It Va hw.tws.enable_msi This tunable enables MSI support on the controller if set to a non-zero value. The default value is 0. .It Va hw.tws.queue_depth -The maximium queued requests for one controller. +The maximum queued requests for one controller. .It Va hw.tws.use_32bit_sgls Limit the driver to use only 32-bit SG elements regardless whether the operating system is running in 64-bit mode. Modified: stable/8/share/man/man4/uhso.4 ============================================================================== --- stable/8/share/man/man4/uhso.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/uhso.4 Fri May 18 00:56:12 2012 (r235579) @@ -100,7 +100,7 @@ mode to modem mode. This behavior can be disabled by setting .Va hw.usb.uhso.auto_switch to 0 using -.Xr sysctl 8 +.Xr sysctl 8 . .Sh EXAMPLES Establishing a packet interface connection using the AT command interface available at one of the serial ports Modified: stable/8/share/man/man4/umcs.4 ============================================================================== --- stable/8/share/man/man4/umcs.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/umcs.4 Fri May 18 00:56:12 2012 (r235579) @@ -66,7 +66,7 @@ driver which makes it behave like a Different ports on device are presented as sub-units, like .Pa /dev/ttyU0.1 and -.Pa /dev/ttyU0.2 +.Pa /dev/ttyU0.2 . .Sh HARDWARE The .Nm Modified: stable/8/share/man/man4/uslcom.4 ============================================================================== --- stable/8/share/man/man4/uslcom.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/uslcom.4 Fri May 18 00:56:12 2012 (r235579) @@ -40,7 +40,7 @@ uslcom_load="YES" .Sh DESCRIPTION The .Nm -driver supports Silicon Laboratories CP2101/CP2102 based serial adapters. +driver supports Silicon Laboratories CP2101/CP2102 based USB serial adapters. .Sh HARDWARE The following devices should work with the .Nm Modified: stable/8/share/man/man4/vr.4 ============================================================================== --- stable/8/share/man/man4/vr.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/vr.4 Fri May 18 00:56:12 2012 (r235579) @@ -111,7 +111,7 @@ driver supports the following media opti .Pp .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: stable/8/share/man/man4/watchdog.4 ============================================================================== --- stable/8/share/man/man4/watchdog.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/watchdog.4 Fri May 18 00:56:12 2012 (r235579) @@ -38,6 +38,7 @@ The .Nm facility is used for controlling hardware and software watchdogs. .Pp +The device .Pa /dev/fido responds to a single .Xr ioctl 2 Modified: stable/8/share/man/man4/wb.4 ============================================================================== --- stable/8/share/man/man4/wb.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/wb.4 Fri May 18 00:56:12 2012 (r235579) @@ -110,7 +110,7 @@ driver supports the following media opti .Pp .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: stable/8/share/man/man4/wpi.4 ============================================================================== --- stable/8/share/man/man4/wpi.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/wpi.4 Fri May 18 00:56:12 2012 (r235579) @@ -56,7 +56,7 @@ The .Nm driver provides support for the .Tn Intel -3945ABG Wireless network adapter +3945ABG Wireless network adapter. .Nm supports .Cm station , @@ -129,7 +129,7 @@ Background scanning is not currently sup .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr ifconfig 8 , -.Xr wpa_supplicant 8 . +.Xr wpa_supplicant 8 .Sh AUTHORS .An -nosplit The original Modified: stable/8/share/man/man4/xl.4 ============================================================================== --- stable/8/share/man/man4/xl.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/xl.4 Fri May 18 00:56:12 2012 (r235579) @@ -117,7 +117,7 @@ driver supports the following media opti .Pp .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: stable/8/share/man/man4/xnb.4 ============================================================================== --- stable/8/share/man/man4/xnb.4 Fri May 18 00:55:47 2012 (r235578) +++ stable/8/share/man/man4/xnb.4 Fri May 18 00:56:12 2012 (r235579) @@ -125,7 +125,7 @@ driver was written by .Aq alans@spectralogic.com and .An John Suykerbuyk -.Aq johns@spectralogic.com +.Aq johns@spectralogic.com . .Sh BUGS The .Nm From owner-svn-src-all@FreeBSD.ORG Fri May 18 01:04:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF560106566B; Fri, 18 May 2012 01:04:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C930C8FC0C; Fri, 18 May 2012 01:04:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I143QT026290; Fri, 18 May 2012 01:04:03 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I143b7026277; Fri, 18 May 2012 01:04:03 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180104.q4I143b7026277@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 01:04:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235580 - in stable/9/lib/libc: compat-43 sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 01:04:04 -0000 Author: gjb (doc committer) Date: Fri May 18 01:04:03 2012 New Revision: 235580 URL: http://svn.freebsd.org/changeset/base/235580 Log: MFC r235140: General mdoc(7) and typo fixes. PR: 167713 Modified: stable/9/lib/libc/compat-43/sigpause.2 stable/9/lib/libc/sys/ktrace.2 stable/9/lib/libc/sys/msgsnd.2 stable/9/lib/libc/sys/pathconf.2 stable/9/lib/libc/sys/rtprio.2 stable/9/lib/libc/sys/setfib.2 stable/9/lib/libc/sys/shm_open.2 stable/9/lib/libc/sys/sigqueue.2 stable/9/lib/libc/sys/timer_create.2 stable/9/lib/libc/sys/timer_delete.2 stable/9/lib/libc/sys/timer_settime.2 stable/9/lib/libc/sys/unlink.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/compat-43/sigpause.2 ============================================================================== --- stable/9/lib/libc/compat-43/sigpause.2 Fri May 18 00:56:12 2012 (r235579) +++ stable/9/lib/libc/compat-43/sigpause.2 Fri May 18 01:04:03 2012 (r235580) @@ -62,7 +62,7 @@ .Sy This interface is made obsolete by .Xr sigsuspend 2 .Sy and -.Xr sigaction 2 +.Xr sigaction 2 . .Pp The .Fn sigset @@ -172,7 +172,8 @@ returns if the signal had been blocked and the signal's previous disposition if it had not been blocked. Otherwise, -.Dv SIG_ERR is returned and +.Dv SIG_ERR +is returned and .Va errno set to indicate the error. .Pp Modified: stable/9/lib/libc/sys/ktrace.2 ============================================================================== --- stable/9/lib/libc/sys/ktrace.2 Fri May 18 00:56:12 2012 (r235579) +++ stable/9/lib/libc/sys/ktrace.2 Fri May 18 01:04:03 2012 (r235580) @@ -126,7 +126,7 @@ field gives the time (with microsecond r that the record was generated. The .Va ktr_tid -field holds a threadid. +field holds a thread id. .Pp The generic header is followed by .Va ktr_len Modified: stable/9/lib/libc/sys/msgsnd.2 ============================================================================== --- stable/9/lib/libc/sys/msgsnd.2 Fri May 18 00:56:12 2012 (r235579) +++ stable/9/lib/libc/sys/msgsnd.2 Fri May 18 01:04:03 2012 (r235580) @@ -139,7 +139,7 @@ will fail if: The .Fa msqid argument -is not a valid message queue identifier +is not a valid message queue identifier. .Pp The message queue was removed while .Fn msgsnd Modified: stable/9/lib/libc/sys/pathconf.2 ============================================================================== --- stable/9/lib/libc/sys/pathconf.2 Fri May 18 00:56:12 2012 (r235579) +++ stable/9/lib/libc/sys/pathconf.2 Fri May 18 01:04:03 2012 (r235580) @@ -166,7 +166,7 @@ Returns 1 if a Mandatory Access Control specified file, otherwise 0. .It Li _PC_MIN_HOLE_SIZE If a file system supports the reporting of holes (see -.Xr lseek 2 , +.Xr lseek 2 ) , .Fn pathconf and .Fn fpathconf Modified: stable/9/lib/libc/sys/rtprio.2 ============================================================================== --- stable/9/lib/libc/sys/rtprio.2 Fri May 18 00:56:12 2012 (r235579) +++ stable/9/lib/libc/sys/rtprio.2 Fri May 18 01:04:03 2012 (r235580) @@ -78,7 +78,8 @@ RTP_PRIO_NORMAL for normal priorities, a The priority specified by the .Va prio field ranges between 0 and -.Dv RTP_PRIO_MAX (usually 31) . +.Dv RTP_PRIO_MAX +.Pq usually 31 . 0 is the highest possible priority. .Pp Realtime and idle priority is inherited through fork() and exec(). @@ -95,7 +96,7 @@ Processes of equal real/idle priority ar The .Fn rtprio system call -will fail if +will fail if: .Bl -tag -width Er .It Bq Er EINVAL The specified Modified: stable/9/lib/libc/sys/setfib.2 ============================================================================== --- stable/9/lib/libc/sys/setfib.2 Fri May 18 00:56:12 2012 (r235579) +++ stable/9/lib/libc/sys/setfib.2 Fri May 18 01:04:03 2012 (r235580) @@ -94,7 +94,8 @@ system call is a .Fx extension however similar extensions have been added to many other -.Ux style kernels. +.Ux +style kernels. .Sh HISTORY The .Fn setfib Modified: stable/9/lib/libc/sys/shm_open.2 ============================================================================== --- stable/9/lib/libc/sys/shm_open.2 Fri May 18 00:56:12 2012 (r235579) +++ stable/9/lib/libc/sys/shm_open.2 Fri May 18 01:04:03 2012 (r235580) @@ -88,7 +88,7 @@ already exists, then .Fn shm_open will fail with -.Er EEXIST. +.Er EEXIST . .Pp Newly created objects start off with a size of zero. If an existing shared memory object is opened with Modified: stable/9/lib/libc/sys/sigqueue.2 ============================================================================== --- stable/9/lib/libc/sys/sigqueue.2 Fri May 18 00:56:12 2012 (r235579) +++ stable/9/lib/libc/sys/sigqueue.2 Fri May 18 01:04:03 2012 (r235580) @@ -140,7 +140,7 @@ does not exist. The .Fn sigqueue system call conforms to -.St -p1003.1-2004 +.St -p1003.1-2004 . .Sh HISTORY Support for .Tn POSIX Modified: stable/9/lib/libc/sys/timer_create.2 ============================================================================== --- stable/9/lib/libc/sys/timer_create.2 Fri May 18 00:56:12 2012 (r235579) +++ stable/9/lib/libc/sys/timer_create.2 Fri May 18 01:04:03 2012 (r235580) @@ -157,7 +157,7 @@ memory protection fault. The .Fn timer_create system call conforms to -.St -p1003.1-2004 +.St -p1003.1-2004 . .Sh HISTORY Support for .Tn POSIX Modified: stable/9/lib/libc/sys/timer_delete.2 ============================================================================== --- stable/9/lib/libc/sys/timer_delete.2 Fri May 18 00:56:12 2012 (r235579) +++ stable/9/lib/libc/sys/timer_delete.2 Fri May 18 01:04:03 2012 (r235580) @@ -72,7 +72,7 @@ is not a valid timer ID. The .Fn timer_delete system call conforms to -.St -p1003.1-2004 +.St -p1003.1-2004 . .Sh HISTORY Support for .Tn POSIX Modified: stable/9/lib/libc/sys/timer_settime.2 ============================================================================== --- stable/9/lib/libc/sys/timer_settime.2 Fri May 18 00:56:12 2012 (r235579) +++ stable/9/lib/libc/sys/timer_settime.2 Fri May 18 01:04:03 2012 (r235580) @@ -257,7 +257,7 @@ The and .Fn timer_settime system calls conform to -.St -p1003.1-2004 +.St -p1003.1-2004 . .Sh HISTORY Support for .Tn POSIX Modified: stable/9/lib/libc/sys/unlink.2 ============================================================================== --- stable/9/lib/libc/sys/unlink.2 Fri May 18 00:56:12 2012 (r235579) +++ stable/9/lib/libc/sys/unlink.2 Fri May 18 01:04:03 2012 (r235580) @@ -157,7 +157,7 @@ In addition to the errors returned by th .Fn unlink , the .Fn unlinkat -may fail if +may fail if: .Bl -tag -width Er .It Bq Er EBADF The From owner-svn-src-all@FreeBSD.ORG Fri May 18 01:04:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1307E1065686; Fri, 18 May 2012 01:04:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0C068FC14; Fri, 18 May 2012 01:04:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I14S1D026349; Fri, 18 May 2012 01:04:28 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I14SOQ026336; Fri, 18 May 2012 01:04:28 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180104.q4I14SOQ026336@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 01:04:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235581 - in stable/8/lib/libc: compat-43 sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 01:04:29 -0000 Author: gjb (doc committer) Date: Fri May 18 01:04:28 2012 New Revision: 235581 URL: http://svn.freebsd.org/changeset/base/235581 Log: MFC r235140: General mdoc(7) and typo fixes. PR: 167713 Modified: stable/8/lib/libc/compat-43/sigpause.2 stable/8/lib/libc/sys/ktrace.2 stable/8/lib/libc/sys/msgsnd.2 stable/8/lib/libc/sys/pathconf.2 stable/8/lib/libc/sys/rtprio.2 stable/8/lib/libc/sys/setfib.2 stable/8/lib/libc/sys/shm_open.2 stable/8/lib/libc/sys/sigqueue.2 stable/8/lib/libc/sys/timer_create.2 stable/8/lib/libc/sys/timer_delete.2 stable/8/lib/libc/sys/timer_settime.2 stable/8/lib/libc/sys/unlink.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/compat-43/sigpause.2 ============================================================================== --- stable/8/lib/libc/compat-43/sigpause.2 Fri May 18 01:04:03 2012 (r235580) +++ stable/8/lib/libc/compat-43/sigpause.2 Fri May 18 01:04:28 2012 (r235581) @@ -62,7 +62,7 @@ .Sy This interface is made obsolete by .Xr sigsuspend 2 .Sy and -.Xr sigaction 2 +.Xr sigaction 2 . .Pp The .Fn sigset @@ -172,7 +172,8 @@ returns if the signal had been blocked and the signal's previous disposition if it had not been blocked. Otherwise, -.Dv SIG_ERR is returned and +.Dv SIG_ERR +is returned and .Va errno set to indicate the error. .Pp Modified: stable/8/lib/libc/sys/ktrace.2 ============================================================================== --- stable/8/lib/libc/sys/ktrace.2 Fri May 18 01:04:03 2012 (r235580) +++ stable/8/lib/libc/sys/ktrace.2 Fri May 18 01:04:28 2012 (r235581) @@ -126,7 +126,7 @@ field gives the time (with microsecond r that the record was generated. The .Va ktr_tid -field holds a threadid. +field holds a thread id. .Pp The generic header is followed by .Va ktr_len Modified: stable/8/lib/libc/sys/msgsnd.2 ============================================================================== --- stable/8/lib/libc/sys/msgsnd.2 Fri May 18 01:04:03 2012 (r235580) +++ stable/8/lib/libc/sys/msgsnd.2 Fri May 18 01:04:28 2012 (r235581) @@ -139,7 +139,7 @@ will fail if: The .Fa msqid argument -is not a valid message queue identifier +is not a valid message queue identifier. .Pp The message queue was removed while .Fn msgsnd Modified: stable/8/lib/libc/sys/pathconf.2 ============================================================================== --- stable/8/lib/libc/sys/pathconf.2 Fri May 18 01:04:03 2012 (r235580) +++ stable/8/lib/libc/sys/pathconf.2 Fri May 18 01:04:28 2012 (r235581) @@ -167,7 +167,7 @@ Returns 1 if a Mandatory Access Control specified file, otherwise 0. .It Li _PC_MIN_HOLE_SIZE If a file system supports the reporting of holes (see -.Xr lseek 2 , +.Xr lseek 2 ) , .Fn pathconf and .Fn fpathconf Modified: stable/8/lib/libc/sys/rtprio.2 ============================================================================== --- stable/8/lib/libc/sys/rtprio.2 Fri May 18 01:04:03 2012 (r235580) +++ stable/8/lib/libc/sys/rtprio.2 Fri May 18 01:04:28 2012 (r235581) @@ -78,7 +78,8 @@ RTP_PRIO_NORMAL for normal priorities, a The priority specified by the .Va prio field ranges between 0 and -.Dv RTP_PRIO_MAX (usually 31) . +.Dv RTP_PRIO_MAX +.Pq usually 31 . 0 is the highest possible priority. .Pp Realtime and idle priority is inherited through fork() and exec(). @@ -95,7 +96,7 @@ Processes of equal real/idle priority ar The .Fn rtprio system call -will fail if +will fail if: .Bl -tag -width Er .It Bq Er EINVAL The specified Modified: stable/8/lib/libc/sys/setfib.2 ============================================================================== --- stable/8/lib/libc/sys/setfib.2 Fri May 18 01:04:03 2012 (r235580) +++ stable/8/lib/libc/sys/setfib.2 Fri May 18 01:04:28 2012 (r235581) @@ -94,7 +94,8 @@ system call is a .Fx extension however similar extensions have been added to many other -.Ux style kernels. +.Ux +style kernels. .Sh HISTORY The .Fn setfib Modified: stable/8/lib/libc/sys/shm_open.2 ============================================================================== --- stable/8/lib/libc/sys/shm_open.2 Fri May 18 01:04:03 2012 (r235580) +++ stable/8/lib/libc/sys/shm_open.2 Fri May 18 01:04:28 2012 (r235581) @@ -87,7 +87,7 @@ already exists, then .Fn shm_open will fail with -.Er EEXIST. +.Er EEXIST . .Pp Newly created objects start off with a size of zero. If an existing shared memory object is opened with Modified: stable/8/lib/libc/sys/sigqueue.2 ============================================================================== --- stable/8/lib/libc/sys/sigqueue.2 Fri May 18 01:04:03 2012 (r235580) +++ stable/8/lib/libc/sys/sigqueue.2 Fri May 18 01:04:28 2012 (r235581) @@ -140,7 +140,7 @@ does not exist. The .Fn sigqueue system call conforms to -.St -p1003.1-2004 +.St -p1003.1-2004 . .Sh HISTORY Support for .Tn POSIX Modified: stable/8/lib/libc/sys/timer_create.2 ============================================================================== --- stable/8/lib/libc/sys/timer_create.2 Fri May 18 01:04:03 2012 (r235580) +++ stable/8/lib/libc/sys/timer_create.2 Fri May 18 01:04:28 2012 (r235581) @@ -157,7 +157,7 @@ memory protection fault. The .Fn timer_create system call conforms to -.St -p1003.1-2004 +.St -p1003.1-2004 . .Sh HISTORY Support for .Tn POSIX Modified: stable/8/lib/libc/sys/timer_delete.2 ============================================================================== --- stable/8/lib/libc/sys/timer_delete.2 Fri May 18 01:04:03 2012 (r235580) +++ stable/8/lib/libc/sys/timer_delete.2 Fri May 18 01:04:28 2012 (r235581) @@ -72,7 +72,7 @@ is not a valid timer ID. The .Fn timer_delete system call conforms to -.St -p1003.1-2004 +.St -p1003.1-2004 . .Sh HISTORY Support for .Tn POSIX Modified: stable/8/lib/libc/sys/timer_settime.2 ============================================================================== --- stable/8/lib/libc/sys/timer_settime.2 Fri May 18 01:04:03 2012 (r235580) +++ stable/8/lib/libc/sys/timer_settime.2 Fri May 18 01:04:28 2012 (r235581) @@ -257,7 +257,7 @@ The and .Fn timer_settime system calls conform to -.St -p1003.1-2004 +.St -p1003.1-2004 . .Sh HISTORY Support for .Tn POSIX Modified: stable/8/lib/libc/sys/unlink.2 ============================================================================== --- stable/8/lib/libc/sys/unlink.2 Fri May 18 01:04:03 2012 (r235580) +++ stable/8/lib/libc/sys/unlink.2 Fri May 18 01:04:28 2012 (r235581) @@ -155,7 +155,7 @@ In addition to the errors returned by th .Fn unlink , the .Fn unlinkat -may fail if +may fail if: .Bl -tag -width Er .It Bq Er EBADF The From owner-svn-src-all@FreeBSD.ORG Fri May 18 01:10:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0B131106564A; Fri, 18 May 2012 01:10:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E887C8FC16; Fri, 18 May 2012 01:10:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I1ACWu026682; Fri, 18 May 2012 01:10:12 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I1ACps026669; Fri, 18 May 2012 01:10:12 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180110.q4I1ACps026669@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 01:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235582 - in stable/9/share/man: man4 man7 man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 01:10:13 -0000 Author: gjb (doc committer) Date: Fri May 18 01:10:12 2012 New Revision: 235582 URL: http://svn.freebsd.org/changeset/base/235582 Log: MFC r235319: Remove duplicate words in mdoc(7) pages. PR: 167810 Modified: stable/9/share/man/man4/mk48txx.4 stable/9/share/man/man4/mwl.4 stable/9/share/man/man4/ng_patch.4 stable/9/share/man/man4/ste.4 stable/9/share/man/man4/vge.4 stable/9/share/man/man7/tuning.7 stable/9/share/man/man9/VOP_GETACL.9 stable/9/share/man/man9/VOP_GETEXTATTR.9 stable/9/share/man/man9/VOP_SETACL.9 stable/9/share/man/man9/VOP_SETEXTATTR.9 stable/9/share/man/man9/locking.9 stable/9/share/man/man9/store.9 Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/share/man/man7/ (props changed) stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man4/mk48txx.4 ============================================================================== --- stable/9/share/man/man4/mk48txx.4 Fri May 18 01:04:28 2012 (r235581) +++ stable/9/share/man/man4/mk48txx.4 Fri May 18 01:10:12 2012 (r235582) @@ -123,7 +123,7 @@ function. The offset into the control registers of the .Tn Mostek chip, -which is set by the the +which is set by the .Fn mk48txx_attach function. .It Fa sc_year0 Modified: stable/9/share/man/man4/mwl.4 ============================================================================== --- stable/9/share/man/man4/mwl.4 Fri May 18 01:04:28 2012 (r235581) +++ stable/9/share/man/man4/mwl.4 Fri May 18 01:10:12 2012 (r235582) @@ -144,7 +144,7 @@ ifconfig wlan0 create wlandev mwl0 wlanm ifconfig wlan0 meshid my_mesh mode 11a inet 192.168.0.10/24 .Ed .Pp -Create two virtual 802.11a host-based access points, one with +Create two virtual 802.11a host-based access points, one with WEP enabled and one with no security, and bridge them to the fxp0 (wired) device: .Bd -literal -offset indent Modified: stable/9/share/man/man4/ng_patch.4 ============================================================================== --- stable/9/share/man/man4/ng_patch.4 Fri May 18 01:04:28 2012 (r235581) +++ stable/9/share/man/man4/ng_patch.4 Fri May 18 01:10:12 2012 (r235582) @@ -140,7 +140,7 @@ node allows to modify TTL and TOS/DSCP f Suppose you have two adjacent simplex links to remote network (e.g.\& satellite), so that the packets expiring in between will generate unwanted ICMP-replies which have to go forth, not back. -Thus you need to raise TTL of every packet entering link link by 2 +Thus you need to raise TTL of every packet entering link by 2 to ensure the TTL will not reach zero there. So you setup .Xr ipfw 8 Modified: stable/9/share/man/man4/ste.4 ============================================================================== --- stable/9/share/man/man4/ste.4 Fri May 18 01:04:28 2012 (r235581) +++ stable/9/share/man/man4/ste.4 Fri May 18 01:10:12 2012 (r235582) @@ -136,7 +136,7 @@ Maximum number of time to delay RX inter The valid range is 0 to 209712 in units of 1us, the default is 150 (150us). The value 0 effectively disables the RX interrupt moderation. -The resolution of of timer is about 3.2us so finer tuning than +The resolution of timer is about 3.2us so finer tuning than 3.2us wouldn't be available. The interface does not need to be brought down and up again before a change takes effect. Modified: stable/9/share/man/man4/vge.4 ============================================================================== --- stable/9/share/man/man4/vge.4 Fri May 18 01:04:28 2012 (r235581) +++ stable/9/share/man/man4/vge.4 Fri May 18 01:10:12 2012 (r235582) @@ -177,7 +177,7 @@ tunables: Maximum number of time to delay interrupts. The valid range is 0 to 5100 in units of 1us, the default is 150 (150us). -The resolution of of timer is about 20us so finer tuning than +The resolution of timer is about 20us so finer tuning than 20us wouldn't be available. The interface should be brought down and up again before a change takes effect. Modified: stable/9/share/man/man7/tuning.7 ============================================================================== --- stable/9/share/man/man7/tuning.7 Fri May 18 01:04:28 2012 (r235581) +++ stable/9/share/man/man7/tuning.7 Fri May 18 01:10:12 2012 (r235582) @@ -447,7 +447,7 @@ the content of mapped buffer to the read Increasing this value to a higher setting, such as `25165824' might improve performance on systems where space for mapping pipe buffers is quickly exhausted. -This exhaustion is not fatal; however, and it will only cause pipes to +This exhaustion is not fatal; however, and it will only cause pipes to fall back to using double-copy. .Pp The Modified: stable/9/share/man/man9/VOP_GETACL.9 ============================================================================== --- stable/9/share/man/man9/VOP_GETACL.9 Fri May 18 01:04:28 2012 (r235581) +++ stable/9/share/man/man9/VOP_GETACL.9 Fri May 18 01:10:12 2012 (r235582) @@ -79,7 +79,7 @@ Otherwise, an appropriate error code is .It Bq Er EINVAL The ACL type passed is invalid for this vnode. .It Bq Er EACCES -The the caller does not have the appropriate privilege. +The caller does not have the appropriate privilege. .It Bq Er ENOMEM Sufficient memory is not available to fulfill the request. .It Bq Er EOPNOTSUPP Modified: stable/9/share/man/man9/VOP_GETEXTATTR.9 ============================================================================== --- stable/9/share/man/man9/VOP_GETEXTATTR.9 Fri May 18 01:04:28 2012 (r235581) +++ stable/9/share/man/man9/VOP_GETEXTATTR.9 Fri May 18 01:10:12 2012 (r235582) @@ -102,7 +102,7 @@ Otherwise, an appropriate error code is .It Bq Er ENOATTR The requested attribute was not defined for this vnode. .It Bq Er EACCES -The the caller does not have the appropriate privilege. +The caller does not have the appropriate privilege. .It Bq Er ENXIO The request was not valid in this file system for the specified vnode and attribute name. Modified: stable/9/share/man/man9/VOP_SETACL.9 ============================================================================== --- stable/9/share/man/man9/VOP_SETACL.9 Fri May 18 01:04:28 2012 (r235581) +++ stable/9/share/man/man9/VOP_SETACL.9 Fri May 18 01:10:12 2012 (r235582) @@ -84,7 +84,7 @@ Otherwise, an appropriate error code is .It Bq Er EINVAL The ACL type passed is invalid for this vnode, or the ACL data is invalid. .It Bq Er EACCES -The the caller does not have the appropriate privilege. +The caller does not have the appropriate privilege. .It Bq Er ENOMEM Sufficient memory is not available to fulfill the request. .It Bq Er EOPNOTSUPP Modified: stable/9/share/man/man9/VOP_SETEXTATTR.9 ============================================================================== --- stable/9/share/man/man9/VOP_SETEXTATTR.9 Fri May 18 01:04:28 2012 (r235581) +++ stable/9/share/man/man9/VOP_SETEXTATTR.9 Fri May 18 01:10:12 2012 (r235582) @@ -91,7 +91,7 @@ Otherwise, an appropriate error code is .Sh ERRORS .Bl -tag -width Er .It Bq Er EACCES -The the caller does not have the appropriate privilege. +The caller does not have the appropriate privilege. .It Bq Er ENXIO The request was not valid in this file system for the specified vnode and attribute name. Modified: stable/9/share/man/man9/locking.9 ============================================================================== --- stable/9/share/man/man9/locking.9 Fri May 18 01:04:28 2012 (r235581) +++ stable/9/share/man/man9/locking.9 Fri May 18 01:10:12 2012 (r235582) @@ -281,7 +281,7 @@ This is often a bad idea because it gene good knowledge of all of the call graph above the place where .Fn mtx_sleep is being called and assumptions the calling code has made. -Because the lock gets dropped during sleep, one one must re-test all +Because the lock gets dropped during sleep, one must re-test all the assumptions that were made before, all the way up the call graph to the place where the lock was acquired. .Pp Modified: stable/9/share/man/man9/store.9 ============================================================================== --- stable/9/share/man/man9/store.9 Fri May 18 01:04:28 2012 (r235581) +++ stable/9/share/man/man9/store.9 Fri May 18 01:10:12 2012 (r235582) @@ -76,13 +76,13 @@ Stores a byte of data to the user-space Stores a word of data to the user-space address .Pa base . .It Fn suword16 -Stores 16 bits of of data to the user-space address +Stores 16 bits of data to the user-space address .Pa base . .It Fn suword32 -Stores 32 bits of of data to the user-space address +Stores 32 bits of data to the user-space address .Pa base . .It Fn suword64 -Stores 64 bits of of data to the user-space address +Stores 64 bits of data to the user-space address .Pa base . .It Fn suswintr Stores a short word of data to the user-space address From owner-svn-src-all@FreeBSD.ORG Fri May 18 01:10:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8B911065672; Fri, 18 May 2012 01:10:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D32DB8FC12; Fri, 18 May 2012 01:10:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I1AYKv026742; Fri, 18 May 2012 01:10:34 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I1AYgf026729; Fri, 18 May 2012 01:10:34 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180110.q4I1AYgf026729@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 01:10:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235583 - in stable/8/share/man: man4 man7 man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 01:10:35 -0000 Author: gjb (doc committer) Date: Fri May 18 01:10:34 2012 New Revision: 235583 URL: http://svn.freebsd.org/changeset/base/235583 Log: MFC r235319: Remove duplicate words in mdoc(7) pages. PR: 167810 Modified: stable/8/share/man/man4/mk48txx.4 stable/8/share/man/man4/mwl.4 stable/8/share/man/man4/ng_patch.4 stable/8/share/man/man4/ste.4 stable/8/share/man/man4/vge.4 stable/8/share/man/man7/tuning.7 stable/8/share/man/man9/VOP_GETACL.9 stable/8/share/man/man9/VOP_GETEXTATTR.9 stable/8/share/man/man9/VOP_SETACL.9 stable/8/share/man/man9/VOP_SETEXTATTR.9 stable/8/share/man/man9/locking.9 stable/8/share/man/man9/store.9 Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/share/man/man7/ (props changed) stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man4/mk48txx.4 ============================================================================== --- stable/8/share/man/man4/mk48txx.4 Fri May 18 01:10:12 2012 (r235582) +++ stable/8/share/man/man4/mk48txx.4 Fri May 18 01:10:34 2012 (r235583) @@ -125,7 +125,7 @@ function. The offset into the control registers of the .Tn Mostek chip, -which is set by the the +which is set by the .Fn mk48txx_attach function. .It Fa sc_year0 Modified: stable/8/share/man/man4/mwl.4 ============================================================================== --- stable/8/share/man/man4/mwl.4 Fri May 18 01:10:12 2012 (r235582) +++ stable/8/share/man/man4/mwl.4 Fri May 18 01:10:34 2012 (r235583) @@ -146,7 +146,7 @@ ifconfig wlan0 create wlandev mwl0 wlanm ifconfig wlan0 meshid my_mesh mode 11a inet 192.168.0.10/24 .Ed .Pp -Create two virtual 802.11a host-based access points, one with +Create two virtual 802.11a host-based access points, one with WEP enabled and one with no security, and bridge them to the fxp0 (wired) device: .Bd -literal -offset indent Modified: stable/8/share/man/man4/ng_patch.4 ============================================================================== --- stable/8/share/man/man4/ng_patch.4 Fri May 18 01:10:12 2012 (r235582) +++ stable/8/share/man/man4/ng_patch.4 Fri May 18 01:10:34 2012 (r235583) @@ -140,7 +140,7 @@ node allows to modify TTL and TOS/DSCP f Suppose you have two adjacent simplex links to remote network (e.g.\& satellite), so that the packets expiring in between will generate unwanted ICMP-replies which have to go forth, not back. -Thus you need to raise TTL of every packet entering link link by 2 +Thus you need to raise TTL of every packet entering link by 2 to ensure the TTL will not reach zero there. So you setup .Xr ipfw 8 Modified: stable/8/share/man/man4/ste.4 ============================================================================== --- stable/8/share/man/man4/ste.4 Fri May 18 01:10:12 2012 (r235582) +++ stable/8/share/man/man4/ste.4 Fri May 18 01:10:34 2012 (r235583) @@ -138,7 +138,7 @@ Maximum number of time to delay RX inter The valid range is 0 to 209712 in units of 1us, the default is 150 (150us). The value 0 effectively disables the RX interrupt moderation. -The resolution of of timer is about 3.2us so finer tuning than +The resolution of timer is about 3.2us so finer tuning than 3.2us wouldn't be available. The interface does not need to be brought down and up again before a change takes effect. Modified: stable/8/share/man/man4/vge.4 ============================================================================== --- stable/8/share/man/man4/vge.4 Fri May 18 01:10:12 2012 (r235582) +++ stable/8/share/man/man4/vge.4 Fri May 18 01:10:34 2012 (r235583) @@ -177,7 +177,7 @@ tunables: Maximum number of time to delay interrupts. The valid range is 0 to 5100 in units of 1us, the default is 150 (150us). -The resolution of of timer is about 20us so finer tuning than +The resolution of timer is about 20us so finer tuning than 20us wouldn't be available. The interface should be brought down and up again before a change takes effect. Modified: stable/8/share/man/man7/tuning.7 ============================================================================== --- stable/8/share/man/man7/tuning.7 Fri May 18 01:10:12 2012 (r235582) +++ stable/8/share/man/man7/tuning.7 Fri May 18 01:10:34 2012 (r235583) @@ -442,7 +442,7 @@ the content of mapped buffer to the read Increasing this value to a higher setting, such as `25165824' might improve performance on systems where space for mapping pipe buffers is quickly exhausted. -This exhaustion is not fatal; however, and it will only cause pipes to +This exhaustion is not fatal; however, and it will only cause pipes to fall back to using double-copy. .Pp The Modified: stable/8/share/man/man9/VOP_GETACL.9 ============================================================================== --- stable/8/share/man/man9/VOP_GETACL.9 Fri May 18 01:10:12 2012 (r235582) +++ stable/8/share/man/man9/VOP_GETACL.9 Fri May 18 01:10:34 2012 (r235583) @@ -79,7 +79,7 @@ Otherwise, an appropriate error code is .It Bq Er EINVAL The ACL type passed is invalid for this vnode. .It Bq Er EACCES -The the caller does not have the appropriate privilege. +The caller does not have the appropriate privilege. .It Bq Er ENOMEM Sufficient memory is not available to fulfill the request. .It Bq Er EOPNOTSUPP Modified: stable/8/share/man/man9/VOP_GETEXTATTR.9 ============================================================================== --- stable/8/share/man/man9/VOP_GETEXTATTR.9 Fri May 18 01:10:12 2012 (r235582) +++ stable/8/share/man/man9/VOP_GETEXTATTR.9 Fri May 18 01:10:34 2012 (r235583) @@ -102,7 +102,7 @@ Otherwise, an appropriate error code is .It Bq Er ENOATTR The requested attribute was not defined for this vnode. .It Bq Er EACCES -The the caller does not have the appropriate privilege. +The caller does not have the appropriate privilege. .It Bq Er ENXIO The request was not valid in this file system for the specified vnode and attribute name. Modified: stable/8/share/man/man9/VOP_SETACL.9 ============================================================================== --- stable/8/share/man/man9/VOP_SETACL.9 Fri May 18 01:10:12 2012 (r235582) +++ stable/8/share/man/man9/VOP_SETACL.9 Fri May 18 01:10:34 2012 (r235583) @@ -84,7 +84,7 @@ Otherwise, an appropriate error code is .It Bq Er EINVAL The ACL type passed is invalid for this vnode, or the ACL data is invalid. .It Bq Er EACCES -The the caller does not have the appropriate privilege. +The caller does not have the appropriate privilege. .It Bq Er ENOMEM Sufficient memory is not available to fulfill the request. .It Bq Er EOPNOTSUPP Modified: stable/8/share/man/man9/VOP_SETEXTATTR.9 ============================================================================== --- stable/8/share/man/man9/VOP_SETEXTATTR.9 Fri May 18 01:10:12 2012 (r235582) +++ stable/8/share/man/man9/VOP_SETEXTATTR.9 Fri May 18 01:10:34 2012 (r235583) @@ -91,7 +91,7 @@ Otherwise, an appropriate error code is .Sh ERRORS .Bl -tag -width Er .It Bq Er EACCES -The the caller does not have the appropriate privilege. +The caller does not have the appropriate privilege. .It Bq Er ENXIO The request was not valid in this file system for the specified vnode and attribute name. Modified: stable/8/share/man/man9/locking.9 ============================================================================== --- stable/8/share/man/man9/locking.9 Fri May 18 01:10:12 2012 (r235582) +++ stable/8/share/man/man9/locking.9 Fri May 18 01:10:34 2012 (r235583) @@ -281,7 +281,7 @@ This is often a bad idea because it gene good knowledge of all of the call graph above the place where .Fn mtx_sleep is being called and assumptions the calling code has made. -Because the lock gets dropped during sleep, one one must re-test all +Because the lock gets dropped during sleep, one must re-test all the assumptions that were made before, all the way up the call graph to the place where the lock was acquired. .Pp Modified: stable/8/share/man/man9/store.9 ============================================================================== --- stable/8/share/man/man9/store.9 Fri May 18 01:10:12 2012 (r235582) +++ stable/8/share/man/man9/store.9 Fri May 18 01:10:34 2012 (r235583) @@ -76,13 +76,13 @@ Stores a byte of data to the user-space Stores a word of data to the user-space address .Pa base . .It Fn suword16 -Stores 16 bits of of data to the user-space address +Stores 16 bits of data to the user-space address .Pa base . .It Fn suword32 -Stores 32 bits of of data to the user-space address +Stores 32 bits of data to the user-space address .Pa base . .It Fn suword64 -Stores 64 bits of of data to the user-space address +Stores 64 bits of data to the user-space address .Pa base . .It Fn suswintr Stores a short word of data to the user-space address From owner-svn-src-all@FreeBSD.ORG Fri May 18 01:13:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3DD3E106566C; Fri, 18 May 2012 01:13:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DCF48FC12; Fri, 18 May 2012 01:13:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I1DItA026914; Fri, 18 May 2012 01:13:18 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I1DIa8026905; Fri, 18 May 2012 01:13:18 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180113.q4I1DIa8026905@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 01:13:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235584 - in stable/7/share/man: man4 man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 01:13:19 -0000 Author: gjb (doc committer) Date: Fri May 18 01:13:18 2012 New Revision: 235584 URL: http://svn.freebsd.org/changeset/base/235584 Log: MFC r235319: Remove duplicate words in mdoc(7) pages. PR: 167810 Modified: stable/7/share/man/man4/mk48txx.4 stable/7/share/man/man4/ng_patch.4 stable/7/share/man/man4/ste.4 stable/7/share/man/man4/vge.4 stable/7/share/man/man9/VOP_GETACL.9 stable/7/share/man/man9/VOP_GETEXTATTR.9 stable/7/share/man/man9/VOP_SETACL.9 stable/7/share/man/man9/VOP_SETEXTATTR.9 Directory Properties: stable/7/share/man/man4/ (props changed) stable/7/share/man/man9/ (props changed) Modified: stable/7/share/man/man4/mk48txx.4 ============================================================================== --- stable/7/share/man/man4/mk48txx.4 Fri May 18 01:10:34 2012 (r235583) +++ stable/7/share/man/man4/mk48txx.4 Fri May 18 01:13:18 2012 (r235584) @@ -125,7 +125,7 @@ function. The offset into the control registers of the .Tn Mostek chip, -which is set by the the +which is set by the .Fn mk48txx_attach function. .It Fa sc_year0 Modified: stable/7/share/man/man4/ng_patch.4 ============================================================================== --- stable/7/share/man/man4/ng_patch.4 Fri May 18 01:10:34 2012 (r235583) +++ stable/7/share/man/man4/ng_patch.4 Fri May 18 01:13:18 2012 (r235584) @@ -140,7 +140,7 @@ node allows to modify TTL and TOS/DSCP f Suppose you have two adjacent simplex links to remote network (e.g.\& satellite), so that the packets expiring in between will generate unwanted ICMP-replies which have to go forth, not back. -Thus you need to raise TTL of every packet entering link link by 2 +Thus you need to raise TTL of every packet entering link by 2 to ensure the TTL will not reach zero there. So you setup .Xr ipfw 8 Modified: stable/7/share/man/man4/ste.4 ============================================================================== --- stable/7/share/man/man4/ste.4 Fri May 18 01:10:34 2012 (r235583) +++ stable/7/share/man/man4/ste.4 Fri May 18 01:13:18 2012 (r235584) @@ -138,7 +138,7 @@ Maximum number of time to delay RX inter The valid range is 0 to 209712 in units of 1us, the default is 150 (150us). The value 0 effectively disables the RX interrupt moderation. -The resolution of of timer is about 3.2us so finer tuning than +The resolution of timer is about 3.2us so finer tuning than 3.2us wouldn't be available. The interface does not need to be brought down and up again before a change takes effect. Modified: stable/7/share/man/man4/vge.4 ============================================================================== --- stable/7/share/man/man4/vge.4 Fri May 18 01:10:34 2012 (r235583) +++ stable/7/share/man/man4/vge.4 Fri May 18 01:13:18 2012 (r235584) @@ -177,7 +177,7 @@ tunables: Maximum number of time to delay interrupts. The valid range is 0 to 5100 in units of 1us, the default is 150 (150us). -The resolution of of timer is about 20us so finer tuning than +The resolution of timer is about 20us so finer tuning than 20us wouldn't be available. The interface should be brought down and up again before a change takes effect. Modified: stable/7/share/man/man9/VOP_GETACL.9 ============================================================================== --- stable/7/share/man/man9/VOP_GETACL.9 Fri May 18 01:10:34 2012 (r235583) +++ stable/7/share/man/man9/VOP_GETACL.9 Fri May 18 01:13:18 2012 (r235584) @@ -79,7 +79,7 @@ Otherwise, an appropriate error code is .It Bq Er EINVAL The ACL type passed is invalid for this vnode. .It Bq Er EACCES -The the caller does not have the appropriate privilege. +The caller does not have the appropriate privilege. .It Bq Er ENOMEM Sufficient memory is not available to fulfill the request. .It Bq Er EOPNOTSUPP Modified: stable/7/share/man/man9/VOP_GETEXTATTR.9 ============================================================================== --- stable/7/share/man/man9/VOP_GETEXTATTR.9 Fri May 18 01:10:34 2012 (r235583) +++ stable/7/share/man/man9/VOP_GETEXTATTR.9 Fri May 18 01:13:18 2012 (r235584) @@ -102,7 +102,7 @@ Otherwise, an appropriate error code is .It Bq Er ENOATTR The requested attribute was not defined for this vnode. .It Bq Er EACCES -The the caller does not have the appropriate privilege. +The caller does not have the appropriate privilege. .It Bq Er ENXIO The request was not valid in this file system for the specified vnode and attribute name. Modified: stable/7/share/man/man9/VOP_SETACL.9 ============================================================================== --- stable/7/share/man/man9/VOP_SETACL.9 Fri May 18 01:10:34 2012 (r235583) +++ stable/7/share/man/man9/VOP_SETACL.9 Fri May 18 01:13:18 2012 (r235584) @@ -84,7 +84,7 @@ Otherwise, an appropriate error code is .It Bq Er EINVAL The ACL type passed is invalid for this vnode, or the ACL data is invalid. .It Bq Er EACCES -The the caller does not have the appropriate privilege. +The caller does not have the appropriate privilege. .It Bq Er ENOMEM Sufficient memory is not available to fulfill the request. .It Bq Er EOPNOTSUPP Modified: stable/7/share/man/man9/VOP_SETEXTATTR.9 ============================================================================== --- stable/7/share/man/man9/VOP_SETEXTATTR.9 Fri May 18 01:10:34 2012 (r235583) +++ stable/7/share/man/man9/VOP_SETEXTATTR.9 Fri May 18 01:13:18 2012 (r235584) @@ -91,7 +91,7 @@ Otherwise, an appropriate error code is .Sh ERRORS .Bl -tag -width Er .It Bq Er EACCES -The the caller does not have the appropriate privilege. +The caller does not have the appropriate privilege. .It Bq Er ENXIO The request was not valid in this file system for the specified vnode and attribute name. From owner-svn-src-all@FreeBSD.ORG Fri May 18 01:50:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A18D9106564A; Fri, 18 May 2012 01:50:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 830738FC0A; Fri, 18 May 2012 01:50:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I1oZ9V028241; Fri, 18 May 2012 01:50:35 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I1oZGr028230; Fri, 18 May 2012 01:50:35 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180150.q4I1oZGr028230@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 01:50:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235585 - in stable/8: lib/libutil sbin/hastd sbin/iscontrol share/man/man5 usr.sbin/ntp/doc usr.sbin/wpa/hostapd usr.sbin/wpa/wpa_supplicant X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 01:50:35 -0000 Author: gjb (doc committer) Date: Fri May 18 01:50:34 2012 New Revision: 235585 URL: http://svn.freebsd.org/changeset/base/235585 Log: MFC r235337: General mdoc(7) and typo fixes. PR: 167804 Modified: stable/8/lib/libutil/login.conf.5 stable/8/sbin/hastd/hast.conf.5 stable/8/sbin/iscontrol/iscsi.conf.5 stable/8/share/man/man5/make.conf.5 stable/8/share/man/man5/nsmb.conf.5 stable/8/share/man/man5/portsnap.conf.5 stable/8/share/man/man5/rc.conf.5 stable/8/usr.sbin/ntp/doc/ntp.conf.5 stable/8/usr.sbin/wpa/hostapd/hostapd.conf.5 stable/8/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Directory Properties: stable/8/lib/libutil/ (props changed) stable/8/sbin/hastd/ (props changed) stable/8/sbin/iscontrol/ (props changed) stable/8/share/man/man5/ (props changed) stable/8/usr.sbin/ntp/ (props changed) stable/8/usr.sbin/wpa/ (props changed) Modified: stable/8/lib/libutil/login.conf.5 ============================================================================== --- stable/8/lib/libutil/login.conf.5 Fri May 18 01:13:18 2012 (r235584) +++ stable/8/lib/libutil/login.conf.5 Fri May 18 01:50:34 2012 (r235585) @@ -208,7 +208,8 @@ value. The syntax is the same as for the .Fl l argument of -.Xr cpuset 1 or the word +.Xr cpuset 1 +or the word .Ql default . If set to .Ql default Modified: stable/8/sbin/hastd/hast.conf.5 ============================================================================== --- stable/8/sbin/hastd/hast.conf.5 Fri May 18 01:13:18 2012 (r235584) +++ stable/8/sbin/hastd/hast.conf.5 Fri May 18 01:50:34 2012 (r235585) @@ -37,7 +37,7 @@ .Xr hastd 8 daemon and the .Xr hastctl 8 -utility. +utility .Sh DESCRIPTION The .Nm @@ -439,7 +439,7 @@ resource tank { .Xr gethostname 3 , .Xr geom 4 , .Xr hastctl 8 , -.Xr hastd 8 . +.Xr hastd 8 .Sh AUTHORS The .Nm Modified: stable/8/sbin/iscontrol/iscsi.conf.5 ============================================================================== --- stable/8/sbin/iscontrol/iscsi.conf.5 Fri May 18 01:13:18 2012 (r235584) +++ stable/8/sbin/iscontrol/iscsi.conf.5 Fri May 18 01:50:34 2012 (r235585) @@ -76,7 +76,7 @@ currently only 1. is the name by which the target is known, not to be confused with target address, either obtained via the target administrator, or from a -.Em discovery session. +.Em discovery session . .It Cm InitiatorName if not specified, defaults to .Sy iqn.2005-01.il.ac.huji.cs: @@ -146,7 +146,7 @@ see This value can only be reduced. .It Cm sockbufsize sets the receiver and transmitter socket buffer size to -.Em size, +.Em size , in kilobytes. The default is 128. .El Modified: stable/8/share/man/man5/make.conf.5 ============================================================================== --- stable/8/share/man/man5/make.conf.5 Fri May 18 01:13:18 2012 (r235584) +++ stable/8/share/man/man5/make.conf.5 Fri May 18 01:50:34 2012 (r235585) @@ -554,7 +554,7 @@ files at build time. The value should include the full path to the .Pa .mc file(s), e.g., -.Pa /etc/mail/foo.mc +.Pa /etc/mail/foo.mc , .Pa /etc/mail/bar.mc . .It Va SENDMAIL_ALIASES .Pq Vt str Modified: stable/8/share/man/man5/nsmb.conf.5 ============================================================================== --- stable/8/share/man/man5/nsmb.conf.5 Fri May 18 01:13:18 2012 (r235584) +++ stable/8/share/man/man5/nsmb.conf.5 Fri May 18 01:50:34 2012 (r235585) @@ -96,7 +96,6 @@ Possible keywords may include: .Bl -tag -width ".Pa /etc/nsmb.conf" .It Pa /etc/nsmb.conf The default remote mount-point configuration file. -.Pa "~/nsmb.conf" .It Pa ~/nsmb.conf The user specific remote mount-point configuration file. .El Modified: stable/8/share/man/man5/portsnap.conf.5 ============================================================================== --- stable/8/share/man/man5/portsnap.conf.5 Fri May 18 01:13:18 2012 (r235584) +++ stable/8/share/man/man5/portsnap.conf.5 Fri May 18 01:50:34 2012 (r235585) @@ -47,7 +47,8 @@ specifies the source from which snapshot This is equivalent to the .Fl s Ar server option to -.Xr portsnap 8 , and will be ignored if the command-line +.Xr portsnap 8 , +and will be ignored if the command-line option is used. .Pp A line of the form @@ -58,7 +59,8 @@ belonging to an RSA keypair which is tru This is equivalent to the .Fl k Ar KEY option to -.Xr portsnap 8 , and will be ignored if the command-line +.Xr portsnap 8 , +and will be ignored if the command-line option is used. .Pp A line of the form @@ -68,7 +70,8 @@ snapshot of the ports tree. This is equivalent to the .Fl d Ar workdir option to -.Xr portsnap 8 , and will be ignored if the command-line option +.Xr portsnap 8 , +and will be ignored if the command-line option is used. .Pp A line of the form @@ -82,7 +85,8 @@ commands. This is equivalent to the .Fl p Ar portsdir option to -.Xr portsnap 8 , and will be ignored if the command-line option +.Xr portsnap 8 , +and will be ignored if the command-line option is used. .Pp If more than one line of any of the above forms is included in Modified: stable/8/share/man/man5/rc.conf.5 ============================================================================== --- stable/8/share/man/man5/rc.conf.5 Fri May 18 01:13:18 2012 (r235584) +++ stable/8/share/man/man5/rc.conf.5 Fri May 18 01:50:34 2012 (r235585) @@ -386,7 +386,7 @@ is used to set the hostname via DHCP, this variable should be set to an empty string. If this value remains unset when the system is done booting your console login will display the default hostname of -.Dq Amnesiac. +.Dq Amnesiac . .It Va ipv6_enable .Pq Vt bool Enable support for IPv6 networking. @@ -2984,9 +2984,10 @@ is enabled, and a daemon is started for a non-default port, the .Va "moused_" Ns Ar XXX Ns Va "_flags" set of options has precedence over and replaces the default -.Va moused_flags (where +.Va moused_flags +(where .Ar XXX -is the name of the non-default port, i.e.\& +is the name of the non-default port, i.e.,\& .Ar ums0 ) . By setting .Va "moused_" Ns Ar XXX Ns Va "_flags" Modified: stable/8/usr.sbin/ntp/doc/ntp.conf.5 ============================================================================== --- stable/8/usr.sbin/ntp/doc/ntp.conf.5 Fri May 18 01:13:18 2012 (r235584) +++ stable/8/usr.sbin/ntp/doc/ntp.conf.5 Fri May 18 01:50:34 2012 (r235585) @@ -268,7 +268,7 @@ Options: All packets sent to and received from the server or peer are to include authentication fields encrypted using the autokey scheme described in -.Sx Authentication Options . +.Sx Authentication Commands . .It Cm burst when the server is reachable, send a burst of eight packets instead of the usual one. @@ -305,7 +305,7 @@ default is to include no encryption fiel .It Cm minpoll Ar minpoll .It Cm maxpoll Ar maxpoll These options specify the minimum and maximum poll intervals -for NTP messages, as a power of 2 in seconds +for NTP messages, as a power of 2 in seconds. The maximum poll interval defaults to 10 (1,024 s), but can be increased by the .Cm maxpoll @@ -363,7 +363,7 @@ Note that, in order to avoid accidental or malicious disruption in this mode, both the server and client should operate using symmetric-key or public-key authentication as described in -.Sx Authentication Options . +.Sx Authentication Commands . .It Ic manycastserver Ar address ... This command enables reception of manycast client messages to the multicast group address(es) (type m) specified. @@ -376,7 +376,7 @@ Note that, in order to avoid accidental or malicious disruption in this mode, both the server and client should operate using symmetric-key or public-key authentication as described in -.Sx Authentication Options . +.Sx Authentication Commands . .It Ic multicastclient Ar address ... This command enables reception of multicast server messages to the multicast group address(es) (type m) specified. @@ -389,7 +389,7 @@ Note that, in order to avoid accidental or malicious disruption in this mode, both the server and client should operate using symmetric-key or public-key authentication as described in -.Sx Authentication Options . +.Sx Authentication Commands . .El .Sh Authentication Support Authentication support allows the NTP client to verify that the @@ -466,7 +466,7 @@ of these checks and be discarded. Furthermore, the Autokey scheme requires a preliminary protocol exchange to obtain the server certificate, verify its -credentials and initialize the protocol +credentials and initialize the protocol. .Pp The .Cm auth @@ -669,7 +669,7 @@ using the host name, network address and all of which are bound together by the protocol specifically to deflect masquerade attacks. For this reason Autokey -includes the source and destinatino IP addresses in message digest +includes the source and destination IP addresses in message digest computations and so the same addresses must be available at both the server and client. For this reason operation @@ -796,7 +796,7 @@ The certificate extension fields must no a subject key identifier or a issuer key identifier field; however, an extended key usage field for a trusted host must contain the value -.Cm trustRoot ; . +.Cm trustRoot . Other extension fields are ignored. .Ss Authentication Commands .Bl -tag -width indent @@ -1068,10 +1068,11 @@ following form to the file generation se The first two fields show the date (Modified Julian Day) and time (seconds and fraction past UTC midnight). The next field shows the peer -address in dotted-quad notation, The final message field includes the +address in dotted-quad notation. +The final message field includes the message type and certain ancillary information. See the -.Sx Authentication Options +.Sx Authentication Commands section for further information. .It Cm loopstats Enables recording of loop filter statistics information. @@ -1155,7 +1156,7 @@ Time in hours since the system was last .It Packets received Cm 81965 Total number of packets received. .It Packets processed Cm 0 -Number of packets received in response to previous packets sent +Number of packets received in response to previous packets sent. .It Current version Cm 9546 Number of packets matching the current NTP version. .It Previous version Cm 56 @@ -1461,7 +1462,7 @@ subcommand specifies the minimum average spacing, while the .Cm minimum subcommand specifies the minimum packet spacing. -Packets that violate these minima are discarded +Packets that violate these minimum are discarded and a kiss-o'-death packet returned if enabled. The default minimum average and minimum are 5 and 2, respectively. @@ -1775,7 +1776,7 @@ It is often useful to narrow the range o servers which can be found by manycast client associations. Because manycast servers respond only when the client stratum is equal to or greater than the server stratum, -primary (stratum 1) servers fill find only primary servers +primary (stratum 1) servers will find only primary servers in TTL range, which is probably the most common objective. However, unless configured otherwise, all manycast clients in TTL range will eventually find all primary servers @@ -1955,7 +1956,7 @@ peers remaining. This value defaults to 1, but can be changed to any number from 1 to 15. .It Cm minclock Ar minclock -The clustering algorithm repeatedly casts out outlyer +The clustering algorithm repeatedly casts out outerlayer associations until no more than .Cm minclock associations remain. @@ -1965,7 +1966,7 @@ configured sources. .It Cm minsane Ar minsane This is the minimum number of candidates available to the clock selection algorithm in order to produce -one or more truechimers for the clustering algorithm. +one or more true chimers for the clustering algorithm. If fewer than this number are available, the clock is undisciplined and allowed to run free. The default is 1 Modified: stable/8/usr.sbin/wpa/hostapd/hostapd.conf.5 ============================================================================== --- stable/8/usr.sbin/wpa/hostapd/hostapd.conf.5 Fri May 18 01:13:18 2012 (r235584) +++ stable/8/usr.sbin/wpa/hostapd/hostapd.conf.5 Fri May 18 01:50:34 2012 (r235585) @@ -172,7 +172,7 @@ This conversion uses SSID so the PSK cha used and the SSID is changed. .It Va wpa_psk_file Optionally, WPA PSKs can be read from a separate text file (containing a -list of (PSK,MAC address) pairs. +list of PSK,MAC address pairs). .It Va wpa_key_mgmt Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). .It Va wpa_pairwise Modified: stable/8/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 ============================================================================== --- stable/8/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Fri May 18 01:13:18 2012 (r235584) +++ stable/8/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Fri May 18 01:50:34 2012 (r235585) @@ -296,7 +296,7 @@ This can be used to achieve forward secr If the .Va dh_file is in DSA parameters format, it will be automatically converted -into DH params. +into DH parameters. .It Va subject_match Substring to be matched against the subject of the authentication server certificate. @@ -350,7 +350,7 @@ TLS Message Length field in all TLS mess fragmented. .It Li sim_min_num_chal=3 can be used to configure EAP-SIM to require three -challenges (by default, it accepts 2 or 3) +challenges (by default, it accepts 2 or 3). .It Li fast_provisioning=1 option enables in-line provisioning of EAP-FAST credentials (PAC). From owner-svn-src-all@FreeBSD.ORG Fri May 18 01:51:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B66F8106566B; Fri, 18 May 2012 01:51:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CABD8FC15; Fri, 18 May 2012 01:51:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I1pC8l028306; Fri, 18 May 2012 01:51:12 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I1pCGP028294; Fri, 18 May 2012 01:51:12 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180151.q4I1pCGP028294@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 01:51:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235586 - in stable/9: lib/libutil sbin/hastd sbin/iscontrol share/man/man5 usr.sbin/ntp/doc usr.sbin/wpa/hostapd usr.sbin/wpa/wpa_supplicant X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 01:51:12 -0000 Author: gjb (doc committer) Date: Fri May 18 01:51:12 2012 New Revision: 235586 URL: http://svn.freebsd.org/changeset/base/235586 Log: MFC r235337: General mdoc(7) and typo fixes. PR: 167804 Modified: stable/9/lib/libutil/login.conf.5 stable/9/sbin/hastd/hast.conf.5 stable/9/sbin/iscontrol/iscsi.conf.5 stable/9/share/man/man5/device.hints.5 stable/9/share/man/man5/make.conf.5 stable/9/share/man/man5/nsmb.conf.5 stable/9/share/man/man5/portsnap.conf.5 stable/9/share/man/man5/rc.conf.5 stable/9/usr.sbin/ntp/doc/ntp.conf.5 stable/9/usr.sbin/wpa/hostapd/hostapd.conf.5 stable/9/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Directory Properties: stable/9/lib/libutil/ (props changed) stable/9/sbin/hastd/ (props changed) stable/9/sbin/iscontrol/ (props changed) stable/9/share/man/man5/ (props changed) stable/9/usr.sbin/ntp/ (props changed) stable/9/usr.sbin/wpa/ (props changed) stable/9/usr.sbin/wpa/wpa_supplicant/ (props changed) Modified: stable/9/lib/libutil/login.conf.5 ============================================================================== --- stable/9/lib/libutil/login.conf.5 Fri May 18 01:50:34 2012 (r235585) +++ stable/9/lib/libutil/login.conf.5 Fri May 18 01:51:12 2012 (r235586) @@ -209,7 +209,8 @@ value. The syntax is the same as for the .Fl l argument of -.Xr cpuset 1 or the word +.Xr cpuset 1 +or the word .Ql default . If set to .Ql default Modified: stable/9/sbin/hastd/hast.conf.5 ============================================================================== --- stable/9/sbin/hastd/hast.conf.5 Fri May 18 01:50:34 2012 (r235585) +++ stable/9/sbin/hastd/hast.conf.5 Fri May 18 01:51:12 2012 (r235586) @@ -37,7 +37,7 @@ .Xr hastd 8 daemon and the .Xr hastctl 8 -utility. +utility .Sh DESCRIPTION The .Nm @@ -439,7 +439,7 @@ resource tank { .Xr gethostname 3 , .Xr geom 4 , .Xr hastctl 8 , -.Xr hastd 8 . +.Xr hastd 8 .Sh AUTHORS The .Nm Modified: stable/9/sbin/iscontrol/iscsi.conf.5 ============================================================================== --- stable/9/sbin/iscontrol/iscsi.conf.5 Fri May 18 01:50:34 2012 (r235585) +++ stable/9/sbin/iscontrol/iscsi.conf.5 Fri May 18 01:51:12 2012 (r235586) @@ -76,7 +76,7 @@ currently only 1. is the name by which the target is known, not to be confused with target address, either obtained via the target administrator, or from a -.Em discovery session. +.Em discovery session . .It Cm InitiatorName if not specified, defaults to .Sy iqn.2005-01.il.ac.huji.cs: @@ -146,7 +146,7 @@ see This value can only be reduced. .It Cm sockbufsize sets the receiver and transmitter socket buffer size to -.Em size, +.Em size , in kilobytes. The default is 128. .El Modified: stable/9/share/man/man5/device.hints.5 ============================================================================== --- stable/9/share/man/man5/device.hints.5 Fri May 18 01:50:34 2012 (r235585) +++ stable/9/share/man/man5/device.hints.5 Fri May 18 01:51:12 2012 (r235586) @@ -162,7 +162,7 @@ hint.acpi.0.disabled="1" .Xr kenv 1 , .Xr loader.conf 5 , .Xr loader 8 , -.Xr resource_int_value 9 . +.Xr resource_int_value 9 .Sh HISTORY The .Nm Modified: stable/9/share/man/man5/make.conf.5 ============================================================================== --- stable/9/share/man/man5/make.conf.5 Fri May 18 01:50:34 2012 (r235585) +++ stable/9/share/man/man5/make.conf.5 Fri May 18 01:51:12 2012 (r235586) @@ -575,7 +575,7 @@ files at build time. The value should include the full path to the .Pa .mc file(s), e.g., -.Pa /etc/mail/foo.mc +.Pa /etc/mail/foo.mc , .Pa /etc/mail/bar.mc . .It Va SENDMAIL_ALIASES .Pq Vt str Modified: stable/9/share/man/man5/nsmb.conf.5 ============================================================================== --- stable/9/share/man/man5/nsmb.conf.5 Fri May 18 01:50:34 2012 (r235585) +++ stable/9/share/man/man5/nsmb.conf.5 Fri May 18 01:51:12 2012 (r235586) @@ -96,7 +96,6 @@ Possible keywords may include: .Bl -tag -width ".Pa /etc/nsmb.conf" .It Pa /etc/nsmb.conf The default remote mount-point configuration file. -.Pa "~/nsmb.conf" .It Pa ~/nsmb.conf The user specific remote mount-point configuration file. .El Modified: stable/9/share/man/man5/portsnap.conf.5 ============================================================================== --- stable/9/share/man/man5/portsnap.conf.5 Fri May 18 01:50:34 2012 (r235585) +++ stable/9/share/man/man5/portsnap.conf.5 Fri May 18 01:51:12 2012 (r235586) @@ -47,7 +47,8 @@ specifies the source from which snapshot This is equivalent to the .Fl s Ar server option to -.Xr portsnap 8 , and will be ignored if the command-line +.Xr portsnap 8 , +and will be ignored if the command-line option is used. .Pp A line of the form @@ -58,7 +59,8 @@ belonging to an RSA keypair which is tru This is equivalent to the .Fl k Ar KEY option to -.Xr portsnap 8 , and will be ignored if the command-line +.Xr portsnap 8 , +and will be ignored if the command-line option is used. .Pp A line of the form @@ -68,7 +70,8 @@ snapshot of the ports tree. This is equivalent to the .Fl d Ar workdir option to -.Xr portsnap 8 , and will be ignored if the command-line option +.Xr portsnap 8 , +and will be ignored if the command-line option is used. .Pp A line of the form @@ -82,7 +85,8 @@ commands. This is equivalent to the .Fl p Ar portsdir option to -.Xr portsnap 8 , and will be ignored if the command-line option +.Xr portsnap 8 , +and will be ignored if the command-line option is used. .Pp If more than one line of any of the above forms is included in Modified: stable/9/share/man/man5/rc.conf.5 ============================================================================== --- stable/9/share/man/man5/rc.conf.5 Fri May 18 01:50:34 2012 (r235585) +++ stable/9/share/man/man5/rc.conf.5 Fri May 18 01:51:12 2012 (r235586) @@ -386,7 +386,7 @@ is used to set the hostname via DHCP, this variable should be set to an empty string. If this value remains unset when the system is done booting your console login will display the default hostname of -.Dq Amnesiac. +.Dq Amnesiac . .It Va nisdomainname .Pq Vt str The NIS domain name of this host, or @@ -1299,6 +1299,7 @@ ifconfig_ed0_name="net0" ifconfig_net0="inet 192.0.2.1 netmask 0xffffff00" .Ed .It Va ipv6_enable +.Pq Vt bool This variable is deprecated. Use .Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 @@ -1306,7 +1307,6 @@ and .Va ipv6_activate_all_interfaces if necessary. .Pp -.Pq Vt bool If the variable is .Dq Li YES , .Dq Li inet6 accept_rtadv @@ -1317,12 +1317,12 @@ and the is defined as .Dq Li YES . .It Va ipv6_prefer +.Pq Vt bool This variable is deprecated. Use .Va ip6addrctl_policy instead. .Pp -.Pq Vt bool If the variable is .Dq Li YES , the default address selection policy table set by @@ -3273,9 +3273,10 @@ is enabled, and a daemon is started for a non-default port, the .Va "moused_" Ns Ar XXX Ns Va "_flags" set of options has precedence over and replaces the default -.Va moused_flags (where +.Va moused_flags +(where .Ar XXX -is the name of the non-default port, i.e.\& +is the name of the non-default port, i.e.,\& .Ar ums0 ) . By setting .Va "moused_" Ns Ar XXX Ns Va "_flags" Modified: stable/9/usr.sbin/ntp/doc/ntp.conf.5 ============================================================================== --- stable/9/usr.sbin/ntp/doc/ntp.conf.5 Fri May 18 01:50:34 2012 (r235585) +++ stable/9/usr.sbin/ntp/doc/ntp.conf.5 Fri May 18 01:51:12 2012 (r235586) @@ -268,7 +268,7 @@ Options: All packets sent to and received from the server or peer are to include authentication fields encrypted using the autokey scheme described in -.Sx Authentication Options . +.Sx Authentication Commands . .It Cm burst when the server is reachable, send a burst of eight packets instead of the usual one. @@ -305,7 +305,7 @@ default is to include no encryption fiel .It Cm minpoll Ar minpoll .It Cm maxpoll Ar maxpoll These options specify the minimum and maximum poll intervals -for NTP messages, as a power of 2 in seconds +for NTP messages, as a power of 2 in seconds. The maximum poll interval defaults to 10 (1,024 s), but can be increased by the .Cm maxpoll @@ -363,7 +363,7 @@ Note that, in order to avoid accidental or malicious disruption in this mode, both the server and client should operate using symmetric-key or public-key authentication as described in -.Sx Authentication Options . +.Sx Authentication Commands . .It Ic manycastserver Ar address ... This command enables reception of manycast client messages to the multicast group address(es) (type m) specified. @@ -376,7 +376,7 @@ Note that, in order to avoid accidental or malicious disruption in this mode, both the server and client should operate using symmetric-key or public-key authentication as described in -.Sx Authentication Options . +.Sx Authentication Commands . .It Ic multicastclient Ar address ... This command enables reception of multicast server messages to the multicast group address(es) (type m) specified. @@ -389,7 +389,7 @@ Note that, in order to avoid accidental or malicious disruption in this mode, both the server and client should operate using symmetric-key or public-key authentication as described in -.Sx Authentication Options . +.Sx Authentication Commands . .El .Sh Authentication Support Authentication support allows the NTP client to verify that the @@ -466,7 +466,7 @@ of these checks and be discarded. Furthermore, the Autokey scheme requires a preliminary protocol exchange to obtain the server certificate, verify its -credentials and initialize the protocol +credentials and initialize the protocol. .Pp The .Cm auth @@ -669,7 +669,7 @@ using the host name, network address and all of which are bound together by the protocol specifically to deflect masquerade attacks. For this reason Autokey -includes the source and destinatino IP addresses in message digest +includes the source and destination IP addresses in message digest computations and so the same addresses must be available at both the server and client. For this reason operation @@ -796,7 +796,7 @@ The certificate extension fields must no a subject key identifier or a issuer key identifier field; however, an extended key usage field for a trusted host must contain the value -.Cm trustRoot ; . +.Cm trustRoot . Other extension fields are ignored. .Ss Authentication Commands .Bl -tag -width indent @@ -1068,10 +1068,11 @@ following form to the file generation se The first two fields show the date (Modified Julian Day) and time (seconds and fraction past UTC midnight). The next field shows the peer -address in dotted-quad notation, The final message field includes the +address in dotted-quad notation. +The final message field includes the message type and certain ancillary information. See the -.Sx Authentication Options +.Sx Authentication Commands section for further information. .It Cm loopstats Enables recording of loop filter statistics information. @@ -1155,7 +1156,7 @@ Time in hours since the system was last .It Packets received Cm 81965 Total number of packets received. .It Packets processed Cm 0 -Number of packets received in response to previous packets sent +Number of packets received in response to previous packets sent. .It Current version Cm 9546 Number of packets matching the current NTP version. .It Previous version Cm 56 @@ -1461,7 +1462,7 @@ subcommand specifies the minimum average spacing, while the .Cm minimum subcommand specifies the minimum packet spacing. -Packets that violate these minima are discarded +Packets that violate these minimum are discarded and a kiss-o'-death packet returned if enabled. The default minimum average and minimum are 5 and 2, respectively. @@ -1775,7 +1776,7 @@ It is often useful to narrow the range o servers which can be found by manycast client associations. Because manycast servers respond only when the client stratum is equal to or greater than the server stratum, -primary (stratum 1) servers fill find only primary servers +primary (stratum 1) servers will find only primary servers in TTL range, which is probably the most common objective. However, unless configured otherwise, all manycast clients in TTL range will eventually find all primary servers @@ -1955,7 +1956,7 @@ peers remaining. This value defaults to 1, but can be changed to any number from 1 to 15. .It Cm minclock Ar minclock -The clustering algorithm repeatedly casts out outlyer +The clustering algorithm repeatedly casts out outerlayer associations until no more than .Cm minclock associations remain. @@ -1965,7 +1966,7 @@ configured sources. .It Cm minsane Ar minsane This is the minimum number of candidates available to the clock selection algorithm in order to produce -one or more truechimers for the clustering algorithm. +one or more true chimers for the clustering algorithm. If fewer than this number are available, the clock is undisciplined and allowed to run free. The default is 1 Modified: stable/9/usr.sbin/wpa/hostapd/hostapd.conf.5 ============================================================================== --- stable/9/usr.sbin/wpa/hostapd/hostapd.conf.5 Fri May 18 01:50:34 2012 (r235585) +++ stable/9/usr.sbin/wpa/hostapd/hostapd.conf.5 Fri May 18 01:51:12 2012 (r235586) @@ -172,7 +172,7 @@ This conversion uses SSID so the PSK cha used and the SSID is changed. .It Va wpa_psk_file Optionally, WPA PSKs can be read from a separate text file (containing a -list of (PSK,MAC address) pairs. +list of PSK,MAC address pairs). .It Va wpa_key_mgmt Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). .It Va wpa_pairwise Modified: stable/9/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 ============================================================================== --- stable/9/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Fri May 18 01:50:34 2012 (r235585) +++ stable/9/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Fri May 18 01:51:12 2012 (r235586) @@ -316,7 +316,7 @@ This can be used to achieve forward secr If the .Va dh_file is in DSA parameters format, it will be automatically converted -into DH params. +into DH parameters. .It Va subject_match Substring to be matched against the subject of the authentication server certificate. @@ -370,7 +370,7 @@ TLS Message Length field in all TLS mess fragmented. .It Li sim_min_num_chal=3 can be used to configure EAP-SIM to require three -challenges (by default, it accepts 2 or 3) +challenges (by default, it accepts 2 or 3). .It Li fast_provisioning=1 option enables in-line provisioning of EAP-FAST credentials (PAC). From owner-svn-src-all@FreeBSD.ORG Fri May 18 02:00:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 681C21065675; Fri, 18 May 2012 02:00:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42BA98FC08; Fri, 18 May 2012 02:00:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I202hk028751; Fri, 18 May 2012 02:00:02 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I202ao028747; Fri, 18 May 2012 02:00:02 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180200.q4I202ao028747@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 02:00:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235587 - in stable/9: share/man/man5 tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 02:00:02 -0000 Author: gjb (doc committer) Date: Fri May 18 02:00:01 2012 New Revision: 235587 URL: http://svn.freebsd.org/changeset/base/235587 Log: MFC r235342: General mdoc(7) and typo fixes. PR: 167804 Modified: stable/9/share/man/man5/src.conf.5 stable/9/tools/build/options/WITHOUT_BINUTILS stable/9/tools/build/options/WITHOUT_ZONEINFO stable/9/tools/build/options/WITH_CLANG_IS_CC stable/9/tools/build/options/WITH_SHARED_TOOLCHAIN Directory Properties: stable/9/share/man/man5/ (props changed) stable/9/tools/build/options/ (props changed) Modified: stable/9/share/man/man5/src.conf.5 ============================================================================== --- stable/9/share/man/man5/src.conf.5 Fri May 18 01:51:12 2012 (r235586) +++ stable/9/share/man/man5/src.conf.5 Fri May 18 02:00:01 2012 (r235587) @@ -209,7 +209,7 @@ This requires ports/textproc/libxml2 to .It Va WITHOUT_BINUTILS .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BINUTILS 222090 2011-05-19 05:13:25Z imp Set to not install binutils (as, c++-filt, gconv, gnu-ar, gnu-randlib, -ld, nm, objcopy, objdump, readelf, size and strip) +ld, nm, objcopy, objdump, readelf, size and strip). .Bf -symbolic The option does not generally work for build targets, unless some alternative toolchain is enabled. @@ -286,12 +286,10 @@ Set to build additional clang and llvm t .It Va WITH_CLANG_IS_CC .\" from FreeBSD: stable/9/tools/build/options/WITH_CLANG_IS_CC 233099 2012-03-17 22:29:05Z dim Set to install the Clang C/C++ compiler as -.Pa /usr/bin/cc -, +.Pa /usr/bin/cc , .Pa /usr/bin/c++ and -.Pa /usr/bin/cpp -. +.Pa /usr/bin/cpp . .It Va WITHOUT_CPP .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru Set to not build @@ -884,7 +882,7 @@ Set to build the toolchain binaries shar The set includes .Xr cc 1 , .Xr make 1 -and neccessary utilites like assembler, linker and library archive manager. +and necessary utilities like assembler, linker and library archive manager. .It Va WITHOUT_SOURCELESS .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_SOURCELESS 231905 2012-02-19 07:44:38Z rmh Set to not build kernel modules that include sourceless code (either microcode or native code for host CPU). @@ -1003,7 +1001,7 @@ protocols (usable only via 802.1X). Set to not build ZFS file system. .It Va WITHOUT_ZONEINFO .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_ZONEINFO 171994 2007-08-27 20:01:08Z remko -Set to not build the timezone database +Set to not build the timezone database. .El .Sh FILES .Bl -tag -compact Modified: stable/9/tools/build/options/WITHOUT_BINUTILS ============================================================================== --- stable/9/tools/build/options/WITHOUT_BINUTILS Fri May 18 01:51:12 2012 (r235586) +++ stable/9/tools/build/options/WITHOUT_BINUTILS Fri May 18 02:00:01 2012 (r235587) @@ -1,6 +1,6 @@ .\" $FreeBSD$ Set to not install binutils (as, c++-filt, gconv, gnu-ar, gnu-randlib, -ld, nm, objcopy, objdump, readelf, size and strip) +ld, nm, objcopy, objdump, readelf, size and strip). .Bf -symbolic The option does not generally work for build targets, unless some alternative toolchain is enabled. Modified: stable/9/tools/build/options/WITHOUT_ZONEINFO ============================================================================== --- stable/9/tools/build/options/WITHOUT_ZONEINFO Fri May 18 01:51:12 2012 (r235586) +++ stable/9/tools/build/options/WITHOUT_ZONEINFO Fri May 18 02:00:01 2012 (r235587) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Set to not build the timezone database +Set to not build the timezone database. Modified: stable/9/tools/build/options/WITH_CLANG_IS_CC ============================================================================== --- stable/9/tools/build/options/WITH_CLANG_IS_CC Fri May 18 01:51:12 2012 (r235586) +++ stable/9/tools/build/options/WITH_CLANG_IS_CC Fri May 18 02:00:01 2012 (r235587) @@ -1,8 +1,6 @@ .\" $FreeBSD$ Set to install the Clang C/C++ compiler as -.Pa /usr/bin/cc -, +.Pa /usr/bin/cc , .Pa /usr/bin/c++ and -.Pa /usr/bin/cpp -. +.Pa /usr/bin/cpp . Modified: stable/9/tools/build/options/WITH_SHARED_TOOLCHAIN ============================================================================== --- stable/9/tools/build/options/WITH_SHARED_TOOLCHAIN Fri May 18 01:51:12 2012 (r235586) +++ stable/9/tools/build/options/WITH_SHARED_TOOLCHAIN Fri May 18 02:00:01 2012 (r235587) @@ -3,4 +3,4 @@ Set to build the toolchain binaries shar The set includes .Xr cc 1 , .Xr make 1 -and neccessary utilites like assembler, linker and library archive manager. +and necessary utilities like assembler, linker and library archive manager. From owner-svn-src-all@FreeBSD.ORG Fri May 18 02:00:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C8F621065752; Fri, 18 May 2012 02:00:41 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2B4F8FC0C; Fri, 18 May 2012 02:00:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I20fJa028810; Fri, 18 May 2012 02:00:41 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I20fW6028807; Fri, 18 May 2012 02:00:41 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180200.q4I20fW6028807@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 02:00:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235588 - in stable/8: share/man/man5 tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 02:00:41 -0000 Author: gjb (doc committer) Date: Fri May 18 02:00:41 2012 New Revision: 235588 URL: http://svn.freebsd.org/changeset/base/235588 Log: MFC r235342: General mdoc(7) and typo fixes. PR: 167804 Modified: stable/8/share/man/man5/src.conf.5 stable/8/tools/build/options/WITHOUT_ZONEINFO Directory Properties: stable/8/share/man/man5/ (props changed) stable/8/tools/build/options/ (props changed) Modified: stable/8/share/man/man5/src.conf.5 ============================================================================== --- stable/8/share/man/man5/src.conf.5 Fri May 18 02:00:01 2012 (r235587) +++ stable/8/share/man/man5/src.conf.5 Fri May 18 02:00:41 2012 (r235588) @@ -844,7 +844,7 @@ protocols (usable only via 802.1X). Set to not build ZFS file system. .It Va WITHOUT_ZONEINFO .\" from FreeBSD: stable/8/tools/build/options/WITHOUT_ZONEINFO 171994 2007-08-27 20:01:08Z remko -Set to not build the timezone database +Set to not build the timezone database. .El .Sh FILES .Bl -tag -compact Modified: stable/8/tools/build/options/WITHOUT_ZONEINFO ============================================================================== --- stable/8/tools/build/options/WITHOUT_ZONEINFO Fri May 18 02:00:01 2012 (r235587) +++ stable/8/tools/build/options/WITHOUT_ZONEINFO Fri May 18 02:00:41 2012 (r235588) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Set to not build the timezone database +Set to not build the timezone database. From owner-svn-src-all@FreeBSD.ORG Fri May 18 02:06:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 215F2106564A; Fri, 18 May 2012 02:06:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B57F8FC0A; Fri, 18 May 2012 02:06:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I26AwR029046; Fri, 18 May 2012 02:06:10 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I26AbF029044; Fri, 18 May 2012 02:06:10 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180206.q4I26AbF029044@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 02:06:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235589 - stable/9/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 02:06:11 -0000 Author: gjb (doc committer) Date: Fri May 18 02:06:10 2012 New Revision: 235589 URL: http://svn.freebsd.org/changeset/base/235589 Log: Document requirement to alter some sysctls when using igb(4) with jumbo frames. PR: 153738 Modified: stable/9/share/man/man4/igb.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/igb.4 ============================================================================== --- stable/9/share/man/man4/igb.4 Fri May 18 02:00:41 2012 (r235588) +++ stable/9/share/man/man4/igb.4 Fri May 18 02:06:10 2012 (r235589) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 14, 2010 +.Dd May 12, 2012 .Dt IGB 4 .Os .Sh NAME @@ -160,6 +160,14 @@ The minimum is 80, and the maximum is 40 .It Va hw.igb.enable_aim If set to 1, enable Adaptive Interrupt Moderation. The default is to enable Adaptive Interrupt Moderation. +.It Va kern.ipc.nmbclusters +The maximum number of mbuf clusters allowed. +If the system has more than one igb card or jumbo frames are +enabled, this value will need to be increased. +.It Va kern.ipc.nmbjumbo9k +The maximum number of mbuf 9k jumbo clusters allowed. +Increasing this to allow for at least 8192 extra clusters +per interface can allow for an mtu of 8192. .El .Sh FILES .Bl -tag -width /dev/led/igb* From owner-svn-src-all@FreeBSD.ORG Fri May 18 02:06:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01BF31065748; Fri, 18 May 2012 02:06:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E01CD8FC08; Fri, 18 May 2012 02:06:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I26Yqf029093; Fri, 18 May 2012 02:06:34 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I26YLE029090; Fri, 18 May 2012 02:06:34 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180206.q4I26YLE029090@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 02:06:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235590 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 02:06:35 -0000 Author: gjb (doc committer) Date: Fri May 18 02:06:34 2012 New Revision: 235590 URL: http://svn.freebsd.org/changeset/base/235590 Log: Document requirement to alter some sysctls when using igb(4) with jumbo frames. PR: 153738 Modified: stable/8/share/man/man4/igb.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/igb.4 ============================================================================== --- stable/8/share/man/man4/igb.4 Fri May 18 02:06:10 2012 (r235589) +++ stable/8/share/man/man4/igb.4 Fri May 18 02:06:34 2012 (r235590) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 14, 2010 +.Dd May 12, 2012 .Dt IGB 4 .Os .Sh NAME @@ -160,6 +160,14 @@ The minimum is 80, and the maximum is 40 .It Va hw.igb.enable_aim If set to 1, enable Adaptive Interrupt Moderation. The default is to enable Adaptive Interrupt Moderation. +.It Va kern.ipc.nmbclusters +The maximum number of mbuf clusters allowed. +If the system has more than one igb card or jumbo frames are +enabled, this value will need to be increased. +.It Va kern.ipc.nmbjumbo9k +The maximum number of mbuf 9k jumbo clusters allowed. +Increasing this to allow for at least 8192 extra clusters +per interface can allow for an mtu of 8192. .El .Sh DIAGNOSTICS .Bl -diag From owner-svn-src-all@FreeBSD.ORG Fri May 18 02:13:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D3CC1106564A; Fri, 18 May 2012 02:13:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE2EB8FC18; Fri, 18 May 2012 02:13:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I2DJBU029392; Fri, 18 May 2012 02:13:19 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I2DJW8029382; Fri, 18 May 2012 02:13:19 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180213.q4I2DJW8029382@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 02:13:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235591 - stable/9/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 02:13:19 -0000 Author: gjb (doc committer) Date: Fri May 18 02:13:19 2012 New Revision: 235591 URL: http://svn.freebsd.org/changeset/base/235591 Log: MFC r235357,r235358,r235371,r235373,r235376: Fix various mdoc(7) style nits. Modified: stable/9/share/man/man9/DB_COMMAND.9 stable/9/share/man/man9/DECLARE_GEOM_CLASS.9 stable/9/share/man/man9/bus_space.9 stable/9/share/man/man9/eventtimers.9 stable/9/share/man/man9/fail.9 stable/9/share/man/man9/namei.9 stable/9/share/man/man9/spl.9 stable/9/share/man/man9/usbdi.9 Directory Properties: stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man9/DB_COMMAND.9 ============================================================================== --- stable/9/share/man/man9/DB_COMMAND.9 Fri May 18 02:06:34 2012 (r235590) +++ stable/9/share/man/man9/DB_COMMAND.9 Fri May 18 02:13:19 2012 (r235591) @@ -72,7 +72,7 @@ The general command syntax: .Ar address Ns Op Li , Ns Ar count , translates into the following parameters for .Fa command_function : -.Bl -tag +.Bl -tag -width Fa -offset indent .It Fa addr The address passed to the command as an argument. .It Fa have_addr Modified: stable/9/share/man/man9/DECLARE_GEOM_CLASS.9 ============================================================================== --- stable/9/share/man/man9/DECLARE_GEOM_CLASS.9 Fri May 18 02:06:34 2012 (r235590) +++ stable/9/share/man/man9/DECLARE_GEOM_CLASS.9 Fri May 18 02:13:19 2012 (r235591) @@ -49,7 +49,7 @@ modules GEOM classes and it is the only The arguments to .Fn DECLARE_GEOM_CLASS are: -.Bl -tag -offset indent +.Bl -tag -offset indent -width Fa .It Fa class The .Vt g_class Modified: stable/9/share/man/man9/bus_space.9 ============================================================================== --- stable/9/share/man/man9/bus_space.9 Fri May 18 02:06:34 2012 (r235590) +++ stable/9/share/man/man9/bus_space.9 Fri May 18 02:13:19 2012 (r235591) @@ -1610,7 +1610,7 @@ Access to these types of memory regions .Fn bus_space_*_stream_N functions. .Pp -.Bl -tag -compact +.Bl -tag -compact -width Fn .It Fn bus_space_read_stream_1 .It Fn bus_space_read_stream_2 .It Fn bus_space_read_stream_4 Modified: stable/9/share/man/man9/eventtimers.9 ============================================================================== --- stable/9/share/man/man9/eventtimers.9 Fri May 18 02:06:34 2012 (r235590) +++ stable/9/share/man/man9/eventtimers.9 Fri May 18 02:13:19 2012 (r235591) @@ -86,7 +86,7 @@ struct eventtimer { Event timers are responsible for generating interrupts at specified time or periodically, to run different time-based events. Subsystem consists of three main parts: -.Bl -tag +.Bl -tag -width "Consumers" .It Drivers Manage hardware to generate requested time events. .It Consumers @@ -107,7 +107,7 @@ Driver API is built around eventtimer st To register its functionality driver allocates that structure and calls .Fn et_register . Driver should fill following fields there: -.Bl -tag +.Bl -tag -width Va .It Va et_name Unique name of the event timer for management purposes. .It Va et_flags Modified: stable/9/share/man/man9/fail.9 ============================================================================== --- stable/9/share/man/man9/fail.9 Fri May 18 02:06:34 2012 (r235590) +++ stable/9/share/man/man9/fail.9 Fri May 18 02:13:19 2012 (r235591) @@ -167,7 +167,7 @@ The fail point term is only executed whe matching p_pid. .Pp .Sh EXAMPLES -.Bl -tag +.Bl -tag -width Sy .It Sy sysctl debug.fail_point.foobar="2.1%return(5)" 21/1000ths of the time, execute .Fa code Modified: stable/9/share/man/man9/namei.9 ============================================================================== --- stable/9/share/man/man9/namei.9 Fri May 18 02:06:34 2012 (r235590) +++ stable/9/share/man/man9/namei.9 Fri May 18 02:13:19 2012 (r235591) @@ -320,7 +320,7 @@ If successful, .Fn namei will return 0, otherwise it will return an error. .Sh FILES -.Bl -tag +.Bl -tag -width Pa .It Pa src/sys/kern/vfs_lookup.c .El .Sh ERRORS Modified: stable/9/share/man/man9/spl.9 ============================================================================== --- stable/9/share/man/man9/spl.9 Fri May 18 02:06:34 2012 (r235590) +++ stable/9/share/man/man9/spl.9 Fri May 18 02:13:19 2012 (r235591) @@ -112,8 +112,7 @@ The system automatically arranges for in the .Em xxx group to be called at a priority >= -.Ns spl Ns Em xxx -\&(). +.Em spl Ns Fn xxx .Pp The function .Fn splx Modified: stable/9/share/man/man9/usbdi.9 ============================================================================== --- stable/9/share/man/man9/usbdi.9 Fri May 18 02:06:34 2012 (r235590) +++ stable/9/share/man/man9/usbdi.9 Fri May 18 02:13:19 2012 (r235591) @@ -435,7 +435,7 @@ The value of this field is given in mill device speed. . Depending on the endpoint type, this field has different meaning: -.Bl -tag +.Bl -tag -width "UE_ISOCHRONOUS" .It UE_INTERRUPT "0" use the default interrupt interval based on endpoint descriptor. "Else" use the given value for polling rate. @@ -461,7 +461,7 @@ timeout of 250ms will be used. .Fa frames field sets the maximum number of frames. If zero is specified it will yield the following results: -.Bl -tag +.Bl -tag -width "UE_INTERRUPT" .It UE_BULK xfer->nframes = 1; .It UE_INTERRUPT @@ -487,7 +487,7 @@ be used when setting up the given USB tr .Fa flags field has type "struct usb_xfer_flags" and allows one to set initial flags an USB transfer. Valid flags are: -.Bl -tag +.Bl -tag -width "force_short_xfer" .It force_short_xfer This flag forces the last transmitted USB packet to be short. A short packet has a length of less than "xfer->max_packet_size", which @@ -507,7 +507,7 @@ This flag causes a failing USB transfer queue except in the case of "xfer->error" equal to "USB_ERR_CANCELLED". No other USB transfers in the affected PIPE queue will be started until either: -.Bl -tag +.Bl -tag -width "1" .It 1 The failing USB transfer is stopped using "usbd_transfer_stop()". .It 2 @@ -574,7 +574,7 @@ flag can not be changed during operation . . .It stall_pipe -.Bl -tag +.Bl -tag -width "Device Side Mode" .It Device Side Mode Setting this flag will cause STALL pids to be sent to the endpoint belonging to this transfer before the transfer is started. From owner-svn-src-all@FreeBSD.ORG Fri May 18 02:14:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9CA50106566C; Fri, 18 May 2012 02:14:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 875FB8FC1D; Fri, 18 May 2012 02:14:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I2E9XQ029455; Fri, 18 May 2012 02:14:09 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I2E9SP029449; Fri, 18 May 2012 02:14:09 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180214.q4I2E9SP029449@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 02:14:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235592 - stable/8/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 02:14:09 -0000 Author: gjb (doc committer) Date: Fri May 18 02:14:08 2012 New Revision: 235592 URL: http://svn.freebsd.org/changeset/base/235592 Log: MFC r235357,r235358,r235371,r235373,r235376: Fix various mdoc(7) style nits. Modified: stable/8/share/man/man9/DB_COMMAND.9 stable/8/share/man/man9/DECLARE_GEOM_CLASS.9 stable/8/share/man/man9/bus_space.9 stable/8/share/man/man9/fail.9 stable/8/share/man/man9/usbdi.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/DB_COMMAND.9 ============================================================================== --- stable/8/share/man/man9/DB_COMMAND.9 Fri May 18 02:13:19 2012 (r235591) +++ stable/8/share/man/man9/DB_COMMAND.9 Fri May 18 02:14:08 2012 (r235592) @@ -72,7 +72,7 @@ The general command syntax: .Ar address Ns Op Li , Ns Ar count , translates into the following parameters for .Fa command_function : -.Bl -tag +.Bl -tag -width Fa -offset indent .It Fa addr The address passed to the command as an argument. .It Fa have_addr Modified: stable/8/share/man/man9/DECLARE_GEOM_CLASS.9 ============================================================================== --- stable/8/share/man/man9/DECLARE_GEOM_CLASS.9 Fri May 18 02:13:19 2012 (r235591) +++ stable/8/share/man/man9/DECLARE_GEOM_CLASS.9 Fri May 18 02:14:08 2012 (r235592) @@ -49,7 +49,7 @@ modules GEOM classes and it is the only The arguments to .Fn DECLARE_GEOM_CLASS are: -.Bl -tag -offset indent +.Bl -tag -offset indent -width Fa .It Fa class The .Vt g_class Modified: stable/8/share/man/man9/bus_space.9 ============================================================================== --- stable/8/share/man/man9/bus_space.9 Fri May 18 02:13:19 2012 (r235591) +++ stable/8/share/man/man9/bus_space.9 Fri May 18 02:14:08 2012 (r235592) @@ -1610,7 +1610,7 @@ Access to these types of memory regions .Fn bus_space_*_stream_N functions. .Pp -.Bl -tag -compact +.Bl -tag -compact -width Fn .It Fn bus_space_read_stream_1 .It Fn bus_space_read_stream_2 .It Fn bus_space_read_stream_4 Modified: stable/8/share/man/man9/fail.9 ============================================================================== --- stable/8/share/man/man9/fail.9 Fri May 18 02:13:19 2012 (r235591) +++ stable/8/share/man/man9/fail.9 Fri May 18 02:14:08 2012 (r235592) @@ -163,7 +163,7 @@ are the only types that cascade. A return() term only cascades if the code executes, and a print() term only cascades when passed a non-zero argument. .Sh EXAMPLES -.Bl -tag +.Bl -tag -width Sy .It Sy sysctl debug.fail_point.foobar="2.1%return(5)" 21/1000ths of the time, execute .Fa code Modified: stable/8/share/man/man9/usbdi.9 ============================================================================== --- stable/8/share/man/man9/usbdi.9 Fri May 18 02:13:19 2012 (r235591) +++ stable/8/share/man/man9/usbdi.9 Fri May 18 02:14:08 2012 (r235592) @@ -436,7 +436,7 @@ The value of this field is given in mill device speed. . Depending on the endpoint type, this field has different meaning: -.Bl -tag +.Bl -tag -width "UE_ISOCHRONOUS" .It UE_INTERRUPT "0" use the default interrupt interval based on endpoint descriptor. "Else" use the given value for polling rate. @@ -462,7 +462,7 @@ timeout of 250ms will be used. .Fa frames field sets the maximum number of frames. If zero is specified it will yield the following results: -.Bl -tag +.Bl -tag -width "UE_INTERRUPT" .It UE_BULK xfer->nframes = 1; .It UE_INTERRUPT @@ -488,7 +488,7 @@ be used when setting up the given USB tr .Fa flags field has type "struct usb_xfer_flags" and allows one to set initial flags an USB transfer. Valid flags are: -.Bl -tag +.Bl -tag -width "force_short_xfer" .It force_short_xfer This flag forces the last transmitted USB packet to be short. A short packet has a length of less than "xfer->max_packet_size", which @@ -508,7 +508,7 @@ This flag causes a failing USB transfer queue except in the case of "xfer->error" equal to "USB_ERR_CANCELLED". No other USB transfers in the affected PIPE queue will be started until either: -.Bl -tag +.Bl -tag -width "1" .It 1 The failing USB transfer is stopped using "usbd_transfer_stop()". .It 2 @@ -575,7 +575,7 @@ flag can not be changed during operation . . .It stall_pipe -.Bl -tag +.Bl -tag -width "Device Side Mode" .It Device Side Mode Setting this flag will cause STALL pids to be sent to the endpoint belonging to this transfer before the transfer is started. From owner-svn-src-all@FreeBSD.ORG Fri May 18 02:16:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82BD6106566C; Fri, 18 May 2012 02:16:15 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DDF08FC08; Fri, 18 May 2012 02:16:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I2GFTI029580; Fri, 18 May 2012 02:16:15 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I2GF7p029578; Fri, 18 May 2012 02:16:15 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180216.q4I2GF7p029578@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 02:16:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235593 - stable/9/share/man/man8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 02:16:15 -0000 Author: gjb (doc committer) Date: Fri May 18 02:16:14 2012 New Revision: 235593 URL: http://svn.freebsd.org/changeset/base/235593 Log: MFC r235441: Fix an mdoc(7) formatting nit. Modified: stable/9/share/man/man8/rc.8 Directory Properties: stable/9/share/man/man8/ (props changed) Modified: stable/9/share/man/man8/rc.8 ============================================================================== --- stable/9/share/man/man8/rc.8 Fri May 18 02:14:08 2012 (r235592) +++ stable/9/share/man/man8/rc.8 Fri May 18 02:16:14 2012 (r235593) @@ -452,7 +452,7 @@ before starting the daemon. Following tradition, all startup files reside in .Pa /etc . .Sh FILES -.Bl -tag -compact +.Bl -tag -compact -width Pa .It Pa /etc/rc .It Pa /etc/rc.conf .It Pa /etc/rc.conf.local From owner-svn-src-all@FreeBSD.ORG Fri May 18 02:16:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0FDE51065794; Fri, 18 May 2012 02:16:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE8F18FC15; Fri, 18 May 2012 02:16:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I2GZvF029624; Fri, 18 May 2012 02:16:35 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I2GZ05029622; Fri, 18 May 2012 02:16:35 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180216.q4I2GZ05029622@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 02:16:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235594 - stable/8/share/man/man8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 02:16:36 -0000 Author: gjb (doc committer) Date: Fri May 18 02:16:35 2012 New Revision: 235594 URL: http://svn.freebsd.org/changeset/base/235594 Log: MFC r235441: Fix an mdoc(7) formatting nit. Modified: stable/8/share/man/man8/rc.8 Directory Properties: stable/8/share/man/man8/ (props changed) Modified: stable/8/share/man/man8/rc.8 ============================================================================== --- stable/8/share/man/man8/rc.8 Fri May 18 02:16:14 2012 (r235593) +++ stable/8/share/man/man8/rc.8 Fri May 18 02:16:35 2012 (r235594) @@ -453,7 +453,7 @@ before starting the daemon. Following tradition, all startup files reside in .Pa /etc . .Sh FILES -.Bl -tag -compact +.Bl -tag -compact -width Pa .It Pa /etc/rc .It Pa /etc/rc.conf .It Pa /etc/rc.conf.local From owner-svn-src-all@FreeBSD.ORG Fri May 18 02:19:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 12C69106566B; Fri, 18 May 2012 02:19:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F15128FC08; Fri, 18 May 2012 02:19:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I2JrWr029802; Fri, 18 May 2012 02:19:53 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I2JrjN029800; Fri, 18 May 2012 02:19:53 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180219.q4I2JrjN029800@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 02:19:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235595 - stable/9/usr.sbin/wpa/hostapd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 02:19:54 -0000 Author: gjb (doc committer) Date: Fri May 18 02:19:53 2012 New Revision: 235595 URL: http://svn.freebsd.org/changeset/base/235595 Log: MFC r235499: Reword hostapd.conf(5) sentence. Modified: stable/9/usr.sbin/wpa/hostapd/hostapd.conf.5 Directory Properties: stable/9/usr.sbin/wpa/ (props changed) Modified: stable/9/usr.sbin/wpa/hostapd/hostapd.conf.5 ============================================================================== --- stable/9/usr.sbin/wpa/hostapd/hostapd.conf.5 Fri May 18 02:16:35 2012 (r235594) +++ stable/9/usr.sbin/wpa/hostapd/hostapd.conf.5 Fri May 18 02:19:53 2012 (r235595) @@ -171,8 +171,8 @@ will be converted to PSK. This conversion uses SSID so the PSK changes when ASCII passphrase is used and the SSID is changed. .It Va wpa_psk_file -Optionally, WPA PSKs can be read from a separate text file (containing a -list of PSK,MAC address pairs). +Optionally, WPA PSKs can be read from a separate text file containing a +list of PSK and MAC address pairs. .It Va wpa_key_mgmt Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). .It Va wpa_pairwise From owner-svn-src-all@FreeBSD.ORG Fri May 18 02:20:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7383B10656A9; Fri, 18 May 2012 02:20:16 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D5038FC1A; Fri, 18 May 2012 02:20:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I2KGIp029854; Fri, 18 May 2012 02:20:16 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I2KGSB029852; Fri, 18 May 2012 02:20:16 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180220.q4I2KGSB029852@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 02:20:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235596 - stable/8/usr.sbin/wpa/hostapd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 02:20:16 -0000 Author: gjb (doc committer) Date: Fri May 18 02:20:15 2012 New Revision: 235596 URL: http://svn.freebsd.org/changeset/base/235596 Log: MFC r235499: Reword hostapd.conf(5) sentence. Modified: stable/8/usr.sbin/wpa/hostapd/hostapd.conf.5 Directory Properties: stable/8/usr.sbin/wpa/ (props changed) Modified: stable/8/usr.sbin/wpa/hostapd/hostapd.conf.5 ============================================================================== --- stable/8/usr.sbin/wpa/hostapd/hostapd.conf.5 Fri May 18 02:19:53 2012 (r235595) +++ stable/8/usr.sbin/wpa/hostapd/hostapd.conf.5 Fri May 18 02:20:15 2012 (r235596) @@ -171,8 +171,8 @@ will be converted to PSK. This conversion uses SSID so the PSK changes when ASCII passphrase is used and the SSID is changed. .It Va wpa_psk_file -Optionally, WPA PSKs can be read from a separate text file (containing a -list of PSK,MAC address pairs). +Optionally, WPA PSKs can be read from a separate text file containing a +list of PSK and MAC address pairs. .It Va wpa_key_mgmt Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). .It Va wpa_pairwise From owner-svn-src-all@FreeBSD.ORG Fri May 18 03:11:18 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E63D6106564A; Fri, 18 May 2012 03:11:17 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper-int.allbsd.org [IPv6:2001:2f0:104:e002::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5143D8FC15; Fri, 18 May 2012 03:11:17 +0000 (UTC) Received: from alph.allbsd.org ([IPv6:2001:2f0:104:e010:862b:2bff:febc:8956]) (authenticated bits=128) by mail.allbsd.org (8.14.4/8.14.4) with ESMTP id q4I3B4xS082427; Fri, 18 May 2012 12:11:14 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.allbsd.org (8.14.4/8.14.4) with ESMTP id q4I3B2K3031239; Fri, 18 May 2012 12:11:03 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Fri, 18 May 2012 12:10:23 +0900 (JST) Message-Id: <20120518.121023.1697531074032414697.hrs@allbsd.org> To: gjb@FreeBSD.org From: Hiroki Sato In-Reply-To: <201205180000.q4I00lGh023244@svn.freebsd.org> <201205180031.q4I0VLQg024737@svn.freebsd.org> References: <201205180000.q4I00lGh023244@svn.freebsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.4.50 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Fri_May_18_12_10_23_2012_113)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.3 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (mail.allbsd.org [IPv6:2001:2f0:104:e001::32]); Fri, 18 May 2012 12:11:14 +0900 (JST) X-Spam-Status: No, score=-104.6 required=13.0 tests=BAYES_00, CONTENT_TYPE_PRESENT, RDNS_NONE, SPF_SOFTFAIL, USER_IN_WHITELIST autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on gatekeeper.allbsd.org Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-9@FreeBSD.org Subject: Re: svn commit: r235570 - in stable/9: cddl/contrib/opensolaris/cmd/zstreamdump gnu/usr.bin/binutils/addr2line gnu/usr.bin/binutils/ranlib gnu/usr.bin/binutils/size gnu/usr.bin/binutils/strip gnu/usr.b... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 03:11:18 -0000 ----Security_Multipart(Fri_May_18_12_10_23_2012_113)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Glen Barber wrote in <201205180000.q4I00lGh023244@svn.freebsd.org>: gj> Author: gjb (doc committer) gj> Date: Fri May 18 00:00:46 2012 gj> New Revision: 235570 gj> URL: http://svn.freebsd.org/changeset/base/235570 gj> gj> Log: gj> MFC r235211: gj> gj> General mdoc(7) and typo fixes. gj> gj> PR: 167696 gj> (snip) gj> Modified: stable/9/usr.bin/join/join.1 gj> ============================================================================== gj> --- stable/9/usr.bin/join/join.1 Thu May 17 22:04:17 2012 (r235569) gj> +++ stable/9/usr.bin/join/join.1 Fri May 18 00:00:46 2012 (r235570) gj> @@ -107,7 +107,7 @@ representing the join field. gj> The elements of list must be either comma gj> .Pq Ql \&, gj> or whitespace separated. gj> -(The latter requires quoting to protect it from the shell, or, a simpler gj> +(The letter requires quoting to protect it from the shell, or, a simpler gj> approach is to use multiple gj> .Fl o gj> options.) "latter" looks correct to me. Glen Barber wrote in <201205180031.q4I0VLQg024737@svn.freebsd.org>: gj> Author: gjb (doc committer) gj> Date: Fri May 18 00:31:20 2012 gj> New Revision: 235575 gj> URL: http://svn.freebsd.org/changeset/base/235575 gj> gj> Log: gj> MFC r235286: gj> gj> General mdoc(7) and typo fixes. gj> gj> PR: 167734 gj> (snip) gj> Modified: stable/9/sys/netinet/libalias/libalias.3 gj> ============================================================================== gj> --- stable/9/sys/netinet/libalias/libalias.3 Fri May 18 00:08:09 2012 (r235574) gj> +++ stable/9/sys/netinet/libalias/libalias.3 Fri May 18 00:31:20 2012 (r235575) gj> @@ -919,7 +919,7 @@ added support for PPTP and LSNAT as well gj> .An Paolo Pisati Aq piso@FreeBSD.org gj> made the library modular, moving support for all gj> protocols (except for IP, TCP and UDP) to external modules. gj> -.Sh ACKNOWLEDGMENTS gj> +.Sh ACKNOWLEDGEMENTS gj> Listed below, in approximate chronological order, are individuals who gj> have provided valuable comments and/or debugging assistance. gj> .Bd -ragged -offset indent Just out of my curiosity, but should we fix "acknowledgments"? -- Hiroki ----Security_Multipart(Fri_May_18_12_10_23_2012_113)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAk+1vZ8ACgkQTyzT2CeTzy0uEwCeMp1zLeA6T8Mtd1wwQlhMpqg/ aQcAoIm/rViST3Z/r+lclykPimN2F4z2 =FMQz -----END PGP SIGNATURE----- ----Security_Multipart(Fri_May_18_12_10_23_2012_113)---- From owner-svn-src-all@FreeBSD.ORG Fri May 18 03:24:59 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 06CAB1065672 for ; Fri, 18 May 2012 03:24:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from glenbarber.us (onyx.glenbarber.us [199.48.134.227]) by mx1.freebsd.org (Postfix) with SMTP id B87BC8FC0C for ; Fri, 18 May 2012 03:24:58 +0000 (UTC) Received: (qmail 94140 invoked by uid 0); 17 May 2012 23:24:58 -0400 Received: from unknown (HELO glenbarber.us) (76.124.49.145) by 0 with SMTP; 17 May 2012 23:24:58 -0400 Date: Thu, 17 May 2012 23:24:56 -0400 From: Glen Barber To: Hiroki Sato Message-ID: <20120518032456.GB1348@glenbarber.us> References: <201205180000.q4I00lGh023244@svn.freebsd.org> <20120518.121023.1697531074032414697.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120518.121023.1697531074032414697.hrs@allbsd.org> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-9@FreeBSD.org Subject: Re: svn commit: r235570 - in stable/9: cddl/contrib/opensolaris/cmd/zstreamdump gnu/usr.bin/binutils/addr2line gnu/usr.bin/binutils/ranlib gnu/usr.bin/binutils/size gnu/usr.bin/binutils/strip gnu/usr.b... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 03:24:59 -0000 On Fri, May 18, 2012 at 12:10:23PM +0900, Hiroki Sato wrote: > gj> Modified: stable/9/usr.bin/join/join.1 > gj> ============================================================================== > gj> --- stable/9/usr.bin/join/join.1 Thu May 17 22:04:17 2012 (r235569) > gj> +++ stable/9/usr.bin/join/join.1 Fri May 18 00:00:46 2012 (r235570) > gj> @@ -107,7 +107,7 @@ representing the join field. > gj> The elements of list must be either comma > gj> .Pq Ql \&, > gj> or whitespace separated. > gj> -(The latter requires quoting to protect it from the shell, or, a simpler > gj> +(The letter requires quoting to protect it from the shell, or, a simpler > gj> approach is to use multiple > gj> .Fl o > gj> options.) > > "latter" looks correct to me. > You are correct. This is my fault for not catching this in the original patch/commit. I will fix it. > gj> Modified: stable/9/sys/netinet/libalias/libalias.3 > gj> ============================================================================== > gj> --- stable/9/sys/netinet/libalias/libalias.3 Fri May 18 00:08:09 2012 (r235574) > gj> +++ stable/9/sys/netinet/libalias/libalias.3 Fri May 18 00:31:20 2012 (r235575) > gj> @@ -919,7 +919,7 @@ added support for PPTP and LSNAT as well > gj> .An Paolo Pisati Aq piso@FreeBSD.org > gj> made the library modular, moving support for all > gj> protocols (except for IP, TCP and UDP) to external modules. > gj> -.Sh ACKNOWLEDGMENTS > gj> +.Sh ACKNOWLEDGEMENTS > gj> Listed below, in approximate chronological order, are individuals who > gj> have provided valuable comments and/or debugging assistance. > gj> .Bd -ragged -offset indent > > Just out of my curiosity, but should we fix "acknowledgments"? > I believe the spelling reflected in the change is more proper, but if it would be preferable to revert the change, I will be happy to do so. My understanding of the differentiation between the two is the way in which it is used, where the spelling reflected in the change has a technical connotation. Glen From owner-svn-src-all@FreeBSD.ORG Fri May 18 03:30:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C56B8106564A; Fri, 18 May 2012 03:30:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B14178FC0C; Fri, 18 May 2012 03:30:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I3UosT032363; Fri, 18 May 2012 03:30:50 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I3UoV7032361; Fri, 18 May 2012 03:30:50 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205180330.q4I3UoV7032361@svn.freebsd.org> From: Glen Barber Date: Fri, 18 May 2012 03:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235597 - head/usr.bin/join X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 03:30:50 -0000 Author: gjb (doc committer) Date: Fri May 18 03:30:50 2012 New Revision: 235597 URL: http://svn.freebsd.org/changeset/base/235597 Log: Fix a typo that crept in. Pointyhat: gjb (myself) Spotted by: hrs MFC after: 2 days (minor change) Modified: head/usr.bin/join/join.1 Modified: head/usr.bin/join/join.1 ============================================================================== --- head/usr.bin/join/join.1 Fri May 18 02:20:15 2012 (r235596) +++ head/usr.bin/join/join.1 Fri May 18 03:30:50 2012 (r235597) @@ -107,7 +107,7 @@ representing the join field. The elements of list must be either comma .Pq Ql \&, or whitespace separated. -(The letter requires quoting to protect it from the shell, or, a simpler +(The latter requires quoting to protect it from the shell, or, a simpler approach is to use multiple .Fl o options.) From owner-svn-src-all@FreeBSD.ORG Fri May 18 05:36:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7A701106564A; Fri, 18 May 2012 05:36:05 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64A3A8FC08; Fri, 18 May 2012 05:36:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I5a5Tf036233; Fri, 18 May 2012 05:36:05 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I5a5Ks036230; Fri, 18 May 2012 05:36:05 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201205180536.q4I5a5Ks036230@svn.freebsd.org> From: Alan Cox Date: Fri, 18 May 2012 05:36:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235598 - in head/sys/amd64: amd64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 05:36:05 -0000 Author: alc Date: Fri May 18 05:36:04 2012 New Revision: 235598 URL: http://svn.freebsd.org/changeset/base/235598 Log: Rename pmap_collect() to pmap_pv_reclaim() and rewrite it such that it no longer uses the active and inactive paging queues. Instead, the pmap now maintains an LRU-ordered list of pv entry pages, and pmap_pv_reclaim() uses this list to select pv entries for reclamation. Note: The old pmap_collect() tried to avoid reclaiming mappings for pages that have either a hold_count or a busy field that is non-zero. However, this isn't necessary for correctness, and the locking in pmap_collect() was insufficient to guarantee that such mappings weren't reclaimed. The new pmap_pv_reclaim() doesn't even try. Reviewed by: kib MFC after: 6 weeks Modified: head/sys/amd64/amd64/pmap.c head/sys/amd64/include/pmap.h Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri May 18 03:30:50 2012 (r235597) +++ head/sys/amd64/amd64/pmap.c Fri May 18 05:36:04 2012 (r235598) @@ -201,6 +201,7 @@ static u_int64_t DMPDPphys; /* phys addr /* * Data for the pv entry allocation mechanism */ +static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); static long pv_entry_count; static struct md_page *pv_table; @@ -2028,71 +2029,136 @@ SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry "Current number of pv entry allocs"); SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, &pv_entry_spare, 0, "Current number of spare pv entries"); - -static int pmap_collect_inactive, pmap_collect_active; - -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_inactive, CTLFLAG_RD, &pmap_collect_inactive, 0, - "Current number times pmap_collect called on inactive queue"); -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_active, CTLFLAG_RD, &pmap_collect_active, 0, - "Current number times pmap_collect called on active queue"); #endif /* * We are in a serious low memory condition. Resort to * drastic measures to free some pages so we can allocate - * another pv entry chunk. This is normally called to - * unmap inactive pages, and if necessary, active pages. + * another pv entry chunk. * * We do not, however, unmap 2mpages because subsequent accesses will * allocate per-page pv entries until repromotion occurs, thereby * exacerbating the shortage of free pv entries. */ -static void -pmap_collect(pmap_t locked_pmap, struct vpgqueues *vpq) +static vm_page_t +pmap_pv_reclaim(pmap_t locked_pmap) { + struct pch newtail; + struct pv_chunk *pc; + struct md_page *pvh; pd_entry_t *pde; pmap_t pmap; pt_entry_t *pte, tpte; - pv_entry_t next_pv, pv; + pv_entry_t pv; vm_offset_t va; - vm_page_t m, free; - - TAILQ_FOREACH(m, &vpq->pl, pageq) { - if ((m->flags & PG_MARKER) != 0 || m->hold_count || m->busy) - continue; - TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) { - va = pv->pv_va; - pmap = PV_PMAP(pv); + vm_page_t free, m; + uint64_t inuse, freemask; + int bit, field, freed; + + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); + pmap = NULL; + free = m = NULL; + TAILQ_INIT(&newtail); + while ((pc = TAILQ_FIRST(&pv_chunks)) != NULL && free == NULL) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + if (pmap != pc->pc_pmap) { + if (pmap != NULL) { + pmap_invalidate_all(pmap); + if (pmap != locked_pmap) + PMAP_UNLOCK(pmap); + } + pmap = pc->pc_pmap; /* Avoid deadlock and lock recursion. */ if (pmap > locked_pmap) PMAP_LOCK(pmap); - else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) + else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) { + pmap = NULL; + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); continue; - pmap_resident_count_dec(pmap, 1); - pde = pmap_pde(pmap, va); - KASSERT((*pde & PG_PS) == 0, ("pmap_collect: found" - " a 2mpage in page %p's pv list", m)); - pte = pmap_pde_to_pte(pde, va); - tpte = pte_load_clear(pte); - KASSERT((tpte & PG_W) == 0, - ("pmap_collect: wired pte %#lx", tpte)); - if (tpte & PG_A) - vm_page_aflag_set(m, PGA_REFERENCED); - if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) - vm_page_dirty(m); - free = NULL; - pmap_unuse_pt(pmap, va, *pde, &free); - pmap_invalidate_page(pmap, va); - pmap_free_zero_pages(free); - TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - free_pv_entry(pmap, pv); - if (pmap != locked_pmap) - PMAP_UNLOCK(pmap); + } } - if (TAILQ_EMPTY(&m->md.pv_list) && - TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list)) - vm_page_aflag_clear(m, PGA_WRITEABLE); + + /* + * Destroy every non-wired, 4 KB page mapping in the chunk. + */ + freed = 0; + for (field = 0; field < _NPCM; field++) { + freemask = 0; + for (inuse = ~pc->pc_map[field] & pc_freemask[field]; + inuse != 0; inuse &= ~(1UL << bit)) { + bit = bsfq(inuse); + pv = &pc->pc_pventry[field * 64 + bit]; + va = pv->pv_va; + pde = pmap_pde(pmap, va); + if ((*pde & PG_PS) != 0) + continue; + pte = pmap_pde_to_pte(pde, va); + if ((*pte & PG_W) != 0) + continue; + tpte = pte_load_clear(pte); + if ((tpte & PG_G) != 0) + pmap_invalidate_page(pmap, va); + m = PHYS_TO_VM_PAGE(tpte & PG_FRAME); + if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) + vm_page_dirty(m); + if ((tpte & PG_A) != 0) + vm_page_aflag_set(m, PGA_REFERENCED); + TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); + if (TAILQ_EMPTY(&m->md.pv_list) && + (m->flags & PG_FICTITIOUS) == 0) { + pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + if (TAILQ_EMPTY(&pvh->pv_list)) { + vm_page_aflag_clear(m, + PGA_WRITEABLE); + } + } + pmap_unuse_pt(pmap, va, *pde, &free); + freemask |= 1UL << bit; + freed++; + } + pc->pc_map[field] |= freemask; + } + if (freed == 0) { + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + continue; + } + pmap_resident_count_dec(pmap, freed); + PV_STAT(pv_entry_frees += freed); + PV_STAT(pv_entry_spare += freed); + pv_entry_count -= freed; + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + if (pc->pc_map[0] == PC_FREE0 && pc->pc_map[1] == PC_FREE1 && + pc->pc_map[2] == PC_FREE2) { + PV_STAT(pv_entry_spare -= _NPCPV); + PV_STAT(pc_chunk_count--); + PV_STAT(pc_chunk_frees++); + /* Entire chunk is free; return it. */ + m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); + dump_drop_page(m->phys_addr); + break; + } + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + /* One freed pv entry in locked_pmap is sufficient. */ + if (pmap == locked_pmap) + break; + } + TAILQ_CONCAT(&pv_chunks, &newtail, pc_lru); + if (pmap != NULL) { + pmap_invalidate_all(pmap); + if (pmap != locked_pmap) + PMAP_UNLOCK(pmap); + } + if (m == NULL && free != NULL) { + m = free; + free = m->right; + /* Recycle a freed page table page. */ + m->wire_count = 1; + atomic_add_int(&cnt.v_wire_count, 1); } + pmap_free_zero_pages(free); + return (m); } /* @@ -2125,6 +2191,7 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv return; } TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); PV_STAT(pv_entry_spare -= _NPCPV); PV_STAT(pc_chunk_count--); PV_STAT(pc_chunk_frees++); @@ -2142,7 +2209,6 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try) { - struct vpgqueues *pq; int bit, field; pv_entry_t pv; struct pv_chunk *pc; @@ -2151,7 +2217,6 @@ get_pv_entry(pmap_t pmap, boolean_t try) PMAP_LOCK_ASSERT(pmap, MA_OWNED); mtx_assert(&vm_page_queue_mtx, MA_OWNED); PV_STAT(pv_entry_allocs++); - pq = NULL; retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); if (pc != NULL) { @@ -2171,35 +2236,26 @@ retry: TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); } + if (pc != TAILQ_LAST(&pv_chunks, pch)) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); + } pv_entry_count++; PV_STAT(pv_entry_spare--); return (pv); } } /* No free items, allocate another chunk */ - m = vm_page_alloc(NULL, 0, (pq == &vm_page_queues[PQ_ACTIVE] ? - VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ | + m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); if (m == NULL) { if (try) { PV_STAT(pc_chunk_tryfail++); return (NULL); } - /* - * Reclaim pv entries: At first, destroy mappings to inactive - * pages. After that, if a pv chunk entry is still needed, - * destroy mappings to active pages. - */ - if (pq == NULL) { - PV_STAT(pmap_collect_inactive++); - pq = &vm_page_queues[PQ_INACTIVE]; - } else if (pq == &vm_page_queues[PQ_INACTIVE]) { - PV_STAT(pmap_collect_active++); - pq = &vm_page_queues[PQ_ACTIVE]; - } else - panic("get_pv_entry: allocation failed"); - pmap_collect(pmap, pq); - goto retry; + m = pmap_pv_reclaim(pmap); + if (m == NULL) + goto retry; } PV_STAT(pc_chunk_count++); PV_STAT(pc_chunk_allocs++); @@ -2209,6 +2265,7 @@ retry: pc->pc_map[0] = PC_FREE0 & ~1ul; /* preallocated bit 0 */ pc->pc_map[1] = PC_FREE1; pc->pc_map[2] = PC_FREE2; + TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); pv = &pc->pc_pventry[0]; TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); pv_entry_count++; @@ -4151,6 +4208,7 @@ pmap_remove_pages(pmap_t pmap) PV_STAT(pc_chunk_count--); PV_STAT(pc_chunk_frees++); TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); dump_drop_page(m->phys_addr); vm_page_unwire(m, 0); Modified: head/sys/amd64/include/pmap.h ============================================================================== --- head/sys/amd64/include/pmap.h Fri May 18 03:30:50 2012 (r235597) +++ head/sys/amd64/include/pmap.h Fri May 18 05:36:04 2012 (r235598) @@ -295,7 +295,7 @@ struct pv_chunk { pmap_t pc_pmap; TAILQ_ENTRY(pv_chunk) pc_list; uint64_t pc_map[_NPCM]; /* bitmap; 1 = free */ - uint64_t pc_spare[2]; + TAILQ_ENTRY(pv_chunk) pc_lru; struct pv_entry pc_pventry[_NPCPV]; }; From owner-svn-src-all@FreeBSD.ORG Fri May 18 06:30:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F777106566B; Fri, 18 May 2012 06:30:36 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mexforwardwc.lss.emc.com (mexforwardwc.lss.emc.com [137.69.117.200]) by mx1.freebsd.org (Postfix) with ESMTP id 35E678FC08; Fri, 18 May 2012 06:30:36 +0000 (UTC) Received: from scl02-01d02-si01.isus.emc.com (scl02-01d02-si01.isus.emc.com [137.69.225.84]) by mexforwardwc.lss.emc.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id q4I6UUPM024167 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 May 2012 23:30:30 -0700 Received: from mailhubwc.lss.emc.com (mailhubscprd03.lss.emc.com [137.69.224.145]) by scl02-01d02-si01.isus.emc.com (RSA Interceptor); Thu, 17 May 2012 23:30:17 -0700 Received: from seacasht02.desktop.isilon.com (seacasht02.isilon.com [137.69.159.81]) by mailhubwc.lss.emc.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id q4I6UHUt021306; Thu, 17 May 2012 23:30:17 -0700 Received: from seaxch12.isilon.com (137.69.158.60) by SEACASHT02.desktop.isilon.com (137.69.159.81) with Microsoft SMTP Server id 14.1.355.2; Thu, 17 May 2012 23:30:16 -0700 Received: from [137.69.152.66] ([137.69.152.66]) by seaxch12.isilon.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 17 May 2012 23:22:36 -0700 MIME-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset="windows-1252" From: Garrett Cooper In-Reply-To: <201111180305.pAI35LtC045952@svn.freebsd.org> Date: Thu, 17 May 2012 23:22:38 -0700 Content-Transfer-Encoding: quoted-printable Message-ID: <9AD9BD15-BC6A-4A85-A7BE-EE315AB39ECF@gmail.com> References: <201111180305.pAI35LtC045952@svn.freebsd.org> To: Kevin Lo X-Mailer: Apple Mail (2.1257) X-OriginalArrivalTime: 18 May 2012 06:22:36.0594 (UTC) FILETIME=[9E2F4120:01CD34BE] X-EMM-MHVC: 1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227650 - in head: lib/libkiconv sys/conf sys/fs/msdosfs sys/fs/smbfs sys/kern sys/libkern sys/modules/libiconv sys/modules/libmchain sys/netsmb sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 06:30:36 -0000 On Nov 17, 2011, at 7:05 PM, Kevin Lo wrote: > Author: kevlo > Date: Fri Nov 18 03:05:20 2011 > New Revision: 227650 > URL: http://svn.freebsd.org/changeset/base/227650 >=20 > Log: > Add unicode support to msdosfs and smbfs; original pathes from imura, > bug fixes by Kuan-Chung Chiu . >=20 > Tested by me in production for several days at work. Some of the code in this commit breaks unloading of the libiconv module = (it hard locks on unload). In particular if I do the following=85 Index: /root/current/sys/libkern/iconv_ucs.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 --- /root/current/sys/libkern/iconv_ucs.c (revision 235066) +++ /root/current/sys/libkern/iconv_ucs.c (working copy) @@ -373,6 +373,7 @@ static int iconv_ucs_init(struct iconv_converter_class *dcp) { +#if 0 int error; =20 error =3D iconv_add(ENCODING_UNICODE, ENCODING_UNICODE, = ENCODING_UTF8); @@ -381,6 +382,7 @@ error =3D iconv_add(ENCODING_UNICODE, ENCODING_UTF8, = ENCODING_UNICODE); if (error) return (error); +#endif return (0); } =20 Then unload works (maybe at the cost of leaking a converter or = two). It seems that iconv_unregister_handler succeeds when it's called = (I inserted some printfs just because), but it might be doing bad things = because of restructuring that took place in this commit. Thanks! -Garrett PS Committing kern/168095 beforehand may or may not help...= From owner-svn-src-all@FreeBSD.ORG Fri May 18 09:19:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5AC86106564A; Fri, 18 May 2012 09:19:08 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C4A98FC17; Fri, 18 May 2012 09:19:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I9J8xn042968; Fri, 18 May 2012 09:19:08 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I9J7BB042965; Fri, 18 May 2012 09:19:07 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201205180919.q4I9J7BB042965@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 18 May 2012 09:19:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235599 - head/sys/geom/mirror X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 09:19:08 -0000 Author: ae Date: Fri May 18 09:19:07 2012 New Revision: 235599 URL: http://svn.freebsd.org/changeset/base/235599 Log: Introduce new device flag G_MIRROR_DEVICE_FLAG_TASTING. It should protect geom from destroying while it is tasting. PR: kern/154860 Reviewed by: pjd MFC after: 1 week Modified: head/sys/geom/mirror/g_mirror.c head/sys/geom/mirror/g_mirror.h Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Fri May 18 05:36:04 2012 (r235598) +++ head/sys/geom/mirror/g_mirror.c Fri May 18 09:19:07 2012 (r235599) @@ -1693,6 +1693,8 @@ g_mirror_can_destroy(struct g_mirror_sof gp = sc->sc_geom; if (gp->softc == NULL) return (1); + if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_TASTING) != 0) + return (0); LIST_FOREACH(cp, &gp->consumer, consumer) { if (g_mirror_is_busy(sc, cp)) return (0); @@ -3054,6 +3056,7 @@ g_mirror_taste(struct g_class *mp, struc G_MIRROR_DEBUG(1, "Adding disk %s to %s.", pp->name, gp->name); g_topology_unlock(); sx_xlock(&sc->sc_lock); + sc->sc_flags |= G_MIRROR_DEVICE_FLAG_TASTING; error = g_mirror_add_disk(sc, pp, &md); if (error != 0) { G_MIRROR_DEBUG(0, "Cannot add disk %s to %s (error=%d).", @@ -3066,6 +3069,12 @@ g_mirror_taste(struct g_class *mp, struc } gp = NULL; } + sc->sc_flags &= ~G_MIRROR_DEVICE_FLAG_TASTING; + if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0) { + g_mirror_destroy(sc, G_MIRROR_DESTROY_HARD); + g_topology_lock(); + return (NULL); + } sx_xunlock(&sc->sc_lock); g_topology_lock(); return (gp); Modified: head/sys/geom/mirror/g_mirror.h ============================================================================== --- head/sys/geom/mirror/g_mirror.h Fri May 18 05:36:04 2012 (r235598) +++ head/sys/geom/mirror/g_mirror.h Fri May 18 09:19:07 2012 (r235599) @@ -157,6 +157,7 @@ struct g_mirror_event { #define G_MIRROR_DEVICE_FLAG_DESTROY 0x0100000000000000ULL #define G_MIRROR_DEVICE_FLAG_WAIT 0x0200000000000000ULL #define G_MIRROR_DEVICE_FLAG_DESTROYING 0x0400000000000000ULL +#define G_MIRROR_DEVICE_FLAG_TASTING 0x0800000000000000ULL #define G_MIRROR_DEVICE_STATE_STARTING 0 #define G_MIRROR_DEVICE_STATE_RUNNING 1 From owner-svn-src-all@FreeBSD.ORG Fri May 18 09:22:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C36481065673; Fri, 18 May 2012 09:22:21 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFE068FC0A; Fri, 18 May 2012 09:22:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4I9MLk7043110; Fri, 18 May 2012 09:22:21 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4I9MLqO043108; Fri, 18 May 2012 09:22:21 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201205180922.q4I9MLqO043108@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 18 May 2012 09:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235600 - head/sys/geom/mirror X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 09:22:21 -0000 Author: ae Date: Fri May 18 09:22:21 2012 New Revision: 235600 URL: http://svn.freebsd.org/changeset/base/235600 Log: Prevent removing of the last active component from a mirror. PR: kern/154860 Reviewed by: pjd MFC after: 1 week Modified: head/sys/geom/mirror/g_mirror_ctl.c Modified: head/sys/geom/mirror/g_mirror_ctl.c ============================================================================== --- head/sys/geom/mirror/g_mirror_ctl.c Fri May 18 09:19:07 2012 (r235599) +++ head/sys/geom/mirror/g_mirror_ctl.c Fri May 18 09:22:21 2012 (r235600) @@ -560,7 +560,7 @@ g_mirror_ctl_remove(struct gctl_req *req const char *name; char param[16]; int *nargs; - u_int i; + u_int i, active; nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); if (nargs == NULL) { @@ -587,6 +587,7 @@ g_mirror_ctl_remove(struct gctl_req *req "first."); return; } + active = g_mirror_ndisks(sc, G_MIRROR_DISK_STATE_ACTIVE); for (i = 1; i < (u_int)*nargs; i++) { snprintf(param, sizeof(param), "arg%u", i); name = gctl_get_asciiparam(req, param); @@ -599,6 +600,16 @@ g_mirror_ctl_remove(struct gctl_req *req gctl_error(req, "No such provider: %s.", name); continue; } + if (disk->d_state == G_MIRROR_DISK_STATE_ACTIVE) { + if (active > 1) + active--; + else { + gctl_error(req, "%s: Can't remove the last " + "ACTIVE component %s.", sc->sc_geom->name, + name); + continue; + } + } g_mirror_event_send(disk, G_MIRROR_DISK_STATE_DESTROY, G_MIRROR_EVENT_DONTWAIT); } From owner-svn-src-all@FreeBSD.ORG Fri May 18 09:56:23 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14E3E1065670; Fri, 18 May 2012 09:56:23 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from ns.kevlo.org (kevlo.org [220.128.136.52]) by mx1.freebsd.org (Postfix) with ESMTP id 996178FC0C; Fri, 18 May 2012 09:56:22 +0000 (UTC) Received: from [127.0.0.1] (git.kevlo.org [220.128.136.52]) by ns.kevlo.org (8.14.5/8.14.5) with ESMTP id q4I9uIlE006475; Fri, 18 May 2012 17:56:19 +0800 (CST) (envelope-from kevlo@FreeBSD.org) Message-ID: <1337334980.2286.24.camel@nsl> From: Kevin Lo To: Garrett Cooper Date: Fri, 18 May 2012 17:56:20 +0800 In-Reply-To: <9AD9BD15-BC6A-4A85-A7BE-EE315AB39ECF@gmail.com> References: <201111180305.pAI35LtC045952@svn.freebsd.org> <9AD9BD15-BC6A-4A85-A7BE-EE315AB39ECF@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 8bit Mime-Version: 1.0 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r227650 - in head: lib/libkiconv sys/conf sys/fs/msdosfs sys/fs/smbfs sys/kern sys/libkern sys/modules/libiconv sys/modules/libmchain sys/netsmb sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 09:56:23 -0000 Garrett Cooper wrote: > On Nov 17, 2011, at 7:05 PM, Kevin Lo wrote: > > > Author: kevlo > > Date: Fri Nov 18 03:05:20 2011 > > New Revision: 227650 > > URL: http://svn.freebsd.org/changeset/base/227650 > > > > Log: > > Add unicode support to msdosfs and smbfs; original pathes from imura, > > bug fixes by Kuan-Chung Chiu . > > > > Tested by me in production for several days at work. > > Some of the code in this commit breaks unloading of the libiconv module (it hard locks on unload). In particular if I do the following… Hmm, I have a machine running FreeBSD but not included r227650. Trying to unload libiconv.ko, I get the message: kldunload: attempt to unload file that was loaded by the kernel kldunload: can't unload file: Device busy > > Index: /root/current/sys/libkern/iconv_ucs.c > =================================================================== > --- /root/current/sys/libkern/iconv_ucs.c (revision 235066) > +++ /root/current/sys/libkern/iconv_ucs.c (working copy) > @@ -373,6 +373,7 @@ > static int > iconv_ucs_init(struct iconv_converter_class *dcp) > { > +#if 0 > int error; > > error = iconv_add(ENCODING_UNICODE, ENCODING_UNICODE, ENCODING_UTF8); > @@ -381,6 +382,7 @@ > error = iconv_add(ENCODING_UNICODE, ENCODING_UTF8, ENCODING_UNICODE); > if (error) > return (error); > +#endif > return (0); > } > > Then unload works (maybe at the cost of leaking a converter or two). It seems that iconv_unregister_handler succeeds when it's called (I inserted some printfs just because), but it might be doing bad things because of restructuring that took place in this commit. > Thanks! > -Garrett > > PS Committing kern/168095 beforehand may or may not help... Kevin From owner-svn-src-all@FreeBSD.ORG Fri May 18 10:01:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C65AF106566B; Fri, 18 May 2012 10:01:31 +0000 (UTC) (envelope-from gleb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B19808FC24; Fri, 18 May 2012 10:01:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IA1Vet044376; Fri, 18 May 2012 10:01:31 GMT (envelope-from gleb@svn.freebsd.org) Received: (from gleb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IA1VED044374; Fri, 18 May 2012 10:01:31 GMT (envelope-from gleb@svn.freebsd.org) Message-Id: <201205181001.q4IA1VED044374@svn.freebsd.org> From: Gleb Kurtsou Date: Fri, 18 May 2012 10:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235601 - head/include/protocols X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 10:01:31 -0000 Author: gleb Date: Fri May 18 10:01:31 2012 New Revision: 235601 URL: http://svn.freebsd.org/changeset/base/235601 Log: Don't use ino_t in dumprestore protocol definition. Since ino_t size is about to change to 64-bits, replace ino_t used in dump protocol definition with 32-bit dump_ino_t to preserve backward compatibility. At some point, it may be necessary to use spare fields in struct in order to fully support 64-bit inode numbers. Sponsored by: Google Summer of Code 2011 Modified: head/include/protocols/dumprestore.h Modified: head/include/protocols/dumprestore.h ============================================================================== --- head/include/protocols/dumprestore.h Fri May 18 09:22:21 2012 (r235600) +++ head/include/protocols/dumprestore.h Fri May 18 10:01:31 2012 (r235601) @@ -65,6 +65,15 @@ #endif #define CHECKSUM (int)84446 +/* + * Since ino_t size is changing to 64-bits, yet we desire this structure to + * remain compatible with exiting dump formats, we do NOT use ino_t here, + * but rather define a 32-bit type in its place. At some point, it may be + * necessary to use some of the c_spare[] in order to fully support 64-bit + * inode numbers. + */ +typedef uint32_t dump_ino_t; + union u_spcl { char dummy[TP_BSIZE]; struct s_spcl { @@ -73,7 +82,7 @@ union u_spcl { int32_t c_old_ddate; /* date of previous dump */ int32_t c_volume; /* dump volume number */ int32_t c_old_tapea; /* logical block of this record */ - ino_t c_inumber; /* number of inode */ + dump_ino_t c_inumber; /* number of inode */ int32_t c_magic; /* magic number (see above) */ int32_t c_checksum; /* record checksum */ /* From owner-svn-src-all@FreeBSD.ORG Fri May 18 10:10:06 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EC19B106564A; Fri, 18 May 2012 10:10:05 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from ns.kevlo.org (kevlo.org [220.128.136.52]) by mx1.freebsd.org (Postfix) with ESMTP id 601EB8FC14; Fri, 18 May 2012 10:10:05 +0000 (UTC) Received: from [127.0.0.1] (git.kevlo.org [220.128.136.52]) by ns.kevlo.org (8.14.5/8.14.5) with ESMTP id q4IAA2Tu006558; Fri, 18 May 2012 18:10:02 +0800 (CST) (envelope-from kevlo@FreeBSD.org) Message-ID: <1337335804.2286.28.camel@nsl> From: Kevin Lo To: Garrett Cooper Date: Fri, 18 May 2012 18:10:04 +0800 In-Reply-To: <1337334980.2286.24.camel@nsl> References: <201111180305.pAI35LtC045952@svn.freebsd.org> <9AD9BD15-BC6A-4A85-A7BE-EE315AB39ECF@gmail.com> <1337334980.2286.24.camel@nsl> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 8bit Mime-Version: 1.0 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r227650 - in head: lib/libkiconv sys/conf sys/fs/msdosfs sys/fs/smbfs sys/kern sys/libkern sys/modules/libiconv sys/modules/libmchain sys/netsmb sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 10:10:06 -0000 Kevin Lo wrote: > Garrett Cooper wrote: > > On Nov 17, 2011, at 7:05 PM, Kevin Lo wrote: > > > > > Author: kevlo > > > Date: Fri Nov 18 03:05:20 2011 > > > New Revision: 227650 > > > URL: http://svn.freebsd.org/changeset/base/227650 > > > > > > Log: > > > Add unicode support to msdosfs and smbfs; original pathes from imura, > > > bug fixes by Kuan-Chung Chiu . > > > > > > Tested by me in production for several days at work. > > > > Some of the code in this commit breaks unloading of the libiconv module (it hard locks on unload). In particular if I do the following… > > Hmm, I have a machine running FreeBSD but not included r227650. > Trying to unload libiconv.ko, I get the message: > > kldunload: attempt to unload file that was loaded by the kernel > kldunload: can't unload file: Device busy Ah I spoke too soon. It seems this commit does break unloading libiconv. I'll take a look at it, thanks. > > > > Index: /root/current/sys/libkern/iconv_ucs.c > > =================================================================== > > --- /root/current/sys/libkern/iconv_ucs.c (revision 235066) > > +++ /root/current/sys/libkern/iconv_ucs.c (working copy) > > @@ -373,6 +373,7 @@ > > static int > > iconv_ucs_init(struct iconv_converter_class *dcp) > > { > > +#if 0 > > int error; > > > > error = iconv_add(ENCODING_UNICODE, ENCODING_UNICODE, ENCODING_UTF8); > > @@ -381,6 +382,7 @@ > > error = iconv_add(ENCODING_UNICODE, ENCODING_UTF8, ENCODING_UNICODE); > > if (error) > > return (error); > > +#endif > > return (0); > > } > > > > Then unload works (maybe at the cost of leaking a converter or two). It seems that iconv_unregister_handler succeeds when it's called (I inserted some printfs just because), but it might be doing bad things because of restructuring that took place in this commit. > > Thanks! > > -Garrett > > > > PS Committing kern/168095 beforehand may or may not help... From owner-svn-src-all@FreeBSD.ORG Fri May 18 10:15:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0B81C1065673; Fri, 18 May 2012 10:15:47 +0000 (UTC) (envelope-from gleb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D197C8FC08; Fri, 18 May 2012 10:15:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IAFktZ044828; Fri, 18 May 2012 10:15:46 GMT (envelope-from gleb@svn.freebsd.org) Received: (from gleb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IAFkuA044824; Fri, 18 May 2012 10:15:46 GMT (envelope-from gleb@svn.freebsd.org) Message-Id: <201205181015.q4IAFkuA044824@svn.freebsd.org> From: Gleb Kurtsou Date: Fri, 18 May 2012 10:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235602 - in head: lib/libprocstat usr.bin/fstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 10:15:47 -0000 Author: gleb Date: Fri May 18 10:15:46 2012 New Revision: 235602 URL: http://svn.freebsd.org/changeset/base/235602 Log: Don't cast inode number or file size down to long or unsigned. Since ino_t size is about to change to 64-bits, casts to long would truncate 64-bit numbers on 32-bit archs. Sponsored by: Google Summer of Code 2011 Modified: head/lib/libprocstat/cd9660.c head/lib/libprocstat/common_kvm.c head/usr.bin/fstat/fstat.c Modified: head/lib/libprocstat/cd9660.c ============================================================================== --- head/lib/libprocstat/cd9660.c Fri May 18 10:01:31 2012 (r235601) +++ head/lib/libprocstat/cd9660.c Fri May 18 10:15:46 2012 (r235602) @@ -84,7 +84,7 @@ isofs_filestat(kvm_t *kd, struct vnode * } vn->vn_fsid = dev2udev(kd, mnt.im_dev); vn->vn_mode = (mode_t)isonode.inode.iso_mode; - vn->vn_fileid = (long)isonode.i_number; - vn->vn_size = (u_long)isonode.i_size; + vn->vn_fileid = isonode.i_number; + vn->vn_size = isonode.i_size; return (0); } Modified: head/lib/libprocstat/common_kvm.c ============================================================================== --- head/lib/libprocstat/common_kvm.c Fri May 18 10:01:31 2012 (r235601) +++ head/lib/libprocstat/common_kvm.c Fri May 18 10:15:46 2012 (r235602) @@ -99,9 +99,9 @@ ufs_filestat(kvm_t *kd, struct vnode *vp * comparisons */ vn->vn_fsid = dev2udev(kd, inode.i_dev); - vn->vn_fileid = (long)inode.i_number; + vn->vn_fileid = inode.i_number; vn->vn_mode = (mode_t)inode.i_mode; - vn->vn_size = (u_long)inode.i_size; + vn->vn_size = inode.i_size; return (0); } Modified: head/usr.bin/fstat/fstat.c ============================================================================== --- head/usr.bin/fstat/fstat.c Fri May 18 10:01:31 2012 (r235601) +++ head/usr.bin/fstat/fstat.c Fri May 18 10:15:46 2012 (r235602) @@ -244,7 +244,7 @@ print_file_info(struct procstat *procsta for (d = devs; d != NULL; d = d->next) if (d->fsid == vn.vn_fsid) { fsmatch = 1; - if ((unsigned)d->ino == vn.vn_fileid) { + if (d->ino == vn.vn_fileid) { filename = d->name; break; } From owner-svn-src-all@FreeBSD.ORG Fri May 18 10:23:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74A761065677; Fri, 18 May 2012 10:23:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5FEB28FC0A; Fri, 18 May 2012 10:23:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IANm7p047644; Fri, 18 May 2012 10:23:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IANmak047642; Fri, 18 May 2012 10:23:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205181023.q4IANmak047642@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 18 May 2012 10:23:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235603 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 10:23:48 -0000 Author: kib Date: Fri May 18 10:23:47 2012 New Revision: 235603 URL: http://svn.freebsd.org/changeset/base/235603 Log: Do not double-reference the found vm object in cdev_pager_lookup(). vm_pager_object_lookup() already referenced the object. Note that there is no in-tree consumers of cdev_pager_lookup(). The only known user of the function is i915 gem driver, which is not yet imported. This should make the KPI change minor. Submitted by: avg MFC after: 1 week Modified: head/sys/vm/device_pager.c Modified: head/sys/vm/device_pager.c ============================================================================== --- head/sys/vm/device_pager.c Fri May 18 10:15:46 2012 (r235602) +++ head/sys/vm/device_pager.c Fri May 18 10:23:47 2012 (r235603) @@ -111,7 +111,6 @@ cdev_pager_lookup(void *handle) mtx_lock(&dev_pager_mtx); object = vm_pager_object_lookup(&dev_pager_object_list, handle); - vm_object_reference(object); mtx_unlock(&dev_pager_mtx); return (object); } From owner-svn-src-all@FreeBSD.ORG Fri May 18 14:12:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04BF61065672; Fri, 18 May 2012 14:12:18 +0000 (UTC) (envelope-from gber@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E5D6C8FC17; Fri, 18 May 2012 14:12:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IECH2v056586; Fri, 18 May 2012 14:12:17 GMT (envelope-from gber@svn.freebsd.org) Received: (from gber@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IECHN3056584; Fri, 18 May 2012 14:12:17 GMT (envelope-from gber@svn.freebsd.org) Message-Id: <201205181412.q4IECHN3056584@svn.freebsd.org> From: Grzegorz Bernacki Date: Fri, 18 May 2012 14:12:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235607 - head/usr.sbin/nandsim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 14:12:18 -0000 Author: gber Date: Fri May 18 14:12:17 2012 New Revision: 235607 URL: http://svn.freebsd.org/changeset/base/235607 Log: Add missing include. Modified: head/usr.sbin/nandsim/nandsim_cfgparse.c Modified: head/usr.sbin/nandsim/nandsim_cfgparse.c ============================================================================== --- head/usr.sbin/nandsim/nandsim_cfgparse.c Fri May 18 12:51:48 2012 (r235606) +++ head/usr.sbin/nandsim/nandsim_cfgparse.c Fri May 18 14:12:17 2012 (r235607) @@ -23,6 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#include __FBSDID("$FreeBSD$"); #include From owner-svn-src-all@FreeBSD.ORG Fri May 18 14:27:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E6031065673; Fri, 18 May 2012 14:27:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id D81878FC15; Fri, 18 May 2012 14:27:50 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 48C51B93B; Fri, 18 May 2012 10:27:50 -0400 (EDT) From: John Baldwin To: Gleb Kurtsou Date: Fri, 18 May 2012 09:41:48 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201205181001.q4IA1VED044374@svn.freebsd.org> In-Reply-To: <201205181001.q4IA1VED044374@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201205180941.48076.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 18 May 2012 10:27:50 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r235601 - head/include/protocols X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 14:27:51 -0000 On Friday, May 18, 2012 6:01:31 am Gleb Kurtsou wrote: > Author: gleb > Date: Fri May 18 10:01:31 2012 > New Revision: 235601 > URL: http://svn.freebsd.org/changeset/base/235601 > > Log: > Don't use ino_t in dumprestore protocol definition. > > Since ino_t size is about to change to 64-bits, replace ino_t used in > dump protocol definition with 32-bit dump_ino_t to preserve backward > compatibility. At some point, it may be necessary to use spare fields > in struct in order to fully support 64-bit inode numbers. > > Sponsored by: Google Summer of Code 2011 A question about your stat changes: did you expand dev_t to 32 bits for the AFS folks, or did you leave it as 16 bits? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri May 18 14:29:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A44EE106564A; Fri, 18 May 2012 14:29:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 856658FC19; Fri, 18 May 2012 14:29:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IETt3q057292; Fri, 18 May 2012 14:29:55 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IETtdW057288; Fri, 18 May 2012 14:29:55 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205181429.q4IETtdW057288@svn.freebsd.org> From: John Baldwin Date: Fri, 18 May 2012 14:29:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235608 - in stable/8/sys: amd64/amd64 i386/conf i386/i386 pc98/pc98 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 14:29:55 -0000 Author: jhb Date: Fri May 18 14:29:54 2012 New Revision: 235608 URL: http://svn.freebsd.org/changeset/base/235608 Log: MFC 217886,218389: Set td_kstack_pages for thread0. Modified: stable/8/sys/amd64/amd64/machdep.c stable/8/sys/i386/i386/machdep.c stable/8/sys/pc98/pc98/machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/amd64/amd64/machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/machdep.c Fri May 18 14:12:17 2012 (r235607) +++ stable/8/sys/amd64/amd64/machdep.c Fri May 18 14:29:54 2012 (r235608) @@ -1545,12 +1545,14 @@ hammer_time(u_int64_t modulep, u_int64_t struct nmi_pcpu *np; u_int64_t msr; char *env; + size_t kstack0_sz; thread0.td_kstack = physfree + KERNBASE; - bzero((void *)thread0.td_kstack, KSTACK_PAGES * PAGE_SIZE); - physfree += KSTACK_PAGES * PAGE_SIZE; - thread0.td_pcb = (struct pcb *) - (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; + thread0.td_kstack_pages = KSTACK_PAGES; + kstack0_sz = thread0.td_kstack_pages * PAGE_SIZE; + bzero((void *)thread0.td_kstack, kstack0_sz); + physfree += kstack0_sz; + thread0.td_pcb = (struct pcb *)(thread0.td_kstack + kstack0_sz) - 1; /* * This may be done better later if it gets more high level @@ -1692,8 +1694,8 @@ hammer_time(u_int64_t modulep, u_int64_t initializecpucache(); /* make an initial tss so cpu can get interrupt stack on syscall! */ - common_tss[0].tss_rsp0 = thread0.td_kstack + \ - KSTACK_PAGES * PAGE_SIZE - sizeof(struct pcb); + common_tss[0].tss_rsp0 = thread0.td_kstack + + kstack0_sz - sizeof(struct pcb); /* Ensure the stack is aligned to 16 bytes */ common_tss[0].tss_rsp0 &= ~0xFul; PCPU_SET(rsp0, common_tss[0].tss_rsp0); Modified: stable/8/sys/i386/i386/machdep.c ============================================================================== --- stable/8/sys/i386/i386/machdep.c Fri May 18 14:12:17 2012 (r235607) +++ stable/8/sys/i386/i386/machdep.c Fri May 18 14:29:54 2012 (r235608) @@ -2508,6 +2508,7 @@ init386(first) { unsigned long gdtmachpfn; int error, gsel_tss, metadata_missing, x, pa; + size_t kstack0_sz; struct pcpu *pc; struct callback_register event = { .type = CALLBACKTYPE_event, @@ -2519,8 +2520,9 @@ init386(first) }; thread0.td_kstack = proc0kstack; - thread0.td_pcb = (struct pcb *) - (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; + thread0.td_kstack_pages = KSTACK_PAGES; + kstack0_sz = thread0.td_kstack_pages * PAGE_SIZE; + thread0.td_pcb = (struct pcb *)(thread0.td_kstack + kstack0_sz) - 1; /* * This may be done better later if it gets more high level @@ -2671,7 +2673,7 @@ init386(first) /* make an initial tss so cpu can get interrupt stack on syscall! */ /* Note: -16 is so we can grow the trapframe if we came from vm86 */ PCPU_SET(common_tss.tss_esp0, thread0.td_kstack + - KSTACK_PAGES * PAGE_SIZE - sizeof(struct pcb) - 16); + kstack0_sz - sizeof(struct pcb) - 16); PCPU_SET(common_tss.tss_ss0, GSEL(GDATA_SEL, SEL_KPL)); gsel_tss = GSEL(GPROC0_SEL, SEL_KPL); HYPERVISOR_stack_switch(GSEL(GDATA_SEL, SEL_KPL), @@ -2734,11 +2736,13 @@ init386(first) { struct gate_descriptor *gdp; int gsel_tss, metadata_missing, x, pa; + size_t kstack0_sz; struct pcpu *pc; thread0.td_kstack = proc0kstack; - thread0.td_pcb = (struct pcb *) - (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; + thread0.td_kstack_pages = KSTACK_PAGES; + kstack0_sz = thread0.td_kstack_pages * PAGE_SIZE; + thread0.td_pcb = (struct pcb *)(thread0.td_kstack + kstack0_sz) - 1; /* * This may be done better later if it gets more high level @@ -2930,7 +2934,7 @@ init386(first) /* make an initial tss so cpu can get interrupt stack on syscall! */ /* Note: -16 is so we can grow the trapframe if we came from vm86 */ PCPU_SET(common_tss.tss_esp0, thread0.td_kstack + - KSTACK_PAGES * PAGE_SIZE - sizeof(struct pcb) - 16); + kstack0_sz - sizeof(struct pcb) - 16); PCPU_SET(common_tss.tss_ss0, GSEL(GDATA_SEL, SEL_KPL)); gsel_tss = GSEL(GPROC0_SEL, SEL_KPL); PCPU_SET(tss_gdt, &gdt[GPROC0_SEL].sd); Modified: stable/8/sys/pc98/pc98/machdep.c ============================================================================== --- stable/8/sys/pc98/pc98/machdep.c Fri May 18 14:12:17 2012 (r235607) +++ stable/8/sys/pc98/pc98/machdep.c Fri May 18 14:29:54 2012 (r235608) @@ -2088,11 +2088,13 @@ init386(first) { struct gate_descriptor *gdp; int gsel_tss, metadata_missing, x, pa; + size_t kstack0_sz; struct pcpu *pc; thread0.td_kstack = proc0kstack; - thread0.td_pcb = (struct pcb *) - (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; + thread0.td_kstack_pages = KSTACK_PAGES; + kstack0_sz = thread0.td_kstack_pages * PAGE_SIZE; + thread0.td_pcb = (struct pcb *)(thread0.td_kstack + kstack0_sz) - 1; /* * This may be done better later if it gets more high level @@ -2262,7 +2264,7 @@ init386(first) /* make an initial tss so cpu can get interrupt stack on syscall! */ /* Note: -16 is so we can grow the trapframe if we came from vm86 */ PCPU_SET(common_tss.tss_esp0, thread0.td_kstack + - KSTACK_PAGES * PAGE_SIZE - sizeof(struct pcb) - 16); + kstack0_sz - sizeof(struct pcb) - 16); PCPU_SET(common_tss.tss_ss0, GSEL(GDATA_SEL, SEL_KPL)); gsel_tss = GSEL(GPROC0_SEL, SEL_KPL); PCPU_SET(tss_gdt, &gdt[GPROC0_SEL].sd); From owner-svn-src-all@FreeBSD.ORG Fri May 18 14:41:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 666931065672; Fri, 18 May 2012 14:41:15 +0000 (UTC) (envelope-from gber@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 46C3D8FC08; Fri, 18 May 2012 14:41:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IEfFNt057789; Fri, 18 May 2012 14:41:15 GMT (envelope-from gber@svn.freebsd.org) Received: (from gber@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IEfFqP057774; Fri, 18 May 2012 14:41:15 GMT (envelope-from gber@svn.freebsd.org) Message-Id: <201205181441.q4IEfFqP057774@svn.freebsd.org> From: Grzegorz Bernacki Date: Fri, 18 May 2012 14:41:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235609 - in head/sys: arm/conf arm/include arm/mv arm/mv/discovery boot/fdt/dts boot/uboot/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 14:41:15 -0000 Author: gber Date: Fri May 18 14:41:14 2012 New Revision: 235609 URL: http://svn.freebsd.org/changeset/base/235609 Log: Add architecture dependent code to support NAND Framework on Marvell SoCs. Obtained from: Semihalf Supported by: FreeBSD Foundation, Juniper Networks Added: head/sys/boot/fdt/dts/bindings-localbus.txt (contents, props changed) Modified: head/sys/arm/conf/DB-78XXX head/sys/arm/conf/DB-88F6XXX head/sys/arm/conf/SHEEVAPLUG head/sys/arm/include/fdt.h head/sys/arm/mv/discovery/discovery.c head/sys/arm/mv/files.mv head/sys/arm/mv/mv_machdep.c head/sys/arm/mv/mvwin.h head/sys/boot/fdt/dts/db78100.dts head/sys/boot/fdt/dts/db88f6281.dts head/sys/boot/fdt/dts/sheevaplug.dts head/sys/boot/uboot/lib/api_public.h head/sys/boot/uboot/lib/glue.c Modified: head/sys/arm/conf/DB-78XXX ============================================================================== --- head/sys/arm/conf/DB-78XXX Fri May 18 14:29:54 2012 (r235608) +++ head/sys/arm/conf/DB-78XXX Fri May 18 14:41:14 2012 (r235609) @@ -17,6 +17,7 @@ options SCHED_4BSD #4BSD scheduler options INET #InterNETworking options INET6 #IPv6 communications protocols options FFS #Berkeley Fast Filesystem +options NANDFS #NAND Filesystem options NFSCL #New Network Filesystem Client options NFSLOCKD #Network Lock Manager options NFS_ROOT #NFS usable as /, requires NFSCL @@ -82,6 +83,10 @@ device ds133x # SATA device mvs +# NAND +device nand + # Flattened Device Tree options FDT +options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=db78100.dts Modified: head/sys/arm/conf/DB-88F6XXX ============================================================================== --- head/sys/arm/conf/DB-88F6XXX Fri May 18 14:29:54 2012 (r235608) +++ head/sys/arm/conf/DB-88F6XXX Fri May 18 14:41:14 2012 (r235609) @@ -17,6 +17,7 @@ options SCHED_4BSD #4BSD scheduler options INET #InterNETworking options INET6 #IPv6 communications protocols options FFS #Berkeley Fast Filesystem +options NANDFS #NAND Filesystem options NFSCL #New Network Filesystem Client options NFSLOCKD #Network Lock Manager options NFS_ROOT #NFS usable as /, requires NFSCL @@ -85,6 +86,10 @@ device iicbus # SATA device mvs +# NAND +device nand + # Flattened Device Tree options FDT +options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=db88f6281.dts Modified: head/sys/arm/conf/SHEEVAPLUG ============================================================================== --- head/sys/arm/conf/SHEEVAPLUG Fri May 18 14:29:54 2012 (r235608) +++ head/sys/arm/conf/SHEEVAPLUG Fri May 18 14:41:14 2012 (r235609) @@ -17,6 +17,7 @@ options SCHED_4BSD #4BSD scheduler options INET #InterNETworking options INET6 #IPv6 communications protocols options FFS #Berkeley Fast Filesystem +options NANDFS #NAND Filesystem options NFSCL #New Network Filesystem Client options NFSLOCKD #Network Lock Manager options NFS_ROOT #NFS usable as /, requires NFSCL @@ -72,6 +73,9 @@ device scbus device pass device da +# NAND +device nand + # Flattened Device Tree options FDT options FDT_DTB_STATIC Modified: head/sys/arm/include/fdt.h ============================================================================== --- head/sys/arm/include/fdt.h Fri May 18 14:29:54 2012 (r235608) +++ head/sys/arm/include/fdt.h Fri May 18 14:41:14 2012 (r235609) @@ -57,6 +57,7 @@ struct mem_region { vm_size_t mr_size; }; +int fdt_localbus_devmap(phandle_t, struct pmap_devmap *, int, int *); int fdt_pci_devmap(phandle_t, struct pmap_devmap *devmap, vm_offset_t, vm_offset_t); Modified: head/sys/arm/mv/discovery/discovery.c ============================================================================== --- head/sys/arm/mv/discovery/discovery.c Fri May 18 14:29:54 2012 (r235608) +++ head/sys/arm/mv/discovery/discovery.c Fri May 18 14:41:14 2012 (r235609) @@ -43,6 +43,30 @@ __FBSDID("$FreeBSD$"); #include #include +/* + * Virtual address space layout: + * ----------------------------- + * 0x0000_0000 - 0xBFFF_FFFF : User Process (3 GB) + * 0xC000_0000 - virtual_avail : Kernel Reserved (text, data, page tables, + * : stack etc.) + * virtual-avail - 0xEFFF_FFFF : KVA (virtual_avail is typically < 0xc0a0_0000) + * 0xF000_0000 - 0xF0FF_FFFF : No-Cache allocation area (16 MB) + * 0xF100_0000 - 0xF10F_FFFF : SoC Integrated devices registers range (1 MB) + * 0xF110_0000 - 0xF11F_FFFF : PCI-Express I/O space (1MB) + * 0xF120_0000 - 0xF12F_FFFF : PCI I/O space (1MB) + * 0xF130_0000 - 0xF52F_FFFF : PCI-Express memory space (64MB) + * 0xF530_0000 - 0xF92F_FFFF : PCI memory space (64MB) + * 0xF930_0000 - 0xF93F_FFFF : Device Bus: BOOT (1 MB) + * 0xF940_0000 - 0xF94F_FFFF : Device Bus: CS0 (1 MB) + * 0xF950_0000 - 0xFB4F_FFFF : Device Bus: CS1 (32 MB) + * 0xFB50_0000 - 0xFB5F_FFFF : Device Bus: CS2 (1 MB) + * 0xFB60_0000 - 0xFFFE_FFFF : Unused (~74MB) + * 0xFFFF_0000 - 0xFFFF_0FFF : 'High' vectors page (4 kB) + * 0xFFFF_1000 - 0xFFFF_1FFF : ARM_TP_ADDRESS/RAS page (4 kB) + * 0xFFFF_2000 - 0xFFFF_FFFF : Unused (56 kB) + */ + + struct resource_spec mv_gpio_res[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_IRQ, 0, RF_ACTIVE }, Modified: head/sys/arm/mv/files.mv ============================================================================== --- head/sys/arm/mv/files.mv Fri May 18 14:29:54 2012 (r235608) +++ head/sys/arm/mv/files.mv Fri May 18 14:41:14 2012 (r235609) @@ -22,6 +22,7 @@ arm/mv/bus_space.c standard arm/mv/common.c standard arm/mv/gpio.c standard arm/mv/ic.c standard +arm/mv/mv_localbus.c standard arm/mv/mv_machdep.c standard arm/mv/mv_pci.c optional pci arm/mv/mv_sata.c optional ata | atamvsata @@ -30,6 +31,7 @@ arm/mv/twsi.c optional iicbus dev/cesa/cesa.c optional cesa dev/mge/if_mge.c optional mge +dev/nand/nfc_mv.c optional nand dev/mvs/mvs_soc.c optional mvs dev/uart/uart_dev_ns8250.c optional uart dev/usb/controller/ehci_mv.c optional ehci Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Fri May 18 14:29:54 2012 (r235608) +++ head/sys/arm/mv/mv_machdep.c Fri May 18 14:41:14 2012 (r235609) @@ -314,7 +314,7 @@ initarm(void *mdp, void *unused __unused uint32_t memsize, l2size; void *kmdp; u_int l1pagetable; - int i = 0, j = 0; + int i = 0, j = 0, err_devmap = 0; kmdp = NULL; lastaddr = 0; @@ -496,8 +496,7 @@ initarm(void *mdp, void *unused __unused VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); /* Map pmap_devmap[] entries */ - if (platform_devmap_init() != 0) - while (1); + err_devmap = platform_devmap_init(); pmap_devmap_bootstrap(l1pagetable, pmap_devmap_bootstrap_table); cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)) | @@ -530,12 +529,17 @@ initarm(void *mdp, void *unused __unused print_kernel_section_addr(); print_kenv(); + if (err_devmap != 0) + printf("WARNING: could not fully configure devmap, error=%d\n", + err_devmap); + /* * Re-initialise decode windows */ if (soc_decode_win() != 0) printf("WARNING: could not re-initialise decode windows! " "Running with existing settings...\n"); + /* * Pages were allocated during the secondary bootstrap for the * stacks for different CPU modes. @@ -733,25 +737,34 @@ moveon: return (0); } -#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) +#define FDT_DEVMAP_MAX (MV_WIN_CPU_MAX + 1) static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = { { 0, 0, 0, 0, 0, } }; /* + * XXX: When device entry in devmap has pd_size smaller than section size, + * system will freeze during initialization + */ + +/* * Construct pmap_devmap[] with DT-derived config data. */ + static int platform_devmap_init(void) { phandle_t root, child; + pcell_t bank_count; u_long base, size; - int i; + int i, num_mapped; + + i = 0; + pmap_devmap_bootstrap_table = &fdt_devmap[0]; /* * IMMR range. */ - i = 0; fdt_devmap[i].pd_va = fdt_immr_va; fdt_devmap[i].pd_pa = fdt_immr_pa; fdt_devmap[i].pd_size = fdt_immr_size; @@ -760,12 +773,12 @@ platform_devmap_init(void) i++; /* - * PCI range(s). + * PCI range(s) and localbus. */ if ((root = OF_finddevice("/")) == -1) return (ENXIO); - for (child = OF_child(root); child != 0; child = OF_peer(child)) + for (child = OF_child(root); child != 0; child = OF_peer(child)) { if (fdt_is_type(child, "pci")) { /* * Check space: each PCI node will consume 2 devmap @@ -773,7 +786,6 @@ platform_devmap_init(void) */ if (i + 1 >= FDT_DEVMAP_MAX) { return (ENOMEM); - break; } /* @@ -786,6 +798,29 @@ platform_devmap_init(void) i += 2; } + if (fdt_is_compatible(child, "mrvl,lbc")) { + /* Check available space */ + if (OF_getprop(child, "bank-count", (void *)&bank_count, + sizeof(bank_count)) <= 0) + /* If no property, use default value */ + bank_count = 1; + else + bank_count = fdt32_to_cpu(bank_count); + + if ((i + bank_count) >= FDT_DEVMAP_MAX) + return (ENOMEM); + + /* Add all localbus ranges to device map */ + num_mapped = 0; + + if (fdt_localbus_devmap(child, &fdt_devmap[i], + (int)bank_count, &num_mapped) != 0) + return (ENXIO); + + i += num_mapped; + } + } + /* * CESA SRAM range. */ @@ -795,7 +830,7 @@ platform_devmap_init(void) if ((child = fdt_find_compatible(root, "mrvl,cesa-sram", 0)) == 0) /* No CESA SRAM node. */ - goto out; + return (0); moveon: if (i >= FDT_DEVMAP_MAX) return (ENOMEM); @@ -809,8 +844,6 @@ moveon: fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE; fdt_devmap[i].pd_cache = PTE_NOCACHE; -out: - pmap_devmap_bootstrap_table = &fdt_devmap[0]; return (0); } Modified: head/sys/arm/mv/mvwin.h ============================================================================== --- head/sys/arm/mv/mvwin.h Fri May 18 14:29:54 2012 (r235608) +++ head/sys/arm/mv/mvwin.h Fri May 18 14:41:14 2012 (r235609) @@ -57,20 +57,17 @@ #define MV_PCI_MEM_BASE MV_PCI_MEM_PHYS_BASE #define MV_PCI_MEM_SIZE (64 * 1024 * 1024) -/* XXX DEV_BOOT, CSx are board specific, should be defined per platform */ +#define MV_DEV_BOOT_BASE 0xF9300000 +#define MV_DEV_BOOT_SIZE (1024 * 1024) /* 1 MB */ -/* 512KB NOR FLASH */ -#define MV_DEV_BOOT_PHYS_BASE (MV_PCI_MEM_PHYS_BASE + MV_PCI_MEM_SIZE) -#define MV_DEV_BOOT_SIZE (512 * 1024) -/* CS0: 7-seg LED */ -#define MV_DEV_CS0_PHYS_BASE 0xFA000000 -#define MV_DEV_CS0_SIZE (1024 * 1024) /* XXX u-boot has 2MB */ -/* CS1: 32MB NOR FLASH */ -#define MV_DEV_CS1_PHYS_BASE (MV_DEV_CS0_PHYS_BASE + MV_DEV_CS0_SIZE) -#define MV_DEV_CS1_SIZE (32 * 1024 * 1024) -/* CS2: 32MB NAND FLASH */ -#define MV_DEV_CS2_PHYS_BASE (MV_DEV_CS1_PHYS_BASE + MV_DEV_CS1_SIZE) -#define MV_DEV_CS2_SIZE 1024 /* XXX u-boot has 1MB */ +#define MV_DEV_CS0_BASE 0xF9400000 +#define MV_DEV_CS0_SIZE (1024 * 1024) /* 1 MB */ + +#define MV_DEV_CS1_BASE 0xF9500000 +#define MV_DEV_CS1_SIZE (32 * 1024 * 1024) /* 32 MB */ + +#define MV_DEV_CS2_BASE 0xFB500000 +#define MV_DEV_CS2_SIZE (1024 * 1024) /* 1 MB */ #define MV_CESA_SRAM_PHYS_BASE 0xFD000000 #define MV_CESA_SRAM_BASE MV_CESA_SRAM_PHYS_BASE /* VA == PA mapping */ @@ -107,8 +104,6 @@ #define MV_PCIE12_BASE (MV_PCIE_BASE + 0x48000) #define MV_PCIE13_BASE (MV_PCIE_BASE + 0x4C000) -#define MV_DEV_CS0_BASE MV_DEV_CS0_PHYS_BASE - /* * Decode windows definitions and macros */ Added: head/sys/boot/fdt/dts/bindings-localbus.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/bindings-localbus.txt Fri May 18 14:41:14 2012 (r235609) @@ -0,0 +1,83 @@ +$FreeBSD$ + +Marvell Device bus (localbus) configuration. +============================================ + +1. Properties for localbus nodes + +1.1 ranges + +Property: ranges + +Value type: encoded as arbitrary number of localbus + nodes specifiers. + +Description: ranges property defines values used for mapping devices + connected to localbus, in Marvell devices it is used also for + setting decoding windows. + + a) child node address-cells: + - first cell: number of bank (chip select) + - second cell: (Marvell devices) Target ID for decoding + windows setup + + b) parent node address cells: + - address offset: used with parent's node base address to + specify base address of mapped device + + c) child node size-cells: + - size: defines amount of memory that should be reserved for + device + +1.2 bank-count + +Property: bank-count + +Value type: + +Description: The bank_count property defines maximum number of banks on + localbus node. Bank is most often interpreted as device chip + select, but may also describe another device (e.g. SPI flash). + +1.3 Example + + localbus@0 { + #address-cells = <2>; + #size-cells = <1>; + compatible = "mrvl,lbc"; + bank-count = <5>; + + /* This reflects CPU decode windows setup. */ + ranges = <0x0 0x2f 0xb2200000 0x00100000 + 0x1 0x3e 0xb2100000 0x00100000 + 0x2 0x3d 0xb0000000 0x02000000 + 0x3 0x3b 0xb2000000 0x00100000>; + }; + +2. Properties for localbus consumer nodes: + +2.1 reg + +Property: reg + +Value type: + +Description: A standard property required for localbus child nodes. Defines + the device memory region. + + a) first cell: number of bank (chip select) + + b) address offset: used with address offset from parent's ranges + for corresponding bank to specify base address of + the device + + c) size: defines size of the device memory region + +2.2 Example + + nor@0,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x0 0x0 0x00100000>; + }; Modified: head/sys/boot/fdt/dts/db78100.dts ============================================================================== --- head/sys/boot/fdt/dts/db78100.dts Fri May 18 14:29:54 2012 (r235608) +++ head/sys/boot/fdt/dts/db78100.dts Fri May 18 14:41:14 2012 (r235609) @@ -69,25 +69,23 @@ reg = <0x0 0x20000000>; // 512M at 0x0 }; - localbus@f1000000 { + localbus@0 { #address-cells = <2>; #size-cells = <1>; compatible = "mrvl,lbc"; - win-count = <14>; + bank-count = <5>; /* This reflects CPU decode windows setup. */ - ranges = <0x0 0x0f 0xf9300000 0x00100000 - 0x1 0x1e 0xfa000000 0x00100000 - 0x2 0x1d 0xfa100000 0x02000000 - 0x3 0x1b 0xfc100000 0x00000400>; + ranges = <0x0 0x2f 0xf9300000 0x00100000 + 0x1 0x3e 0xf9400000 0x00100000 + 0x2 0x3d 0xf9500000 0x02000000 + 0x3 0x3b 0xfb500000 0x00100000>; nor@0,0 { #address-cells = <1>; #size-cells = <1>; compatible = "cfi-flash"; reg = <0x0 0x0 0x00100000>; - bank-width = <2>; - device-width = <1>; }; led@1,0 { @@ -102,16 +100,13 @@ #size-cells = <1>; compatible = "cfi-flash"; reg = <0x2 0x0 0x02000000>; - bank-width = <2>; - device-width = <1>; }; nand@3,0 { #address-cells = <1>; #size-cells = <1>; + compatible = "mrvl,nfc"; reg = <0x3 0x0 0x00100000>; - bank-width = <2>; - device-width = <1>; }; }; Modified: head/sys/boot/fdt/dts/db88f6281.dts ============================================================================== --- head/sys/boot/fdt/dts/db88f6281.dts Fri May 18 14:29:54 2012 (r235608) +++ head/sys/boot/fdt/dts/db88f6281.dts Fri May 18 14:41:14 2012 (r235609) @@ -72,48 +72,24 @@ reg = <0x0 0x20000000>; // 512M at 0x0 }; - localbus@f1000000 { + localbus@0 { #address-cells = <2>; #size-cells = <1>; compatible = "mrvl,lbc"; + bank-count = <3>; /* This reflects CPU decode windows setup. */ - ranges = <0x0 0x0f 0xf9300000 0x00100000 - 0x1 0x1e 0xfa000000 0x00100000 - 0x2 0x1d 0xfa100000 0x02000000 - 0x3 0x1b 0xfc100000 0x00000400>; + ranges = <0x0 0x2f 0xf9300000 0x00100000>; - nor@0,0 { + nand@0,0 { #address-cells = <1>; #size-cells = <1>; - compatible = "cfi-flash"; + compatible = "mrvl,nfc"; reg = <0x0 0x0 0x00100000>; bank-width = <2>; device-width = <1>; - }; - - led@1,0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "led"; - reg = <0x1 0x0 0x00100000>; - }; - nor@2,0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "cfi-flash"; - reg = <0x2 0x0 0x02000000>; - bank-width = <2>; - device-width = <1>; - }; - nand@3,0 { - #address-cells = <1>; - #size-cells = <1>; - reg = <0x3 0x0 0x00100000>; - bank-width = <2>; - device-width = <1>; }; }; @@ -305,4 +281,9 @@ 0x0 0x00100000>; }; }; + + chosen { + stdin = "serial0"; + stdout = "serial0"; + }; }; Modified: head/sys/boot/fdt/dts/sheevaplug.dts ============================================================================== --- head/sys/boot/fdt/dts/sheevaplug.dts Fri May 18 14:29:54 2012 (r235608) +++ head/sys/boot/fdt/dts/sheevaplug.dts Fri May 18 14:41:14 2012 (r235609) @@ -71,48 +71,24 @@ reg = <0x0 0x20000000>; // 512M at 0x0 }; - localbus@f1000000 { + localbus@0 { #address-cells = <2>; #size-cells = <1>; compatible = "mrvl,lbc"; + bank-count = <3>; /* This reflects CPU decode windows setup. */ - ranges = <0x0 0x0f 0xf9300000 0x00100000 - 0x1 0x1e 0xfa000000 0x00100000 - 0x2 0x1d 0xfa100000 0x02000000 - 0x3 0x1b 0xfc100000 0x00000400>; + ranges = <0x0 0x2f 0xf9300000 0x00100000>; - nor@0,0 { + nand@0,0 { #address-cells = <1>; #size-cells = <1>; - compatible = "cfi-flash"; + compatible = "mrvl,nfc"; reg = <0x0 0x0 0x00100000>; bank-width = <2>; device-width = <1>; - }; - led@1,0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "led"; - reg = <0x1 0x0 0x00100000>; - }; - - nor@2,0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "cfi-flash"; - reg = <0x2 0x0 0x02000000>; - bank-width = <2>; - device-width = <1>; - }; - nand@3,0 { - #address-cells = <1>; - #size-cells = <1>; - reg = <0x3 0x0 0x00100000>; - bank-width = <2>; - device-width = <1>; }; }; Modified: head/sys/boot/uboot/lib/api_public.h ============================================================================== --- head/sys/boot/uboot/lib/api_public.h Fri May 18 14:29:54 2012 (r235608) +++ head/sys/boot/uboot/lib/api_public.h Fri May 18 14:41:14 2012 (r235609) @@ -132,6 +132,7 @@ typedef unsigned long lbastart_t; #define DT_STOR_SCSI 0x0020 #define DT_STOR_USB 0x0040 #define DT_STOR_MMC 0x0080 +#define DT_STOR_NAND 0x0100 #define DEV_STA_CLOSED 0x0000 /* invalid, closed */ #define DEV_STA_OPEN 0x0001 /* open i.e. active */ Modified: head/sys/boot/uboot/lib/glue.c ============================================================================== --- head/sys/boot/uboot/lib/glue.c Fri May 18 14:29:54 2012 (r235608) +++ head/sys/boot/uboot/lib/glue.c Fri May 18 14:41:14 2012 (r235609) @@ -407,6 +407,9 @@ ub_stor_type(int type) if (type & DT_STOR_MMC) return ("MMC"); + if (type & DT_STOR_NAND) + return ("NAND"); + return ("Unknown"); } From owner-svn-src-all@FreeBSD.ORG Fri May 18 15:20:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09529106566B; Fri, 18 May 2012 15:20:22 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF8858FC0A; Fri, 18 May 2012 15:20:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IFKL9l059390; Fri, 18 May 2012 15:20:21 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IFKLNS059388; Fri, 18 May 2012 15:20:21 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201205181520.q4IFKLNS059388@svn.freebsd.org> From: Kirk McKusick Date: Fri, 18 May 2012 15:20:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235610 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 15:20:22 -0000 Author: mckusick Date: Fri May 18 15:20:21 2012 New Revision: 235610 URL: http://svn.freebsd.org/changeset/base/235610 Log: Add missing `continue' statement at end of case. Found by: Kevin Lo (kevlo@) MFC after: 1 week Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Fri May 18 14:41:14 2012 (r235609) +++ head/sys/ufs/ffs/ffs_softdep.c Fri May 18 15:20:21 2012 (r235610) @@ -10687,6 +10687,7 @@ handle_jwork(wkhd) case D_FREEFRAG: rele_jseg(WK_JSEG(WK_FREEFRAG(wk)->ff_jdep)); WORKITEM_FREE(wk, D_FREEFRAG); + continue; case D_FREEWORK: handle_written_freework(WK_FREEWORK(wk)); continue; From owner-svn-src-all@FreeBSD.ORG Fri May 18 15:24:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3AABB1065674; Fri, 18 May 2012 15:24:43 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0DA798FC18; Fri, 18 May 2012 15:24:41 +0000 (UTC) Received: by lbon10 with SMTP id n10so3011350lbo.13 for ; Fri, 18 May 2012 08:24:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=k6lGDTq0rLudRcD3B3w1BjAspqNh1fKBSdU8BsXj130=; b=zLMgbZJyvF/DEhkKWMYidrAottAbxufAOtboYwxNoJE4Eoc5t6YSC+vkY+mXTIZKYQ wzCXHQ/R0DG+26/IvDECFm9uVAyqfrjyEioxO0eIHQxc0B0vBXf9ELA4YeoSjknvtJm8 oL+gLD3zrMo+DjKKavfCdKfnZNv17y2NXXi6vN6EeLW6hpGJhDFtST7aBG2pNogtqslU Zk4gtyCt16gmfejt/QTa90Cm9JRQAxCNubuLz+hU5Pa772UuCj+JHP9ML0ckjhfiuASL 1ILcbubXb+7cL+/4DziBYEditnNr32nhN60m+fmDg3GRP5I+sAGzSeBVOp4w1EQqFNQ9 uIpA== Received: by 10.152.114.106 with SMTP id jf10mr11490284lab.16.1337354680020; Fri, 18 May 2012 08:24:40 -0700 (PDT) Received: from localhost ([78.157.92.5]) by mx.google.com with ESMTPS id gw17sm12799510lab.11.2012.05.18.08.24.37 (version=SSLv3 cipher=OTHER); Fri, 18 May 2012 08:24:38 -0700 (PDT) Date: Fri, 18 May 2012 18:24:36 +0300 From: Gleb Kurtsou To: John Baldwin Message-ID: <20120518152436.GA9116@reks> References: <201205181001.q4IA1VED044374@svn.freebsd.org> <201205180941.48076.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201205180941.48076.jhb@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 Subject: Re: svn commit: r235601 - head/include/protocols X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 15:24:43 -0000 On (18/05/2012 09:41), John Baldwin wrote: > On Friday, May 18, 2012 6:01:31 am Gleb Kurtsou wrote: > > Author: gleb > > Date: Fri May 18 10:01:31 2012 > > New Revision: 235601 > > URL: http://svn.freebsd.org/changeset/base/235601 > > > > Log: > > Don't use ino_t in dumprestore protocol definition. > > > > Since ino_t size is about to change to 64-bits, replace ino_t used in > > dump protocol definition with 32-bit dump_ino_t to preserve backward > > compatibility. At some point, it may be necessary to use spare fields > > in struct in order to fully support 64-bit inode numbers. > > > > Sponsored by: Google Summer of Code 2011 > > A question about your stat changes: did you expand dev_t to 32 bits for the > AFS folks, or did you leave it as 16 bits? dev_t is already 32-bit. Changing it to 64-bit was discussed at some point and from what I recall no decision was made: http://marc.info/?t=129119478700005&r=1&w=2 I'm going to commit preparatory changes only for now. Then publish diff for testing. We can still change dev_t to 64-bit if needed. Although I didn't work on it. Thanks, Gleb. From owner-svn-src-all@FreeBSD.ORG Fri May 18 15:25:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1477E106566C; Fri, 18 May 2012 15:25:44 +0000 (UTC) (envelope-from gber@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E96358FC15; Fri, 18 May 2012 15:25:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IFPhis059648; Fri, 18 May 2012 15:25:43 GMT (envelope-from gber@svn.freebsd.org) Received: (from gber@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IFPhpR059647; Fri, 18 May 2012 15:25:43 GMT (envelope-from gber@svn.freebsd.org) Message-Id: <201205181525.q4IFPhpR059647@svn.freebsd.org> From: Grzegorz Bernacki Date: Fri, 18 May 2012 15:25:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235611 - head/sys/arm/mv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 15:25:44 -0000 Author: gber Date: Fri May 18 15:25:43 2012 New Revision: 235611 URL: http://svn.freebsd.org/changeset/base/235611 Log: Add localbus driver for Marvell's platforms. Obtained from: Semihalf Supported by: FreeBSD Foundation, Juniper Networks Added: head/sys/arm/mv/mv_localbus.c (contents, props changed) Added: head/sys/arm/mv/mv_localbus.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/mv/mv_localbus.c Fri May 18 15:25:43 2012 (r235611) @@ -0,0 +1,493 @@ +/*- + * Copyright (c) 2012 Semihalf. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_platform.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include "dev/fdt/fdt_common.h" +#include "ofw_bus_if.h" + +#include + +#define DEBUG +#undef DEBUG + +#ifdef DEBUG +#define debugf(fmt, args...) do { printf("%s(): ", __func__); \ + printf(fmt,##args); } while (0) +#else +#define debugf(fmt, args...) +#endif + +#define MV_LOCALBUS_MAX_BANKS 8 +#define MV_LOCALBUS_MAX_BANK_CELLS 4 + +static MALLOC_DEFINE(M_LOCALBUS, "localbus", "localbus devices information"); + +struct localbus_bank { + vm_offset_t va; /* VA of the bank */ + vm_paddr_t pa; /* physical address of the bank */ + vm_size_t size; /* bank size */ + uint8_t mapped; /* device memory has mapping */ +}; + +struct localbus_softc { + device_t sc_dev; + bus_space_handle_t sc_bsh; + bus_space_tag_t sc_bst; + int sc_rid; + + struct localbus_bank *sc_banks; +}; + +struct localbus_devinfo { + struct ofw_bus_devinfo di_ofw; + struct resource_list di_res; + int di_bank; +}; + +struct localbus_va_entry { + int8_t bank; + vm_offset_t va; + vm_size_t size; +}; + +/* + * Prototypes. + */ +static int localbus_probe(device_t); +static int localbus_attach(device_t); +static int localbus_print_child(device_t, device_t); + +static struct resource *localbus_alloc_resource(device_t, device_t, int, + int *, u_long, u_long, u_long, u_int); +static struct resource_list *localbus_get_resource_list(device_t, device_t); + +static ofw_bus_get_devinfo_t localbus_get_devinfo; + +/* + * Bus interface definition. + */ +static device_method_t localbus_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, localbus_probe), + DEVMETHOD(device_attach, localbus_attach), + DEVMETHOD(device_detach, bus_generic_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + /* Bus interface */ + DEVMETHOD(bus_print_child, localbus_print_child), + DEVMETHOD(bus_alloc_resource, localbus_alloc_resource), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_get_resource_list, localbus_get_resource_list), + + /* OFW bus interface */ + DEVMETHOD(ofw_bus_get_devinfo, localbus_get_devinfo), + DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), + DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), + DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), + DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), + DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), + + { 0, 0 } +}; + +static driver_t localbus_driver = { + "localbus", + localbus_methods, + sizeof(struct localbus_softc) +}; + +const struct localbus_va_entry localbus_virtmap[] = { + { 0, MV_DEV_BOOT_BASE, MV_DEV_BOOT_SIZE }, + { 1, MV_DEV_CS0_BASE, MV_DEV_CS0_SIZE }, + { 2, MV_DEV_CS1_BASE, MV_DEV_CS1_SIZE }, + { 3, MV_DEV_CS2_BASE, MV_DEV_CS2_SIZE }, + + { -1, 0, 0 } +}; + +static struct localbus_bank localbus_banks[MV_LOCALBUS_MAX_BANKS]; + +devclass_t localbus_devclass; + +DRIVER_MODULE(localbus, fdtbus, localbus_driver, localbus_devclass, 0, 0); + +static int +fdt_localbus_reg_decode(phandle_t node, struct localbus_softc *sc, + struct localbus_devinfo *di) +{ + u_long start, end, count; + pcell_t *reg, *regptr; + pcell_t addr_cells, size_cells; + int tuple_size, tuples; + int i, rv, bank; + + if (fdt_addrsize_cells(OF_parent(node), &addr_cells, &size_cells) != 0) + return (ENXIO); + + tuple_size = sizeof(pcell_t) * (addr_cells + size_cells); + tuples = OF_getprop_alloc(node, "reg", tuple_size, (void **)®); + debugf("addr_cells = %d, size_cells = %d\n", addr_cells, size_cells); + debugf("tuples = %d, tuple size = %d\n", tuples, tuple_size); + if (tuples <= 0) + /* No 'reg' property in this node. */ + return (0); + + regptr = reg; + for (i = 0; i < tuples; i++) { + + bank = fdt_data_get((void *)regptr, 1); + + if (bank >= MV_LOCALBUS_MAX_BANKS) { + device_printf(sc->sc_dev, "bank number [%d] out of " + "range\n", bank); + continue; + } + + /* + * If device doesn't have virtual to physical mapping don't add + * resources + */ + if (!(sc->sc_banks[bank].mapped)) { + device_printf(sc->sc_dev, "device [%d]: missing memory " + "mapping\n", bank); + continue; + } + + di->di_bank = bank; + regptr += 1; + + /* Get address/size. */ + rv = fdt_data_to_res(regptr, addr_cells - 1, size_cells, &start, + &count); + if (rv != 0) { + resource_list_free(&di->di_res); + goto out; + } + + /* Check if enough amount of memory is mapped */ + if (sc->sc_banks[bank].size < count) { + device_printf(sc->sc_dev, "device [%d]: not enough " + "memory reserved\n", bank); + continue; + } + + regptr += addr_cells - 1 + size_cells; + + /* Calculate address range relative to VA base. */ + start = sc->sc_banks[bank].va + start; + end = start + count - 1; + + debugf("reg addr bank = %d, start = %lx, end = %lx, " + "count = %lx\n", bank, start, end, count); + + /* Use bank (CS) cell as rid. */ + resource_list_add(&di->di_res, SYS_RES_MEMORY, di->di_bank, + start, end, count); + } + rv = 0; +out: + free(reg, M_OFWPROP); + return (rv); +} + +static int +localbus_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible_strict(dev, "mrvl,lbc")) + return (ENXIO); + + device_set_desc(dev, "Marvell device bus"); + + return (BUS_PROBE_DEFAULT); +} + +static int +localbus_attach(device_t dev) +{ + device_t dev_child; + struct localbus_softc *sc; + struct localbus_devinfo *di; + phandle_t dt_node, dt_child; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + sc->sc_banks = localbus_banks; + + /* + * Walk localbus and add direct subordinates as our children. + */ + dt_node = ofw_bus_get_node(dev); + for (dt_child = OF_child(dt_node); dt_child != 0; + dt_child = OF_peer(dt_child)) { + + /* Check and process 'status' property. */ + if (!(fdt_is_enabled(dt_child))) + continue; + + if (!(fdt_pm_is_enabled(dt_child))) + continue; + + di = malloc(sizeof(*di), M_LOCALBUS, M_WAITOK | M_ZERO); + if (ofw_bus_gen_setup_devinfo(&di->di_ofw, dt_child) != 0) { + free(di, M_LOCALBUS); + device_printf(dev, "could not set up devinfo\n"); + continue; + } + + resource_list_init(&di->di_res); + if (fdt_localbus_reg_decode(dt_child, sc, di)) { + device_printf(dev, "could not process 'reg' " + "property\n"); + ofw_bus_gen_destroy_devinfo(&di->di_ofw); + free(di, M_LOCALBUS); + continue; + } + + /* Add newbus device for this FDT node */ + dev_child = device_add_child(dev, NULL, -1); + if (dev_child == NULL) { + device_printf(dev, "could not add child: %s\n", + di->di_ofw.obd_name); + resource_list_free(&di->di_res); + ofw_bus_gen_destroy_devinfo(&di->di_ofw); + free(di, M_LOCALBUS); + continue; + } +#ifdef DEBUG + device_printf(dev, "added child: %s\n\n", di->di_ofw.obd_name); +#endif + device_set_ivars(dev_child, di); + } + + return (bus_generic_attach(dev)); +} + +static int +localbus_print_child(device_t dev, device_t child) +{ + struct localbus_devinfo *di; + struct resource_list *rl; + int rv; + + di = device_get_ivars(child); + rl = &di->di_res; + + rv = 0; + rv += bus_print_child_header(dev, child); + rv += resource_list_print_type(rl, "mem", SYS_RES_MEMORY, "%#lx"); + rv += resource_list_print_type(rl, "irq", SYS_RES_IRQ, "%ld"); + rv += bus_print_child_footer(dev, child); + + return (rv); +} + +static struct resource * +localbus_alloc_resource(device_t bus, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct localbus_devinfo *di; + struct resource_list_entry *rle; + + /* + * Request for the default allocation with a given rid: use resource + * list stored in the local device info. + */ + if ((start == 0UL) && (end == ~0UL)) { + if ((di = device_get_ivars(child)) == NULL) + return (NULL); + + if (type == SYS_RES_IOPORT) + type = SYS_RES_MEMORY; + + rid = &di->di_bank; + rle = resource_list_find(&di->di_res, type, *rid); + if (rle == NULL) { + device_printf(bus, "no default resources for " + "rid = %d, type = %d\n", *rid, type); + return (NULL); + } + start = rle->start; + end = rle->end; + count = rle->count; + } + + return (bus_generic_alloc_resource(bus, child, type, rid, start, end, + count, flags)); +} + + +static struct resource_list * +localbus_get_resource_list(device_t bus, device_t child) +{ + struct localbus_devinfo *di; + + di = device_get_ivars(child); + return (&di->di_res); +} + +static const struct ofw_bus_devinfo * +localbus_get_devinfo(device_t bus, device_t child) +{ + struct localbus_devinfo *di; + + di = device_get_ivars(child); + return (&di->di_ofw); +} + +int +fdt_localbus_devmap(phandle_t dt_node, struct pmap_devmap *fdt_devmap, + int banks_max_num, int *banks_added) +{ + pcell_t ranges[MV_LOCALBUS_MAX_BANKS * MV_LOCALBUS_MAX_BANK_CELLS]; + pcell_t *rangesptr; + uint32_t tuple_size, bank; + vm_paddr_t offset; + vm_size_t size; + int dev_num, addr_cells, size_cells, par_addr_cells, va_index, i, j, k; + + if ((fdt_addrsize_cells(dt_node, &addr_cells, &size_cells)) != 0) + return (EINVAL); + + par_addr_cells = fdt_parent_addr_cells(dt_node); + if (par_addr_cells > 2) { + /* + * Localbus devmap initialization error: unsupported parent + * #addr-cells + */ + return (ERANGE); + } + + tuple_size = (addr_cells + par_addr_cells + size_cells); + if (tuple_size > MV_LOCALBUS_MAX_BANK_CELLS) + return (ERANGE); + + tuple_size *= sizeof(pcell_t); + + dev_num = OF_getprop(dt_node, "ranges", ranges, sizeof(ranges)); + if (dev_num <= 0) + return (EINVAL); + + /* Calculate number of devices attached to bus */ + dev_num = dev_num / tuple_size; + + /* + * If number of ranges > max number of localbus devices, + * additional entries will not be processed + */ + dev_num = MIN(dev_num, banks_max_num); + + rangesptr = &ranges[0]; + j = 0; + + /* Process data from FDT */ + for (i = 0; i < dev_num; i++) { + + /* First field is bank number */ + bank = fdt_data_get((void *)rangesptr, 1); + rangesptr += 1; + + if (bank < 0 || bank > MV_LOCALBUS_MAX_BANKS) { + /* Bank out of range */ + rangesptr += ((addr_cells - 1) + par_addr_cells + + size_cells); + continue; + } + + /* Find virtmap entry for this bank */ + va_index = -1; + for (k = 0; localbus_virtmap[k].bank >= 0; k++) { + if (localbus_virtmap[k].bank == bank) { + va_index = k; + break; + } + } + + /* Check if virtmap entry was found */ + if (va_index == -1) { + rangesptr += ((addr_cells - 1) + par_addr_cells + + size_cells); + continue; + } + + /* Remaining child's address fields are unused */ + rangesptr += (addr_cells - 1); + + /* Parent address offset */ + offset = fdt_data_get((void *)rangesptr, par_addr_cells); + rangesptr += par_addr_cells; + + /* Last field is size */ + size = fdt_data_get((void *)rangesptr, size_cells); + rangesptr += size_cells; + + if (size > localbus_virtmap[va_index].size) { + /* Not enough space reserved in virtual memory map */ + continue; + } + + fdt_devmap[j].pd_va = localbus_virtmap[va_index].va; + fdt_devmap[j].pd_pa = offset; + fdt_devmap[j].pd_size = size; + fdt_devmap[j].pd_prot = VM_PROT_READ | VM_PROT_WRITE; + fdt_devmap[j].pd_cache = PTE_NOCACHE; + + /* Copy data to structure used by localbus driver */ + localbus_banks[bank].va = fdt_devmap[j].pd_va; + localbus_banks[bank].pa = fdt_devmap[j].pd_pa; + localbus_banks[bank].size = fdt_devmap[j].pd_size; + localbus_banks[bank].mapped = 1; + + j++; + } + + *banks_added = j; + return (0); +} From owner-svn-src-all@FreeBSD.ORG Fri May 18 16:16:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA5F3106566B; Fri, 18 May 2012 16:16:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA97F8FC12; Fri, 18 May 2012 16:16:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IGGlJI062311; Fri, 18 May 2012 16:16:47 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IGGlxM062308; Fri, 18 May 2012 16:16:47 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205181616.q4IGGlxM062308@svn.freebsd.org> From: John Baldwin Date: Fri, 18 May 2012 16:16:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235612 - in stable/9/sys: i386/conf kern ofed/drivers/infiniband/ulp/ipoib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 16:16:48 -0000 Author: jhb Date: Fri May 18 16:16:47 2012 New Revision: 235612 URL: http://svn.freebsd.org/changeset/base/235612 Log: MFC 234182: Don't update if_obytes when transmitting packets. That is already done in IFQ_HANDOFF() when the packet is passed to the start routine, so doing it here resulted in double counting. Modified: stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c ============================================================================== --- stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c Fri May 18 15:25:43 2012 (r235611) +++ stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c Fri May 18 16:16:47 2012 (r235612) @@ -682,7 +682,6 @@ void ipoib_cm_handle_tx_wc(struct ipoib_ /* FIXME: is this right? Shouldn't we only increment on success? */ ++dev->if_opackets; - dev->if_obytes += tx_req->mb->m_pkthdr.len; m_freem(tx_req->mb); Modified: stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c ============================================================================== --- stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c Fri May 18 15:25:43 2012 (r235611) +++ stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c Fri May 18 16:16:47 2012 (r235612) @@ -345,7 +345,6 @@ static void ipoib_ib_handle_tx_wc(struct ipoib_dma_unmap_tx(priv->ca, tx_req); ++dev->if_opackets; - dev->if_obytes += tx_req->mb->m_pkthdr.len; m_freem(tx_req->mb); From owner-svn-src-all@FreeBSD.ORG Fri May 18 16:40:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C8B110656B4; Fri, 18 May 2012 16:40:16 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4828C8FC0C; Fri, 18 May 2012 16:40:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IGeG4Q063492; Fri, 18 May 2012 16:40:16 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IGeGLM063486; Fri, 18 May 2012 16:40:16 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201205181640.q4IGeGLM063486@svn.freebsd.org> From: "George V. Neville-Neil" Date: Fri, 18 May 2012 16:40:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235613 - in head: etc/mtree share share/dtrace share/dtrace/toolkit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 16:40:16 -0000 Author: gnn Date: Fri May 18 16:40:15 2012 New Revision: 235613 URL: http://svn.freebsd.org/changeset/base/235613 Log: Add support for our own DTrace scripts and those from the DTraceToolkit to the build system. FreeBSD written scripts are stored in src/share and the toolkit scripts are brought from the cddl directory into a working tree via install. MFC after: 2 weeks Added: head/share/dtrace/ head/share/dtrace/Makefile (contents, props changed) head/share/dtrace/README (contents, props changed) head/share/dtrace/toolkit/ head/share/dtrace/toolkit/Makefile (contents, props changed) Modified: head/etc/mtree/BSD.usr.dist head/share/Makefile Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Fri May 18 16:16:47 2012 (r235612) +++ head/etc/mtree/BSD.usr.dist Fri May 18 16:40:15 2012 (r235613) @@ -200,6 +200,10 @@ .. .. .. + dtrace + toolkit + .. + .. examples BSD_daemon .. Modified: head/share/Makefile ============================================================================== --- head/share/Makefile Fri May 18 16:16:47 2012 (r235612) +++ head/share/Makefile Fri May 18 16:40:15 2012 (r235613) @@ -8,6 +8,7 @@ SUBDIR= ${_colldef} \ ${_dict} \ ${_doc} \ + dtrace \ ${_examples} \ ${_i18n} \ ${_man} \ Added: head/share/dtrace/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/dtrace/Makefile Fri May 18 16:40:15 2012 (r235613) @@ -0,0 +1,21 @@ +# $FreeBSD$ +# +# Hand installing our scripts and optionally (based on MK_CDDL) installing +# the DTraceToolkit. +# + +.include + +SUBDIR= ${_toolkit} + +.if ${MK_CDDL} != "no" +_toolkit= toolkit +.endif + +SCRIPTS= nfsclienttime + +SCRIPTSDIR= ${SHAREDIR}/dtrace/ + +NO_OBJ= + +.include Added: head/share/dtrace/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/dtrace/README Fri May 18 16:40:15 2012 (r235613) @@ -0,0 +1,11 @@ +$FreeBSD$ + +This directory contains scripts for use with the DTrace system. The +toolkit/ directory contains the latest vendor import of Brendan +Gregg's DTRaceToolkit while all the other files and directories +contain code generated by the FreeBSD Project for use with DTrace on +FreeBSD. + +NOTE: Do not add new scripts to the DTraceToolkit contained in this +directory. New DTraceToolkit scripts should be send to the maintainer +of the toolkit and then brought back into FreeBSD via future vendor imports. Added: head/share/dtrace/toolkit/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/dtrace/toolkit/Makefile Fri May 18 16:40:15 2012 (r235613) @@ -0,0 +1,17 @@ +#$FreeBSD$ +# +# Install scripts from the DTraceToolkit +# +DTRACETOOLKIT= ../../../cddl/contrib/dtracetoolkit + +SCRIPTS= ${DTRACETOOLKIT}/execsnoop \ + ${DTRACETOOLKIT}/hotuser \ + ${DTRACETOOLKIT}/hotkernel \ + ${DTRACETOOLKIT}/opensnoop \ + ${DTRACETOOLKIT}/procsystime \ + +SCRIPTSDIR= ${SHAREDIR}/dtrace/toolkit + +NO_OBJ= + +.include From owner-svn-src-all@FreeBSD.ORG Fri May 18 16:47:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97494106564A; Fri, 18 May 2012 16:47:16 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6829D8FC0A; Fri, 18 May 2012 16:47:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IGlGSe063849; Fri, 18 May 2012 16:47:16 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IGlGEL063848; Fri, 18 May 2012 16:47:16 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201205181647.q4IGlGEL063848@svn.freebsd.org> From: "George V. Neville-Neil" Date: Fri, 18 May 2012 16:47:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235614 - head/share/dtrace X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 16:47:16 -0000 Author: gnn Date: Fri May 18 16:47:15 2012 New Revision: 235614 URL: http://svn.freebsd.org/changeset/base/235614 Log: Add a DTrace script to show the frequency and latency of NFS client calls. Submitted by: rwatson Added: head/share/dtrace/nfsclienttime (contents, props changed) Added: head/share/dtrace/nfsclienttime ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/dtrace/nfsclienttime Fri May 18 16:47:15 2012 (r235614) @@ -0,0 +1,74 @@ +#!/bin/sh +# +# Copyright (c) 2012 Robert N. M. Watson +# All rights reserved. +# +# This software was developed at the University of Cambridge Computer +# Laboratory with support from a grant from Google, Inc. +# +# 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$ +# +# This script measures all time spent waiting on RPC replies for each +# system call, and then generates a histogram of those times sorted by +# system call name. +# +# Currently only supports NFSv3 +# +# Usage: nfsclienttime +# +# Press Ctrl-C to exit and display statistics. +# + +/usr/sbin/dtrace -n ' +#pragma D option quiet + +dtrace:::BEGIN +{ + printf("Collecting data...press Ctrl-C to exit.\n"); +} + +syscall:::entry +{ + + self->count = 0; +} + +nfsclient:nfs3::start +{ + + self->timestamp = timestamp; +} + +nfsclient:nfs3::done +{ + + self->count += (timestamp - self->timestamp); +} + +syscall:::return +/self->count != 0/ { + + @syscalls[probefunc] = quantize(self->count); +} +' From owner-svn-src-all@FreeBSD.ORG Fri May 18 18:26:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2825A106564A; Fri, 18 May 2012 18:26:04 +0000 (UTC) (envelope-from rea@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11AB68FC19; Fri, 18 May 2012 18:26:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IIQ3Ol068047; Fri, 18 May 2012 18:26:03 GMT (envelope-from rea@svn.freebsd.org) Received: (from rea@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IIQ3T4068045; Fri, 18 May 2012 18:26:03 GMT (envelope-from rea@svn.freebsd.org) Message-Id: <201205181826.q4IIQ3T4068045@svn.freebsd.org> From: Eygene Ryabinkin Date: Fri, 18 May 2012 18:26:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235615 - stable/9/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 18:26:04 -0000 Author: rea (ports committer) Date: Fri May 18 18:26:03 2012 New Revision: 235615 URL: http://svn.freebsd.org/changeset/base/235615 Log: /etc/netstart: remove invocation of dhclient dhclient is no longer a real service, it is a helper script for /etc/rc.d/netif and devd. Its direct invocation isn't needed to bring the network up. Approved by: jhb, delphij Modified: stable/9/etc/netstart Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/netstart ============================================================================== --- stable/9/etc/netstart Fri May 18 16:47:15 2012 (r235614) +++ stable/9/etc/netstart Fri May 18 18:26:03 2012 (r235615) @@ -52,7 +52,6 @@ _start=quietstart # . /etc/rc.d/atm3.sh ${_start} /etc/rc.d/netif ${_start} /etc/rc.d/ipsec ${_start} -/etc/rc.d/dhclient ${_start} /etc/rc.d/ppp ${_start} /etc/rc.d/ipfw ${_start} /etc/rc.d/routing ${_start} From owner-svn-src-all@FreeBSD.ORG Fri May 18 18:29:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72D90106566B; Fri, 18 May 2012 18:29:45 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43E338FC08; Fri, 18 May 2012 18:29:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IITj2s068315; Fri, 18 May 2012 18:29:45 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IITj8T068313; Fri, 18 May 2012 18:29:45 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201205181829.q4IITj8T068313@svn.freebsd.org> From: Sean Bruno Date: Fri, 18 May 2012 18:29:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235616 - stable/8/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 18:29:45 -0000 Author: sbruno Date: Fri May 18 18:29:44 2012 New Revision: 235616 URL: http://svn.freebsd.org/changeset/base/235616 Log: MFC r235210 Modify the binding of queues to attach to as many CPUs as possible when using more than one igb(4) adapter. This means that queues will not be bound to the same CPUs if there are more CPUs availble. This is only applicable to a system that has multiple interfaces. Modified: stable/8/sys/dev/e1000/if_igb.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/e1000/ (props changed) Modified: stable/8/sys/dev/e1000/if_igb.c ============================================================================== --- stable/8/sys/dev/e1000/if_igb.c Fri May 18 18:26:03 2012 (r235615) +++ stable/8/sys/dev/e1000/if_igb.c Fri May 18 18:29:44 2012 (r235616) @@ -364,6 +364,13 @@ TUNABLE_INT("hw.igb.num_queues", &igb_nu SYSCTL_INT(_hw_igb, OID_AUTO, num_queues, CTLFLAG_RDTUN, &igb_num_queues, 0, "Number of queues to configure, 0 indicates autoconfigure"); +/* +** Global variable to store last used CPU when binding queues +** to CPUs in igb_allocate_msix. Starts at CPU_FIRST and increments when a +** queue is bound to a cpu. +*/ +static int igb_last_bind_cpu = -1; + /* How many packets rxeof tries to clean at a time */ static int igb_rx_process_limit = 100; TUNABLE_INT("hw.igb.rx_process_limit", &igb_rx_process_limit); @@ -2484,8 +2491,16 @@ igb_allocate_msix(struct adapter *adapte ** Bind the msix vector, and thus the ** rings to the corresponding cpu. */ - if (adapter->num_queues > 1) - bus_bind_intr(dev, que->res, i); + if (adapter->num_queues > 1) { + if (igb_last_bind_cpu < 0) + igb_last_bind_cpu = CPU_FIRST(); + bus_bind_intr(dev, que->res, igb_last_bind_cpu); + device_printf(dev, + "Bound queue %d to cpu %d\n", + i,igb_last_bind_cpu); + igb_last_bind_cpu = CPU_NEXT(igb_last_bind_cpu); + igb_last_bind_cpu = igb_last_bind_cpu % mp_ncpus; + } #if __FreeBSD_version >= 800000 TASK_INIT(&que->txr->txq_task, 0, igb_deferred_mq_start, que->txr); From owner-svn-src-all@FreeBSD.ORG Fri May 18 18:32:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C74B6106566B; Fri, 18 May 2012 18:32:44 +0000 (UTC) (envelope-from rea@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B24778FC0A; Fri, 18 May 2012 18:32:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IIWi7D068504; Fri, 18 May 2012 18:32:44 GMT (envelope-from rea@svn.freebsd.org) Received: (from rea@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IIWiKP068502; Fri, 18 May 2012 18:32:44 GMT (envelope-from rea@svn.freebsd.org) Message-Id: <201205181832.q4IIWiKP068502@svn.freebsd.org> From: Eygene Ryabinkin Date: Fri, 18 May 2012 18:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235617 - stable/8/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 18:32:44 -0000 Author: rea (ports committer) Date: Fri May 18 18:32:44 2012 New Revision: 235617 URL: http://svn.freebsd.org/changeset/base/235617 Log: /etc/netstart: remove invocation of dhclient dhclient is no longer a real service, it is a helper script for /etc/rc.d/netif and devd. Its direct invocation isn't needed to bring the network up. Approved by: jhb, delphij Modified: stable/8/etc/netstart Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/netstart ============================================================================== --- stable/8/etc/netstart Fri May 18 18:29:44 2012 (r235616) +++ stable/8/etc/netstart Fri May 18 18:32:44 2012 (r235617) @@ -52,7 +52,6 @@ _start=quietstart # . /etc/rc.d/atm3.sh ${_start} /etc/rc.d/netif ${_start} /etc/rc.d/ipsec ${_start} -/etc/rc.d/dhclient ${_start} /etc/rc.d/ppp ${_start} /etc/rc.d/ipfw ${_start} /etc/rc.d/network_ipv6 ${_start} From owner-svn-src-all@FreeBSD.ORG Fri May 18 18:34:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BFDE106564A; Fri, 18 May 2012 18:34:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE1F98FC08; Fri, 18 May 2012 18:34:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IIYTM9068644; Fri, 18 May 2012 18:34:29 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IIYTeh068642; Fri, 18 May 2012 18:34:29 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201205181834.q4IIYTeh068642@svn.freebsd.org> From: Dimitry Andric Date: Fri, 18 May 2012 18:34:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235618 - stable/9/games/morse X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 18:34:30 -0000 Author: dim Date: Fri May 18 18:34:29 2012 New Revision: 235618 URL: http://svn.freebsd.org/changeset/base/235618 Log: MFC r230131: Reencode morse.c to UTF-8. This does not make it Unicode aware. No changes in resulting object file. Moved user-visible symbols into comment table, so you can see all chars, not just the ones matching your (fallback) locale. Modified: stable/9/games/morse/morse.c Directory Properties: stable/9/games/morse/ (props changed) Modified: stable/9/games/morse/morse.c ============================================================================== --- stable/9/games/morse/morse.c Fri May 18 18:32:44 2012 (r235617) +++ stable/9/games/morse/morse.c Fri May 18 18:34:29 2012 (r235618) @@ -143,26 +143,31 @@ static const struct morsetab mtab[] = { {'\0', ""} }; - +/* + * Code-points for some Latin1 chars in ISO-8859-1 encoding. + * UTF-8 encoded chars in the comments. + */ static const struct morsetab iso8859_1tab[] = { - {'', ".--.-"}, - {'', ".--.-"}, - {'', ".--.-"}, - {'', ".-.-"}, - {'', "-.-.."}, - {'', "..-.."}, - {'', "..-.."}, - {'', "-..-."}, - {'', "---."}, - {'', "..--"}, + {'\340', ".--.-"}, /* à */ + {'\341', ".--.-"}, /* á */ + {'\342', ".--.-"}, /* â */ + {'\344', ".-.-"}, /* ä */ + {'\347', "-.-.."}, /* ç */ + {'\350', "..-.."}, /* è */ + {'\351', "..-.."}, /* é */ + {'\352', "-..-."}, /* ê */ + {'\366', "---."}, /* ö */ + {'\374', "..--"}, /* ü */ {'\0', ""} }; +/* + * Code-points for some Greek chars in ISO-8859-7 encoding. + * UTF-8 encoded chars in the comments. + */ static const struct morsetab iso8859_7tab[] = { /* - * The Greek alphabet; you'll need an ISO8859-7 font in order - * to see the actual characters. * This table does not implement: * - the special sequences for the seven diphthongs, * - the punctuation differences. @@ -180,83 +185,83 @@ static const struct morsetab iso8859_7ta * ; ..-.- * ! --..-- */ - {'', ".-"}, /* alpha */ - {'', ".-"}, /* alpha with acute */ - {'', "-..."}, /* beta */ - {'', "--."}, /* gamma */ - {'', "-.."}, /* delta */ - {'', "."}, /* epsilon */ - {'', "."}, /* epsilon with acute */ - {'', "--.."}, /* zeta */ - {'', "...."}, /* eta */ - {'', "...."}, /* eta with acute */ - {'', "-.-."}, /* theta */ - {'', ".."}, /* iota */ - {'', ".."}, /* iota with acute */ - {'', ".."}, /* iota with diaeresis */ - {'', ".."}, /* iota with acute and diaeresis */ - {'', "-.-"}, /* kappa */ - {'', ".-.."}, /* lambda */ - {'', "--"}, /* mu */ - {'', "-."}, /* nu */ - {'', "-..-"}, /* xi */ - {'', "---"}, /* omicron */ - {'', "---"}, /* omicron with acute */ - {'', ".--."}, /* pi */ - {'', ".-."}, /* rho */ - {'', "..."}, /* sigma */ - {'', "..."}, /* final sigma */ - {'', "-"}, /* tau */ - {'', "-.--"}, /* upsilon */ - {'', "-.--"}, /* upsilon with acute */ - {'', "-.--"}, /* upsilon and diaeresis */ - {'', "-.--"}, /* upsilon with acute and diaeresis */ - {'', "..-."}, /* phi */ - {'', "----"}, /* chi */ - {'', "--.-"}, /* psi */ - {'', ".--"}, /* omega */ - {'', ".--"}, /* omega with acute */ + {'\341', ".-"}, /* α, alpha */ + {'\334', ".-"}, /* ά, alpha with acute */ + {'\342', "-..."}, /* β, beta */ + {'\343', "--."}, /* γ, gamma */ + {'\344', "-.."}, /* δ, delta */ + {'\345', "."}, /* ε, epsilon */ + {'\335', "."}, /* έ, epsilon with acute */ + {'\346', "--.."}, /* ζ, zeta */ + {'\347', "...."}, /* η, eta */ + {'\336', "...."}, /* ή, eta with acute */ + {'\350', "-.-."}, /* θ, theta */ + {'\351', ".."}, /* ι, iota */ + {'\337', ".."}, /* ί, iota with acute */ + {'\372', ".."}, /* ϊ, iota with diaeresis */ + {'\300', ".."}, /* ΐ, iota with acute and diaeresis */ + {'\352', "-.-"}, /* κ, kappa */ + {'\353', ".-.."}, /* λ, lambda */ + {'\354', "--"}, /* μ, mu */ + {'\355', "-."}, /* ν, nu */ + {'\356', "-..-"}, /* ξ, xi */ + {'\357', "---"}, /* ο, omicron */ + {'\374', "---"}, /* ό, omicron with acute */ + {'\360', ".--."}, /* π, pi */ + {'\361', ".-."}, /* ρ, rho */ + {'\363', "..."}, /* σ, sigma */ + {'\362', "..."}, /* ς, final sigma */ + {'\364', "-"}, /* τ, tau */ + {'\365', "-.--"}, /* υ, upsilon */ + {'\375', "-.--"}, /* ύ, upsilon with acute */ + {'\373', "-.--"}, /* ϋ, upsilon and diaeresis */ + {'\340', "-.--"}, /* ΰ, upsilon with acute and diaeresis */ + {'\366', "..-."}, /* φ, phi */ + {'\367', "----"}, /* χ, chi */ + {'\370', "--.-"}, /* ψ, psi */ + {'\371', ".--"}, /* ω, omega */ + {'\376', ".--"}, /* ώ, omega with acute */ {'\0', ""} }; +/* + * Code-points for the Cyrillic alphabet in KOI8-R encoding. + * UTF-8 encoded chars in the comments. + */ static const struct morsetab koi8rtab[] = { - /* - * The Cyrillic alphabet; you'll need a KOI8-R font in order - * to see the actual characters - */ - {'', ".-"}, /* a */ - {'', "-..."}, /* be */ - {'', ".--"}, /* ve */ - {'', "--."}, /* ge */ - {'', "-.."}, /* de */ - {'', "."}, /* ye */ - {'', "."}, /* yo, the same as ye */ - {'', "...-"}, /* she */ - {'', "--.."}, /* ze */ - {'', ".."}, /* i */ - {'', ".---"}, /* i kratkoye */ - {'', "-.-"}, /* ka */ - {'', ".-.."}, /* el */ - {'', "--"}, /* em */ - {'', "-."}, /* en */ - {'', "---"}, /* o */ - {'', ".--."}, /* pe */ - {'', ".-."}, /* er */ - {'', "..."}, /* es */ - {'', "-"}, /* te */ - {'', "..-"}, /* u */ - {'', "..-."}, /* ef */ - {'', "...."}, /* kha */ - {'', "-.-."}, /* ce */ - {'', "---."}, /* che */ - {'', "----"}, /* sha */ - {'', "--.-"}, /* shcha */ - {'', "-.--"}, /* yi */ - {'', "-..-"}, /* myakhkij znak */ - {'', "..-.."}, /* ae */ - {'', "..--"}, /* yu */ - {'', ".-.-"}, /* ya */ + {'\301', ".-"}, /* а, a */ + {'\302', "-..."}, /* б, be */ + {'\327', ".--"}, /* в, ve */ + {'\307', "--."}, /* г, ge */ + {'\304', "-.."}, /* д, de */ + {'\305', "."}, /* е, ye */ + {'\243', "."}, /* ё, yo, the same as ye */ + {'\326', "...-"}, /* ж, she */ + {'\332', "--.."}, /* з, ze */ + {'\311', ".."}, /* и, i */ + {'\312', ".---"}, /* й, i kratkoye */ + {'\313', "-.-"}, /* к, ka */ + {'\314', ".-.."}, /* л, el */ + {'\315', "--"}, /* м, em */ + {'\316', "-."}, /* н, en */ + {'\317', "---"}, /* о, o */ + {'\320', ".--."}, /* п, pe */ + {'\322', ".-."}, /* р, er */ + {'\323', "..."}, /* с, es */ + {'\324', "-"}, /* т, te */ + {'\325', "..-"}, /* у, u */ + {'\306', "..-."}, /* ф, ef */ + {'\310', "...."}, /* х, kha */ + {'\303', "-.-."}, /* ц, ce */ + {'\336', "---."}, /* ч, che */ + {'\333', "----"}, /* ш, sha */ + {'\335', "--.-"}, /* щ, shcha */ + {'\331', "-.--"}, /* ы, yi */ + {'\330', "-..-"}, /* ь, myakhkij znak */ + {'\334', "..-.."}, /* э, ae */ + {'\300', "..--"}, /* ю, yu */ + {'\321', ".-.-"}, /* я, ya */ {'\0', ""} }; From owner-svn-src-all@FreeBSD.ORG Fri May 18 18:35:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD7091065673; Fri, 18 May 2012 18:35:09 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C90F78FC17; Fri, 18 May 2012 18:35:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IIZ9MC068720; Fri, 18 May 2012 18:35:09 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IIZ9nO068718; Fri, 18 May 2012 18:35:09 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201205181835.q4IIZ9nO068718@svn.freebsd.org> From: Kirk McKusick Date: Fri, 18 May 2012 18:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235619 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 18:35:10 -0000 Author: mckusick Date: Fri May 18 18:35:09 2012 New Revision: 235619 URL: http://svn.freebsd.org/changeset/base/235619 Log: Update comment to document that the vnode free-list mutex needs to be held when updating mnt_activevnodelist and mnt_activevnodelistsize. Modified: head/sys/sys/mount.h Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Fri May 18 18:34:29 2012 (r235618) +++ head/sys/sys/mount.h Fri May 18 18:35:09 2012 (r235619) @@ -148,6 +148,7 @@ struct vfsopt { * Lock reference: * m - mountlist_mtx * i - interlock + * v - vnode freelist mutex * * Unmarked fields are considered stable as long as a ref is held. * @@ -164,8 +165,8 @@ struct mount { int mnt_ref; /* (i) Reference count */ struct vnodelst mnt_nvnodelist; /* (i) list of vnodes */ int mnt_nvnodelistsize; /* (i) # of vnodes */ - struct vnodelst mnt_activevnodelist; /* (i) list of active vnodes */ - int mnt_activevnodelistsize;/* (i) # of active vnodes */ + struct vnodelst mnt_activevnodelist; /* (v) list of active vnodes */ + int mnt_activevnodelistsize;/* (v) # of active vnodes */ int mnt_writeopcount; /* (i) write syscalls pending */ int mnt_kern_flag; /* (i) kernel only flags */ uint64_t mnt_flag; /* (i) flags shared with user */ From owner-svn-src-all@FreeBSD.ORG Fri May 18 18:51:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E83551065672; Fri, 18 May 2012 18:51:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B9AD38FC17; Fri, 18 May 2012 18:51:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IIpDaW069406; Fri, 18 May 2012 18:51:13 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IIpDI0069404; Fri, 18 May 2012 18:51:13 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205181851.q4IIpDI0069404@svn.freebsd.org> From: John Baldwin Date: Fri, 18 May 2012 18:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235620 - in stable/9/sys: i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 18:51:14 -0000 Author: jhb Date: Fri May 18 18:51:13 2012 New Revision: 235620 URL: http://svn.freebsd.org/changeset/base/235620 Log: MFC 234186 If a linker file contains at least one module, but all of the modules fail to load (the MOD_LOAD event fails) during a kldload(2), unload the linker file and fail the kldload(2) with ENOEXEC. Modified: stable/9/sys/kern/kern_linker.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/kern/kern_linker.c ============================================================================== --- stable/9/sys/kern/kern_linker.c Fri May 18 18:35:09 2012 (r235619) +++ stable/9/sys/kern/kern_linker.c Fri May 18 18:51:13 2012 (r235620) @@ -378,7 +378,7 @@ linker_load_file(const char *filename, l { linker_class_t lc; linker_file_t lf; - int foundfile, error; + int foundfile, error, modules; /* Refuse to load modules if securelevel raised */ if (prison0.pr_securelevel > 0) @@ -417,11 +417,22 @@ linker_load_file(const char *filename, l linker_file_unload(lf, LINKER_UNLOAD_FORCE); return (error); } + modules = !TAILQ_EMPTY(&lf->modules); KLD_UNLOCK(); linker_file_register_sysctls(lf); linker_file_sysinit(lf); KLD_LOCK(); lf->flags |= LINKER_FILE_LINKED; + + /* + * If all of the modules in this file failed + * to load, unload the file and return an + * error of ENOEXEC. + */ + if (modules && TAILQ_EMPTY(&lf->modules)) { + linker_file_unload(lf, LINKER_UNLOAD_FORCE); + return (ENOEXEC); + } *result = lf; return (0); } @@ -625,7 +636,7 @@ linker_file_unload(linker_file_t file, i /* * Inform any modules associated with this file that they are - * being be unloaded. + * being unloaded. */ MOD_XLOCK; for (mod = TAILQ_FIRST(&file->modules); mod; mod = next) { From owner-svn-src-all@FreeBSD.ORG Fri May 18 18:53:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 06725106564A; Fri, 18 May 2012 18:53:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CBEEC8FC08; Fri, 18 May 2012 18:53:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IIrSJO069551; Fri, 18 May 2012 18:53:28 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IIrSGj069549; Fri, 18 May 2012 18:53:28 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205181853.q4IIrSGj069549@svn.freebsd.org> From: John Baldwin Date: Fri, 18 May 2012 18:53:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235621 - in stable/8/sys: i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 18:53:29 -0000 Author: jhb Date: Fri May 18 18:53:28 2012 New Revision: 235621 URL: http://svn.freebsd.org/changeset/base/235621 Log: MFC 234186 If a linker file contains at least one module, but all of the modules fail to load (the MOD_LOAD event fails) during a kldload(2), unload the linker file and fail the kldload(2) with ENOEXEC. Modified: stable/8/sys/kern/kern_linker.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/kern/kern_linker.c ============================================================================== --- stable/8/sys/kern/kern_linker.c Fri May 18 18:51:13 2012 (r235620) +++ stable/8/sys/kern/kern_linker.c Fri May 18 18:53:28 2012 (r235621) @@ -376,7 +376,7 @@ linker_load_file(const char *filename, l { linker_class_t lc; linker_file_t lf; - int foundfile, error; + int foundfile, error, modules; /* Refuse to load modules if securelevel raised */ if (prison0.pr_securelevel > 0) @@ -415,11 +415,22 @@ linker_load_file(const char *filename, l linker_file_unload(lf, LINKER_UNLOAD_FORCE); return (error); } + modules = !TAILQ_EMPTY(&lf->modules); KLD_UNLOCK(); linker_file_register_sysctls(lf); linker_file_sysinit(lf); KLD_LOCK(); lf->flags |= LINKER_FILE_LINKED; + + /* + * If all of the modules in this file failed + * to load, unload the file and return an + * error of ENOEXEC. + */ + if (modules && TAILQ_EMPTY(&lf->modules)) { + linker_file_unload(lf, LINKER_UNLOAD_FORCE); + return (ENOEXEC); + } *result = lf; return (0); } @@ -623,7 +634,7 @@ linker_file_unload(linker_file_t file, i /* * Inform any modules associated with this file that they are - * being be unloaded. + * being unloaded. */ MOD_XLOCK; for (mod = TAILQ_FIRST(&file->modules); mod; mod = next) { From owner-svn-src-all@FreeBSD.ORG Fri May 18 18:55:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 542FE1065673; Fri, 18 May 2012 18:55:59 +0000 (UTC) (envelope-from iwasaki@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C9CA8FC19; Fri, 18 May 2012 18:55:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IItxev069718; Fri, 18 May 2012 18:55:59 GMT (envelope-from iwasaki@svn.freebsd.org) Received: (from iwasaki@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IItxs0069711; Fri, 18 May 2012 18:55:59 GMT (envelope-from iwasaki@svn.freebsd.org) Message-Id: <201205181855.q4IItxs0069711@svn.freebsd.org> From: Mitsuru IWASAKI Date: Fri, 18 May 2012 18:55:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235622 - in head/sys: i386/acpica i386/i386 i386/include kern pc98/pc98 sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 18:55:59 -0000 Author: iwasaki Date: Fri May 18 18:55:58 2012 New Revision: 235622 URL: http://svn.freebsd.org/changeset/base/235622 Log: Add SMP/i386 suspend/resume support. Most part is merged from amd64. - i386/acpica/acpi_wakecode.S Replaced with amd64 code (from realmode to paging enabling code). - i386/acpica/acpi_wakeup.c Replaced with amd64 code (except for wakeup_pagetables stuff). - i386/include/pcb.h - i386/i386/genassym.c Added PCB new members (CR0, CR2, CR4, DS, ED, FS, SS, GDT, IDT, LDT and TR) needed for suspend/resume, not for context switch. - i386/i386/swtch.s Added suspendctx() and resumectx(). Note that savectx() was not changed and used for suspending (while amd64 code uses it). BSP and AP execute the same sequence, suspendctx(), acpi_wakecode() and resumectx() for suspend/resume (in case of UP system also). - i386/i386/apic_vector.s Added cpususpend(). - i386/i386/mp_machdep.c - i386/include/smp.h Added cpususpend_handler(). - i386/include/apicvar.h - kern/subr_smp.c - sys/smp.h Added IPI_SUSPEND and suspend_cpus(). - i386/i386/initcpu.c - i386/i386/machdep.c - i386/include/md_var.h - pc98/pc98/machdep.c Moved initializecpu() declarations to md_var.h. MFC after: 3 days Modified: head/sys/i386/acpica/acpi_wakecode.S head/sys/i386/acpica/acpi_wakeup.c head/sys/i386/i386/apic_vector.s head/sys/i386/i386/genassym.c head/sys/i386/i386/initcpu.c head/sys/i386/i386/machdep.c head/sys/i386/i386/mp_machdep.c head/sys/i386/i386/swtch.s head/sys/i386/include/apicvar.h head/sys/i386/include/md_var.h head/sys/i386/include/pcb.h head/sys/i386/include/smp.h head/sys/kern/subr_smp.c head/sys/pc98/pc98/machdep.c head/sys/sys/smp.h Modified: head/sys/i386/acpica/acpi_wakecode.S ============================================================================== --- head/sys/i386/acpica/acpi_wakecode.S Fri May 18 18:53:28 2012 (r235621) +++ head/sys/i386/acpica/acpi_wakecode.S Fri May 18 18:55:58 2012 (r235622) @@ -1,6 +1,8 @@ /*- * Copyright (c) 2001 Takanori Watanabe - * Copyright (c) 2001 Mitsuru IWASAKI + * Copyright (c) 2001-2012 Mitsuru IWASAKI + * Copyright (c) 2003 Peter Wemm + * Copyright (c) 2008-2012 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,7 +30,9 @@ */ #include +#include #include +#include #include "assym.s" @@ -39,221 +43,163 @@ * Depending on the previous sleep state, we may need to initialize more * of the system (i.e., S3 suspend-to-RAM vs. S4 suspend-to-disk). */ - .align 4 - .code16 -wakeup_16: - nop - cli - cld + .data /* So we can modify it */ + + ALIGN_TEXT + .code16 +wakeup_start: /* * Set up segment registers for real mode, a small stack for * any calls we make, and clear any flags. */ - movw %cs,%ax - movw %ax,%ds - movw %ax,%ss - movw $PAGE_SIZE,%sp - pushl $0 - popfl + cli /* make sure no interrupts */ + mov %cs, %ax /* copy %cs to %ds. Remember these */ + mov %ax, %ds /* are offsets rather than selectors */ + mov %ax, %ss + movw $PAGE_SIZE, %sp + xorw %ax, %ax + pushw %ax + popfw /* To debug resume hangs, beep the speaker if the user requested. */ - cmpl $1,resume_beep - jne nobeep - movb $0xc0,%al - outb %al,$0x42 - movb $0x04,%al - outb %al,$0x42 - inb $0x61,%al - orb $0x3,%al - outb %al,$0x61 -nobeep: + testb $~0, resume_beep - wakeup_start + jz 1f + movb $0, resume_beep - wakeup_start + + /* Set PIC timer2 to beep. */ + movb $(TIMER_SEL2 | TIMER_SQWAVE | TIMER_16BIT), %al + outb %al, $TIMER_MODE + + /* Turn on speaker. */ + inb $IO_PPI, %al + orb $PIT_SPKR, %al + outb %al, $IO_PPI + + /* Set frequency. */ + movw $0x4c0, %ax + outb %al, $TIMER_CNTR2 + shrw $8, %ax + outb %al, $TIMER_CNTR2 +1: /* Re-initialize video BIOS if the reset_video tunable is set. */ - cmpl $1,reset_video - jne nobiosreset - lcall $0xc000,$3 + testb $~0, reset_video - wakeup_start + jz 1f + movb $0, reset_video - wakeup_start + lcall $0xc000, $3 + + /* When we reach here, int 0x10 should be ready. Hide cursor. */ + movb $0x01, %ah + movb $0x20, %ch + int $0x10 + + /* Re-start in case the previous BIOS call clobbers them. */ + jmp wakeup_start +1: /* - * Set up segment registers for real mode again in case the - * previous BIOS call clobbers them. + * Find relocation base and patch the gdt descript and ljmp targets */ - movw %cs,%ax - movw %ax,%ds - movw %ax,%ss -nobiosreset: - - /* Load GDT for real mode. Use 32 bit prefix for addresses >16 MB. */ - lgdtl physical_gdt - - /* Restore CR2, CR3 and CR4 */ - movl previous_cr2,%eax - movl %eax,%cr2 - movl previous_cr3,%eax - movl %eax,%cr3 - movl previous_cr4,%eax - movl %eax,%cr4 - - /* Transfer some values to protected mode with an inline stack */ -#define NVALUES 9 -#define TRANSFER_STACK32(val, idx) \ - movl val,%eax; \ - movl %eax,wakeup_32stack+(idx+1)+(idx*4) - - TRANSFER_STACK32(previous_ss, (NVALUES - 9)) - TRANSFER_STACK32(previous_fs, (NVALUES - 8)) - TRANSFER_STACK32(previous_ds, (NVALUES - 7)) - TRANSFER_STACK32(physical_gdt+2, (NVALUES - 6)) - TRANSFER_STACK32(where_to_recover, (NVALUES - 5)) - TRANSFER_STACK32(previous_idt+2, (NVALUES - 4)) - TRANSFER_STACK32(previous_ldt, (NVALUES - 3)) - TRANSFER_STACK32(previous_gdt+2, (NVALUES - 2)) - TRANSFER_STACK32(previous_tr, (NVALUES - 1)) - TRANSFER_STACK32(previous_cr0, (NVALUES - 0)) + xorl %ebx, %ebx + mov %cs, %bx + sall $4, %ebx /* %ebx is now our relocation base */ - mov physical_esp,%esi /* to be used in 32bit code */ + /* + * Load the descriptor table pointer. We'll need it when running + * in 16-bit protected mode. + */ + lgdtl bootgdtdesc - wakeup_start /* Enable protected mode */ - movl %cr0,%eax - orl $(CR0_PE),%eax - movl %eax,%cr0 + movl $CR0_PE, %eax + mov %eax, %cr0 + /* + * Now execute a far jump to turn on protected mode. This + * causes the segment registers to turn into selectors and causes + * %cs to be loaded from the gdt. + * + * The following instruction is: + * ljmpl $bootcode32 - bootgdt, $wakeup_32 - wakeup_start + * but gas cannot assemble that. And besides, we patch the targets + * in early startup and its a little clearer what we are patching. + */ wakeup_sw32: - /* Switch to protected mode by intersegmental jump */ - ljmpl $KCSEL,$0x12345678 /* Code location, to be replaced */ + .byte 0x66 /* size override to 32 bits */ + .byte 0xea /* opcode for far jump */ + .long wakeup_32 - wakeup_start /* offset in segment */ + .word bootcode32 - bootgdt /* index in gdt for 32 bit code */ /* - * Now switched to protected mode without paging enabled. - * %esi: KERNEL stack pointer (physical address) + * At this point, we are running in 32 bit legacy protected mode. */ + ALIGN_TEXT .code32 wakeup_32: - nop - /* Set up segment registers for protected mode */ - movw $KDSEL,%ax /* KDSEL to segment registers */ - movw %ax,%ds - movw %ax,%es - movw %ax,%gs - movw %ax,%ss - movw $KPSEL,%ax /* KPSEL to %fs */ - movw %ax,%fs - movl %esi,%esp /* physical address stack pointer */ - -wakeup_32stack: - /* Operands are overwritten in 16 bit code by TRANSFER_STACK32 macro */ - pushl $0xabcdef09 /* ss + dummy */ - pushl $0xabcdef08 /* fs + gs */ - pushl $0xabcdef07 /* ds + es */ - pushl $0xabcdef06 /* gdt:base (physical address) */ - pushl $0xabcdef05 /* recover address */ - pushl $0xabcdef04 /* idt:base */ - pushl $0xabcdef03 /* ldt + idt:limit */ - pushl $0xabcdef02 /* gdt:base */ - pushl $0xabcdef01 /* TR + gdt:limit */ - pushl $0xabcdef00 /* CR0 */ - - movl %esp,%ebp -#define CR0_REGISTER 0(%ebp) -#define TASK_REGISTER 4(%ebp) -#define PREVIOUS_GDT 6(%ebp) -#define PREVIOUS_LDT 12(%ebp) -#define PREVIOUS_IDT 14(%ebp) -#define RECOVER_ADDR 20(%ebp) -#define PHYSICAL_GDT_BASE 24(%ebp) -#define PREVIOUS_DS 28(%ebp) -#define PREVIOUS_ES 30(%ebp) -#define PREVIOUS_FS 32(%ebp) -#define PREVIOUS_GS 34(%ebp) -#define PREVIOUS_SS 36(%ebp) - - /* Fixup TSS type field */ -#define TSS_TYPEFIX_MASK 0xf9 - xorl %esi,%esi - movl PHYSICAL_GDT_BASE,%ebx - movw TASK_REGISTER,%si - leal (%ebx,%esi),%eax /* get TSS segment descriptor */ - andb $TSS_TYPEFIX_MASK,5(%eax) - - /* Prepare to return to sleep/wakeup code point */ - lgdtl PREVIOUS_GDT - lidtl PREVIOUS_IDT - - /* Pack values from the GDT to be loaded into segment registers. */ - movl PREVIOUS_DS,%ebx - movl PREVIOUS_FS,%ecx - movl PREVIOUS_SS,%edx - movw TASK_REGISTER,%si - shll $16,%esi - movw PREVIOUS_LDT,%si - movl RECOVER_ADDR,%edi - - /* Enable paging and etc. */ - movl CR0_REGISTER,%eax - movl %eax,%cr0 + mov $bootdata32 - bootgdt, %eax + mov %ax, %ds - /* Flush the prefetch queue */ - jmp 1f -1: jmp 1f -1: + /* Get PCB and return address. */ + movl wakeup_pcb - wakeup_start(%ebx), %esi + movl wakeup_ret - wakeup_start(%ebx), %edi + + /* Restore CR4 and CR3. */ + movl wakeup_cr4 - wakeup_start(%ebx), %eax + mov %eax, %cr4 + movl wakeup_cr3 - wakeup_start(%ebx), %eax + mov %eax, %cr3 /* - * Now we are in kernel virtual memory addressing with the following - * original register values: - * %ebx: ds + es - * %ecx: fs + gs - * %edx: ss + dummy - * %esi: LDTR + TR - * %edi: recover address - * We'll load these back into the segment registers now. + * Finally, switch to long bit mode by enabling paging. We have + * to be very careful here because all the segmentation disappears + * out from underneath us. The spec says we can depend on the + * subsequent pipelined branch to execute, but *only if* everthing + * is still identity mapped. If any mappings change, the pipeline + * will flush. */ - nop - - movl %esi,%eax /* LDTR + TR */ - lldt %ax /* load LDT register */ - shrl $16,%eax - ltr %ax /* load task register */ - - /* Restore segment registers */ - movl %ebx,%eax /* ds + es */ - movw %ax,%ds - shrl $16,%eax - movw %ax,%es - movl %ecx,%eax /* fs + gs */ - movw %ax,%fs - shrl $16,%eax - movw %ax,%gs - movl %edx,%eax /* ss */ - movw %ax,%ss + mov %cr0, %eax + orl $CR0_PG, %eax + mov %eax, %cr0 - /* Jump to acpi_restorecpu() */ + jmp 1f +1: + /* Jump to return address. */ jmp *%edi -/* used in real mode */ -physical_gdt: .word 0 - .long 0 -physical_esp: .long 0 -previous_cr2: .long 0 -previous_cr3: .long 0 -previous_cr4: .long 0 -resume_beep: .long 0 -reset_video: .long 0 + .data -/* - * Transfer from real mode to protected mode. The order of these variables - * is very important, DO NOT INSERT OR CHANGE unless you know why. - */ -previous_cr0: .long 0 -previous_tr: .word 0 -previous_gdt: .word 0 - .long 0 -previous_ldt: .word 0 -previous_idt: .word 0 - .long 0 -where_to_recover: .long 0 -previous_ds: .word 0 -previous_es: .word 0 -previous_fs: .word 0 -previous_gs: .word 0 -previous_ss: .word 0 -dummy: .word 0 +resume_beep: + .byte 0 +reset_video: + .byte 0 + + ALIGN_DATA +bootgdt: + .long 0x00000000 + .long 0x00000000 + +bootcode32: + .long 0x0000ffff + .long 0x00cf9b00 + +bootdata32: + .long 0x0000ffff + .long 0x00cf9300 +bootgdtend: + +bootgdtdesc: + .word bootgdtend - bootgdt /* Length */ + .long bootgdt - wakeup_start /* Offset plus %ds << 4 */ + + ALIGN_DATA +wakeup_cr4: + .long 0 +wakeup_cr3: + .long 0 +wakeup_pcb: + .long 0 +wakeup_ret: + .long 0 +dummy: Modified: head/sys/i386/acpica/acpi_wakeup.c ============================================================================== --- head/sys/i386/acpica/acpi_wakeup.c Fri May 18 18:53:28 2012 (r235621) +++ head/sys/i386/acpica/acpi_wakeup.c Fri May 18 18:55:58 2012 (r235622) @@ -1,6 +1,8 @@ /*- * Copyright (c) 2001 Takanori Watanabe - * Copyright (c) 2001 Mitsuru IWASAKI + * Copyright (c) 2001-2012 Mitsuru IWASAKI + * Copyright (c) 2003 Peter Wemm + * Copyright (c) 2008-2012 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,26 +31,29 @@ __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 + +#ifdef SMP +#include +#include +#include +#endif #include @@ -57,164 +62,186 @@ __FBSDID("$FreeBSD$"); #include "acpi_wakecode.h" #include "acpi_wakedata.h" -/* Make sure the code is less than one page and leave room for the stack. */ +/* Make sure the code is less than a page and leave room for the stack. */ CTASSERT(sizeof(wakecode) < PAGE_SIZE - 1024); -#ifndef _SYS_CDEFS_H_ -#error this file needs sys/cdefs.h as a prerequisite +extern int acpi_resume_beep; +extern int acpi_reset_video; + +#ifdef SMP +extern struct pcb **susppcbs; +#else +static struct pcb **susppcbs; +#endif + +static void *acpi_alloc_wakeup_handler(void); +static void acpi_stop_beep(void *); + +#ifdef SMP +static int acpi_wakeup_ap(struct acpi_softc *, int); +static void acpi_wakeup_cpus(struct acpi_softc *, const cpuset_t *); #endif -extern uint32_t acpi_resume_beep; -extern uint32_t acpi_reset_video; -extern void initializecpu(void); - -static struct region_descriptor __used saved_idt, saved_gdt; -static struct region_descriptor *p_gdt; -static uint16_t __used saved_ldt; - -static uint32_t __used r_eax, r_ebx, r_ecx, r_edx, r_ebp, r_esi, r_edi, - r_efl, r_cr0, r_cr2, r_cr3, r_cr4, ret_addr; - -static uint16_t __used r_cs, r_ds, r_es, r_fs, r_gs, r_ss, r_tr; -static uint32_t __used r_esp; - -static void acpi_printcpu(void); -static void acpi_realmodeinst(void *arg, bus_dma_segment_t *segs, - int nsegs, int error); -static void acpi_alloc_wakeup_handler(void); - -/* XXX shut gcc up */ -extern int acpi_savecpu(void); -extern int acpi_restorecpu(void); - -#ifdef __GNUCLIKE_ASM -__asm__(" \n\ - .text \n\ - .p2align 2, 0x90 \n\ - .type acpi_restorecpu, @function\n\ -acpi_restorecpu: \n\ - .align 4 \n\ - movl r_eax,%eax \n\ - movl r_ebx,%ebx \n\ - movl r_ecx,%ecx \n\ - movl r_edx,%edx \n\ - movl r_ebp,%ebp \n\ - movl r_esi,%esi \n\ - movl r_edi,%edi \n\ - movl r_esp,%esp \n\ - \n\ - pushl r_efl \n\ - popfl \n\ - \n\ - movl ret_addr,%eax \n\ - movl %eax,(%esp) \n\ - xorl %eax,%eax \n\ - ret \n\ - \n\ - .text \n\ - .p2align 2, 0x90 \n\ - .type acpi_savecpu, @function \n\ -acpi_savecpu: \n\ - movw %cs,r_cs \n\ - movw %ds,r_ds \n\ - movw %es,r_es \n\ - movw %fs,r_fs \n\ - movw %gs,r_gs \n\ - movw %ss,r_ss \n\ - \n\ - movl %eax,r_eax \n\ - movl %ebx,r_ebx \n\ - movl %ecx,r_ecx \n\ - movl %edx,r_edx \n\ - movl %ebp,r_ebp \n\ - movl %esi,r_esi \n\ - movl %edi,r_edi \n\ - \n\ - movl %cr0,%eax \n\ - movl %eax,r_cr0 \n\ - movl %cr2,%eax \n\ - movl %eax,r_cr2 \n\ - movl %cr3,%eax \n\ - movl %eax,r_cr3 \n\ - movl %cr4,%eax \n\ - movl %eax,r_cr4 \n\ - \n\ - pushfl \n\ - popl r_efl \n\ - \n\ - movl %esp,r_esp \n\ - \n\ - sgdt saved_gdt \n\ - sidt saved_idt \n\ - sldt saved_ldt \n\ - str r_tr \n\ - \n\ - movl (%esp),%eax \n\ - movl %eax,ret_addr \n\ - movl $1,%eax \n\ - ret \n\ -"); -#endif /* __GNUCLIKE_ASM */ +#define ACPI_PAGETABLES 0 +#define WAKECODE_VADDR(sc) ((sc)->acpi_wakeaddr + (ACPI_PAGETABLES * PAGE_SIZE)) +#define WAKECODE_PADDR(sc) ((sc)->acpi_wakephys + (ACPI_PAGETABLES * PAGE_SIZE)) +#define WAKECODE_FIXUP(offset, type, val) do { \ + type *addr; \ + addr = (type *)(WAKECODE_VADDR(sc) + offset); \ + *addr = val; \ +} while (0) static void -acpi_printcpu(void) +acpi_stop_beep(void *arg) { - printf("======== acpi_printcpu() debug dump ========\n"); - printf("gdt[%04x:%08x] idt[%04x:%08x] ldt[%04x] tr[%04x] efl[%08x]\n", - saved_gdt.rd_limit, saved_gdt.rd_base, - saved_idt.rd_limit, saved_idt.rd_base, - saved_ldt, r_tr, r_efl); - printf("eax[%08x] ebx[%08x] ecx[%08x] edx[%08x]\n", - r_eax, r_ebx, r_ecx, r_edx); - printf("esi[%08x] edi[%08x] ebp[%08x] esp[%08x]\n", - r_esi, r_edi, r_ebp, r_esp); - printf("cr0[%08x] cr2[%08x] cr3[%08x] cr4[%08x]\n", - r_cr0, r_cr2, r_cr3, r_cr4); - printf("cs[%04x] ds[%04x] es[%04x] fs[%04x] gs[%04x] ss[%04x]\n", - r_cs, r_ds, r_es, r_fs, r_gs, r_ss); + + if (acpi_resume_beep != 0) + timer_spkr_release(); } -#define WAKECODE_FIXUP(offset, type, val) do { \ - type *addr; \ - addr = (type *)(sc->acpi_wakeaddr + offset); \ - *addr = val; \ -} while (0) +#ifdef SMP +static int +acpi_wakeup_ap(struct acpi_softc *sc, int cpu) +{ + int vector = (WAKECODE_PADDR(sc) >> 12) & 0xff; + int apic_id = cpu_apic_ids[cpu]; + int ms; + + WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[cpu]); + + /* do an INIT IPI: assert RESET */ + lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | + APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_INIT, apic_id); + + /* wait for pending status end */ + lapic_ipi_wait(-1); + + /* do an INIT IPI: deassert RESET */ + lapic_ipi_raw(APIC_DEST_ALLESELF | APIC_TRIGMOD_LEVEL | + APIC_LEVEL_DEASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_INIT, 0); + + /* wait for pending status end */ + DELAY(10000); /* wait ~10mS */ + lapic_ipi_wait(-1); -#define WAKECODE_BCOPY(offset, type, val) do { \ - void *addr; \ - addr = (void *)(sc->acpi_wakeaddr + offset); \ - bcopy(&(val), addr, sizeof(type)); \ -} while (0) + /* + * next we do a STARTUP IPI: the previous INIT IPI might still be + * latched, (P5 bug) this 1st STARTUP would then terminate + * immediately, and the previously started INIT IPI would continue. OR + * the previous INIT IPI has already run. and this STARTUP IPI will + * run. OR the previous INIT IPI was ignored. and this STARTUP IPI + * will run. + */ + + /* do a STARTUP IPI */ + lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | + APIC_LEVEL_DEASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP | + vector, apic_id); + lapic_ipi_wait(-1); + DELAY(200); /* wait ~200uS */ + + /* + * finally we do a 2nd STARTUP IPI: this 2nd STARTUP IPI should run IF + * the previous STARTUP IPI was cancelled by a latched INIT IPI. OR + * this STARTUP IPI will be ignored, as only ONE STARTUP IPI is + * recognized after hardware RESET or INIT IPI. + */ + + lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | + APIC_LEVEL_DEASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP | + vector, apic_id); + lapic_ipi_wait(-1); + DELAY(200); /* wait ~200uS */ + + /* Wait up to 5 seconds for it to start. */ + for (ms = 0; ms < 5000; ms++) { + if (susppcbs[cpu]->pcb_eip == 0) + return (1); /* return SUCCESS */ + DELAY(1000); + } + return (0); /* return FAILURE */ +} + +#define WARMBOOT_TARGET 0 +#define WARMBOOT_OFF (KERNBASE + 0x0467) +#define WARMBOOT_SEG (KERNBASE + 0x0469) + +#define CMOS_REG (0x70) +#define CMOS_DATA (0x71) +#define BIOS_RESET (0x0f) +#define BIOS_WARM (0x0a) -/* Turn off bits 1&2 of the PIT, stopping the beep. */ static void -acpi_stop_beep(void *arg) +acpi_wakeup_cpus(struct acpi_softc *sc, const cpuset_t *wakeup_cpus) { - outb(0x61, inb(0x61) & ~0x3); + uint32_t mpbioswarmvec; + int cpu; + u_char mpbiosreason; + + /* save the current value of the warm-start vector */ + mpbioswarmvec = *((uint32_t *)WARMBOOT_OFF); + outb(CMOS_REG, BIOS_RESET); + mpbiosreason = inb(CMOS_DATA); + + /* setup a vector to our boot code */ + *((volatile u_short *)WARMBOOT_OFF) = WARMBOOT_TARGET; + *((volatile u_short *)WARMBOOT_SEG) = WAKECODE_PADDR(sc) >> 4; + outb(CMOS_REG, BIOS_RESET); + outb(CMOS_DATA, BIOS_WARM); /* 'warm-start' */ + + /* Wake up each AP. */ + for (cpu = 1; cpu < mp_ncpus; cpu++) { + if (!CPU_ISSET(cpu, wakeup_cpus)) + continue; + if (acpi_wakeup_ap(sc, cpu) == 0) { + /* restore the warmstart vector */ + *(uint32_t *)WARMBOOT_OFF = mpbioswarmvec; + panic("acpi_wakeup: failed to resume AP #%d (PHY #%d)", + cpu, cpu_apic_ids[cpu]); + } + } + + /* restore the warmstart vector */ + *(uint32_t *)WARMBOOT_OFF = mpbioswarmvec; + + outb(CMOS_REG, BIOS_RESET); + outb(CMOS_DATA, mpbiosreason); } +#endif int acpi_sleep_machdep(struct acpi_softc *sc, int state) { - ACPI_STATUS status; - struct pmap *pm; - int ret; - uint32_t cr3; - u_long ef; +#ifdef SMP + cpuset_t wakeup_cpus; +#endif + register_t cr3, rf; + ACPI_STATUS status; + struct pmap *pm; + int ret; ret = -1; - if (sc->acpi_wakeaddr == 0) + + if (sc->acpi_wakeaddr == 0ul) return (ret); - AcpiSetFirmwareWakingVector(sc->acpi_wakephys); +#ifdef SMP + wakeup_cpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &wakeup_cpus); +#endif + + if (acpi_resume_beep != 0) + timer_spkr_acquire(); - ef = intr_disable(); + AcpiSetFirmwareWakingVector(WAKECODE_PADDR(sc)); + + rf = intr_disable(); intr_suspend(); /* - * Temporarily switch to the kernel pmap because it provides an - * identity mapping (setup at boot) for the low physical memory - * region containing the wakeup code. + * Temporarily switch to the kernel pmap because it provides + * an identity mapping (setup at boot) for the low physical + * memory region containing the wakeup code. */ pm = kernel_pmap; cr3 = rcr3(); @@ -224,39 +251,22 @@ acpi_sleep_machdep(struct acpi_softc *sc load_cr3(vtophys(pm->pm_pdir)); #endif - ret_addr = 0; - if (acpi_savecpu()) { - /* Execute Sleep */ - - p_gdt = (struct region_descriptor *) - (sc->acpi_wakeaddr + physical_gdt); - p_gdt->rd_limit = saved_gdt.rd_limit; - p_gdt->rd_base = vtophys(saved_gdt.rd_base); - - WAKECODE_FIXUP(physical_esp, uint32_t, vtophys(r_esp)); - WAKECODE_FIXUP(previous_cr0, uint32_t, r_cr0); - WAKECODE_FIXUP(previous_cr2, uint32_t, r_cr2); - WAKECODE_FIXUP(previous_cr3, uint32_t, r_cr3); - WAKECODE_FIXUP(previous_cr4, uint32_t, r_cr4); - - WAKECODE_FIXUP(resume_beep, uint32_t, acpi_resume_beep); - WAKECODE_FIXUP(reset_video, uint32_t, acpi_reset_video); - - WAKECODE_FIXUP(previous_tr, uint16_t, r_tr); - WAKECODE_BCOPY(previous_gdt, struct region_descriptor, saved_gdt); - WAKECODE_FIXUP(previous_ldt, uint16_t, saved_ldt); - WAKECODE_BCOPY(previous_idt, struct region_descriptor, saved_idt); - - WAKECODE_FIXUP(where_to_recover, void *, acpi_restorecpu); - - WAKECODE_FIXUP(previous_ds, uint16_t, r_ds); - WAKECODE_FIXUP(previous_es, uint16_t, r_es); - WAKECODE_FIXUP(previous_fs, uint16_t, r_fs); - WAKECODE_FIXUP(previous_gs, uint16_t, r_gs); - WAKECODE_FIXUP(previous_ss, uint16_t, r_ss); + if (suspendctx(susppcbs[0])) { +#ifdef SMP + if (!CPU_EMPTY(&wakeup_cpus) && + suspend_cpus(wakeup_cpus) == 0) { + device_printf(sc->acpi_dev, "Failed to suspend APs\n"); + goto out; + } +#endif + + WAKECODE_FIXUP(resume_beep, uint8_t, (acpi_resume_beep != 0)); + WAKECODE_FIXUP(reset_video, uint8_t, (acpi_reset_video != 0)); + + WAKECODE_FIXUP(wakeup_cr4, register_t, susppcbs[0]->pcb_cr4); + WAKECODE_FIXUP(wakeup_cr3, register_t, susppcbs[0]->pcb_cr3); - if (bootverbose) - acpi_printcpu(); + WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[0]); /* Call ACPICA to enter the desired sleep state */ if (state == ACPI_STATE_S4 && sc->acpi_s4bios) @@ -266,8 +276,8 @@ acpi_sleep_machdep(struct acpi_softc *sc if (status != AE_OK) { device_printf(sc->acpi_dev, - "AcpiEnterSleepState failed - %s\n", - AcpiFormatException(status)); + "AcpiEnterSleepState failed - %s\n", + AcpiFormatException(status)); goto out; } @@ -275,97 +285,96 @@ acpi_sleep_machdep(struct acpi_softc *sc ia32_pause(); } else { pmap_init_pat(); + initializecpu(); PCPU_SET(switchtime, 0); PCPU_SET(switchticks, ticks); - if (bootverbose) { - acpi_savecpu(); - acpi_printcpu(); - } +#ifdef SMP + if (!CPU_EMPTY(&wakeup_cpus)) + acpi_wakeup_cpus(sc, &wakeup_cpus); +#endif ret = 0; } out: +#ifdef SMP + if (!CPU_EMPTY(&wakeup_cpus)) + restart_cpus(wakeup_cpus); +#endif + load_cr3(cr3); mca_resume(); intr_resume(); - intr_restore(ef); + intr_restore(rf); + + AcpiSetFirmwareWakingVector(0); if (ret == 0 && mem_range_softc.mr_op != NULL && mem_range_softc.mr_op->reinit != NULL) mem_range_softc.mr_op->reinit(&mem_range_softc); - /* If we beeped, turn it off after a delay. */ - if (acpi_resume_beep) - timeout(acpi_stop_beep, NULL, 3 * hz); - return (ret); } -static bus_dma_tag_t acpi_waketag; -static bus_dmamap_t acpi_wakemap; -static vm_offset_t acpi_wakeaddr; - -static void +static void * acpi_alloc_wakeup_handler(void) { - void *wakeaddr; - - if (!cold) - return; + void *wakeaddr; + int i; /* * Specify the region for our wakeup code. We want it in the low 1 MB - * region, excluding video memory and above (0xa0000). We ask for - * it to be page-aligned, just to be safe. + * region, excluding real mode IVT (0-0x3ff), BDA (0x400-0x4ff), EBDA + * (less than 128KB, below 0xa0000, must be excluded by SMAP and DSDT), + * and ROM area (0xa0000 and above). The temporary page tables must be + * page-aligned. */ - if (bus_dma_tag_create(/*parent*/ NULL, - /*alignment*/ PAGE_SIZE, /*no boundary*/ 0, - /*lowaddr*/ 0x9ffff, /*highaddr*/ BUS_SPACE_MAXADDR, NULL, NULL, - /*maxsize*/ PAGE_SIZE, /*segments*/ 1, /*maxsegsize*/ PAGE_SIZE, - 0, busdma_lock_mutex, &Giant, &acpi_waketag) != 0) { - printf("acpi_alloc_wakeup_handler: can't create wake tag\n"); - return; + wakeaddr = contigmalloc((ACPI_PAGETABLES + 1) * PAGE_SIZE, M_DEVBUF, + M_NOWAIT, 0x500, 0xa0000, PAGE_SIZE, 0ul); + if (wakeaddr == NULL) { + printf("%s: can't alloc wake memory\n", __func__); + return (NULL); } - if (bus_dmamem_alloc(acpi_waketag, &wakeaddr, BUS_DMA_NOWAIT, - &acpi_wakemap) != 0) { - printf("acpi_alloc_wakeup_handler: can't alloc wake memory\n"); - return; + if (EVENTHANDLER_REGISTER(power_resume, acpi_stop_beep, NULL, + EVENTHANDLER_PRI_LAST) == NULL) { + printf("%s: can't register event handler\n", __func__); + contigfree(wakeaddr, (ACPI_PAGETABLES + 1) * PAGE_SIZE, M_DEVBUF); + return (NULL); } - acpi_wakeaddr = (vm_offset_t)wakeaddr; -} - -SYSINIT(acpiwakeup, SI_SUB_KMEM, SI_ORDER_ANY, acpi_alloc_wakeup_handler, 0); - -static void -acpi_realmodeinst(void *arg, bus_dma_segment_t *segs, int nsegs, int error) -{ - struct acpi_softc *sc; - uint32_t *addr; - - /* Overwrite the ljmp target with the real address */ - sc = arg; - sc->acpi_wakephys = segs[0].ds_addr; - addr = (uint32_t *)&wakecode[wakeup_sw32 + 2]; - *addr = sc->acpi_wakephys + wakeup_32; - - /* Copy the wake code into our low page and save its physical addr. */ - bcopy(wakecode, (void *)sc->acpi_wakeaddr, sizeof(wakecode)); - if (bootverbose) { - device_printf(sc->acpi_dev, "wakeup code va %#x pa %#jx\n", - acpi_wakeaddr, (uintmax_t)sc->acpi_wakephys); + susppcbs = malloc(mp_ncpus * sizeof(*susppcbs), M_DEVBUF, M_WAITOK); + for (i = 0; i < mp_ncpus; i++) { + susppcbs[i] = malloc(sizeof(**susppcbs), M_DEVBUF, M_WAITOK); } + + return (wakeaddr); } void acpi_install_wakeup_handler(struct acpi_softc *sc) { - if (acpi_wakeaddr == 0) + static void *wakeaddr = NULL; + + if (wakeaddr != NULL) return; - sc->acpi_waketag = acpi_waketag; - sc->acpi_wakeaddr = acpi_wakeaddr; - sc->acpi_wakemap = acpi_wakemap; + wakeaddr = acpi_alloc_wakeup_handler(); + if (wakeaddr == NULL) + return; + + sc->acpi_wakeaddr = (vm_offset_t)wakeaddr; + sc->acpi_wakephys = vtophys(wakeaddr); + + bcopy(wakecode, (void *)WAKECODE_VADDR(sc), sizeof(wakecode)); - bus_dmamap_load(sc->acpi_waketag, sc->acpi_wakemap, - (void *)sc->acpi_wakeaddr, PAGE_SIZE, acpi_realmodeinst, sc, 0); + /* Patch GDT base address, ljmp target. */ + WAKECODE_FIXUP((bootgdtdesc + 2), uint32_t, + WAKECODE_PADDR(sc) + bootgdt); + WAKECODE_FIXUP((wakeup_sw32 + 2), uint32_t, + WAKECODE_PADDR(sc) + wakeup_32); + + /* Save pointers to some global data. */ + WAKECODE_FIXUP(wakeup_ret, void *, resumectx); + + if (bootverbose) + device_printf(sc->acpi_dev, "wakeup code va %p pa %p\n", + (void *)sc->acpi_wakeaddr, (void *)sc->acpi_wakephys); } Modified: head/sys/i386/i386/apic_vector.s ============================================================================== --- head/sys/i386/i386/apic_vector.s Fri May 18 18:53:28 2012 (r235621) +++ head/sys/i386/i386/apic_vector.s Fri May 18 18:55:58 2012 (r235622) @@ -334,6 +334,24 @@ IDTVEC(cpustop) iret /* + * Executed by a CPU when it receives an IPI_SUSPEND from another CPU. + */ + .text + SUPERALIGN_TEXT +IDTVEC(cpususpend) + PUSH_FRAME + SET_KERNEL_SREGS + cld + + movl lapic, %eax + movl $0, LA_EOI(%eax) /* End Of Interrupt to APIC */ + + call cpususpend_handler + + POP_FRAME + jmp doreti_iret + +/* * Executed by a CPU when it receives a RENDEZVOUS IPI from another CPU. * * - Calls the generic rendezvous action function. Modified: head/sys/i386/i386/genassym.c ============================================================================== --- head/sys/i386/i386/genassym.c Fri May 18 18:53:28 2012 (r235621) +++ head/sys/i386/i386/genassym.c Fri May 18 18:55:58 2012 (r235622) @@ -121,7 +121,10 @@ ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADD ASSYM(KERNBASE, KERNBASE); ASSYM(KERNLOAD, KERNLOAD); ASSYM(MCLBYTES, MCLBYTES); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri May 18 19:02:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3EBE1065692; Fri, 18 May 2012 19:02:40 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC4618FC0C; Fri, 18 May 2012 19:02:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IJ2etN070509; Fri, 18 May 2012 19:02:40 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IJ2ecZ070498; Fri, 18 May 2012 19:02:40 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201205181902.q4IJ2ecZ070498@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 18 May 2012 19:02:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235623 - in head/contrib/gcc: . config/rs6000 config/sparc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 19:02:40 -0000 Author: pfg Date: Fri May 18 19:02:39 2012 New Revision: 235623 URL: http://svn.freebsd.org/changeset/base/235623 Log: Bring in a subset of gcc fixes that were back ported to the GCC 4.1 branch and are available under GPLv2. 2007-11-07 Eric Botcazou PR rtl-optimization/33822 * rtl.h (REG_OFFSET): Fix comment. * var-tracking.c (INT_MEM_OFFSET): New macro. (var_mem_set): Use it. (var_mem_delete_and_set): Likewise. (var_mem_delete): Likewise. (vt_get_decl_and_offset): Likewise. (offset_valid_for_tracked_p): New predicate. (count_uses): Do not track locations with invalid offsets. (add_uses): Likewise. (add_stores): Likewise. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129972 2007-11-16 Richard Guenther PR middle-end/34030 * fold-const.c (fold_binary): Use correct types for folding 1 << X & Y to Y >> X & 1. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130242 2008-01-14 Eric Botcazou PR rtl-optimization/31944 * cse.c (remove_pseudo_from_table): New function. (merge_equiv_classes): Use above function to remove pseudo-registers. (invalidate): Likewise http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131524 2008-01-24 Kaveh R. Ghazi Backport: 2007-11-07 Kenneth Zadeck PR middle-end/33826 * ipa-pure-const (static_execute): Added code to keep recursive functions from being marked as pure or const. * ipa-utils (searchc): Fixed comment. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131807 2008-02-01 Kaveh R. Ghazi Backport: 2007-08-02 Nathan Froyd PR middle-end/25445 * varasm.c (default_binds_local_p_1): Consult flag_whole_program if we are compiling with -fPIC. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132061 2008-02-04 Richard Guenther PR middle-end/33631 * expr.c (count_type_elements): Give for unions instead of guessing. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132101 2008-02-14 Alan Modra PR target/34393 * config/rs6000/rs6000.md (restore_stack_block): Force operands[1] to a reg. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132309 2008-03-25 Richard Guenther Backport from mainline: 2008-02-12 Richard Guenther PR middle-end/35163 * fold-const.c (fold_widened_comparison): Use get_unwidened in value-preserving mode. Disallow final truncation. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133509 2008-11-30 Eric Botcazou PR target/38287 * config/sparc/sparc.md (divsi3 expander): Remove constraints. (divsi3_sp32): Add new alternative with 'K' for operand #2. (cmp_sdiv_cc_set): Factor common string. (udivsi3_sp32): Add new alternative with 'K' for operand #2. Add TARGET_V9 case. (cmp_udiv_cc_set): Factor common string. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142298 Reviewed by: mm Approved by: jhb (mentor) MFC after: 1 week Modified: head/contrib/gcc/config/rs6000/rs6000.md head/contrib/gcc/config/sparc/sparc.md head/contrib/gcc/cse.c head/contrib/gcc/expr.c head/contrib/gcc/fold-const.c head/contrib/gcc/ipa-pure-const.c head/contrib/gcc/ipa-utils.c head/contrib/gcc/rtl.h head/contrib/gcc/var-tracking.c head/contrib/gcc/varasm.c Modified: head/contrib/gcc/config/rs6000/rs6000.md ============================================================================== --- head/contrib/gcc/config/rs6000/rs6000.md Fri May 18 18:55:58 2012 (r235622) +++ head/contrib/gcc/config/rs6000/rs6000.md Fri May 18 19:02:39 2012 (r235623) @@ -10075,6 +10075,7 @@ "" " { + operands[1] = force_reg (Pmode, operands[1]); operands[2] = gen_reg_rtx (Pmode); operands[3] = gen_frame_mem (Pmode, operands[0]); operands[4] = gen_frame_mem (Pmode, operands[1]); Modified: head/contrib/gcc/config/sparc/sparc.md ============================================================================== --- head/contrib/gcc/config/sparc/sparc.md Fri May 18 18:55:58 2012 (r235622) +++ head/contrib/gcc/config/sparc/sparc.md Fri May 18 19:02:39 2012 (r235623) @@ -5071,14 +5071,11 @@ [(set_attr "type" "multi") (set_attr "length" "2")]) -;; The V8 architecture specifies that there must be 3 instructions between -;; a Y register write and a use of it for correct results. - (define_expand "divsi3" - [(parallel [(set (match_operand:SI 0 "register_operand" "=r,r") - (div:SI (match_operand:SI 1 "register_operand" "r,r") - (match_operand:SI 2 "input_operand" "rI,m"))) - (clobber (match_scratch:SI 3 "=&r,&r"))])] + [(parallel [(set (match_operand:SI 0 "register_operand" "") + (div:SI (match_operand:SI 1 "register_operand" "") + (match_operand:SI 2 "input_operand" ""))) + (clobber (match_scratch:SI 3 ""))])] "TARGET_V8 || TARGET_DEPRECATED_V8_INSNS" { if (TARGET_ARCH64) @@ -5091,24 +5088,40 @@ } }) +;; The V8 architecture specifies that there must be at least 3 instructions +;; between a write to the Y register and a use of it for correct results. +;; We try to fill one of them with a simple constant or a memory load. + (define_insn "divsi3_sp32" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (div:SI (match_operand:SI 1 "register_operand" "r,r") - (match_operand:SI 2 "input_operand" "rI,m"))) - (clobber (match_scratch:SI 3 "=&r,&r"))] - "(TARGET_V8 || TARGET_DEPRECATED_V8_INSNS) - && TARGET_ARCH32" -{ - if (which_alternative == 0) - if (TARGET_V9) - return "sra\t%1, 31, %3\n\twr\t%3, 0, %%y\n\tsdiv\t%1, %2, %0"; - else - return "sra\t%1, 31, %3\n\twr\t%3, 0, %%y\n\tnop\n\tnop\n\tnop\n\tsdiv\t%1, %2, %0"; - else - if (TARGET_V9) - return "sra\t%1, 31, %3\n\twr\t%3, 0, %%y\n\tld\t%2, %3\n\tsdiv\t%1, %3, %0"; - else - return "sra\t%1, 31, %3\n\twr\t%3, 0, %%y\n\tld\t%2, %3\n\tnop\n\tnop\n\tsdiv\t%1, %3, %0"; + [(set (match_operand:SI 0 "register_operand" "=r,r,r") + (div:SI (match_operand:SI 1 "register_operand" "r,r,r") + (match_operand:SI 2 "input_operand" "rI,K,m"))) + (clobber (match_scratch:SI 3 "=&r,&r,&r"))] + "(TARGET_V8 || TARGET_DEPRECATED_V8_INSNS) && TARGET_ARCH32" +{ + output_asm_insn ("sra\t%1, 31, %3", operands); + output_asm_insn ("wr\t%3, 0, %%y", operands); + + switch (which_alternative) + { + case 0: + if (TARGET_V9) + return "sdiv\t%1, %2, %0"; + else + return "nop\n\tnop\n\tnop\n\tsdiv\t%1, %2, %0"; + case 1: + if (TARGET_V9) + return "sethi\t%%hi(%a2), %3\n\tsdiv\t%1, %3, %0"; + else + return "sethi\t%%hi(%a2), %3\n\tnop\n\tnop\n\tsdiv\t%1, %3, %0"; + case 2: + if (TARGET_V9) + return "ld\t%2, %3\n\tsdiv\t%1, %3, %0"; + else + return "ld\t%2, %3\n\tnop\n\tnop\n\tsdiv\t%1, %3, %0"; + default: + gcc_unreachable (); + } } [(set_attr "type" "multi") (set (attr "length") @@ -5143,10 +5156,13 @@ (clobber (match_scratch:SI 3 "=&r"))] "TARGET_V8 || TARGET_DEPRECATED_V8_INSNS" { + output_asm_insn ("sra\t%1, 31, %3", operands); + output_asm_insn ("wr\t%3, 0, %%y", operands); + if (TARGET_V9) - return "sra\t%1, 31, %3\n\twr\t%3, 0, %%y\n\tsdivcc\t%1, %2, %0"; + return "sdivcc\t%1, %2, %0"; else - return "sra\t%1, 31, %3\n\twr\t%3, 0, %%y\n\tnop\n\tnop\n\tnop\n\tsdivcc\t%1, %2, %0"; + return "nop\n\tnop\n\tnop\n\tsdivcc\t%1, %2, %0"; } [(set_attr "type" "multi") (set (attr "length") @@ -5161,29 +5177,48 @@ "TARGET_V8 || TARGET_DEPRECATED_V8_INSNS" "") -;; The V8 architecture specifies that there must be 3 instructions between -;; a Y register write and a use of it for correct results. +;; The V8 architecture specifies that there must be at least 3 instructions +;; between a write to the Y register and a use of it for correct results. +;; We try to fill one of them with a simple constant or a memory load. (define_insn "udivsi3_sp32" - [(set (match_operand:SI 0 "register_operand" "=r,&r,&r") - (udiv:SI (match_operand:SI 1 "nonimmediate_operand" "r,r,m") - (match_operand:SI 2 "input_operand" "rI,m,r")))] - "(TARGET_V8 || TARGET_DEPRECATED_V8_INSNS) - && TARGET_ARCH32" + [(set (match_operand:SI 0 "register_operand" "=r,&r,&r,&r") + (udiv:SI (match_operand:SI 1 "nonimmediate_operand" "r,r,r,m") + (match_operand:SI 2 "input_operand" "rI,K,m,r")))] + "(TARGET_V8 || TARGET_DEPRECATED_V8_INSNS) && TARGET_ARCH32" { - output_asm_insn ("wr\t%%g0, %%g0, %%y", operands); + output_asm_insn ("wr\t%%g0, 0, %%y", operands); + switch (which_alternative) { - default: - return "nop\n\tnop\n\tnop\n\tudiv\t%1, %2, %0"; + case 0: + if (TARGET_V9) + return "udiv\t%1, %2, %0"; + else + return "nop\n\tnop\n\tnop\n\tudiv\t%1, %2, %0"; case 1: - return "ld\t%2, %0\n\tnop\n\tnop\n\tudiv\t%1, %0, %0"; + if (TARGET_V9) + return "sethi\t%%hi(%a2), %0\n\tudiv\t%1, %0, %0"; + else + return "sethi\t%%hi(%a2), %0\n\tnop\n\tnop\n\tudiv\t%1, %0, %0"; case 2: - return "ld\t%1, %0\n\tnop\n\tnop\n\tudiv\t%0, %2, %0"; + if (TARGET_V9) + return "ld\t%2, %0\n\tudiv\t%1, %0, %0"; + else + return "ld\t%2, %0\n\tnop\n\tnop\n\tudiv\t%1, %0, %0"; + case 3: + if (TARGET_V9) + return "ld\t%1, %0\n\tudiv\t%0, %2, %0"; + else + return "ld\t%1, %0\n\tnop\n\tnop\n\tudiv\t%0, %2, %0"; + default: + gcc_unreachable (); } } [(set_attr "type" "multi") - (set_attr "length" "5")]) + (set (attr "length") + (if_then_else (eq_attr "isa" "v9") + (const_int 3) (const_int 5)))]) (define_insn "udivsi3_sp64" [(set (match_operand:SI 0 "register_operand" "=r") @@ -5209,13 +5244,14 @@ (const_int 0))) (set (match_operand:SI 0 "register_operand" "=r") (udiv:SI (match_dup 1) (match_dup 2)))] - "TARGET_V8 - || TARGET_DEPRECATED_V8_INSNS" + "TARGET_V8 || TARGET_DEPRECATED_V8_INSNS" { + output_asm_insn ("wr\t%%g0, 0, %%y", operands); + if (TARGET_V9) - return "wr\t%%g0, %%g0, %%y\n\tudivcc\t%1, %2, %0"; + return "udivcc\t%1, %2, %0"; else - return "wr\t%%g0, %%g0, %%y\n\tnop\n\tnop\n\tnop\n\tudivcc\t%1, %2, %0"; + return "nop\n\tnop\n\tnop\n\tudivcc\t%1, %2, %0"; } [(set_attr "type" "multi") (set (attr "length") Modified: head/contrib/gcc/cse.c ============================================================================== --- head/contrib/gcc/cse.c Fri May 18 18:55:58 2012 (r235622) +++ head/contrib/gcc/cse.c Fri May 18 19:02:39 2012 (r235623) @@ -583,7 +583,8 @@ static void delete_reg_equiv (unsigned i static int mention_regs (rtx); static int insert_regs (rtx, struct table_elt *, int); static void remove_from_table (struct table_elt *, unsigned); -static struct table_elt *lookup (rtx, unsigned, enum machine_mode); +static void remove_pseudo_from_table (rtx, unsigned); +static struct table_elt *lookup (rtx, unsigned, enum machine_mode); static struct table_elt *lookup_for_remove (rtx, unsigned, enum machine_mode); static rtx lookup_as_function (rtx, enum rtx_code); static struct table_elt *insert (rtx, struct table_elt *, unsigned, @@ -1381,6 +1382,19 @@ remove_from_table (struct table_elt *elt table_size--; } +/* Same as above, but X is a pseudo-register. */ + +static void +remove_pseudo_from_table (rtx x, unsigned int hash) +{ + struct table_elt *elt; + + /* Because a pseudo-register can be referenced in more than one + mode, we might have to remove more than one table entry. */ + while ((elt = lookup_for_remove (x, hash, VOIDmode))) + remove_from_table (elt, hash); +} + /* Look up X in the hash table and return its table element, or 0 if X is not in the table. @@ -1707,7 +1721,10 @@ merge_equiv_classes (struct table_elt *c delete_reg_equiv (REGNO (exp)); } - remove_from_table (elt, hash); + if (REG_P (exp) && REGNO (exp) >= FIRST_PSEUDO_REGISTER) + remove_pseudo_from_table (exp, hash); + else + remove_from_table (elt, hash); if (insert_regs (exp, class1, 0) || need_rehash) { @@ -1803,14 +1820,7 @@ invalidate (rtx x, enum machine_mode ful SUBREG_TICKED (regno) = -1; if (regno >= FIRST_PSEUDO_REGISTER) - { - /* Because a register can be referenced in more than one mode, - we might have to remove more than one table entry. */ - struct table_elt *elt; - - while ((elt = lookup_for_remove (x, hash, GET_MODE (x)))) - remove_from_table (elt, hash); - } + remove_pseudo_from_table (x, hash); else { HOST_WIDE_INT in_table Modified: head/contrib/gcc/expr.c ============================================================================== --- head/contrib/gcc/expr.c Fri May 18 18:55:58 2012 (r235622) +++ head/contrib/gcc/expr.c Fri May 18 19:02:39 2012 (r235623) @@ -4750,14 +4750,7 @@ count_type_elements (tree type, bool all case UNION_TYPE: case QUAL_UNION_TYPE: - { - /* Ho hum. How in the world do we guess here? Clearly it isn't - right to count the fields. Guess based on the number of words. */ - HOST_WIDE_INT n = int_size_in_bytes (type); - if (n < 0) - return -1; - return n / UNITS_PER_WORD; - } + return -1; case COMPLEX_TYPE: return 2; Modified: head/contrib/gcc/fold-const.c ============================================================================== --- head/contrib/gcc/fold-const.c Fri May 18 18:55:58 2012 (r235622) +++ head/contrib/gcc/fold-const.c Fri May 18 19:02:39 2012 (r235623) @@ -6657,12 +6657,14 @@ fold_widened_comparison (enum tree_code if (TYPE_PRECISION (TREE_TYPE (arg0)) <= TYPE_PRECISION (shorter_type)) return NULL_TREE; - arg1_unw = get_unwidened (arg1, shorter_type); + arg1_unw = get_unwidened (arg1, NULL_TREE); /* If possible, express the comparison in the shorter mode. */ if ((code == EQ_EXPR || code == NE_EXPR || TYPE_UNSIGNED (TREE_TYPE (arg0)) == TYPE_UNSIGNED (shorter_type)) && (TREE_TYPE (arg1_unw) == shorter_type + || (TYPE_PRECISION (shorter_type) + >= TYPE_PRECISION (TREE_TYPE (arg1_unw))) || (TREE_CODE (arg1_unw) == INTEGER_CST && (TREE_CODE (shorter_type) == INTEGER_TYPE || TREE_CODE (shorter_type) == BOOLEAN_TYPE) @@ -10647,24 +10649,24 @@ fold_binary (enum tree_code code, tree t tree arg01 = TREE_OPERAND (arg0, 1); if (TREE_CODE (arg00) == LSHIFT_EXPR && integer_onep (TREE_OPERAND (arg00, 0))) - return - fold_build2 (code, type, - build2 (BIT_AND_EXPR, TREE_TYPE (arg0), - build2 (RSHIFT_EXPR, TREE_TYPE (arg00), - arg01, TREE_OPERAND (arg00, 1)), - fold_convert (TREE_TYPE (arg0), - integer_one_node)), - arg1); - else if (TREE_CODE (TREE_OPERAND (arg0, 1)) == LSHIFT_EXPR - && integer_onep (TREE_OPERAND (TREE_OPERAND (arg0, 1), 0))) - return - fold_build2 (code, type, - build2 (BIT_AND_EXPR, TREE_TYPE (arg0), - build2 (RSHIFT_EXPR, TREE_TYPE (arg01), - arg00, TREE_OPERAND (arg01, 1)), - fold_convert (TREE_TYPE (arg0), - integer_one_node)), - arg1); + { + tree tem = fold_build2 (RSHIFT_EXPR, TREE_TYPE (arg00), + arg01, TREE_OPERAND (arg00, 1)); + tem = fold_build2 (BIT_AND_EXPR, TREE_TYPE (arg0), tem, + build_int_cst (TREE_TYPE (arg0), 1)); + return fold_build2 (code, type, + fold_convert (TREE_TYPE (arg1), tem), arg1); + } + else if (TREE_CODE (arg01) == LSHIFT_EXPR + && integer_onep (TREE_OPERAND (arg01, 0))) + { + tree tem = fold_build2 (RSHIFT_EXPR, TREE_TYPE (arg01), + arg00, TREE_OPERAND (arg01, 1)); + tem = fold_build2 (BIT_AND_EXPR, TREE_TYPE (arg0), tem, + build_int_cst (TREE_TYPE (arg0), 1)); + return fold_build2 (code, type, + fold_convert (TREE_TYPE (arg1), tem), arg1); + } } /* If this is an NE or EQ comparison of zero against the result of a Modified: head/contrib/gcc/ipa-pure-const.c ============================================================================== --- head/contrib/gcc/ipa-pure-const.c Fri May 18 18:55:58 2012 (r235622) +++ head/contrib/gcc/ipa-pure-const.c Fri May 18 19:02:39 2012 (r235623) @@ -639,6 +639,7 @@ static_execute (void) for (i = 0; i < order_pos; i++ ) { enum pure_const_state_e pure_const_state = IPA_CONST; + int count = 0; node = order[i]; /* Find the worst state for any node in the cycle. */ @@ -655,11 +656,40 @@ static_execute (void) if (!w_l->state_set_in_source) { struct cgraph_edge *e; + count++; + + /* FIXME!!! Because of pr33826, we cannot have either + immediate or transitive recursive functions marked as + pure or const because dce can delete a function that + is in reality an infinite loop. A better solution + than just outlawing them is to add another bit the + functions to distinguish recursive from non recursive + pure and const function. This would allow the + recursive ones to be cse'd but not dce'd. In this + same vein, we could allow functions with loops to + also be cse'd but not dce'd. + + Unfortunately we are late in stage 3, and the fix + described above is is not appropriate. */ + if (count > 1) + { + pure_const_state = IPA_NEITHER; + break; + } + for (e = w->callees; e; e = e->next_callee) { struct cgraph_node *y = e->callee; /* Only look at the master nodes and skip external nodes. */ y = cgraph_master_clone (y); + + /* Check for immediate recursive functions. See the + FIXME above. */ + if (w == y) + { + pure_const_state = IPA_NEITHER; + break; + } if (y) { funct_state y_l = get_function_state (y); Modified: head/contrib/gcc/ipa-utils.c ============================================================================== --- head/contrib/gcc/ipa-utils.c Fri May 18 18:55:58 2012 (r235622) +++ head/contrib/gcc/ipa-utils.c Fri May 18 19:02:39 2012 (r235623) @@ -78,7 +78,7 @@ struct searchc_env { has been customized for cgraph_nodes. The env parameter is because it is recursive and there are no nested functions here. This function should only be called from itself or - cgraph_reduced_inorder. ENV is a stack env and would be + ipa_utils_reduced_inorder. ENV is a stack env and would be unnecessary if C had nested functions. V is the node to start searching from. */ Modified: head/contrib/gcc/rtl.h ============================================================================== --- head/contrib/gcc/rtl.h Fri May 18 18:55:58 2012 (r235622) +++ head/contrib/gcc/rtl.h Fri May 18 19:02:39 2012 (r235623) @@ -1189,8 +1189,8 @@ do { \ refer to part of a DECL. */ #define REG_EXPR(RTX) (REG_ATTRS (RTX) == 0 ? 0 : REG_ATTRS (RTX)->decl) -/* For a MEM rtx, the offset from the start of MEM_DECL, if known, as a - RTX that is always a CONST_INT. */ +/* For a REG rtx, the offset from the start of REG_EXPR, if known, as an + HOST_WIDE_INT. */ #define REG_OFFSET(RTX) (REG_ATTRS (RTX) == 0 ? 0 : REG_ATTRS (RTX)->offset) /* Copy the attributes that apply to memory locations from RHS to LHS. */ Modified: head/contrib/gcc/var-tracking.c ============================================================================== --- head/contrib/gcc/var-tracking.c Fri May 18 18:55:58 2012 (r235622) +++ head/contrib/gcc/var-tracking.c Fri May 18 19:02:39 2012 (r235623) @@ -259,6 +259,9 @@ typedef struct variable_def /* Pointer to the BB's information specific to variable tracking pass. */ #define VTI(BB) ((variable_tracking_info) (BB)->aux) +/* Macro to access MEM_OFFSET as an HOST_WIDE_INT. Evaluates MEM twice. */ +#define INT_MEM_OFFSET(mem) (MEM_OFFSET (mem) ? INTVAL (MEM_OFFSET (mem)) : 0) + /* Alloc pool for struct attrs_def. */ static alloc_pool attrs_pool; @@ -927,7 +930,7 @@ static void var_mem_set (dataflow_set *set, rtx loc) { tree decl = MEM_EXPR (loc); - HOST_WIDE_INT offset = MEM_OFFSET (loc) ? INTVAL (MEM_OFFSET (loc)) : 0; + HOST_WIDE_INT offset = INT_MEM_OFFSET (loc); decl = var_debug_decl (decl); @@ -945,7 +948,7 @@ static void var_mem_delete_and_set (dataflow_set *set, rtx loc, bool modify) { tree decl = MEM_EXPR (loc); - HOST_WIDE_INT offset = MEM_OFFSET (loc) ? INTVAL (MEM_OFFSET (loc)) : 0; + HOST_WIDE_INT offset = INT_MEM_OFFSET (loc); decl = var_debug_decl (decl); @@ -962,7 +965,7 @@ static void var_mem_delete (dataflow_set *set, rtx loc, bool clobber) { tree decl = MEM_EXPR (loc); - HOST_WIDE_INT offset = MEM_OFFSET (loc) ? INTVAL (MEM_OFFSET (loc)) : 0; + HOST_WIDE_INT offset = INT_MEM_OFFSET (loc); decl = var_debug_decl (decl); if (clobber) @@ -1540,6 +1543,18 @@ track_expr_p (tree expr) return 1; } +/* Return true if OFFSET is a valid offset for a register or memory + access we want to track. This is used to reject out-of-bounds + accesses that can cause assertions to fail later. Note that we + don't reject negative offsets because they can be generated for + paradoxical subregs on big-endian architectures. */ + +static inline bool +offset_valid_for_tracked_p (HOST_WIDE_INT offset) +{ + return (-MAX_VAR_PARTS < offset) && (offset < MAX_VAR_PARTS); +} + /* Determine whether a given LOC refers to the same variable part as EXPR+OFFSET. */ @@ -1560,7 +1575,7 @@ same_variable_part_p (rtx loc, tree expr else if (MEM_P (loc)) { expr2 = MEM_EXPR (loc); - offset2 = MEM_OFFSET (loc) ? INTVAL (MEM_OFFSET (loc)) : 0; + offset2 = INT_MEM_OFFSET (loc); } else return false; @@ -1590,7 +1605,8 @@ count_uses (rtx *loc, void *insn) } else if (MEM_P (*loc) && MEM_EXPR (*loc) - && track_expr_p (MEM_EXPR (*loc))) + && track_expr_p (MEM_EXPR (*loc)) + && offset_valid_for_tracked_p (INT_MEM_OFFSET (*loc))) { VTI (bb)->n_mos++; } @@ -1626,14 +1642,19 @@ add_uses (rtx *loc, void *insn) basic_block bb = BLOCK_FOR_INSN ((rtx) insn); micro_operation *mo = VTI (bb)->mos + VTI (bb)->n_mos++; - mo->type = ((REG_EXPR (*loc) && track_expr_p (REG_EXPR (*loc))) - ? MO_USE : MO_USE_NO_VAR); + if (REG_EXPR (*loc) + && track_expr_p (REG_EXPR (*loc)) + && offset_valid_for_tracked_p (REG_OFFSET (*loc))) + mo->type = MO_USE; + else + mo->type = MO_USE_NO_VAR; mo->u.loc = *loc; mo->insn = (rtx) insn; } else if (MEM_P (*loc) && MEM_EXPR (*loc) - && track_expr_p (MEM_EXPR (*loc))) + && track_expr_p (MEM_EXPR (*loc)) + && offset_valid_for_tracked_p (INT_MEM_OFFSET (*loc))) { basic_block bb = BLOCK_FOR_INSN ((rtx) insn); micro_operation *mo = VTI (bb)->mos + VTI (bb)->n_mos++; @@ -1667,8 +1688,9 @@ add_stores (rtx loc, rtx expr, void *ins micro_operation *mo = VTI (bb)->mos + VTI (bb)->n_mos++; if (GET_CODE (expr) == CLOBBER - || ! REG_EXPR (loc) - || ! track_expr_p (REG_EXPR (loc))) + || !(REG_EXPR (loc) + && track_expr_p (REG_EXPR (loc)) + && offset_valid_for_tracked_p (REG_OFFSET (loc)))) mo->type = MO_CLOBBER; else if (GET_CODE (expr) == SET && SET_DEST (expr) == loc @@ -1683,7 +1705,8 @@ add_stores (rtx loc, rtx expr, void *ins } else if (MEM_P (loc) && MEM_EXPR (loc) - && track_expr_p (MEM_EXPR (loc))) + && track_expr_p (MEM_EXPR (loc)) + && offset_valid_for_tracked_p (INT_MEM_OFFSET (loc))) { basic_block bb = BLOCK_FOR_INSN ((rtx) insn); micro_operation *mo = VTI (bb)->mos + VTI (bb)->n_mos++; @@ -1694,8 +1717,7 @@ add_stores (rtx loc, rtx expr, void *ins && SET_DEST (expr) == loc && same_variable_part_p (SET_SRC (expr), MEM_EXPR (loc), - MEM_OFFSET (loc) - ? INTVAL (MEM_OFFSET (loc)) : 0)) + INT_MEM_OFFSET (loc))) mo->type = MO_COPY; else mo->type = MO_SET; @@ -2726,7 +2748,7 @@ vt_get_decl_and_offset (rtx rtl, tree *d if (MEM_ATTRS (rtl)) { *declp = MEM_EXPR (rtl); - *offsetp = MEM_OFFSET (rtl) ? INTVAL (MEM_OFFSET (rtl)) : 0; + *offsetp = INT_MEM_OFFSET (rtl); return true; } } Modified: head/contrib/gcc/varasm.c ============================================================================== --- head/contrib/gcc/varasm.c Fri May 18 18:55:58 2012 (r235622) +++ head/contrib/gcc/varasm.c Fri May 18 19:02:39 2012 (r235623) @@ -5876,9 +5876,10 @@ default_binds_local_p_1 (tree exp, int s else if (DECL_WEAK (exp)) local_p = false; /* If PIC, then assume that any global name can be overridden by - symbols resolved from other modules. */ + symbols resolved from other modules, unless we are compiling with + -fwhole-program, which assumes that names are local. */ else if (shlib) - local_p = false; + local_p = flag_whole_program; /* Uninitialized COMMON variable may be unified with symbols resolved from other modules. */ else if (DECL_COMMON (exp) From owner-svn-src-all@FreeBSD.ORG Fri May 18 19:08:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15BE11065670; Fri, 18 May 2012 19:08:11 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBC9B8FC08; Fri, 18 May 2012 19:08:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IJ8AqN071397; Fri, 18 May 2012 19:08:10 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IJ8ABl071395; Fri, 18 May 2012 19:08:10 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201205181908.q4IJ8ABl071395@svn.freebsd.org> From: Jamie Gritton Date: Fri, 18 May 2012 19:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235624 - stable/9/lib/libjail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 19:08:11 -0000 Author: jamie Date: Fri May 18 19:08:10 2012 New Revision: 235624 URL: http://svn.freebsd.org/changeset/base/235624 Log: MFC r235291: The linker isn't consistent in the ordering of dynamic sysctls, so don't assume that the unnamed final component of "security.jail.param.foo." is one less than the "foo" component. It might be one greater instead. Modified: stable/9/lib/libjail/jail.c Directory Properties: stable/9/lib/libjail/ (props changed) Modified: stable/9/lib/libjail/jail.c ============================================================================== --- stable/9/lib/libjail/jail.c Fri May 18 19:02:39 2012 (r235623) +++ stable/9/lib/libjail/jail.c Fri May 18 19:08:10 2012 (r235624) @@ -855,7 +855,7 @@ jailparam_type(struct jailparam *jp) { char *p, *nname; size_t miblen, desclen; - int isarray; + int i, isarray; struct { int i; char s[MAXPATHLEN]; @@ -977,21 +977,33 @@ jailparam_type(struct jailparam *jp) } break; case CTLTYPE_NODE: - /* A node might be described by an empty-named child. */ + /* + * A node might be described by an empty-named child, + * which would be immediately before or after the node itself. + */ mib[1] = 1; - mib[(miblen / sizeof(int)) + 2] = - mib[(miblen / sizeof(int)) + 1] - 1; miblen += sizeof(int); - desclen = sizeof(desc.s); - if (sysctl(mib, (miblen / sizeof(int)) + 2, desc.s, &desclen, - NULL, 0) < 0) { - snprintf(jail_errmsg, JAIL_ERRMSGLEN, - "sysctl(0.1): %s", strerror(errno)); - return (-1); + for (i = -1; i <= 1; i += 2) { + mib[(miblen / sizeof(int)) + 1] = + mib[(miblen / sizeof(int))] + i; + desclen = sizeof(desc.s); + if (sysctl(mib, (miblen / sizeof(int)) + 2, desc.s, + &desclen, NULL, 0) < 0) { + if (errno == ENOENT) + continue; + snprintf(jail_errmsg, JAIL_ERRMSGLEN, + "sysctl(0.1): %s", strerror(errno)); + return (-1); + } + if (desclen == + sizeof(SJPARAM) + strlen(jp->jp_name) + 2 && + memcmp(SJPARAM ".", desc.s, sizeof(SJPARAM)) == 0 && + memcmp(jp->jp_name, desc.s + sizeof(SJPARAM), + desclen - sizeof(SJPARAM) - 2) == 0 && + desc.s[desclen - 2] == '.') + goto mib_desc; } - if (desc.s[desclen - 2] != '.') - goto unknown_parameter; - goto mib_desc; + goto unknown_parameter; default: snprintf(jail_errmsg, JAIL_ERRMSGLEN, "unknown type for %s", jp->jp_name); From owner-svn-src-all@FreeBSD.ORG Fri May 18 19:48:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B6011065672; Fri, 18 May 2012 19:48:34 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 094878FC08; Fri, 18 May 2012 19:48:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IJmXW7077220; Fri, 18 May 2012 19:48:33 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IJmXLZ077216; Fri, 18 May 2012 19:48:33 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201205181948.q4IJmXLZ077216@svn.freebsd.org> From: Sean Bruno Date: Fri, 18 May 2012 19:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235625 - in stable/8/sys: conf dev/mfi modules/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 19:48:34 -0000 Author: sbruno Date: Fri May 18 19:48:33 2012 New Revision: 235625 URL: http://svn.freebsd.org/changeset/base/235625 Log: MFC of head thunderbolt support for mfi(4) r233711 -- IFV head_mfi into head for initial thunderbolt support r233768 -- atomic_t --> mfi_atomic r233805 -- fix tinderbuild, move megasas_sge to mfivar.h r233877 -- remove atomic.h from includes r235014 -- fix reading of sector >= 2^32 or 2^21, repair RAID handling r235016 -- style(9) r235040 -- fix returns from mfi_tbolt_sync_map_info() r235318 -- repair panic on PAE i386 r235321 -- repair the repair of panics on PAE i386 Added: stable/8/sys/dev/mfi/mfi_syspd.c - copied unchanged from r233711, head/sys/dev/mfi/mfi_syspd.c stable/8/sys/dev/mfi/mfi_tbolt.c - copied, changed from r233711, head/sys/dev/mfi/mfi_tbolt.c Modified: stable/8/sys/conf/files stable/8/sys/dev/mfi/mfi.c stable/8/sys/dev/mfi/mfi_cam.c stable/8/sys/dev/mfi/mfi_debug.c stable/8/sys/dev/mfi/mfi_disk.c stable/8/sys/dev/mfi/mfi_ioctl.h stable/8/sys/dev/mfi/mfi_linux.c stable/8/sys/dev/mfi/mfi_pci.c stable/8/sys/dev/mfi/mfireg.h stable/8/sys/dev/mfi/mfivar.h stable/8/sys/modules/mfi/Makefile Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Fri May 18 19:08:10 2012 (r235624) +++ stable/8/sys/conf/files Fri May 18 19:48:33 2012 (r235625) @@ -1277,6 +1277,8 @@ dev/mfi/mfi.c optional mfi dev/mfi/mfi_debug.c optional mfi dev/mfi/mfi_pci.c optional mfi pci dev/mfi/mfi_disk.c optional mfi +dev/mfi/mfi_syspd.c optional mfi +dev/mfi/mfi_tbolt.c optional mfi dev/mfi/mfi_linux.c optional mfi compat_linux dev/mfi/mfi_cam.c optional mfip scbus dev/mii/acphy.c optional miibus | acphy Modified: stable/8/sys/dev/mfi/mfi.c ============================================================================== --- stable/8/sys/dev/mfi/mfi.c Fri May 18 19:08:10 2012 (r235624) +++ stable/8/sys/dev/mfi/mfi.c Fri May 18 19:48:33 2012 (r235625) @@ -53,6 +53,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" #include "opt_mfi.h" #include @@ -72,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -79,43 +81,52 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include static int mfi_alloc_commands(struct mfi_softc *); static int mfi_comms_init(struct mfi_softc *); -static int mfi_wait_command(struct mfi_softc *, struct mfi_command *); static int mfi_get_controller_info(struct mfi_softc *); static int mfi_get_log_state(struct mfi_softc *, struct mfi_evt_log_state **); static int mfi_parse_entries(struct mfi_softc *, int, int); -static int mfi_dcmd_command(struct mfi_softc *, struct mfi_command **, - uint32_t, void **, size_t); static void mfi_data_cb(void *, bus_dma_segment_t *, int, int); static void mfi_startup(void *arg); static void mfi_intr(void *arg); static void mfi_ldprobe(struct mfi_softc *sc); +static void mfi_syspdprobe(struct mfi_softc *sc); +static void mfi_handle_evt(void *context, int pending); static int mfi_aen_register(struct mfi_softc *sc, int seq, int locale); static void mfi_aen_complete(struct mfi_command *); -static int mfi_aen_setup(struct mfi_softc *, uint32_t); static int mfi_add_ld(struct mfi_softc *sc, int); static void mfi_add_ld_complete(struct mfi_command *); +static int mfi_add_sys_pd(struct mfi_softc *sc, int); +static void mfi_add_sys_pd_complete(struct mfi_command *); static struct mfi_command * mfi_bio_command(struct mfi_softc *); static void mfi_bio_complete(struct mfi_command *); -static int mfi_mapcmd(struct mfi_softc *, struct mfi_command *); +static struct mfi_command *mfi_build_ldio(struct mfi_softc *,struct bio*); +static struct mfi_command *mfi_build_syspdio(struct mfi_softc *,struct bio*); static int mfi_send_frame(struct mfi_softc *, struct mfi_command *); -static void mfi_complete(struct mfi_softc *, struct mfi_command *); static int mfi_abort(struct mfi_softc *, struct mfi_command *); static int mfi_linux_ioctl_int(struct cdev *, u_long, caddr_t, int, struct thread *); static void mfi_timeout(void *); static int mfi_user_command(struct mfi_softc *, struct mfi_ioc_passthru *); -static void mfi_enable_intr_xscale(struct mfi_softc *sc); -static void mfi_enable_intr_ppc(struct mfi_softc *sc); -static int32_t mfi_read_fw_status_xscale(struct mfi_softc *sc); -static int32_t mfi_read_fw_status_ppc(struct mfi_softc *sc); -static int mfi_check_clear_intr_xscale(struct mfi_softc *sc); -static int mfi_check_clear_intr_ppc(struct mfi_softc *sc); -static void mfi_issue_cmd_xscale(struct mfi_softc *sc,uint32_t bus_add,uint32_t frame_cnt); -static void mfi_issue_cmd_ppc(struct mfi_softc *sc,uint32_t bus_add,uint32_t frame_cnt); +static void mfi_enable_intr_xscale(struct mfi_softc *sc); +static void mfi_enable_intr_ppc(struct mfi_softc *sc); +static int32_t mfi_read_fw_status_xscale(struct mfi_softc *sc); +static int32_t mfi_read_fw_status_ppc(struct mfi_softc *sc); +static int mfi_check_clear_intr_xscale(struct mfi_softc *sc); +static int mfi_check_clear_intr_ppc(struct mfi_softc *sc); +static void mfi_issue_cmd_xscale(struct mfi_softc *sc, bus_addr_t bus_add, + uint32_t frame_cnt); +static void mfi_issue_cmd_ppc(struct mfi_softc *sc, bus_addr_t bus_add, + uint32_t frame_cnt); +static int mfi_config_lock(struct mfi_softc *sc, uint32_t opcode); +static void mfi_config_unlock(struct mfi_softc *sc, int locked); +static int mfi_check_command_pre(struct mfi_softc *sc, struct mfi_command *cm); +static void mfi_check_command_post(struct mfi_softc *sc, struct mfi_command *cm); +static int mfi_check_for_sscd(struct mfi_softc *sc, struct mfi_command *cm); SYSCTL_NODE(_hw, OID_AUTO, mfi, CTLFLAG_RD, 0, "MFI driver parameters"); static int mfi_event_locale = MFI_EVT_LOCALE_ALL; @@ -133,6 +144,11 @@ TUNABLE_INT("hw.mfi.max_cmds", &mfi_max_ SYSCTL_INT(_hw_mfi, OID_AUTO, max_cmds, CTLFLAG_RD, &mfi_max_cmds, 0, "Max commands"); +static int mfi_detect_jbod_change = 1; +TUNABLE_INT("hw.mfi.detect_jbod_change", &mfi_detect_jbod_change); +SYSCTL_INT(_hw_mfi, OID_AUTO, detect_jbod_change, CTLFLAG_RW, + &mfi_detect_jbod_change, 0, "Detect a change to a JBOD"); + /* Management interface */ static d_open_t mfi_open; static d_close_t mfi_close; @@ -152,6 +168,7 @@ static struct cdevsw mfi_cdevsw = { MALLOC_DEFINE(M_MFIBUF, "mfibuf", "Buffers for the MFI driver"); #define MFI_INQ_LENGTH SHORT_INQUIRY_LENGTH +struct mfi_skinny_dma_info mfi_skinny; static void mfi_enable_intr_xscale(struct mfi_softc *sc) @@ -162,12 +179,17 @@ mfi_enable_intr_xscale(struct mfi_softc static void mfi_enable_intr_ppc(struct mfi_softc *sc) { - MFI_WRITE4(sc, MFI_ODCR0, 0xFFFFFFFF); if (sc->mfi_flags & MFI_FLAGS_1078) { + MFI_WRITE4(sc, MFI_ODCR0, 0xFFFFFFFF); MFI_WRITE4(sc, MFI_OMSK, ~MFI_1078_EIM); - } else if (sc->mfi_flags & MFI_FLAGS_GEN2) { + } + else if (sc->mfi_flags & MFI_FLAGS_GEN2) { + MFI_WRITE4(sc, MFI_ODCR0, 0xFFFFFFFF); MFI_WRITE4(sc, MFI_OMSK, ~MFI_GEN2_EIM); } + else if (sc->mfi_flags & MFI_FLAGS_SKINNY) { + MFI_WRITE4(sc, MFI_OMSK, ~0x00000001); + } } static int32_t @@ -205,35 +227,51 @@ mfi_check_clear_intr_ppc(struct mfi_soft if (!(status & MFI_1078_RM)) { return 1; } - } else if (sc->mfi_flags & MFI_FLAGS_GEN2) { + } + else if (sc->mfi_flags & MFI_FLAGS_GEN2) { if (!(status & MFI_GEN2_RM)) { return 1; } } - - MFI_WRITE4(sc, MFI_ODCR0, status); + else if (sc->mfi_flags & MFI_FLAGS_SKINNY) { + if (!(status & MFI_SKINNY_RM)) { + return 1; + } + } + if (sc->mfi_flags & MFI_FLAGS_SKINNY) + MFI_WRITE4(sc, MFI_OSTS, status); + else + MFI_WRITE4(sc, MFI_ODCR0, status); return 0; } static void -mfi_issue_cmd_xscale(struct mfi_softc *sc,uint32_t bus_add,uint32_t frame_cnt) +mfi_issue_cmd_xscale(struct mfi_softc *sc, bus_addr_t bus_add, uint32_t frame_cnt) { MFI_WRITE4(sc, MFI_IQP,(bus_add >>3)|frame_cnt); } static void -mfi_issue_cmd_ppc(struct mfi_softc *sc,uint32_t bus_add,uint32_t frame_cnt) +mfi_issue_cmd_ppc(struct mfi_softc *sc, bus_addr_t bus_add, uint32_t frame_cnt) { - MFI_WRITE4(sc, MFI_IQP, (bus_add |frame_cnt <<1)|1 ); + if (sc->mfi_flags & MFI_FLAGS_SKINNY) { + MFI_WRITE4(sc, MFI_IQPL, (bus_add | frame_cnt <<1)|1 ); + MFI_WRITE4(sc, MFI_IQPH, 0x00000000); + } else { + MFI_WRITE4(sc, MFI_IQP, (bus_add | frame_cnt <<1)|1 ); + } } -static int +int mfi_transition_firmware(struct mfi_softc *sc) { uint32_t fw_state, cur_state; int max_wait, i; + uint32_t cur_abs_reg_val = 0; + uint32_t prev_abs_reg_val = 0; - fw_state = sc->mfi_read_fw_status(sc)& MFI_FWSTATE_MASK; + cur_abs_reg_val = sc->mfi_read_fw_status(sc); + fw_state = cur_abs_reg_val & MFI_FWSTATE_MASK; while (fw_state != MFI_FWSTATE_READY) { if (bootverbose) device_printf(sc->mfi_dev, "Waiting for firmware to " @@ -244,38 +282,60 @@ mfi_transition_firmware(struct mfi_softc device_printf(sc->mfi_dev, "Firmware fault\n"); return (ENXIO); case MFI_FWSTATE_WAIT_HANDSHAKE: - MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_CLEAR_HANDSHAKE); - max_wait = 2; + if (sc->mfi_flags & MFI_FLAGS_SKINNY || sc->mfi_flags & MFI_FLAGS_TBOLT) + MFI_WRITE4(sc, MFI_SKINNY_IDB, MFI_FWINIT_CLEAR_HANDSHAKE); + else + MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_CLEAR_HANDSHAKE); + max_wait = MFI_RESET_WAIT_TIME; break; case MFI_FWSTATE_OPERATIONAL: - MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_READY); - max_wait = 10; + if (sc->mfi_flags & MFI_FLAGS_SKINNY || sc->mfi_flags & MFI_FLAGS_TBOLT) + MFI_WRITE4(sc, MFI_SKINNY_IDB, 7); + else + MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_READY); + max_wait = MFI_RESET_WAIT_TIME; break; case MFI_FWSTATE_UNDEFINED: case MFI_FWSTATE_BB_INIT: - max_wait = 2; + max_wait = MFI_RESET_WAIT_TIME; + break; + case MFI_FWSTATE_FW_INIT_2: + max_wait = MFI_RESET_WAIT_TIME; break; case MFI_FWSTATE_FW_INIT: - case MFI_FWSTATE_DEVICE_SCAN: case MFI_FWSTATE_FLUSH_CACHE: - max_wait = 20; + max_wait = MFI_RESET_WAIT_TIME; + break; + case MFI_FWSTATE_DEVICE_SCAN: + max_wait = MFI_RESET_WAIT_TIME; /* wait for 180 seconds */ + prev_abs_reg_val = cur_abs_reg_val; break; case MFI_FWSTATE_BOOT_MESSAGE_PENDING: - MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_HOTPLUG); - max_wait = 10; + if (sc->mfi_flags & MFI_FLAGS_SKINNY || sc->mfi_flags & MFI_FLAGS_TBOLT) + MFI_WRITE4(sc, MFI_SKINNY_IDB, MFI_FWINIT_HOTPLUG); + else + MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_HOTPLUG); + max_wait = MFI_RESET_WAIT_TIME; break; default: - device_printf(sc->mfi_dev,"Unknown firmware state %#x\n", + device_printf(sc->mfi_dev, "Unknown firmware state %#x\n", fw_state); return (ENXIO); } for (i = 0; i < (max_wait * 10); i++) { - fw_state = sc->mfi_read_fw_status(sc) & MFI_FWSTATE_MASK; + cur_abs_reg_val = sc->mfi_read_fw_status(sc); + fw_state = cur_abs_reg_val & MFI_FWSTATE_MASK; if (fw_state == cur_state) DELAY(100000); else break; } + if (fw_state == MFI_FWSTATE_DEVICE_SCAN) { + /* Check the device scanning progress */ + if (prev_abs_reg_val != cur_abs_reg_val) { + continue; + } + } if (fw_state == cur_state) { device_printf(sc->mfi_dev, "Firmware stuck in state " "%#x\n", fw_state); @@ -286,26 +346,36 @@ mfi_transition_firmware(struct mfi_softc } static void -mfi_addr32_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +mfi_addr_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) { - uint32_t *addr; + bus_addr_t *addr; addr = arg; *addr = segs[0].ds_addr; } + int mfi_attach(struct mfi_softc *sc) { uint32_t status; int error, commsz, framessz, sensesz; int frames, unit, max_fw_sge; + uint32_t tb_mem_size = 0; + + if (sc == NULL) + return EINVAL; - device_printf(sc->mfi_dev, "Megaraid SAS driver Ver 3.00 \n"); + device_printf(sc->mfi_dev, "Megaraid SAS driver Ver %s \n", + MEGASAS_VERSION); mtx_init(&sc->mfi_io_lock, "MFI I/O lock", NULL, MTX_DEF); sx_init(&sc->mfi_config_lock, "MFI config"); TAILQ_INIT(&sc->mfi_ld_tqh); + TAILQ_INIT(&sc->mfi_syspd_tqh); + TAILQ_INIT(&sc->mfi_evt_queue); + TASK_INIT(&sc->mfi_evt_task, 0, mfi_handle_evt, sc); + TASK_INIT(&sc->mfi_map_sync_task, 0, mfi_handle_map_sync, sc); TAILQ_INIT(&sc->mfi_aen_pids); TAILQ_INIT(&sc->mfi_cam_ccbq); @@ -314,15 +384,29 @@ mfi_attach(struct mfi_softc *sc) mfi_initq_busy(sc); mfi_initq_bio(sc); + sc->adpreset = 0; + sc->last_seq_num = 0; + sc->disableOnlineCtrlReset = 1; + sc->issuepend_done = 1; + sc->hw_crit_error = 0; + if (sc->mfi_flags & MFI_FLAGS_1064R) { sc->mfi_enable_intr = mfi_enable_intr_xscale; sc->mfi_read_fw_status = mfi_read_fw_status_xscale; sc->mfi_check_clear_intr = mfi_check_clear_intr_xscale; sc->mfi_issue_cmd = mfi_issue_cmd_xscale; - } - else { + } else if (sc->mfi_flags & MFI_FLAGS_TBOLT) { + sc->mfi_enable_intr = mfi_tbolt_enable_intr_ppc; + sc->mfi_disable_intr = mfi_tbolt_disable_intr_ppc; + sc->mfi_read_fw_status = mfi_tbolt_read_fw_status_ppc; + sc->mfi_check_clear_intr = mfi_tbolt_check_clear_intr_ppc; + sc->mfi_issue_cmd = mfi_tbolt_issue_cmd_ppc; + sc->mfi_adp_reset = mfi_tbolt_adp_reset; + sc->mfi_tbolt = 1; + TAILQ_INIT(&sc->mfi_cmd_tbolt_tqh); + } else { sc->mfi_enable_intr = mfi_enable_intr_ppc; - sc->mfi_read_fw_status = mfi_read_fw_status_ppc; + sc->mfi_read_fw_status = mfi_read_fw_status_ppc; sc->mfi_check_clear_intr = mfi_check_clear_intr_ppc; sc->mfi_issue_cmd = mfi_issue_cmd_ppc; } @@ -335,6 +419,32 @@ mfi_attach(struct mfi_softc *sc) return (ENXIO); } + /* Start: LSIP200113393 */ + if (bus_dma_tag_create( sc->mfi_parent_dmat, /* parent */ + 1, 0, /* algnmnt, boundary */ + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MEGASAS_MAX_NAME*sizeof(bus_addr_t), /* maxsize */ + 1, /* msegments */ + MEGASAS_MAX_NAME*sizeof(bus_addr_t), /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->verbuf_h_dmat)) { + device_printf(sc->mfi_dev, "Cannot allocate verbuf_h_dmat DMA tag\n"); + return (ENOMEM); + } + if (bus_dmamem_alloc(sc->verbuf_h_dmat, (void **)&sc->verbuf, + BUS_DMA_NOWAIT, &sc->verbuf_h_dmamap)) { + device_printf(sc->mfi_dev, "Cannot allocate verbuf_h_dmamap memory\n"); + return (ENOMEM); + } + bzero(sc->verbuf, MEGASAS_MAX_NAME*sizeof(bus_addr_t)); + bus_dmamap_load(sc->verbuf_h_dmat, sc->verbuf_h_dmamap, + sc->verbuf, MEGASAS_MAX_NAME*sizeof(bus_addr_t), + mfi_addr_cb, &sc->verbuf_h_busaddr, 0); + /* End: LSIP200113393 */ + /* * Get information needed for sizing the contiguous memory for the * frame pool. Size down the sgl parameter since we know that @@ -347,6 +457,100 @@ mfi_attach(struct mfi_softc *sc) max_fw_sge = (status & MFI_FWSTATE_MAXSGL_MASK) >> 16; sc->mfi_max_sge = min(max_fw_sge, ((MFI_MAXPHYS / PAGE_SIZE) + 1)); + /* ThunderBolt Support get the contiguous memory */ + + if (sc->mfi_flags & MFI_FLAGS_TBOLT) { + mfi_tbolt_init_globals(sc); + device_printf(sc->mfi_dev, "MaxCmd = %x MaxSgl = %x state = %x \n", + sc->mfi_max_fw_cmds, sc->mfi_max_sge, status); + tb_mem_size = mfi_tbolt_get_memory_requirement(sc); + + if (bus_dma_tag_create( sc->mfi_parent_dmat, /* parent */ + 1, 0, /* algnmnt, boundary */ + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + tb_mem_size, /* maxsize */ + 1, /* msegments */ + tb_mem_size, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->mfi_tb_dmat)) { + device_printf(sc->mfi_dev, "Cannot allocate comms DMA tag\n"); + return (ENOMEM); + } + if (bus_dmamem_alloc(sc->mfi_tb_dmat, (void **)&sc->request_message_pool, + BUS_DMA_NOWAIT, &sc->mfi_tb_dmamap)) { + device_printf(sc->mfi_dev, "Cannot allocate comms memory\n"); + return (ENOMEM); + } + bzero(sc->request_message_pool, tb_mem_size); + bus_dmamap_load(sc->mfi_tb_dmat, sc->mfi_tb_dmamap, + sc->request_message_pool, tb_mem_size, mfi_addr_cb, &sc->mfi_tb_busaddr, 0); + + /* For ThunderBolt memory init */ + if (bus_dma_tag_create( sc->mfi_parent_dmat, /* parent */ + 0x100, 0, /* alignmnt, boundary */ + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MFI_FRAME_SIZE, /* maxsize */ + 1, /* msegments */ + MFI_FRAME_SIZE, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->mfi_tb_init_dmat)) { + device_printf(sc->mfi_dev, "Cannot allocate init DMA tag\n"); + return (ENOMEM); + } + if (bus_dmamem_alloc(sc->mfi_tb_init_dmat, (void **)&sc->mfi_tb_init, + BUS_DMA_NOWAIT, &sc->mfi_tb_init_dmamap)) { + device_printf(sc->mfi_dev, "Cannot allocate init memory\n"); + return (ENOMEM); + } + bzero(sc->mfi_tb_init, MFI_FRAME_SIZE); + bus_dmamap_load(sc->mfi_tb_init_dmat, sc->mfi_tb_init_dmamap, + sc->mfi_tb_init, MFI_FRAME_SIZE, mfi_addr_cb, + &sc->mfi_tb_init_busaddr, 0); + if (mfi_tbolt_init_desc_pool(sc, sc->request_message_pool, + tb_mem_size)) { + device_printf(sc->mfi_dev, + "Thunderbolt pool preparation error\n"); + return 0; + } + + /* + Allocate DMA memory mapping for MPI2 IOC Init descriptor, + we are taking it diffrent from what we have allocated for Request + and reply descriptors to avoid confusion later + */ + tb_mem_size = sizeof(struct MPI2_IOC_INIT_REQUEST); + if (bus_dma_tag_create( sc->mfi_parent_dmat, /* parent */ + 1, 0, /* algnmnt, boundary */ + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + tb_mem_size, /* maxsize */ + 1, /* msegments */ + tb_mem_size, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->mfi_tb_ioc_init_dmat)) { + device_printf(sc->mfi_dev, + "Cannot allocate comms DMA tag\n"); + return (ENOMEM); + } + if (bus_dmamem_alloc(sc->mfi_tb_ioc_init_dmat, + (void **)&sc->mfi_tb_ioc_init_desc, + BUS_DMA_NOWAIT, &sc->mfi_tb_ioc_init_dmamap)) { + device_printf(sc->mfi_dev, "Cannot allocate comms memory\n"); + return (ENOMEM); + } + bzero(sc->mfi_tb_ioc_init_desc, tb_mem_size); + bus_dmamap_load(sc->mfi_tb_ioc_init_dmat, sc->mfi_tb_ioc_init_dmamap, + sc->mfi_tb_ioc_init_desc, tb_mem_size, mfi_addr_cb, + &sc->mfi_tb_ioc_init_busaddr, 0); + } /* * Create the dma tag for data buffers. Used both for block I/O * and for various internal data queries. @@ -396,8 +600,7 @@ mfi_attach(struct mfi_softc *sc) } bzero(sc->mfi_comms, commsz); bus_dmamap_load(sc->mfi_comms_dmat, sc->mfi_comms_dmamap, - sc->mfi_comms, commsz, mfi_addr32_cb, &sc->mfi_comms_busaddr, 0); - + sc->mfi_comms, commsz, mfi_addr_cb, &sc->mfi_comms_busaddr, 0); /* * Allocate DMA memory for the command frames. Keep them in the * lower 4GB for efficiency. Calculate the size of the commands at @@ -414,6 +617,8 @@ mfi_attach(struct mfi_softc *sc) } else { sc->mfi_sge_size = sizeof(struct mfi_sg32); } + if (sc->mfi_flags & MFI_FLAGS_SKINNY) + sc->mfi_sge_size = sizeof(struct mfi_sg_skinny); frames = (sc->mfi_sge_size * sc->mfi_max_sge - 1) / MFI_FRAME_SIZE + 2; sc->mfi_cmd_size = frames * MFI_FRAME_SIZE; framessz = sc->mfi_cmd_size * sc->mfi_max_fw_cmds; @@ -438,8 +643,7 @@ mfi_attach(struct mfi_softc *sc) } bzero(sc->mfi_frames, framessz); bus_dmamap_load(sc->mfi_frames_dmat, sc->mfi_frames_dmamap, - sc->mfi_frames, framessz, mfi_addr32_cb, &sc->mfi_frames_busaddr,0); - + sc->mfi_frames, framessz, mfi_addr_cb, &sc->mfi_frames_busaddr,0); /* * Allocate DMA memory for the frame sense data. Keep them in the * lower 4GB for efficiency @@ -465,32 +669,46 @@ mfi_attach(struct mfi_softc *sc) return (ENOMEM); } bus_dmamap_load(sc->mfi_sense_dmat, sc->mfi_sense_dmamap, - sc->mfi_sense, sensesz, mfi_addr32_cb, &sc->mfi_sense_busaddr, 0); - + sc->mfi_sense, sensesz, mfi_addr_cb, &sc->mfi_sense_busaddr, 0); if ((error = mfi_alloc_commands(sc)) != 0) return (error); - if ((error = mfi_comms_init(sc)) != 0) - return (error); + /* Before moving the FW to operational state, check whether + * hostmemory is required by the FW or not + */ - if ((error = mfi_get_controller_info(sc)) != 0) - return (error); + /* ThunderBolt MFI_IOC2 INIT */ + if (sc->mfi_flags & MFI_FLAGS_TBOLT) { + sc->mfi_disable_intr(sc); + if ((error = mfi_tbolt_init_MFI_queue(sc)) != 0) { + device_printf(sc->mfi_dev, + "TB Init has failed with error %d\n",error); + return error; + } - mtx_lock(&sc->mfi_io_lock); - if ((error = mfi_aen_setup(sc, 0), 0) != 0) { - mtx_unlock(&sc->mfi_io_lock); - return (error); - } - mtx_unlock(&sc->mfi_io_lock); + if ((error = mfi_tbolt_alloc_cmd(sc)) != 0) + return error; + if (bus_setup_intr(sc->mfi_dev, sc->mfi_irq, + INTR_MPSAFE|INTR_TYPE_BIO, NULL, mfi_intr_tbolt, sc, + &sc->mfi_intr)) { + device_printf(sc->mfi_dev, "Cannot set up interrupt\n"); + return (EINVAL); + } + sc->mfi_enable_intr(sc); + } else { + if ((error = mfi_comms_init(sc)) != 0) + return (error); - /* - * Set up the interrupt handler. - */ - if (bus_setup_intr(sc->mfi_dev, sc->mfi_irq, INTR_MPSAFE|INTR_TYPE_BIO, - NULL, mfi_intr, sc, &sc->mfi_intr)) { - device_printf(sc->mfi_dev, "Cannot set up interrupt\n"); - return (EINVAL); + if (bus_setup_intr(sc->mfi_dev, sc->mfi_irq, + INTR_MPSAFE|INTR_TYPE_BIO, NULL, mfi_intr, sc, &sc->mfi_intr)) { + device_printf(sc->mfi_dev, "Cannot set up interrupt\n"); + return (EINVAL); + } + sc->mfi_enable_intr(sc); } + if ((error = mfi_get_controller_info(sc)) != 0) + return (error); + sc->disableOnlineCtrlReset = 0; /* Register a config hook to probe the bus for arrays */ sc->mfi_ich.ich_func = mfi_startup; @@ -500,6 +718,10 @@ mfi_attach(struct mfi_softc *sc) "hook\n"); return (EINVAL); } + if ((error = mfi_aen_setup(sc, 0), 0) != 0) { + mtx_unlock(&sc->mfi_io_lock); + return (error); + } /* * Register a shutdown handler. @@ -538,6 +760,10 @@ mfi_attach(struct mfi_softc *sc) callout_reset(&sc->mfi_watchdog_callout, MFI_CMD_TIMEOUT * hz, mfi_timeout, sc); + if (sc->mfi_flags & MFI_FLAGS_TBOLT) { + mfi_tbolt_sync_map_info(sc); + } + return (0); } @@ -571,8 +797,11 @@ mfi_alloc_commands(struct mfi_softc *sc) cm->cm_sc = sc; cm->cm_index = i; if (bus_dmamap_create(sc->mfi_buffer_dmat, 0, - &cm->cm_dmamap) == 0) + &cm->cm_dmamap) == 0) { + mtx_lock(&sc->mfi_io_lock); mfi_release_command(cm); + mtx_unlock(&sc->mfi_io_lock); + } else break; sc->mfi_total_cmds++; @@ -587,6 +816,8 @@ mfi_release_command(struct mfi_command * struct mfi_frame_header *hdr; uint32_t *hdr_data; + mtx_assert(&cm->cm_sc->mfi_io_lock, MA_OWNED); + /* * Zero out the important fields of the frame, but make sure the * context field is preserved. For efficiency, handle the fields @@ -611,24 +842,31 @@ mfi_release_command(struct mfi_command * cm->cm_data = NULL; cm->cm_sg = 0; cm->cm_total_frame_size = 0; + cm->retry_for_fw_reset = 0; mfi_enqueue_free(cm); } -static int -mfi_dcmd_command(struct mfi_softc *sc, struct mfi_command **cmp, uint32_t opcode, - void **bufp, size_t bufsize) +int +mfi_dcmd_command(struct mfi_softc *sc, struct mfi_command **cmp, + uint32_t opcode, void **bufp, size_t bufsize) { struct mfi_command *cm; struct mfi_dcmd_frame *dcmd; void *buf = NULL; - + uint32_t context = 0; + mtx_assert(&sc->mfi_io_lock, MA_OWNED); - + cm = mfi_dequeue_free(sc); if (cm == NULL) return (EBUSY); + /* Zero out the MFI frame */ + context = cm->cm_frame->header.context; + bzero(cm->cm_frame, sizeof(union mfi_frame)); + cm->cm_frame->header.context = context; + if ((bufsize > 0) && (bufp != NULL)) { if (*bufp == NULL) { buf = malloc(bufsize, M_MFIBUF, M_NOWAIT|M_ZERO); @@ -648,6 +886,7 @@ mfi_dcmd_command(struct mfi_softc *sc, s dcmd->header.timeout = 0; dcmd->header.flags = 0; dcmd->header.data_len = bufsize; + dcmd->header.scsi_status = 0; dcmd->opcode = opcode; cm->cm_sg = &dcmd->sgl; cm->cm_total_frame_size = MFI_DCMD_FRAME_SIZE; @@ -669,11 +908,17 @@ mfi_comms_init(struct mfi_softc *sc) struct mfi_init_frame *init; struct mfi_init_qinfo *qinfo; int error; + uint32_t context = 0; mtx_lock(&sc->mfi_io_lock); if ((cm = mfi_dequeue_free(sc)) == NULL) return (EBUSY); + /* Zero out the MFI frame */ + context = cm->cm_frame->header.context; + bzero(cm->cm_frame, sizeof(union mfi_frame)); + cm->cm_frame->header.context = context; + /* * Abuse the SG list area of the frame to hold the init_qinfo * object; @@ -734,9 +979,11 @@ mfi_get_controller_info(struct mfi_softc BUS_DMASYNC_POSTREAD); bus_dmamap_unload(sc->mfi_buffer_dmat, cm->cm_dmamap); - max_sectors_1 = (1 << ci->stripe_sz_ops.min) * ci->max_strips_per_io; + max_sectors_1 = (1 << ci->stripe_sz_ops.max) * ci->max_strips_per_io; max_sectors_2 = ci->max_request_size; sc->mfi_max_io = min(max_sectors_1, max_sectors_2); + sc->disableOnlineCtrlReset = + ci->properties.OnOffProperties.disableOnlineCtrlReset; out: if (ci) @@ -753,6 +1000,7 @@ mfi_get_log_state(struct mfi_softc *sc, struct mfi_command *cm = NULL; int error; + mtx_lock(&sc->mfi_io_lock); error = mfi_dcmd_command(sc, &cm, MFI_DCMD_CTRL_EVENT_GETINFO, (void **)log_state, sizeof(**log_state)); if (error) @@ -771,11 +1019,12 @@ mfi_get_log_state(struct mfi_softc *sc, out: if (cm) mfi_release_command(cm); + mtx_unlock(&sc->mfi_io_lock); return (error); } -static int +int mfi_aen_setup(struct mfi_softc *sc, uint32_t seq_start) { struct mfi_evt_log_state *log_state = NULL; @@ -789,6 +1038,7 @@ mfi_aen_setup(struct mfi_softc *sc, uint if (seq_start == 0) { error = mfi_get_log_state(sc, &log_state); + sc->mfi_boot_seq_num = log_state->boot_seq_num; if (error) { if (log_state) free(log_state, M_MFIBUF); @@ -810,7 +1060,7 @@ mfi_aen_setup(struct mfi_softc *sc, uint return 0; } -static int +int mfi_wait_command(struct mfi_softc *sc, struct mfi_command *cm) { @@ -883,6 +1133,64 @@ mfi_free(struct mfi_softc *sc) if (sc->mfi_comms_dmat != NULL) bus_dma_tag_destroy(sc->mfi_comms_dmat); + /* ThunderBolt contiguous memory free here */ + if (sc->mfi_flags & MFI_FLAGS_TBOLT) { + if (sc->mfi_tb_busaddr != 0) + bus_dmamap_unload(sc->mfi_tb_dmat, sc->mfi_tb_dmamap); + if (sc->request_message_pool != NULL) + bus_dmamem_free(sc->mfi_tb_dmat, sc->request_message_pool, + sc->mfi_tb_dmamap); + if (sc->mfi_tb_dmat != NULL) + bus_dma_tag_destroy(sc->mfi_tb_dmat); + + /* Version buffer memory free */ + /* Start LSIP200113393 */ + if (sc->verbuf_h_busaddr != 0) + bus_dmamap_unload(sc->verbuf_h_dmat, sc->verbuf_h_dmamap); + if (sc->verbuf != NULL) + bus_dmamem_free(sc->verbuf_h_dmat, sc->verbuf, + sc->verbuf_h_dmamap); + if (sc->verbuf_h_dmat != NULL) + bus_dma_tag_destroy(sc->verbuf_h_dmat); + + /* End LSIP200113393 */ + /* ThunderBolt INIT packet memory Free */ + if (sc->mfi_tb_init_busaddr != 0) + bus_dmamap_unload(sc->mfi_tb_init_dmat, sc->mfi_tb_init_dmamap); + if (sc->mfi_tb_init != NULL) + bus_dmamem_free(sc->mfi_tb_init_dmat, sc->mfi_tb_init, + sc->mfi_tb_init_dmamap); + if (sc->mfi_tb_init_dmat != NULL) + bus_dma_tag_destroy(sc->mfi_tb_init_dmat); + + /* ThunderBolt IOC Init Desc memory free here */ + if (sc->mfi_tb_ioc_init_busaddr != 0) + bus_dmamap_unload(sc->mfi_tb_ioc_init_dmat, + sc->mfi_tb_ioc_init_dmamap); + if (sc->mfi_tb_ioc_init_desc != NULL) + bus_dmamem_free(sc->mfi_tb_ioc_init_dmat, + sc->mfi_tb_ioc_init_desc, + sc->mfi_tb_ioc_init_dmamap); + if (sc->mfi_tb_ioc_init_dmat != NULL) + bus_dma_tag_destroy(sc->mfi_tb_ioc_init_dmat); + for (int i = 0; i < sc->mfi_max_fw_cmds; i++) { + if (sc->mfi_cmd_pool_tbolt != NULL) { + if (sc->mfi_cmd_pool_tbolt[i] != NULL) { + free(sc->mfi_cmd_pool_tbolt[i], + M_MFIBUF); + sc->mfi_cmd_pool_tbolt[i] = NULL; + } + } + } + if (sc->mfi_cmd_pool_tbolt != NULL) { + free(sc->mfi_cmd_pool_tbolt, M_MFIBUF); + sc->mfi_cmd_pool_tbolt = NULL; + } + if (sc->request_desc_pool != NULL) { + free(sc->request_desc_pool, M_MFIBUF); + sc->request_desc_pool = NULL; + } + } if (sc->mfi_buffer_dmat != NULL) bus_dma_tag_destroy(sc->mfi_buffer_dmat); if (sc->mfi_parent_dmat != NULL) @@ -909,6 +1217,8 @@ mfi_startup(void *arg) sx_xlock(&sc->mfi_config_lock); mtx_lock(&sc->mfi_io_lock); mfi_ldprobe(sc); + if (sc->mfi_flags & MFI_FLAGS_SKINNY) + mfi_syspdprobe(sc); mtx_unlock(&sc->mfi_io_lock); sx_xunlock(&sc->mfi_config_lock); } @@ -925,12 +1235,7 @@ mfi_intr(void *arg) if (sc->mfi_check_clear_intr(sc)) return; - /* - * Do a dummy read to flush the interrupt ACK that we just performed, - * ensuring that everything is really, truly consistent. - */ - (void)sc->mfi_read_fw_status(sc); - +restart: pi = sc->mfi_comms->hw_pi; ci = sc->mfi_comms->hw_ci; mtx_lock(&sc->mfi_io_lock); @@ -955,6 +1260,14 @@ mfi_intr(void *arg) mfi_startio(sc); mtx_unlock(&sc->mfi_io_lock); + /* + * Dummy read to flush the bus; this ensures that the indexes are up + * to date. Restart processing if more commands have come it. + */ + (void)sc->mfi_read_fw_status(sc); + if (pi != sc->mfi_comms->hw_pi) + goto restart; + return; } @@ -975,6 +1288,9 @@ mfi_shutdown(struct mfi_softc *sc) if (sc->mfi_aen_cm != NULL) mfi_abort(sc, sc->mfi_aen_cm); + if (sc->mfi_map_sync_cm != NULL) + mfi_abort(sc, sc->mfi_map_sync_cm); + dcmd = &cm->cm_frame->dcmd; dcmd->header.flags = MFI_FRAME_DIR_NONE; cm->cm_flags = MFI_CMD_POLLED; @@ -990,6 +1306,81 @@ mfi_shutdown(struct mfi_softc *sc) } static void +mfi_syspdprobe(struct mfi_softc *sc) +{ + struct mfi_frame_header *hdr; + struct mfi_command *cm = NULL; + struct mfi_pd_list *pdlist = NULL; + struct mfi_system_pd *syspd, *tmp; + int error, i, found; + + sx_assert(&sc->mfi_config_lock, SA_XLOCKED); + mtx_assert(&sc->mfi_io_lock, MA_OWNED); + /* Add SYSTEM PD's */ + error = mfi_dcmd_command(sc, &cm, MFI_DCMD_PD_LIST_QUERY, + (void **)&pdlist, sizeof(*pdlist)); + if (error) { + device_printf(sc->mfi_dev, + "Error while forming SYSTEM PD list\n"); + goto out; + } + + cm->cm_flags = MFI_CMD_DATAIN | MFI_CMD_POLLED; + cm->cm_frame->dcmd.mbox[0] = MR_PD_QUERY_TYPE_EXPOSED_TO_HOST; + cm->cm_frame->dcmd.mbox[1] = 0; + if (mfi_mapcmd(sc, cm) != 0) { + device_printf(sc->mfi_dev, + "Failed to get syspd device listing\n"); + goto out; + } + bus_dmamap_sync(sc->mfi_buffer_dmat,cm->cm_dmamap, + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->mfi_buffer_dmat, cm->cm_dmamap); + hdr = &cm->cm_frame->header; + if (hdr->cmd_status != MFI_STAT_OK) { + device_printf(sc->mfi_dev, + "MFI_DCMD_PD_LIST_QUERY failed %x\n", hdr->cmd_status); + goto out; + } + /* Get each PD and add it to the system */ + for (i = 0; i < pdlist->count; i++) { + if (pdlist->addr[i].device_id == + pdlist->addr[i].encl_device_id) + continue; + found = 0; + TAILQ_FOREACH(syspd, &sc->mfi_syspd_tqh, pd_link) { + if (syspd->pd_id == pdlist->addr[i].device_id) + found = 1; + } + if (found == 0) + mfi_add_sys_pd(sc, pdlist->addr[i].device_id); + } + /* Delete SYSPD's whose state has been changed */ + TAILQ_FOREACH_SAFE(syspd, &sc->mfi_syspd_tqh, pd_link, tmp) { + found = 0; + for (i = 0; i < pdlist->count; i++) { + if (syspd->pd_id == pdlist->addr[i].device_id) + found = 1; + } + if (found == 0) { + printf("DELETE\n"); + mtx_unlock(&sc->mfi_io_lock); + mtx_lock(&Giant); + device_delete_child(sc->mfi_dev, syspd->pd_dev); + mtx_unlock(&Giant); + mtx_lock(&sc->mfi_io_lock); + } + } +out: + if (pdlist) + free(pdlist, M_MFIBUF); + if (cm) + mfi_release_command(cm); + + return; +} + +static void mfi_ldprobe(struct mfi_softc *sc) { struct mfi_frame_header *hdr; @@ -1083,10 +1474,124 @@ format_class(int8_t class) static void mfi_decode_evt(struct mfi_softc *sc, struct mfi_evt_detail *detail) { + struct mfi_system_pd *syspd = NULL; device_printf(sc->mfi_dev, "%d (%s/0x%04x/%s) - %s\n", detail->seq, format_timestamp(detail->time), detail->evt_class.members.locale, - format_class(detail->evt_class.members.evt_class), detail->description); + format_class(detail->evt_class.members.evt_class), + detail->description); + + /* Don't act on old AEN's or while shutting down */ + if (detail->seq < sc->mfi_boot_seq_num || sc->mfi_detaching) + return; + + switch (detail->arg_type) { + case MR_EVT_ARGS_NONE: + if (detail->code == MR_EVT_CTRL_HOST_BUS_SCAN_REQUESTED) { + device_printf(sc->mfi_dev, "HostBus scan raised\n"); + if (mfi_detect_jbod_change) { + /* + * Probe for new SYSPD's and Delete + * invalid SYSPD's + */ + sx_xlock(&sc->mfi_config_lock); + mtx_lock(&sc->mfi_io_lock); + mfi_syspdprobe(sc); + mtx_unlock(&sc->mfi_io_lock); + sx_xunlock(&sc->mfi_config_lock); + } + } + break; + case MR_EVT_ARGS_LD_STATE: + /* During load time driver reads all the events starting + * from the one that has been logged after shutdown. Avoid + * these old events. + */ + if (detail->args.ld_state.new_state == MFI_LD_STATE_OFFLINE ) { + /* Remove the LD */ + struct mfi_disk *ld; + TAILQ_FOREACH(ld, &sc->mfi_ld_tqh, ld_link) { + if (ld->ld_id == + detail->args.ld_state.ld.target_id) + break; + } + /* + Fix: for kernel panics when SSCD is removed + KASSERT(ld != NULL, ("volume dissappeared")); + */ + if (ld != NULL) { + mtx_lock(&Giant); + device_delete_child(sc->mfi_dev, ld->ld_dev); + mtx_unlock(&Giant); + } + } + break; + case MR_EVT_ARGS_PD: + if (detail->code == MR_EVT_PD_REMOVED) { + if (mfi_detect_jbod_change) { + /* + * If the removed device is a SYSPD then + * delete it + */ + TAILQ_FOREACH(syspd, &sc->mfi_syspd_tqh, + pd_link) { + if (syspd->pd_id == + detail->args.pd.device_id) { + mtx_lock(&Giant); + device_delete_child( + sc->mfi_dev, + syspd->pd_dev); + mtx_unlock(&Giant); + break; + } + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri May 18 19:48:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 978BF106566B; Fri, 18 May 2012 19:48:39 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F9D58FC12; Fri, 18 May 2012 19:48:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IJmdkX077269; Fri, 18 May 2012 19:48:39 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IJmd83077258; Fri, 18 May 2012 19:48:39 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201205181948.q4IJmd83077258@svn.freebsd.org> From: Kirk McKusick Date: Fri, 18 May 2012 19:48:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235626 - in stable/9/sys: fs/coda fs/ext2fs fs/msdosfs fs/nfsclient fs/nfsserver i386/conf kern nfsclient sys ufs/ffs ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 19:48:39 -0000 Author: mckusick Date: Fri May 18 19:48:38 2012 New Revision: 235626 URL: http://svn.freebsd.org/changeset/base/235626 Log: MFC of 234386, 234400, 234441, 234443, 234482, 234483, 235052, 235241, 235246, and 235619 MFC: 234386 Replace the MNT_VNODE_FOREACH interface with MNT_VNODE_FOREACH_ALL. The primary changes are that the user of the interface no longer needs to manage the mount-mutex locking and that the vnode that is returned has its mutex locked (thus avoiding the need to check to see if its is DOOMED or other possible end of life senarios). To minimize compatibility issues for third-party developers, the old MNT_VNODE_FOREACH interface will remain available so that this change can be MFC'ed to 9. Following the MFC to 9, MNT_VNODE_FOREACH will be removed in head. The reason for this update is to prepare for the addition of the MNT_VNODE_FOREACH_ACTIVE interface that will loop over just the active vnodes associated with a mount point (typically less than 1% of the vnodes associated with the mount point). Reviewed by: kib Tested by: Peter Holm MFC after: 2 weeks MFC: 234400 Drop export of vdestroy() function from kern/vfs_subr.c as it is used only as a helper function in that file. Replace sole call to vbusy() with inline code in vholdl(). Replace sole calls to vfree() and vdestroy() with inline code in vdropl(). The Clang compiler already inlines these functions, so they do not show up in a kernel backtrace which is confusing. Also you cannot set their frame in kgdb which means that it is impossible to view their local variables. So, while the produced code is unchanged, the debugging should be easier. Discussed with: kib MFC after: 2 weeks MFC: 234441 Fix a memory leak of M_VNODE_MARKER introduced in 234386. Found by: Peter Holm MFC: 234443 Delete a no longer useful VNASSERT missed during changes in 234400. Suggested by: kib MFC: 234482 This change creates a new list of active vnodes associated with a mount point. Active vnodes are those with a non-zero use or hold count, e.g., those vnodes that are not on the free list. Note that this list is in addition to the list of all the vnodes associated with a mount point. To avoid adding another set of linkage pointers to the vnode structure, the active list uses the existing linkage pointers used by the free list (previously named v_freelist, now renamed v_actfreelist). This update adds the MNT_VNODE_FOREACH_ACTIVE interface that loops over just the active vnodes associated with a mount point (typically less than 1% of the vnodes associated with the mount point). Reviewed by: kib Tested by: Peter Holm MFC after: 2 weeks MFC: 234483 This update uses the MNT_VNODE_FOREACH_ACTIVE interface that loops over just the active vnodes associated with a mount point to replace MNT_VNODE_FOREACH_ALL in the vfs_msync, ffs_sync_lazy, and qsync routines. The vfs_msync routine is run every 30 seconds for every writably mounted filesystem. It ensures that any files mmap'ed from the filesystem with modified pages have those pages queued to be written back to the file from which they are mapped. The ffs_lazy_sync and qsync routines are run every 30 seconds for every writably mounted UFS/FFS filesystem. The ffs_lazy_sync routine ensures that any files that have been accessed in the previous 30 seconds have had their access times queued for updating in the filesystem. The qsync routine ensures that any files with modified quotas have those quotas queued to be written back to their associated quota file. In a system configured with 250,000 vnodes, less than 1000 are typically active at any point in time. Prior to this change all 250,000 vnodes would be locked and inspected twice every minute by the syncer. For UFS/FFS filesystems they would be locked and inspected six times every minute (twice by each of these three routines since each of these routines does its own pass over the vnodes associated with a mount point). With this change the syncer now locks and inspects only the tiny set of vnodes that are active. Reviewed by: kib Tested by: Peter Holm MFC after: 2 weeks MFC: 235052 (by pluknet) Fix mount mutex handling missed in r234386. MFC: 235241 (by pluknet) Fix mount interlock oversights from the previous change in r234386. Reported by: dougb Submitted by: Mateusz Guzik Reviewed by: Kirk McKusick Tested by: pho MFC: 235246 Fix mount mutex handling missed in r234386. MFC: 235619 Update comment to document that the vnode free-list mutex needs to be held when updating mnt_activevnodelist and mnt_activevnodelistsize. Modified: stable/9/sys/fs/coda/coda_subr.c stable/9/sys/fs/ext2fs/ext2_vfsops.c stable/9/sys/fs/msdosfs/msdosfs_vfsops.c stable/9/sys/fs/nfsclient/nfs_clsubs.c stable/9/sys/fs/nfsclient/nfs_clvfsops.c stable/9/sys/fs/nfsserver/nfs_nfsdport.c stable/9/sys/kern/vfs_default.c stable/9/sys/kern/vfs_mount.c stable/9/sys/kern/vfs_subr.c stable/9/sys/nfsclient/nfs_subs.c stable/9/sys/nfsclient/nfs_vfsops.c stable/9/sys/sys/mount.h stable/9/sys/sys/vnode.h stable/9/sys/ufs/ffs/ffs_snapshot.c stable/9/sys/ufs/ffs/ffs_softdep.c stable/9/sys/ufs/ffs/ffs_vfsops.c stable/9/sys/ufs/ufs/quota.h stable/9/sys/ufs/ufs/ufs_inode.c stable/9/sys/ufs/ufs/ufs_quota.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/fs/coda/coda_subr.c ============================================================================== --- stable/9/sys/fs/coda/coda_subr.c Fri May 18 19:48:33 2012 (r235625) +++ stable/9/sys/fs/coda/coda_subr.c Fri May 18 19:48:38 2012 (r235626) @@ -365,13 +365,7 @@ coda_checkunmounting(struct mount *mp) struct cnode *cp; int count = 0, bad = 0; - MNT_ILOCK(mp); - MNT_VNODE_FOREACH(vp, mp, nvp) { - VI_LOCK(vp); - if (vp->v_iflag & VI_DOOMED) { - VI_UNLOCK(vp); - continue; - } + MNT_VNODE_FOREACH_ALL(vp, mp, nvp) { cp = VTOC(vp); count++; if (!(cp->c_flags & C_UNMOUNTING)) { @@ -381,7 +375,6 @@ coda_checkunmounting(struct mount *mp) } VI_UNLOCK(vp); } - MNT_IUNLOCK(mp); } void Modified: stable/9/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vfsops.c Fri May 18 19:48:33 2012 (r235625) +++ stable/9/sys/fs/ext2fs/ext2_vfsops.c Fri May 18 19:48:38 2012 (r235626) @@ -480,19 +480,12 @@ ext2_reload(struct mount *mp, struct thr } loop: - MNT_ILOCK(mp); - MNT_VNODE_FOREACH(vp, mp, mvp) { - VI_LOCK(vp); - if (vp->v_iflag & VI_DOOMED) { - VI_UNLOCK(vp); - continue; - } - MNT_IUNLOCK(mp); + MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { /* * Step 4: invalidate all cached file data. */ if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td)) { - MNT_VNODE_FOREACH_ABORT(mp, mvp); + MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp); goto loop; } if (vinvalbuf(vp, 0, 0, 0)) @@ -507,7 +500,7 @@ loop: if (error) { VOP_UNLOCK(vp, 0); vrele(vp); - MNT_VNODE_FOREACH_ABORT(mp, mvp); + MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp); return (error); } ext2_ei2i((struct ext2fs_dinode *) ((char *)bp->b_data + @@ -515,9 +508,7 @@ loop: brelse(bp); VOP_UNLOCK(vp, 0); vrele(vp); - MNT_ILOCK(mp); } - MNT_IUNLOCK(mp); return (0); } @@ -839,29 +830,24 @@ ext2_sync(struct mount *mp, int waitfor) /* * Write back each (modified) inode. */ - MNT_ILOCK(mp); loop: - MNT_VNODE_FOREACH(vp, mp, mvp) { - VI_LOCK(vp); - if (vp->v_type == VNON || (vp->v_iflag & VI_DOOMED)) { + MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { + if (vp->v_type == VNON) { VI_UNLOCK(vp); continue; } - MNT_IUNLOCK(mp); ip = VTOI(vp); if ((ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) == 0 && (vp->v_bufobj.bo_dirty.bv_cnt == 0 || waitfor == MNT_LAZY)) { VI_UNLOCK(vp); - MNT_ILOCK(mp); continue; } error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, td); if (error) { - MNT_ILOCK(mp); if (error == ENOENT) { - MNT_VNODE_FOREACH_ABORT_ILOCKED(mp, mvp); + MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp); goto loop; } continue; @@ -870,9 +856,7 @@ loop: allerror = error; VOP_UNLOCK(vp, 0); vrele(vp); - MNT_ILOCK(mp); } - MNT_IUNLOCK(mp); /* * Force stale file system control information to be flushed. Modified: stable/9/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- stable/9/sys/fs/msdosfs/msdosfs_vfsops.c Fri May 18 19:48:33 2012 (r235625) +++ stable/9/sys/fs/msdosfs/msdosfs_vfsops.c Fri May 18 19:48:38 2012 (r235626) @@ -834,7 +834,7 @@ msdosfs_unmount(struct mount *mp, int mn vn_printf(vp, "msdosfs_umount(): just before calling VOP_CLOSE()\n"); printf("freef %p, freeb %p, mount %p\n", - TAILQ_NEXT(vp, v_freelist), vp->v_freelist.tqe_prev, + TAILQ_NEXT(vp, v_actfreelist), vp->v_actfreelist.tqe_prev, vp->v_mount); printf("cleanblkhd %p, dirtyblkhd %p, numoutput %ld, type %d\n", TAILQ_FIRST(&vp->v_bufobj.bo_clean.bv_hd), @@ -923,27 +923,22 @@ msdosfs_sync(struct mount *mp, int waitf /* * Write back each (modified) denode. */ - MNT_ILOCK(mp); loop: - MNT_VNODE_FOREACH(vp, mp, nvp) { - VI_LOCK(vp); - if (vp->v_type == VNON || (vp->v_iflag & VI_DOOMED)) { + MNT_VNODE_FOREACH_ALL(vp, mp, nvp) { + if (vp->v_type == VNON) { VI_UNLOCK(vp); continue; } - MNT_IUNLOCK(mp); dep = VTODE(vp); if ((dep->de_flag & (DE_ACCESS | DE_CREATE | DE_UPDATE | DE_MODIFIED)) == 0 && (vp->v_bufobj.bo_dirty.bv_cnt == 0 || waitfor == MNT_LAZY)) { VI_UNLOCK(vp); - MNT_ILOCK(mp); continue; } error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, td); if (error) { - MNT_ILOCK(mp); if (error == ENOENT) goto loop; continue; @@ -953,9 +948,7 @@ loop: allerror = error; VOP_UNLOCK(vp, 0); vrele(vp); - MNT_ILOCK(mp); } - MNT_IUNLOCK(mp); /* * Flush filesystem control info. Modified: stable/9/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clsubs.c Fri May 18 19:48:33 2012 (r235625) +++ stable/9/sys/fs/nfsclient/nfs_clsubs.c Fri May 18 19:48:38 2012 (r235626) @@ -367,17 +367,10 @@ ncl_clearcommit(struct mount *mp) struct buf *bp, *nbp; struct bufobj *bo; - MNT_ILOCK(mp); - MNT_VNODE_FOREACH(vp, mp, nvp) { + MNT_VNODE_FOREACH_ALL(vp, mp, nvp) { bo = &vp->v_bufobj; - VI_LOCK(vp); - if (vp->v_iflag & VI_DOOMED) { - VI_UNLOCK(vp); - continue; - } vholdl(vp); VI_UNLOCK(vp); - MNT_IUNLOCK(mp); BO_LOCK(bo); TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) { if (!BUF_ISLOCKED(bp) && @@ -387,9 +380,7 @@ ncl_clearcommit(struct mount *mp) } BO_UNLOCK(bo); vdrop(vp); - MNT_ILOCK(mp); } - MNT_IUNLOCK(mp); } /* Modified: stable/9/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clvfsops.c Fri May 18 19:48:33 2012 (r235625) +++ stable/9/sys/fs/nfsclient/nfs_clvfsops.c Fri May 18 19:48:38 2012 (r235626) @@ -1510,24 +1510,21 @@ nfs_sync(struct mount *mp, int waitfor) MNT_IUNLOCK(mp); return (EBADF); } + MNT_IUNLOCK(mp); /* * Force stale buffer cache information to be flushed. */ loop: - MNT_VNODE_FOREACH(vp, mp, mvp) { - VI_LOCK(vp); - MNT_IUNLOCK(mp); + MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { /* XXX Racy bv_cnt check. */ if (NFSVOPISLOCKED(vp) || vp->v_bufobj.bo_dirty.bv_cnt == 0 || waitfor == MNT_LAZY) { VI_UNLOCK(vp); - MNT_ILOCK(mp); continue; } if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td)) { - MNT_ILOCK(mp); - MNT_VNODE_FOREACH_ABORT_ILOCKED(mp, mvp); + MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp); goto loop; } error = VOP_FSYNC(vp, waitfor, td); @@ -1535,10 +1532,7 @@ loop: allerror = error; NFSVOPUNLOCK(vp, 0); vrele(vp); - - MNT_ILOCK(mp); } - MNT_IUNLOCK(mp); return (allerror); } Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdport.c Fri May 18 19:48:33 2012 (r235625) +++ stable/9/sys/fs/nfsserver/nfs_nfsdport.c Fri May 18 19:48:38 2012 (r235626) @@ -2915,12 +2915,14 @@ nfsd_mntinit(void) inited = 1; nfsv4root_mnt.mnt_flag = (MNT_RDONLY | MNT_EXPORTED); TAILQ_INIT(&nfsv4root_mnt.mnt_nvnodelist); + TAILQ_INIT(&nfsv4root_mnt.mnt_activevnodelist); nfsv4root_mnt.mnt_export = NULL; TAILQ_INIT(&nfsv4root_opt); TAILQ_INIT(&nfsv4root_newopt); nfsv4root_mnt.mnt_opt = &nfsv4root_opt; nfsv4root_mnt.mnt_optnew = &nfsv4root_newopt; nfsv4root_mnt.mnt_nvnodelistsize = 0; + nfsv4root_mnt.mnt_activevnodelistsize = 0; } /* Modified: stable/9/sys/kern/vfs_default.c ============================================================================== --- stable/9/sys/kern/vfs_default.c Fri May 18 19:48:33 2012 (r235625) +++ stable/9/sys/kern/vfs_default.c Fri May 18 19:48:38 2012 (r235626) @@ -1114,18 +1114,15 @@ vfs_stdsync(mp, waitfor) /* * Force stale buffer cache information to be flushed. */ - MNT_ILOCK(mp); loop: - MNT_VNODE_FOREACH(vp, mp, mvp) { - /* bv_cnt is an acceptable race here. */ - if (vp->v_bufobj.bo_dirty.bv_cnt == 0) + MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { + if (vp->v_bufobj.bo_dirty.bv_cnt == 0) { + VI_UNLOCK(vp); continue; - VI_LOCK(vp); - MNT_IUNLOCK(mp); + } if ((error = vget(vp, lockreq, td)) != 0) { - MNT_ILOCK(mp); if (error == ENOENT) { - MNT_VNODE_FOREACH_ABORT_ILOCKED(mp, mvp); + MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp); goto loop; } continue; @@ -1134,9 +1131,7 @@ loop: if (error) allerror = error; vput(vp); - MNT_ILOCK(mp); } - MNT_IUNLOCK(mp); return (allerror); } Modified: stable/9/sys/kern/vfs_mount.c ============================================================================== --- stable/9/sys/kern/vfs_mount.c Fri May 18 19:48:33 2012 (r235625) +++ stable/9/sys/kern/vfs_mount.c Fri May 18 19:48:38 2012 (r235626) @@ -79,7 +79,6 @@ SYSCTL_INT(_vfs, OID_AUTO, usermount, CT "Unprivileged users may mount and unmount file systems"); MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount structure"); -MALLOC_DEFINE(M_VNODE_MARKER, "vnodemarker", "vnode marker"); static uma_zone_t mount_zone; /* List of mounted filesystems. */ @@ -460,6 +459,8 @@ vfs_mount_alloc(struct vnode *vp, struct __rangeof(struct mount, mnt_startzero, mnt_endzero)); TAILQ_INIT(&mp->mnt_nvnodelist); mp->mnt_nvnodelistsize = 0; + TAILQ_INIT(&mp->mnt_activevnodelist); + mp->mnt_activevnodelistsize = 0; mp->mnt_ref = 0; (void) vfs_busy(mp, MBF_NOWAIT); mp->mnt_op = vfsp->vfc_vfsops; @@ -513,6 +514,8 @@ vfs_mount_destroy(struct mount *mp) } if (mp->mnt_nvnodelistsize != 0) panic("vfs_mount_destroy: nonzero nvnodelistsize"); + if (mp->mnt_activevnodelistsize != 0) + panic("vfs_mount_destroy: nonzero activevnodelistsize"); if (mp->mnt_lockref != 0) panic("vfs_mount_destroy: nonzero lock refcount"); MNT_IUNLOCK(mp); @@ -1663,10 +1666,14 @@ vfs_copyopt(opts, name, dest, len) } /* - * This is a helper function for filesystems to traverse their - * vnodes. See MNT_VNODE_FOREACH() in sys/mount.h + * These are helper functions for filesystems to traverse all + * their vnodes. See MNT_VNODE_FOREACH() in sys/mount.h. + * + * This interface has been deprecated in favor of MNT_VNODE_FOREACH_ALL. */ +MALLOC_DECLARE(M_VNODE_MARKER); + struct vnode * __mnt_vnode_next(struct vnode **mvp, struct mount *mp) { @@ -1755,7 +1762,6 @@ __mnt_vnode_markerfree(struct vnode **mv MNT_REL(mp); } - int __vfs_statfs(struct mount *mp, struct statfs *sbp) { Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Fri May 18 19:48:33 2012 (r235625) +++ stable/9/sys/kern/vfs_subr.c Fri May 18 19:48:38 2012 (r235626) @@ -102,12 +102,10 @@ static int flushbuflist(struct bufv *buf int slpflag, int slptimeo); static void syncer_shutdown(void *arg, int howto); static int vtryrecycle(struct vnode *vp); -static void vbusy(struct vnode *vp); static void v_incr_usecount(struct vnode *); static void v_decr_usecount(struct vnode *); static void v_decr_useonly(struct vnode *); static void v_upgrade_usecount(struct vnode *); -static void vfree(struct vnode *); static void vnlru_free(int); static void vgonel(struct vnode *); static void vfs_knllock(void *arg); @@ -118,8 +116,7 @@ static void destroy_vpollinfo(struct vpo /* * Number of vnodes in existence. Increased whenever getnewvnode() - * allocates a new vnode, decreased on vdestroy() called on VI_DOOMed - * vnode. + * allocates a new vnode, decreased in vdropl() for VI_DOOMED vnode. */ static unsigned long numvnodes; @@ -778,12 +775,16 @@ vnlru_free(int count) break; VNASSERT(vp->v_op != NULL, vp, ("vnlru_free: vnode already reclaimed.")); - TAILQ_REMOVE(&vnode_free_list, vp, v_freelist); + KASSERT((vp->v_iflag & VI_FREE) != 0, + ("Removing vnode not on freelist")); + KASSERT((vp->v_iflag & VI_ACTIVE) == 0, + ("Mangling active vnode")); + TAILQ_REMOVE(&vnode_free_list, vp, v_actfreelist); /* * Don't recycle if we can't get the interlock. */ if (!VI_TRYLOCK(vp)) { - TAILQ_INSERT_TAIL(&vnode_free_list, vp, v_freelist); + TAILQ_INSERT_TAIL(&vnode_free_list, vp, v_actfreelist); continue; } VNASSERT(VCANRECYCLE(vp), vp, @@ -878,46 +879,6 @@ SYSINIT(vnlru, SI_SUB_KTHREAD_UPDATE, SI * Routines having to do with the management of the vnode table. */ -void -vdestroy(struct vnode *vp) -{ - struct bufobj *bo; - - CTR2(KTR_VFS, "%s: vp %p", __func__, vp); - mtx_lock(&vnode_free_list_mtx); - numvnodes--; - mtx_unlock(&vnode_free_list_mtx); - bo = &vp->v_bufobj; - VNASSERT((vp->v_iflag & VI_FREE) == 0, vp, - ("cleaned vnode still on the free list.")); - VNASSERT(vp->v_data == NULL, vp, ("cleaned vnode isn't")); - VNASSERT(vp->v_holdcnt == 0, vp, ("Non-zero hold count")); - VNASSERT(vp->v_usecount == 0, vp, ("Non-zero use count")); - VNASSERT(vp->v_writecount == 0, vp, ("Non-zero write count")); - VNASSERT(bo->bo_numoutput == 0, vp, ("Clean vnode has pending I/O's")); - VNASSERT(bo->bo_clean.bv_cnt == 0, vp, ("cleanbufcnt not 0")); - VNASSERT(bo->bo_clean.bv_root == NULL, vp, ("cleanblkroot not NULL")); - VNASSERT(bo->bo_dirty.bv_cnt == 0, vp, ("dirtybufcnt not 0")); - VNASSERT(bo->bo_dirty.bv_root == NULL, vp, ("dirtyblkroot not NULL")); - VNASSERT(TAILQ_EMPTY(&vp->v_cache_dst), vp, ("vp has namecache dst")); - VNASSERT(LIST_EMPTY(&vp->v_cache_src), vp, ("vp has namecache src")); - VNASSERT(vp->v_cache_dd == NULL, vp, ("vp has namecache for ..")); - VI_UNLOCK(vp); -#ifdef MAC - mac_vnode_destroy(vp); -#endif - if (vp->v_pollinfo != NULL) - destroy_vpollinfo(vp->v_pollinfo); -#ifdef INVARIANTS - /* XXX Elsewhere we can detect an already freed vnode via NULL v_op. */ - vp->v_op = NULL; -#endif - lockdestroy(vp->v_vnlock); - mtx_destroy(&vp->v_interlock); - mtx_destroy(BO_MTX(bo)); - uma_zfree(vnode_zone, vp); -} - /* * Try to recycle a freed vnode. We abort if anyone picks up a reference * before we actually vgone(). This function must be called with the vnode @@ -1078,12 +1039,26 @@ static void delmntque(struct vnode *vp) { struct mount *mp; + int active; mp = vp->v_mount; if (mp == NULL) return; MNT_ILOCK(mp); + VI_LOCK(vp); + KASSERT(mp->mnt_activevnodelistsize <= mp->mnt_nvnodelistsize, + ("Active vnode list size %d > Vnode list size %d", + mp->mnt_activevnodelistsize, mp->mnt_nvnodelistsize)); + active = vp->v_iflag & VI_ACTIVE; + vp->v_iflag &= ~VI_ACTIVE; + if (active) { + mtx_lock(&vnode_free_list_mtx); + TAILQ_REMOVE(&mp->mnt_activevnodelist, vp, v_actfreelist); + mp->mnt_activevnodelistsize--; + mtx_unlock(&vnode_free_list_mtx); + } vp->v_mount = NULL; + VI_UNLOCK(vp); VNASSERT(mp->mnt_nvnodelistsize > 0, vp, ("bad mount point vnode list size")); TAILQ_REMOVE(&mp->mnt_nvnodelist, vp, v_nmntvnodes); @@ -1123,13 +1098,24 @@ insmntque1(struct vnode *vp, struct moun ASSERT_VOP_ELOCKED(vp, "insmntque: mp-safe fs and non-locked vp"); #endif + /* + * We acquire the vnode interlock early to ensure that the + * vnode cannot be recycled by another process releasing a + * holdcnt on it before we get it on both the vnode list + * and the active vnode list. The mount mutex protects only + * manipulation of the vnode list and the vnode freelist + * mutex protects only manipulation of the active vnode list. + * Hence the need to hold the vnode interlock throughout. + */ MNT_ILOCK(mp); + VI_LOCK(vp); if ((mp->mnt_kern_flag & MNTK_NOINSMNTQ) != 0 && ((mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0 || mp->mnt_nvnodelistsize == 0)) { locked = VOP_ISLOCKED(vp); if (!locked || (locked == LK_EXCLUSIVE && (vp->v_vflag & VV_FORCEINSMQ) == 0)) { + VI_UNLOCK(vp); MNT_IUNLOCK(mp); if (dtr != NULL) dtr(vp, dtr_arg); @@ -1142,6 +1128,14 @@ insmntque1(struct vnode *vp, struct moun VNASSERT(mp->mnt_nvnodelistsize >= 0, vp, ("neg mount point vnode list size")); mp->mnt_nvnodelistsize++; + KASSERT((vp->v_iflag & VI_ACTIVE) == 0, + ("Activating already active vnode")); + vp->v_iflag |= VI_ACTIVE; + mtx_lock(&vnode_free_list_mtx); + TAILQ_INSERT_HEAD(&mp->mnt_activevnodelist, vp, v_actfreelist); + mp->mnt_activevnodelistsize++; + mtx_unlock(&vnode_free_list_mtx); + VI_UNLOCK(vp); MNT_IUNLOCK(mp); return (0); } @@ -2346,19 +2340,41 @@ vhold(struct vnode *vp) VI_UNLOCK(vp); } +/* + * Increase the hold count and activate if this is the first reference. + */ void vholdl(struct vnode *vp) { + struct mount *mp; CTR2(KTR_VFS, "%s: vp %p", __func__, vp); vp->v_holdcnt++; - if (VSHOULDBUSY(vp)) - vbusy(vp); + if (!VSHOULDBUSY(vp)) + return; + ASSERT_VI_LOCKED(vp, "vholdl"); + VNASSERT((vp->v_iflag & VI_FREE) != 0, vp, ("vnode not free")); + VNASSERT(vp->v_op != NULL, vp, ("vholdl: vnode already reclaimed.")); + /* + * Remove a vnode from the free list, mark it as in use, + * and put it on the active list. + */ + mtx_lock(&vnode_free_list_mtx); + TAILQ_REMOVE(&vnode_free_list, vp, v_actfreelist); + freevnodes--; + vp->v_iflag &= ~(VI_FREE|VI_AGE); + KASSERT((vp->v_iflag & VI_ACTIVE) == 0, + ("Activating already active vnode")); + vp->v_iflag |= VI_ACTIVE; + mp = vp->v_mount; + TAILQ_INSERT_HEAD(&mp->mnt_activevnodelist, vp, v_actfreelist); + mp->mnt_activevnodelistsize++; + mtx_unlock(&vnode_free_list_mtx); } /* - * Note that there is one less who cares about this vnode. vdrop() is the - * opposite of vhold(). + * Note that there is one less who cares about this vnode. + * vdrop() is the opposite of vhold(). */ void vdrop(struct vnode *vp) @@ -2370,28 +2386,93 @@ vdrop(struct vnode *vp) /* * Drop the hold count of the vnode. If this is the last reference to - * the vnode we will free it if it has been vgone'd otherwise it is - * placed on the free list. + * the vnode we place it on the free list unless it has been vgone'd + * (marked VI_DOOMED) in which case we will free it. */ void vdropl(struct vnode *vp) { + struct bufobj *bo; + struct mount *mp; + int active; ASSERT_VI_LOCKED(vp, "vdropl"); CTR2(KTR_VFS, "%s: vp %p", __func__, vp); if (vp->v_holdcnt <= 0) panic("vdrop: holdcnt %d", vp->v_holdcnt); vp->v_holdcnt--; - if (vp->v_holdcnt == 0) { - if (vp->v_iflag & VI_DOOMED) { - CTR2(KTR_VFS, "%s: destroying the vnode %p", __func__, - vp); - vdestroy(vp); - return; - } else - vfree(vp); + if (vp->v_holdcnt > 0) { + VI_UNLOCK(vp); + return; } + if ((vp->v_iflag & VI_DOOMED) == 0) { + /* + * Mark a vnode as free: remove it from its active list + * and put it up for recycling on the freelist. + */ + VNASSERT(vp->v_op != NULL, vp, + ("vdropl: vnode already reclaimed.")); + VNASSERT((vp->v_iflag & VI_FREE) == 0, vp, + ("vnode already free")); + VNASSERT(VSHOULDFREE(vp), vp, + ("vdropl: freeing when we shouldn't")); + active = vp->v_iflag & VI_ACTIVE; + vp->v_iflag &= ~VI_ACTIVE; + mp = vp->v_mount; + mtx_lock(&vnode_free_list_mtx); + if (active) { + TAILQ_REMOVE(&mp->mnt_activevnodelist, vp, + v_actfreelist); + mp->mnt_activevnodelistsize--; + } + if (vp->v_iflag & VI_AGE) { + TAILQ_INSERT_HEAD(&vnode_free_list, vp, v_actfreelist); + } else { + TAILQ_INSERT_TAIL(&vnode_free_list, vp, v_actfreelist); + } + freevnodes++; + vp->v_iflag &= ~VI_AGE; + vp->v_iflag |= VI_FREE; + mtx_unlock(&vnode_free_list_mtx); + VI_UNLOCK(vp); + return; + } + /* + * The vnode has been marked for destruction, so free it. + */ + CTR2(KTR_VFS, "%s: destroying the vnode %p", __func__, vp); + mtx_lock(&vnode_free_list_mtx); + numvnodes--; + mtx_unlock(&vnode_free_list_mtx); + bo = &vp->v_bufobj; + VNASSERT((vp->v_iflag & VI_FREE) == 0, vp, + ("cleaned vnode still on the free list.")); + VNASSERT(vp->v_data == NULL, vp, ("cleaned vnode isn't")); + VNASSERT(vp->v_holdcnt == 0, vp, ("Non-zero hold count")); + VNASSERT(vp->v_usecount == 0, vp, ("Non-zero use count")); + VNASSERT(vp->v_writecount == 0, vp, ("Non-zero write count")); + VNASSERT(bo->bo_numoutput == 0, vp, ("Clean vnode has pending I/O's")); + VNASSERT(bo->bo_clean.bv_cnt == 0, vp, ("cleanbufcnt not 0")); + VNASSERT(bo->bo_clean.bv_root == NULL, vp, ("cleanblkroot not NULL")); + VNASSERT(bo->bo_dirty.bv_cnt == 0, vp, ("dirtybufcnt not 0")); + VNASSERT(bo->bo_dirty.bv_root == NULL, vp, ("dirtyblkroot not NULL")); + VNASSERT(TAILQ_EMPTY(&vp->v_cache_dst), vp, ("vp has namecache dst")); + VNASSERT(LIST_EMPTY(&vp->v_cache_src), vp, ("vp has namecache src")); + VNASSERT(vp->v_cache_dd == NULL, vp, ("vp has namecache for ..")); VI_UNLOCK(vp); +#ifdef MAC + mac_vnode_destroy(vp); +#endif + if (vp->v_pollinfo != NULL) + destroy_vpollinfo(vp->v_pollinfo); +#ifdef INVARIANTS + /* XXX Elsewhere we detect an already freed vnode via NULL v_op. */ + vp->v_op = NULL; +#endif + lockdestroy(vp->v_vnlock); + mtx_destroy(&vp->v_interlock); + mtx_destroy(BO_MTX(bo)); + uma_zfree(vnode_zone, vp); } /* @@ -2403,6 +2484,7 @@ vdropl(struct vnode *vp) void vinactive(struct vnode *vp, struct thread *td) { + struct vm_object *obj; ASSERT_VOP_ELOCKED(vp, "vinactive"); ASSERT_VI_LOCKED(vp, "vinactive"); @@ -2412,6 +2494,17 @@ vinactive(struct vnode *vp, struct threa vp->v_iflag |= VI_DOINGINACT; vp->v_iflag &= ~VI_OWEINACT; VI_UNLOCK(vp); + /* + * Before moving off the active list, we must be sure that any + * modified pages are on the vnode's dirty list since these will + * no longer be checked once the vnode is on the inactive list. + */ + obj = vp->v_object; + if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0) { + VM_OBJECT_LOCK(obj); + vm_object_page_clean(obj, 0, 0, OBJPC_NOSYNC); + VM_OBJECT_UNLOCK(obj); + } VOP_INACTIVE(vp, td); VI_LOCK(vp); VNASSERT(vp->v_iflag & VI_DOINGINACT, vp, @@ -2467,17 +2560,13 @@ vflush(struct mount *mp, int rootrefs, i } vput(rootvp); } - MNT_ILOCK(mp); loop: - MNT_VNODE_FOREACH(vp, mp, mvp) { - VI_LOCK(vp); + MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { vholdl(vp); - MNT_IUNLOCK(mp); error = vn_lock(vp, LK_INTERLOCK | LK_EXCLUSIVE); if (error) { vdrop(vp); - MNT_ILOCK(mp); - MNT_VNODE_FOREACH_ABORT_ILOCKED(mp, mvp); + MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp); goto loop; } /* @@ -2486,7 +2575,6 @@ loop: if ((flags & SKIPSYSTEM) && (vp->v_vflag & VV_SYSTEM)) { VOP_UNLOCK(vp, 0); vdrop(vp); - MNT_ILOCK(mp); continue; } /* @@ -2504,7 +2592,7 @@ loop: if (error != 0) { VOP_UNLOCK(vp, 0); vdrop(vp); - MNT_VNODE_FOREACH_ABORT(mp, mvp); + MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp); return (error); } error = VOP_GETATTR(vp, &vattr, td->td_ucred); @@ -2515,7 +2603,6 @@ loop: (vp->v_writecount == 0 || vp->v_type != VREG)) { VOP_UNLOCK(vp, 0); vdropl(vp); - MNT_ILOCK(mp); continue; } } else @@ -2540,9 +2627,7 @@ loop: } VOP_UNLOCK(vp, 0); vdropl(vp); - MNT_ILOCK(mp); } - MNT_IUNLOCK(mp); if (rootrefs > 0 && (flags & FORCECLOSE) == 0) { /* * If just the root vnode is busy, and if its refcount @@ -2993,6 +3078,8 @@ DB_SHOW_COMMAND(mount, db_show_mount) db_printf(" mnt_ref = %d\n", mp->mnt_ref); db_printf(" mnt_gen = %d\n", mp->mnt_gen); db_printf(" mnt_nvnodelistsize = %d\n", mp->mnt_nvnodelistsize); + db_printf(" mnt_activevnodelistsize = %d\n", + mp->mnt_activevnodelistsize); db_printf(" mnt_writeopcount = %d\n", mp->mnt_writeopcount); db_printf(" mnt_maxsymlinklen = %d\n", mp->mnt_maxsymlinklen); db_printf(" mnt_iosize_max = %d\n", mp->mnt_iosize_max); @@ -3002,15 +3089,23 @@ DB_SHOW_COMMAND(mount, db_show_mount) mp->mnt_secondary_accwrites); db_printf(" mnt_gjprovider = %s\n", mp->mnt_gjprovider != NULL ? mp->mnt_gjprovider : "NULL"); - db_printf("\n"); - TAILQ_FOREACH(vp, &mp->mnt_nvnodelist, v_nmntvnodes) { + db_printf("\n\nList of active vnodes\n"); + TAILQ_FOREACH(vp, &mp->mnt_activevnodelist, v_actfreelist) { if (vp->v_type != VMARKER) { vn_printf(vp, "vnode "); if (db_pager_quit) break; } } + db_printf("\n\nList of inactive vnodes\n"); + TAILQ_FOREACH(vp, &mp->mnt_nvnodelist, v_nmntvnodes) { + if (vp->v_type != VMARKER && (vp->v_iflag & VI_ACTIVE) == 0) { + vn_printf(vp, "vnode "); + if (db_pager_quit) + break; + } + } } #endif /* DDB */ @@ -3279,19 +3374,15 @@ vfs_msync(struct mount *mp, int flags) struct vm_object *obj; CTR2(KTR_VFS, "%s: mp %p", __func__, mp); - MNT_ILOCK(mp); - MNT_VNODE_FOREACH(vp, mp, mvp) { - VI_LOCK(vp); + MNT_VNODE_FOREACH_ACTIVE(vp, mp, mvp) { obj = vp->v_object; if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0 && (flags == MNT_WAIT || VOP_ISLOCKED(vp) == 0)) { - MNT_IUNLOCK(mp); if (!vget(vp, LK_EXCLUSIVE | LK_RETRY | LK_INTERLOCK, curthread)) { if (vp->v_vflag & VV_NOSYNC) { /* unlinked */ vput(vp); - MNT_ILOCK(mp); continue; } @@ -3305,55 +3396,9 @@ vfs_msync(struct mount *mp, int flags) } vput(vp); } - MNT_ILOCK(mp); } else VI_UNLOCK(vp); } - MNT_IUNLOCK(mp); -} - -/* - * Mark a vnode as free, putting it up for recycling. - */ -static void -vfree(struct vnode *vp) -{ - - ASSERT_VI_LOCKED(vp, "vfree"); - mtx_lock(&vnode_free_list_mtx); - VNASSERT(vp->v_op != NULL, vp, ("vfree: vnode already reclaimed.")); - VNASSERT((vp->v_iflag & VI_FREE) == 0, vp, ("vnode already free")); - VNASSERT(VSHOULDFREE(vp), vp, ("vfree: freeing when we shouldn't")); - VNASSERT((vp->v_iflag & VI_DOOMED) == 0, vp, - ("vfree: Freeing doomed vnode")); - CTR2(KTR_VFS, "%s: vp %p", __func__, vp); - if (vp->v_iflag & VI_AGE) { - TAILQ_INSERT_HEAD(&vnode_free_list, vp, v_freelist); - } else { - TAILQ_INSERT_TAIL(&vnode_free_list, vp, v_freelist); - } - freevnodes++; - vp->v_iflag &= ~VI_AGE; - vp->v_iflag |= VI_FREE; - mtx_unlock(&vnode_free_list_mtx); -} - -/* - * Opposite of vfree() - mark a vnode as in use. - */ -static void -vbusy(struct vnode *vp) -{ - ASSERT_VI_LOCKED(vp, "vbusy"); - VNASSERT((vp->v_iflag & VI_FREE) != 0, vp, ("vnode not free")); - VNASSERT(vp->v_op != NULL, vp, ("vbusy: vnode already reclaimed.")); - CTR2(KTR_VFS, "%s: vp %p", __func__, vp); - - mtx_lock(&vnode_free_list_mtx); - TAILQ_REMOVE(&vnode_free_list, vp, v_freelist); - freevnodes--; - vp->v_iflag &= ~(VI_FREE|VI_AGE); - mtx_unlock(&vnode_free_list_mtx); } static void @@ -4504,3 +4549,187 @@ vfs_unixify_accmode(accmode_t *accmode) return (0); } + +/* + * These are helper functions for filesystems to traverse all + * their vnodes. See MNT_VNODE_FOREACH_ALL() in sys/mount.h. + * + * This interface replaces MNT_VNODE_FOREACH. + */ + +MALLOC_DEFINE(M_VNODE_MARKER, "vnodemarker", "vnode marker"); + +struct vnode * +__mnt_vnode_next_all(struct vnode **mvp, struct mount *mp) +{ + struct vnode *vp; + + if (should_yield()) + kern_yield(PRI_UNCHANGED); + MNT_ILOCK(mp); + KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch")); + vp = TAILQ_NEXT(*mvp, v_nmntvnodes); + while (vp != NULL && (vp->v_type == VMARKER || + (vp->v_iflag & VI_DOOMED) != 0)) + vp = TAILQ_NEXT(vp, v_nmntvnodes); + + /* Check if we are done */ + if (vp == NULL) { + __mnt_vnode_markerfree_all(mvp, mp); + /* MNT_IUNLOCK(mp); -- done in above function */ + mtx_assert(MNT_MTX(mp), MA_NOTOWNED); + return (NULL); + } + TAILQ_REMOVE(&mp->mnt_nvnodelist, *mvp, v_nmntvnodes); + TAILQ_INSERT_AFTER(&mp->mnt_nvnodelist, vp, *mvp, v_nmntvnodes); + VI_LOCK(vp); + MNT_IUNLOCK(mp); + return (vp); +} + +struct vnode * +__mnt_vnode_first_all(struct vnode **mvp, struct mount *mp) +{ + struct vnode *vp; + + *mvp = malloc(sizeof(struct vnode), M_VNODE_MARKER, M_WAITOK | M_ZERO); + MNT_ILOCK(mp); + MNT_REF(mp); + (*mvp)->v_type = VMARKER; + + vp = TAILQ_FIRST(&mp->mnt_nvnodelist); + while (vp != NULL && (vp->v_type == VMARKER || + (vp->v_iflag & VI_DOOMED) != 0)) + vp = TAILQ_NEXT(vp, v_nmntvnodes); + + /* Check if we are done */ + if (vp == NULL) { + MNT_REL(mp); + MNT_IUNLOCK(mp); + free(*mvp, M_VNODE_MARKER); + *mvp = NULL; + return (NULL); + } + (*mvp)->v_mount = mp; + TAILQ_INSERT_AFTER(&mp->mnt_nvnodelist, vp, *mvp, v_nmntvnodes); + VI_LOCK(vp); + MNT_IUNLOCK(mp); + return (vp); +} + + +void +__mnt_vnode_markerfree_all(struct vnode **mvp, struct mount *mp) +{ + + if (*mvp == NULL) { + MNT_IUNLOCK(mp); + return; + } + + mtx_assert(MNT_MTX(mp), MA_OWNED); + + KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch")); + TAILQ_REMOVE(&mp->mnt_nvnodelist, *mvp, v_nmntvnodes); + MNT_REL(mp); + MNT_IUNLOCK(mp); + free(*mvp, M_VNODE_MARKER); + *mvp = NULL; +} + +/* + * These are helper functions for filesystems to traverse their + * active vnodes. See MNT_VNODE_FOREACH_ACTIVE() in sys/mount.h + */ +struct vnode * +__mnt_vnode_next_active(struct vnode **mvp, struct mount *mp) +{ + struct vnode *vp, *nvp; + + if (should_yield()) + kern_yield(PRI_UNCHANGED); + MNT_ILOCK(mp); + KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch")); + vp = TAILQ_NEXT(*mvp, v_actfreelist); + while (vp != NULL) { + VI_LOCK(vp); + if (vp->v_mount == mp && vp->v_type != VMARKER && + (vp->v_iflag & VI_DOOMED) == 0) + break; + nvp = TAILQ_NEXT(vp, v_actfreelist); + VI_UNLOCK(vp); + vp = nvp; + } + + /* Check if we are done */ + if (vp == NULL) { + __mnt_vnode_markerfree_active(mvp, mp); + /* MNT_IUNLOCK(mp); -- done in above function */ + mtx_assert(MNT_MTX(mp), MA_NOTOWNED); + return (NULL); + } + mtx_lock(&vnode_free_list_mtx); + TAILQ_REMOVE(&mp->mnt_activevnodelist, *mvp, v_actfreelist); + TAILQ_INSERT_AFTER(&mp->mnt_activevnodelist, vp, *mvp, v_actfreelist); + mtx_unlock(&vnode_free_list_mtx); + MNT_IUNLOCK(mp); + return (vp); +} + +struct vnode * +__mnt_vnode_first_active(struct vnode **mvp, struct mount *mp) +{ + struct vnode *vp, *nvp; + + *mvp = malloc(sizeof(struct vnode), M_VNODE_MARKER, M_WAITOK | M_ZERO); + MNT_ILOCK(mp); + MNT_REF(mp); + (*mvp)->v_type = VMARKER; + + vp = TAILQ_NEXT(*mvp, v_actfreelist); + while (vp != NULL) { + VI_LOCK(vp); + if (vp->v_mount == mp && vp->v_type != VMARKER && + (vp->v_iflag & VI_DOOMED) == 0) + break; + nvp = TAILQ_NEXT(vp, v_actfreelist); + VI_UNLOCK(vp); + vp = nvp; + } + + /* Check if we are done */ + if (vp == NULL) { + MNT_REL(mp); + MNT_IUNLOCK(mp); + free(*mvp, M_VNODE_MARKER); + *mvp = NULL; + return (NULL); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri May 18 20:24:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36F13106566C; Fri, 18 May 2012 20:24:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 215DD8FC14; Fri, 18 May 2012 20:24:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IKOVWi078811; Fri, 18 May 2012 20:24:31 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IKOVB1078810; Fri, 18 May 2012 20:24:31 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205182024.q4IKOVB1078810@svn.freebsd.org> From: John Baldwin Date: Fri, 18 May 2012 20:24:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235627 - in stable/9/sys: i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 20:24:32 -0000 Author: jhb Date: Fri May 18 20:24:31 2012 New Revision: 235627 URL: http://svn.freebsd.org/changeset/base/235627 Log: Move mergeinfo from sys/kern/subr_witness.c up to sys/. Modified: Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) stable/9/sys/modules/ (props changed) From owner-svn-src-all@FreeBSD.ORG Fri May 18 20:34:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B776B106564A; Fri, 18 May 2012 20:34:08 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A28568FC0A; Fri, 18 May 2012 20:34:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IKY8le079233; Fri, 18 May 2012 20:34:08 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IKY8Mi079231; Fri, 18 May 2012 20:34:08 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201205182034.q4IKY8Mi079231@svn.freebsd.org> From: "George V. Neville-Neil" Date: Fri, 18 May 2012 20:34:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235628 - head/share/dtrace X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 20:34:08 -0000 Author: gnn Date: Fri May 18 20:34:08 2012 New Revision: 235628 URL: http://svn.freebsd.org/changeset/base/235628 Log: Fix a case typo. Pointed out by: jlh@ Modified: head/share/dtrace/README Modified: head/share/dtrace/README ============================================================================== --- head/share/dtrace/README Fri May 18 20:24:31 2012 (r235627) +++ head/share/dtrace/README Fri May 18 20:34:08 2012 (r235628) @@ -2,7 +2,7 @@ $FreeBSD$ This directory contains scripts for use with the DTrace system. The toolkit/ directory contains the latest vendor import of Brendan -Gregg's DTRaceToolkit while all the other files and directories +Gregg's DTraceToolkit while all the other files and directories contain code generated by the FreeBSD Project for use with DTrace on FreeBSD. From owner-svn-src-all@FreeBSD.ORG Fri May 18 20:40:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3EF92106566B; Fri, 18 May 2012 20:40:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 10DE38FC18; Fri, 18 May 2012 20:40:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IKeOkM079520; Fri, 18 May 2012 20:40:24 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IKeOZi079519; Fri, 18 May 2012 20:40:24 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205182040.q4IKeOZi079519@svn.freebsd.org> From: John Baldwin Date: Fri, 18 May 2012 20:40:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235629 - stable/9/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 20:40:25 -0000 Author: jhb Date: Fri May 18 20:40:24 2012 New Revision: 235629 URL: http://svn.freebsd.org/changeset/base/235629 Log: Purge mergeinfo from i386/conf/XENHVM. The mergeinfo related to amd64/conf/XENHVM is only useful in HEAD. Modified: Directory Properties: stable/9/sys/i386/conf/XENHVM (props changed) From owner-svn-src-all@FreeBSD.ORG Fri May 18 20:43:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31818106564A; Fri, 18 May 2012 20:43:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0400A8FC15; Fri, 18 May 2012 20:43:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4IKhmIp079682; Fri, 18 May 2012 20:43:48 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4IKhmrF079681; Fri, 18 May 2012 20:43:48 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205182043.q4IKhmrF079681@svn.freebsd.org> From: John Baldwin Date: Fri, 18 May 2012 20:43:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235630 - stable/8/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 20:43:49 -0000 Author: jhb Date: Fri May 18 20:43:48 2012 New Revision: 235630 URL: http://svn.freebsd.org/changeset/base/235630 Log: Purge mergeinfo from i386/conf/XENHVM. The mergeinfo related to amd64/conf/XENHVM is only useful in HEAD. Modified: Directory Properties: stable/8/sys/i386/conf/XENHVM (props changed) From owner-svn-src-all@FreeBSD.ORG Fri May 18 21:40:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C5DEC106564A; Fri, 18 May 2012 21:40:18 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6505B8FC19; Fri, 18 May 2012 21:40:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4ILeIES081988; Fri, 18 May 2012 21:40:18 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4ILeHRH081966; Fri, 18 May 2012 21:40:17 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201205182140.q4ILeHRH081966@svn.freebsd.org> From: Sean Bruno Date: Fri, 18 May 2012 21:40:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235631 - in stable/7/sys/dev: advansys amr an arcmsr asr buslogic ciss cxgb dpt hifn hptiop hptmv ida if_ndis iir ips mfi mlx mly twe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 21:40:18 -0000 Author: sbruno Date: Fri May 18 21:40:17 2012 New Revision: 235631 URL: http://svn.freebsd.org/changeset/base/235631 Log: MFC 232854,232874,232882,232883,232886 for bus_get_dma_tag() Modified: stable/7/sys/dev/advansys/adv_pci.c stable/7/sys/dev/advansys/adw_pci.c stable/7/sys/dev/amr/amr_pci.c stable/7/sys/dev/an/if_an_pci.c stable/7/sys/dev/arcmsr/arcmsr.c stable/7/sys/dev/asr/asr.c stable/7/sys/dev/buslogic/bt_pci.c stable/7/sys/dev/ciss/ciss.c stable/7/sys/dev/cxgb/cxgb_sge.c stable/7/sys/dev/dpt/dpt_pci.c stable/7/sys/dev/hifn/hifn7751.c stable/7/sys/dev/hptiop/hptiop.c stable/7/sys/dev/hptmv/entry.c stable/7/sys/dev/ida/ida_pci.c stable/7/sys/dev/if_ndis/if_ndis_pci.c stable/7/sys/dev/iir/iir_pci.c stable/7/sys/dev/ips/ips_pci.c stable/7/sys/dev/mfi/mfi_pci.c stable/7/sys/dev/mlx/mlx_pci.c stable/7/sys/dev/mly/mly.c stable/7/sys/dev/twe/twe_freebsd.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/advansys/adv_pci.c ============================================================================== --- stable/7/sys/dev/advansys/adv_pci.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/advansys/adv_pci.c Fri May 18 21:40:17 2012 (r235631) @@ -189,7 +189,7 @@ adv_pci_attach(device_t dev) /* Allocate a dmatag for our transfer DMA maps */ /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ ADV_PCI_MAX_DMA_ADDR, Modified: stable/7/sys/dev/advansys/adw_pci.c ============================================================================== --- stable/7/sys/dev/advansys/adw_pci.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/advansys/adw_pci.c Fri May 18 21:40:17 2012 (r235631) @@ -260,7 +260,7 @@ adw_pci_attach(device_t dev) /* Allocate a dmatag for our transfer DMA maps */ /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ ADW_PCI_MAX_DMA_ADDR, Modified: stable/7/sys/dev/amr/amr_pci.c ============================================================================== --- stable/7/sys/dev/amr/amr_pci.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/amr/amr_pci.c Fri May 18 21:40:17 2012 (r235631) @@ -277,7 +277,7 @@ amr_pci_attach(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment,boundary */ AMR_IS_SG64(sc) ? BUS_SPACE_MAXADDR : Modified: stable/7/sys/dev/an/if_an_pci.c ============================================================================== --- stable/7/sys/dev/an/if_an_pci.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/an/if_an_pci.c Fri May 18 21:40:17 2012 (r235631) @@ -206,7 +206,7 @@ an_attach_pci(dev) sc->an_mem_aux_bhandle = rman_get_bushandle(sc->mem_aux_res); /* Allocate DMA region */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(dev),/* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/7/sys/dev/arcmsr/arcmsr.c ============================================================================== --- stable/7/sys/dev/arcmsr/arcmsr.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/arcmsr/arcmsr.c Fri May 18 21:40:17 2012 (r235631) @@ -3396,7 +3396,7 @@ static u_int32_t arcmsr_initialize(devic return ENOMEM; } } - if(bus_dma_tag_create( /*parent*/ NULL, + if(bus_dma_tag_create( /*PCI parent*/ bus_get_dma_tag(dev), /*alignemnt*/ 1, /*boundary*/ 0, /*lowaddr*/ BUS_SPACE_MAXADDR, Modified: stable/7/sys/dev/asr/asr.c ============================================================================== --- stable/7/sys/dev/asr/asr.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/asr/asr.c Fri May 18 21:40:17 2012 (r235631) @@ -2331,7 +2331,7 @@ asr_alloc_dma(Asr_softc_t *sc) dev = sc->ha_dev; - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/7/sys/dev/buslogic/bt_pci.c ============================================================================== --- stable/7/sys/dev/buslogic/bt_pci.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/buslogic/bt_pci.c Fri May 18 21:40:17 2012 (r235631) @@ -173,7 +173,7 @@ bt_pci_attach(device_t dev) /* Allocate a dmatag for our CCB DMA maps */ /* XXX Should be a child of the PCI bus dma tag */ - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* PCI parent */ bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: stable/7/sys/dev/ciss/ciss.c ============================================================================== --- stable/7/sys/dev/ciss/ciss.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/ciss/ciss.c Fri May 18 21:40:17 2012 (r235631) @@ -698,7 +698,7 @@ ciss_init_pci(struct ciss_softc *sc) * Note that "simple" adapters can only address within a 32-bit * span. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(sc->ciss_dev),/* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/7/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_sge.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/cxgb/cxgb_sge.c Fri May 18 21:40:17 2012 (r235631) @@ -426,7 +426,7 @@ t3_sge_alloc(adapter_t *sc) { /* The parent tag. */ - if (bus_dma_tag_create( NULL, /* parent */ + if (bus_dma_tag_create( bus_get_dma_tag(sc->dev),/* PCI parent */ 1, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/7/sys/dev/dpt/dpt_pci.c ============================================================================== --- stable/7/sys/dev/dpt/dpt_pci.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/dpt/dpt_pci.c Fri May 18 21:40:17 2012 (r235631) @@ -133,7 +133,7 @@ dpt_pci_attach (device_t dev) /* Allocate a dmatag representing the capabilities of this attachment */ /* XXX Should be a child of the PCI bus dma tag */ - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* PCI parent */ bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: stable/7/sys/dev/hifn/hifn7751.c ============================================================================== --- stable/7/sys/dev/hifn/hifn7751.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/hifn/hifn7751.c Fri May 18 21:40:17 2012 (r235631) @@ -454,7 +454,7 @@ hifn_attach(device_t dev) * Setup the area where the Hifn DMA's descriptors * and associated data structures. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment,boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/7/sys/dev/hptiop/hptiop.c ============================================================================== --- stable/7/sys/dev/hptiop/hptiop.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/hptiop/hptiop.c Fri May 18 21:40:17 2012 (r235631) @@ -1367,7 +1367,7 @@ static int hptiop_attach(device_t dev) mtx_init(&hba->lock, "hptioplock", NULL, MTX_DEF); #endif - if (bus_dma_tag_create(NULL,/* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev),/* PCI parent */ 1, /* alignment */ 0, /* boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ Modified: stable/7/sys/dev/hptmv/entry.c ============================================================================== --- stable/7/sys/dev/hptmv/entry.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/hptmv/entry.c Fri May 18 21:40:17 2012 (r235631) @@ -1325,7 +1325,7 @@ init_adapter(IAL_ADAPTER_T *pAdapter) _vbus_p->OsExt = (void *)pAdapter; pMvSataAdapter->IALData = pAdapter; - if (bus_dma_tag_create(NULL,/* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(pAdapter->hpt_dev),/* parent */ 4, /* alignment */ BUS_SPACE_MAXADDR_32BIT+1, /* boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ Modified: stable/7/sys/dev/ida/ida_pci.c ============================================================================== --- stable/7/sys/dev/ida/ida_pci.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/ida/ida_pci.c Fri May 18 21:40:17 2012 (r235631) @@ -269,7 +269,7 @@ ida_pci_attach(device_t dev) } error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: stable/7/sys/dev/if_ndis/if_ndis_pci.c ============================================================================== --- stable/7/sys/dev/if_ndis/if_ndis_pci.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/if_ndis/if_ndis_pci.c Fri May 18 21:40:17 2012 (r235631) @@ -287,7 +287,7 @@ ndis_attach_pci(dev) * Allocate the parent bus DMA tag appropriate for PCI. */ #define NDIS_NSEG_NEW 32 - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(dev),/* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/7/sys/dev/iir/iir_pci.c ============================================================================== --- stable/7/sys/dev/iir/iir_pci.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/iir/iir_pci.c Fri May 18 21:40:17 2012 (r235631) @@ -319,7 +319,8 @@ iir_pci_attach(device_t dev) /* Allocate a dmatag representing the capabilities of this attachment */ /* XXX Should be a child of the PCI bus dma tag */ - if (bus_dma_tag_create(/*parent*/NULL, /*alignemnt*/1, /*boundary*/0, + if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), + /*alignemnt*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, Modified: stable/7/sys/dev/ips/ips_pci.c ============================================================================== --- stable/7/sys/dev/ips/ips_pci.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/ips/ips_pci.c Fri May 18 21:40:17 2012 (r235631) @@ -135,7 +135,7 @@ static int ips_pci_attach(device_t dev) device_printf(dev, "irq setup failed\n"); goto error; } - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* PCI parent */bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, Modified: stable/7/sys/dev/mfi/mfi_pci.c ============================================================================== --- stable/7/sys/dev/mfi/mfi_pci.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/mfi/mfi_pci.c Fri May 18 21:40:17 2012 (r235631) @@ -211,7 +211,7 @@ mfi_pci_attach(device_t dev) error = ENOMEM; /* Allocate parent DMA tag */ - if (bus_dma_tag_create( NULL, /* parent */ + if (bus_dma_tag_create( bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/7/sys/dev/mlx/mlx_pci.c ============================================================================== --- stable/7/sys/dev/mlx/mlx_pci.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/mlx/mlx_pci.c Fri May 18 21:40:17 2012 (r235631) @@ -191,7 +191,7 @@ mlx_pci_attach(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/7/sys/dev/mly/mly.c ============================================================================== --- stable/7/sys/dev/mly/mly.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/mly/mly.c Fri May 18 21:40:17 2012 (r235631) @@ -393,7 +393,7 @@ mly_pci_attach(struct mly_softc *sc) * * Note that all of these controllers are 64-bit capable. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(sc->mly_dev),/* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Modified: stable/7/sys/dev/twe/twe_freebsd.c ============================================================================== --- stable/7/sys/dev/twe/twe_freebsd.c Fri May 18 20:43:48 2012 (r235630) +++ stable/7/sys/dev/twe/twe_freebsd.c Fri May 18 21:40:17 2012 (r235631) @@ -228,7 +228,7 @@ twe_attach(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ From owner-svn-src-all@FreeBSD.ORG Fri May 18 21:49:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AFC921065673; Fri, 18 May 2012 21:49:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 929D98FC0A; Fri, 18 May 2012 21:49:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4ILnDFV082454; Fri, 18 May 2012 21:49:13 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4ILnDiV082446; Fri, 18 May 2012 21:49:13 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201205182149.q4ILnDiV082446@svn.freebsd.org> From: Dimitry Andric Date: Fri, 18 May 2012 21:49:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235633 - in stable/9: . contrib/llvm contrib/llvm/include/llvm contrib/llvm/include/llvm-c contrib/llvm/include/llvm-c/Transforms contrib/llvm/include/llvm/ADT contrib/llvm/include/llv... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 21:49:13 -0000 Author: dim Date: Fri May 18 21:49:11 2012 New Revision: 235633 URL: http://svn.freebsd.org/changeset/base/235633 Log: MFC r234353: Upgrade our copy of llvm/clang to trunk r154661, in preparation of the upcoming 3.1 release (expected in a few weeks). Preliminary release notes can be found at: MFC r234982: Upgrade our copy of llvm/clang to r155985, from upstream's release_31 branch. This brings us very close to the 3.1 release, which is planned for May 14th. MFC r235058: Make sure a few new internal clang headers get installed, I missed these in the last import. They are sometimes needed when you want to use advanced instructions. Also, add clang's internal stdalign.h header to ObsoleteFiles.inc, since it is redundant: we already have a stdalign.h header in /usr/include. Pointy hat to: dim PR: kern/167574 Submitted by: jkim Reported by: Oliver Hartmann Added: stable/9/contrib/llvm/include/llvm-c/TargetMachine.h - copied unchanged from r234353, head/contrib/llvm/include/llvm-c/TargetMachine.h stable/9/contrib/llvm/include/llvm-c/Transforms/Vectorize.h - copied unchanged from r234353, head/contrib/llvm/include/llvm-c/Transforms/Vectorize.h stable/9/contrib/llvm/include/llvm/ADT/Hashing.h - copied unchanged from r234353, head/contrib/llvm/include/llvm/ADT/Hashing.h stable/9/contrib/llvm/include/llvm/ADT/SparseSet.h - copied unchanged from r234353, head/contrib/llvm/include/llvm/ADT/SparseSet.h stable/9/contrib/llvm/include/llvm/ADT/VariadicFunction.h - copied unchanged from r234353, head/contrib/llvm/include/llvm/ADT/VariadicFunction.h stable/9/contrib/llvm/include/llvm/ADT/edit_distance.h - copied unchanged from r234353, head/contrib/llvm/include/llvm/ADT/edit_distance.h stable/9/contrib/llvm/include/llvm/CodeGen/DFAPacketizer.h - copied, changed from r234353, head/contrib/llvm/include/llvm/CodeGen/DFAPacketizer.h stable/9/contrib/llvm/include/llvm/CodeGen/LiveRangeEdit.h - copied unchanged from r234353, head/contrib/llvm/include/llvm/CodeGen/LiveRangeEdit.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineInstrBundle.h - copied unchanged from r234353, head/contrib/llvm/include/llvm/CodeGen/MachineInstrBundle.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineScheduler.h - copied unchanged from r234353, head/contrib/llvm/include/llvm/CodeGen/MachineScheduler.h stable/9/contrib/llvm/include/llvm/CodeGen/ResourcePriorityQueue.h - copied unchanged from r234353, head/contrib/llvm/include/llvm/CodeGen/ResourcePriorityQueue.h stable/9/contrib/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h - copied, changed from r234353, head/contrib/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/IntelJITEventsWrapper.h - copied unchanged from r234353, head/contrib/llvm/include/llvm/ExecutionEngine/IntelJITEventsWrapper.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/OProfileWrapper.h - copied unchanged from r234353, head/contrib/llvm/include/llvm/ExecutionEngine/OProfileWrapper.h stable/9/contrib/llvm/include/llvm/IntrinsicsHexagon.td - copied unchanged from r234353, head/contrib/llvm/include/llvm/IntrinsicsHexagon.td stable/9/contrib/llvm/include/llvm/MC/MCWinCOFFObjectWriter.h - copied unchanged from r234353, head/contrib/llvm/include/llvm/MC/MCWinCOFFObjectWriter.h stable/9/contrib/llvm/include/llvm/Object/ELF.h - copied, changed from r234353, head/contrib/llvm/include/llvm/Object/ELF.h stable/9/contrib/llvm/include/llvm/Support/DataStream.h - copied unchanged from r234353, head/contrib/llvm/include/llvm/Support/DataStream.h stable/9/contrib/llvm/include/llvm/Support/Locale.h - copied unchanged from r234982, head/contrib/llvm/include/llvm/Support/Locale.h stable/9/contrib/llvm/include/llvm/Support/LockFileManager.h - copied unchanged from r234353, head/contrib/llvm/include/llvm/Support/LockFileManager.h stable/9/contrib/llvm/include/llvm/Support/MDBuilder.h - copied unchanged from r234982, head/contrib/llvm/include/llvm/Support/MDBuilder.h stable/9/contrib/llvm/include/llvm/Support/SaveAndRestore.h - copied unchanged from r234353, head/contrib/llvm/include/llvm/Support/SaveAndRestore.h stable/9/contrib/llvm/include/llvm/Support/StreamableMemoryObject.h - copied unchanged from r234353, head/contrib/llvm/include/llvm/Support/StreamableMemoryObject.h stable/9/contrib/llvm/include/llvm/Support/YAMLParser.h - copied, changed from r234353, head/contrib/llvm/include/llvm/Support/YAMLParser.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/CmpInstAnalysis.h - copied unchanged from r234353, head/contrib/llvm/include/llvm/Transforms/Utils/CmpInstAnalysis.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/ModuleUtils.h - copied unchanged from r234353, head/contrib/llvm/include/llvm/Transforms/Utils/ModuleUtils.h stable/9/contrib/llvm/include/llvm/Transforms/Vectorize.h - copied, changed from r234353, head/contrib/llvm/include/llvm/Transforms/Vectorize.h stable/9/contrib/llvm/lib/Analysis/CodeMetrics.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Analysis/CodeMetrics.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp - copied, changed from r234353, head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h - copied, changed from r234353, head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h stable/9/contrib/llvm/lib/CodeGen/DFAPacketizer.cpp - copied, changed from r234353, head/contrib/llvm/lib/CodeGen/DFAPacketizer.cpp stable/9/contrib/llvm/lib/CodeGen/JITCodeEmitter.cpp - copied unchanged from r234353, head/contrib/llvm/lib/CodeGen/JITCodeEmitter.cpp stable/9/contrib/llvm/lib/CodeGen/MachineBlockPlacement.cpp - copied, changed from r234353, head/contrib/llvm/lib/CodeGen/MachineBlockPlacement.cpp stable/9/contrib/llvm/lib/CodeGen/MachineCodeEmitter.cpp - copied unchanged from r234353, head/contrib/llvm/lib/CodeGen/MachineCodeEmitter.cpp stable/9/contrib/llvm/lib/CodeGen/MachineCopyPropagation.cpp - copied unchanged from r234353, head/contrib/llvm/lib/CodeGen/MachineCopyPropagation.cpp stable/9/contrib/llvm/lib/CodeGen/MachineInstrBundle.cpp - copied unchanged from r234353, head/contrib/llvm/lib/CodeGen/MachineInstrBundle.cpp stable/9/contrib/llvm/lib/CodeGen/MachineScheduler.cpp - copied unchanged from r234353, head/contrib/llvm/lib/CodeGen/MachineScheduler.cpp stable/9/contrib/llvm/lib/CodeGen/RegAllocBase.cpp - copied unchanged from r234353, head/contrib/llvm/lib/CodeGen/RegAllocBase.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp - copied unchanged from r234353, head/contrib/llvm/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp - copied unchanged from r234353, head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp - copied unchanged from r234353, head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp stable/9/contrib/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp - copied unchanged from r234353, head/contrib/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp stable/9/contrib/llvm/lib/CodeGen/TargetOptionsImpl.cpp - copied unchanged from r234353, head/contrib/llvm/lib/CodeGen/TargetOptionsImpl.cpp stable/9/contrib/llvm/lib/ExecutionEngine/EventListenerCommon.h - copied unchanged from r234353, head/contrib/llvm/lib/ExecutionEngine/EventListenerCommon.h stable/9/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/ - copied from r234353, head/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/ stable/9/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.cpp - copied unchanged from r234353, head/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.cpp stable/9/contrib/llvm/lib/ExecutionEngine/OProfileJIT/ - copied from r234353, head/contrib/llvm/lib/ExecutionEngine/OProfileJIT/ stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/GDBRegistrar.cpp - copied unchanged from r234982, head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/GDBRegistrar.cpp stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h - copied unchanged from r234982, head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImage.h - copied unchanged from r234982, head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImage.h stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp - copied, changed from r234353, head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h - copied, changed from r234353, head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h - copied, changed from r234353, head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h stable/9/contrib/llvm/lib/MC/MCDisassembler/EDMain.cpp - copied unchanged from r234353, head/contrib/llvm/lib/MC/MCDisassembler/EDMain.cpp stable/9/contrib/llvm/lib/Support/DataStream.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Support/DataStream.cpp stable/9/contrib/llvm/lib/Support/Hashing.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Support/Hashing.cpp stable/9/contrib/llvm/lib/Support/IntrusiveRefCntPtr.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Support/IntrusiveRefCntPtr.cpp stable/9/contrib/llvm/lib/Support/Locale.cpp - copied unchanged from r234982, head/contrib/llvm/lib/Support/Locale.cpp stable/9/contrib/llvm/lib/Support/LocaleGeneric.inc - copied unchanged from r234982, head/contrib/llvm/lib/Support/LocaleGeneric.inc stable/9/contrib/llvm/lib/Support/LocaleWindows.inc - copied unchanged from r234982, head/contrib/llvm/lib/Support/LocaleWindows.inc stable/9/contrib/llvm/lib/Support/LocaleXlocale.inc - copied unchanged from r234982, head/contrib/llvm/lib/Support/LocaleXlocale.inc stable/9/contrib/llvm/lib/Support/LockFileManager.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Support/LockFileManager.cpp stable/9/contrib/llvm/lib/Support/StreamableMemoryObject.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Support/StreamableMemoryObject.cpp stable/9/contrib/llvm/lib/Support/YAMLParser.cpp - copied, changed from r234353, head/contrib/llvm/lib/Support/YAMLParser.cpp stable/9/contrib/llvm/lib/TableGen/TableGenAction.cpp - copied unchanged from r234353, head/contrib/llvm/lib/TableGen/TableGenAction.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPUMachineFunction.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/CellSPU/SPUMachineFunction.cpp stable/9/contrib/llvm/lib/Target/Hexagon/ - copied from r234353, head/contrib/llvm/lib/Target/Hexagon/ stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeMachineFunction.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/MBlaze/MBlazeMachineFunction.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeELFObjectWriter.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeELFObjectWriter.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430MachineFunctionInfo.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/MSP430/MSP430MachineFunctionInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/AsmParser/ - copied from r234353, head/contrib/llvm/lib/Target/Mips/AsmParser/ stable/9/contrib/llvm/lib/Target/Mips/Disassembler/ - copied from r234982, head/contrib/llvm/lib/Target/Mips/Disassembler/ stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsAnalyzeImmediate.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/Mips/MipsAnalyzeImmediate.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsAnalyzeImmediate.h - copied unchanged from r234353, head/contrib/llvm/lib/Target/Mips/MipsAnalyzeImmediate.h stable/9/contrib/llvm/lib/Target/Mips/MipsCondMov.td - copied, changed from r234353, head/contrib/llvm/lib/Target/Mips/MipsCondMov.td stable/9/contrib/llvm/lib/Target/Mips/MipsMachineFunction.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/Mips/MipsMachineFunction.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXMachineFunctionInfo.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/PTX/PTXMachineFunctionInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCSchedule440.td - copied unchanged from r234353, head/contrib/llvm/lib/Target/PowerPC/PPCSchedule440.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCScheduleA2.td - copied unchanged from r234353, head/contrib/llvm/lib/Target/PowerPC/PPCScheduleA2.td stable/9/contrib/llvm/lib/Target/Sparc/SparcMachineFunctionInfo.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/Sparc/SparcMachineFunctionInfo.cpp stable/9/contrib/llvm/lib/Target/TargetJITInfo.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/TargetJITInfo.cpp stable/9/contrib/llvm/lib/Target/TargetMachineC.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/TargetMachineC.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp stable/9/contrib/llvm/lib/Target/X86/X86InstrSVM.td - copied unchanged from r234353, head/contrib/llvm/lib/Target/X86/X86InstrSVM.td stable/9/contrib/llvm/lib/Target/X86/X86InstrXOP.td - copied unchanged from r234353, head/contrib/llvm/lib/Target/X86/X86InstrXOP.td stable/9/contrib/llvm/lib/Target/X86/X86MachineFunctionInfo.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/X86/X86MachineFunctionInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86Schedule.td - copied unchanged from r234353, head/contrib/llvm/lib/Target/X86/X86Schedule.td stable/9/contrib/llvm/lib/Target/X86/X86ScheduleAtom.td - copied unchanged from r234353, head/contrib/llvm/lib/Target/X86/X86ScheduleAtom.td stable/9/contrib/llvm/lib/Target/XCore/XCoreMachineFunctionInfo.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Target/XCore/XCoreMachineFunctionInfo.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/FunctionBlackList.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Transforms/Instrumentation/FunctionBlackList.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/FunctionBlackList.h - copied unchanged from r234353, head/contrib/llvm/lib/Transforms/Instrumentation/FunctionBlackList.h stable/9/contrib/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/GlobalMerge.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Transforms/Scalar/GlobalMerge.cpp stable/9/contrib/llvm/lib/Transforms/Utils/CmpInstAnalysis.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Transforms/Utils/CmpInstAnalysis.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp stable/9/contrib/llvm/lib/Transforms/Utils/ModuleUtils.cpp - copied unchanged from r234353, head/contrib/llvm/lib/Transforms/Utils/ModuleUtils.cpp stable/9/contrib/llvm/lib/Transforms/Vectorize/ - copied from r234353, head/contrib/llvm/lib/Transforms/Vectorize/ stable/9/contrib/llvm/tools/clang/include/clang/AST/BuiltinTypes.def - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/AST/BuiltinTypes.def stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclLookups.h - copied, changed from r234353, head/contrib/llvm/tools/clang/include/clang/AST/DeclLookups.h stable/9/contrib/llvm/tools/clang/include/clang/AST/LambdaMangleContext.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/AST/LambdaMangleContext.h stable/9/contrib/llvm/tools/clang/include/clang/AST/NSAPI.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/AST/NSAPI.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/Dominators.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/Dominators.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/PostOrderCFGView.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/PostOrderCFGView.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/CallGraph.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/Analysis/CallGraph.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/AllDiagnostics.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/Basic/AllDiagnostics.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsHexagon.def - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsHexagon.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSerializationKinds.td - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSerializationKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/Lambda.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/Basic/Lambda.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Module.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/Basic/Module.h stable/9/contrib/llvm/tools/clang/include/clang/Edit/ - copied from r234353, head/contrib/llvm/tools/clang/include/clang/Edit/ stable/9/contrib/llvm/tools/clang/include/clang/Frontend/ChainedIncludesSource.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/Frontend/ChainedIncludesSource.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/DiagnosticRenderer.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/Frontend/DiagnosticRenderer.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/LayoutOverrideSource.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/Frontend/LayoutOverrideSource.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/MigratorOptions.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/Frontend/MigratorOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/SerializedDiagnosticPrinter.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/Frontend/SerializedDiagnosticPrinter.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnostic.h - copied, changed from r234353, head/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/ModuleMap.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/Lex/ModuleMap.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/SerializationDiagnostic.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/Serialization/SerializationDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/CommonBugCategories.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/CommonBugCategories.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState_Fwd.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState_Fwd.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TaintTag.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TaintTag.h stable/9/contrib/llvm/tools/clang/include/clang/Tooling/ - copied from r234353, head/contrib/llvm/tools/clang/include/clang/Tooling/ stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/ObjCMT.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/ARCMigrate/ObjCMT.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransGCAttrs.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/ARCMigrate/TransGCAttrs.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransGCCalls.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/ARCMigrate/TransGCCalls.cpp stable/9/contrib/llvm/tools/clang/lib/AST/LambdaMangleContext.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/AST/LambdaMangleContext.cpp stable/9/contrib/llvm/tools/clang/lib/AST/NSAPI.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/AST/NSAPI.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/AnalysisDeclContext.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Analysis/AnalysisDeclContext.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/CallGraph.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Analysis/CallGraph.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/Dominators.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Analysis/Dominators.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/PostOrderCFGView.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Analysis/PostOrderCFGView.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/Module.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Basic/Module.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/WindowsToolChain.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Driver/WindowsToolChain.cpp stable/9/contrib/llvm/tools/clang/lib/Edit/ - copied from r234353, head/contrib/llvm/tools/clang/lib/Edit/ stable/9/contrib/llvm/tools/clang/lib/Frontend/ChainedDiagnosticConsumer.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Frontend/ChainedDiagnosticConsumer.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/ChainedIncludesSource.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Frontend/ChainedIncludesSource.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/DependencyGraph.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Frontend/DependencyGraph.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/DiagnosticRenderer.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Frontend/DiagnosticRenderer.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/LayoutOverrideSource.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Frontend/LayoutOverrideSource.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp - copied, changed from r234353, head/contrib/llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp stable/9/contrib/llvm/tools/clang/lib/Headers/avx2intrin.h - copied, changed from r234353, head/contrib/llvm/tools/clang/lib/Headers/avx2intrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/bmi2intrin.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Headers/bmi2intrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/bmiintrin.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Headers/bmiintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/cpuid.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Headers/cpuid.h stable/9/contrib/llvm/tools/clang/lib/Headers/fma4intrin.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Headers/fma4intrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/lzcntintrin.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Headers/lzcntintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/module.map - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Headers/module.map stable/9/contrib/llvm/tools/clang/lib/Headers/popcntintrin.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Headers/popcntintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/unwind.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Headers/unwind.h stable/9/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PPCallbacks.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Lex/PPCallbacks.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/RewriteModernObjC.cpp - copied, changed from r234353, head/contrib/llvm/tools/clang/lib/Rewrite/RewriteModernObjC.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaConsumer.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Sema/SemaConsumer.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaLambda.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/Sema/SemaLambda.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaPseudoObject.cpp - copied, changed from r234353, head/contrib/llvm/tools/clang/lib/Sema/SemaPseudoObject.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaStmtAttr.cpp - copied unchanged from r234982, head/contrib/llvm/tools/clang/lib/Sema/SemaStmtAttr.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CommonBugCategories.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CommonBugCategories.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/InterCheckerAPI.h - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/InterCheckerAPI.h stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/FunctionSummary.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/FunctionSummary.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SubEngine.cpp - copied unchanged from r234353, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SubEngine.cpp stable/9/contrib/llvm/tools/clang/lib/Tooling/ - copied from r234353, head/contrib/llvm/tools/clang/lib/Tooling/ stable/9/contrib/llvm/tools/llvm-readobj/ - copied from r234353, head/contrib/llvm/tools/llvm-readobj/ stable/9/contrib/llvm/tools/llvm-stress/ - copied from r234353, head/contrib/llvm/tools/llvm-stress/ stable/9/contrib/llvm/utils/TableGen/DFAPacketizerEmitter.cpp - copied unchanged from r234353, head/contrib/llvm/utils/TableGen/DFAPacketizerEmitter.cpp stable/9/contrib/llvm/utils/TableGen/DFAPacketizerEmitter.h - copied unchanged from r234353, head/contrib/llvm/utils/TableGen/DFAPacketizerEmitter.h stable/9/contrib/llvm/utils/TableGen/SequenceToOffsetTable.h - copied unchanged from r234353, head/contrib/llvm/utils/TableGen/SequenceToOffsetTable.h stable/9/contrib/llvm/utils/TableGen/X86ModRMFilters.cpp - copied unchanged from r234353, head/contrib/llvm/utils/TableGen/X86ModRMFilters.cpp stable/9/lib/clang/include/MipsGenMCCodeEmitter.inc - copied unchanged from r234353, head/lib/clang/include/MipsGenMCCodeEmitter.inc stable/9/lib/clang/include/clang/Basic/DiagnosticSerializationKinds.inc - copied unchanged from r234353, head/lib/clang/include/clang/Basic/DiagnosticSerializationKinds.inc stable/9/lib/clang/include/clang/Config/ - copied from r234353, head/lib/clang/include/clang/Config/ stable/9/lib/clang/include/clang/Sema/ - copied from r234353, head/lib/clang/include/clang/Sema/ stable/9/lib/clang/libclangedit/ - copied from r234353, head/lib/clang/libclangedit/ stable/9/lib/clang/libllvmmipsasmparser/ - copied from r234353, head/lib/clang/libllvmmipsasmparser/ stable/9/lib/clang/libllvmvectorize/ - copied from r234353, head/lib/clang/libllvmvectorize/ Deleted: stable/9/contrib/llvm/include/llvm/ADT/VectorExtras.h stable/9/contrib/llvm/include/llvm/CodeGen/BinaryObject.h stable/9/contrib/llvm/include/llvm/CodeGen/ObjectCodeEmitter.h stable/9/contrib/llvm/include/llvm/DebugInfoProbe.h stable/9/contrib/llvm/include/llvm/IntrinsicsAlpha.td stable/9/contrib/llvm/include/llvm/Transforms/Utils/BasicInliner.h stable/9/contrib/llvm/lib/CodeGen/ELF.h stable/9/contrib/llvm/lib/CodeGen/ELFCodeEmitter.cpp stable/9/contrib/llvm/lib/CodeGen/ELFCodeEmitter.h stable/9/contrib/llvm/lib/CodeGen/ELFWriter.cpp stable/9/contrib/llvm/lib/CodeGen/ELFWriter.h stable/9/contrib/llvm/lib/CodeGen/LiveRangeEdit.h stable/9/contrib/llvm/lib/CodeGen/ObjectCodeEmitter.cpp stable/9/contrib/llvm/lib/CodeGen/RegAllocLinearScan.cpp stable/9/contrib/llvm/lib/CodeGen/ScheduleDAGEmit.cpp stable/9/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.h stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp stable/9/contrib/llvm/lib/CodeGen/Splitter.cpp stable/9/contrib/llvm/lib/CodeGen/Splitter.h stable/9/contrib/llvm/lib/CodeGen/VirtRegRewriter.cpp stable/9/contrib/llvm/lib/CodeGen/VirtRegRewriter.h stable/9/contrib/llvm/lib/ExecutionEngine/JIT/Intercept.cpp stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JITDebugRegisterer.h stable/9/contrib/llvm/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp stable/9/contrib/llvm/lib/ExecutionEngine/MCJIT/Intercept.cpp stable/9/contrib/llvm/lib/MC/ELFObjectWriter.h stable/9/contrib/llvm/lib/MC/MCELFStreamer.h stable/9/contrib/llvm/lib/MC/MCLoggingStreamer.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMGlobalMerge.cpp stable/9/contrib/llvm/lib/Target/Alpha/ stable/9/contrib/llvm/lib/Target/Blackfin/ stable/9/contrib/llvm/lib/Target/CBackend/ stable/9/contrib/llvm/lib/Target/Hexagon/HexagonMCInst.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsMCSymbolRefExpr.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsMCSymbolRefExpr.h stable/9/contrib/llvm/lib/Target/SystemZ/ stable/9/contrib/llvm/lib/Target/TargetFrameLowering.cpp stable/9/contrib/llvm/lib/Transforms/Utils/BasicInliner.cpp stable/9/contrib/llvm/lib/VMCore/DebugInfoProbe.cpp stable/9/contrib/llvm/tools/bugpoint/CMakeLists.txt stable/9/contrib/llvm/tools/bugpoint/Makefile stable/9/contrib/llvm/tools/clang/include/clang/AST/UsuallyTinyPtrVector.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Support/SaveAndRestore.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/DelayedCleanupPool.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/HostInfo.h stable/9/contrib/llvm/tools/clang/include/clang/Index/ stable/9/contrib/llvm/tools/clang/include/clang/Sema/MultiInitializer.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ChainedIncludesSource.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h stable/9/contrib/llvm/tools/clang/lib/Analysis/AnalysisContext.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGException.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGTemporaries.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/HostInfo.cpp stable/9/contrib/llvm/tools/clang/lib/Index/ stable/9/contrib/llvm/tools/clang/lib/Sema/MultiInitializer.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ChainedIncludesSource.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AggExprVisitor.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/CMakeLists.txt stable/9/contrib/llvm/tools/clang/utils/TableGen/Makefile stable/9/contrib/llvm/tools/llc/CMakeLists.txt stable/9/contrib/llvm/tools/llc/Makefile stable/9/contrib/llvm/tools/lli/CMakeLists.txt stable/9/contrib/llvm/tools/lli/Makefile stable/9/contrib/llvm/tools/llvm-ar/CMakeLists.txt stable/9/contrib/llvm/tools/llvm-ar/Makefile stable/9/contrib/llvm/tools/llvm-as/CMakeLists.txt stable/9/contrib/llvm/tools/llvm-as/Makefile stable/9/contrib/llvm/tools/llvm-bcanalyzer/CMakeLists.txt stable/9/contrib/llvm/tools/llvm-bcanalyzer/Makefile stable/9/contrib/llvm/tools/llvm-diff/CMakeLists.txt stable/9/contrib/llvm/tools/llvm-diff/Makefile stable/9/contrib/llvm/tools/llvm-dis/CMakeLists.txt stable/9/contrib/llvm/tools/llvm-dis/Makefile stable/9/contrib/llvm/tools/llvm-extract/CMakeLists.txt stable/9/contrib/llvm/tools/llvm-extract/Makefile stable/9/contrib/llvm/tools/llvm-ld/CMakeLists.txt stable/9/contrib/llvm/tools/llvm-ld/Makefile stable/9/contrib/llvm/tools/llvm-link/CMakeLists.txt stable/9/contrib/llvm/tools/llvm-link/Makefile stable/9/contrib/llvm/tools/llvm-mc/CMakeLists.txt stable/9/contrib/llvm/tools/llvm-mc/Makefile stable/9/contrib/llvm/tools/llvm-nm/CMakeLists.txt stable/9/contrib/llvm/tools/llvm-nm/Makefile stable/9/contrib/llvm/tools/llvm-objdump/CMakeLists.txt stable/9/contrib/llvm/tools/llvm-objdump/Makefile stable/9/contrib/llvm/tools/llvm-prof/CMakeLists.txt stable/9/contrib/llvm/tools/llvm-prof/Makefile stable/9/contrib/llvm/tools/llvm-ranlib/CMakeLists.txt stable/9/contrib/llvm/tools/llvm-ranlib/Makefile stable/9/contrib/llvm/tools/llvm-rtdyld/CMakeLists.txt stable/9/contrib/llvm/tools/llvm-rtdyld/Makefile stable/9/contrib/llvm/tools/llvm-stub/CMakeLists.txt stable/9/contrib/llvm/tools/llvm-stub/Makefile stable/9/contrib/llvm/tools/macho-dump/CMakeLists.txt stable/9/contrib/llvm/tools/macho-dump/Makefile stable/9/contrib/llvm/tools/opt/CMakeLists.txt stable/9/contrib/llvm/tools/opt/Makefile stable/9/contrib/llvm/utils/TableGen/ARMDecoderEmitter.cpp stable/9/contrib/llvm/utils/TableGen/ARMDecoderEmitter.h stable/9/contrib/llvm/utils/TableGen/InstrEnumEmitter.cpp stable/9/contrib/llvm/utils/TableGen/InstrEnumEmitter.h stable/9/lib/clang/libclangindex/ Modified: stable/9/ObsoleteFiles.inc stable/9/contrib/llvm/LICENSE.TXT stable/9/contrib/llvm/include/llvm-c/Analysis.h stable/9/contrib/llvm/include/llvm-c/BitReader.h stable/9/contrib/llvm/include/llvm-c/BitWriter.h stable/9/contrib/llvm/include/llvm-c/Core.h stable/9/contrib/llvm/include/llvm-c/Disassembler.h stable/9/contrib/llvm/include/llvm-c/EnhancedDisassembly.h stable/9/contrib/llvm/include/llvm-c/ExecutionEngine.h stable/9/contrib/llvm/include/llvm-c/Initialization.h stable/9/contrib/llvm/include/llvm-c/LinkTimeOptimizer.h stable/9/contrib/llvm/include/llvm-c/Object.h stable/9/contrib/llvm/include/llvm-c/Target.h stable/9/contrib/llvm/include/llvm-c/Transforms/IPO.h stable/9/contrib/llvm/include/llvm-c/Transforms/PassManagerBuilder.h stable/9/contrib/llvm/include/llvm-c/Transforms/Scalar.h stable/9/contrib/llvm/include/llvm-c/lto.h stable/9/contrib/llvm/include/llvm/ADT/APFloat.h stable/9/contrib/llvm/include/llvm/ADT/APInt.h stable/9/contrib/llvm/include/llvm/ADT/ArrayRef.h stable/9/contrib/llvm/include/llvm/ADT/BitVector.h stable/9/contrib/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h stable/9/contrib/llvm/include/llvm/ADT/DenseMap.h stable/9/contrib/llvm/include/llvm/ADT/DenseMapInfo.h stable/9/contrib/llvm/include/llvm/ADT/FoldingSet.h stable/9/contrib/llvm/include/llvm/ADT/GraphTraits.h stable/9/contrib/llvm/include/llvm/ADT/ImmutableSet.h stable/9/contrib/llvm/include/llvm/ADT/IntervalMap.h stable/9/contrib/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h stable/9/contrib/llvm/include/llvm/ADT/PointerIntPair.h stable/9/contrib/llvm/include/llvm/ADT/PointerUnion.h stable/9/contrib/llvm/include/llvm/ADT/SetVector.h stable/9/contrib/llvm/include/llvm/ADT/SmallBitVector.h stable/9/contrib/llvm/include/llvm/ADT/SmallPtrSet.h stable/9/contrib/llvm/include/llvm/ADT/SmallSet.h stable/9/contrib/llvm/include/llvm/ADT/SmallString.h stable/9/contrib/llvm/include/llvm/ADT/SmallVector.h stable/9/contrib/llvm/include/llvm/ADT/SparseBitVector.h stable/9/contrib/llvm/include/llvm/ADT/Statistic.h stable/9/contrib/llvm/include/llvm/ADT/StringExtras.h stable/9/contrib/llvm/include/llvm/ADT/StringMap.h stable/9/contrib/llvm/include/llvm/ADT/StringRef.h stable/9/contrib/llvm/include/llvm/ADT/TinyPtrVector.h stable/9/contrib/llvm/include/llvm/ADT/Trie.h stable/9/contrib/llvm/include/llvm/ADT/Triple.h stable/9/contrib/llvm/include/llvm/ADT/Twine.h stable/9/contrib/llvm/include/llvm/ADT/ValueMap.h stable/9/contrib/llvm/include/llvm/ADT/ilist.h stable/9/contrib/llvm/include/llvm/Analysis/AliasAnalysis.h stable/9/contrib/llvm/include/llvm/Analysis/AliasSetTracker.h stable/9/contrib/llvm/include/llvm/Analysis/BlockFrequencyImpl.h stable/9/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfo.h stable/9/contrib/llvm/include/llvm/Analysis/BranchProbabilityInfo.h stable/9/contrib/llvm/include/llvm/Analysis/CFGPrinter.h stable/9/contrib/llvm/include/llvm/Analysis/CaptureTracking.h stable/9/contrib/llvm/include/llvm/Analysis/CodeMetrics.h stable/9/contrib/llvm/include/llvm/Analysis/ConstantFolding.h stable/9/contrib/llvm/include/llvm/Analysis/DIBuilder.h stable/9/contrib/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h stable/9/contrib/llvm/include/llvm/Analysis/DebugInfo.h stable/9/contrib/llvm/include/llvm/Analysis/DominanceFrontier.h stable/9/contrib/llvm/include/llvm/Analysis/DominatorInternals.h stable/9/contrib/llvm/include/llvm/Analysis/Dominators.h stable/9/contrib/llvm/include/llvm/Analysis/IVUsers.h stable/9/contrib/llvm/include/llvm/Analysis/InlineCost.h stable/9/contrib/llvm/include/llvm/Analysis/InstructionSimplify.h stable/9/contrib/llvm/include/llvm/Analysis/IntervalIterator.h stable/9/contrib/llvm/include/llvm/Analysis/LazyValueInfo.h stable/9/contrib/llvm/include/llvm/Analysis/Loads.h stable/9/contrib/llvm/include/llvm/Analysis/LoopInfo.h stable/9/contrib/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h stable/9/contrib/llvm/include/llvm/Analysis/PHITransAddr.h stable/9/contrib/llvm/include/llvm/Analysis/ProfileInfo.h stable/9/contrib/llvm/include/llvm/Analysis/RegionInfo.h stable/9/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h stable/9/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h stable/9/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h stable/9/contrib/llvm/include/llvm/Analysis/ValueTracking.h stable/9/contrib/llvm/include/llvm/Argument.h stable/9/contrib/llvm/include/llvm/Assembly/AssemblyAnnotationWriter.h stable/9/contrib/llvm/include/llvm/Assembly/Parser.h stable/9/contrib/llvm/include/llvm/Assembly/Writer.h stable/9/contrib/llvm/include/llvm/Attributes.h stable/9/contrib/llvm/include/llvm/AutoUpgrade.h stable/9/contrib/llvm/include/llvm/BasicBlock.h stable/9/contrib/llvm/include/llvm/Bitcode/Archive.h stable/9/contrib/llvm/include/llvm/Bitcode/BitCodes.h stable/9/contrib/llvm/include/llvm/Bitcode/BitstreamReader.h stable/9/contrib/llvm/include/llvm/Bitcode/BitstreamWriter.h stable/9/contrib/llvm/include/llvm/Bitcode/LLVMBitCodes.h stable/9/contrib/llvm/include/llvm/Bitcode/ReaderWriter.h stable/9/contrib/llvm/include/llvm/CodeGen/Analysis.h stable/9/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h stable/9/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h stable/9/contrib/llvm/include/llvm/CodeGen/EdgeBundles.h stable/9/contrib/llvm/include/llvm/CodeGen/FastISel.h stable/9/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/GCStrategy.h stable/9/contrib/llvm/include/llvm/CodeGen/ISDOpcodes.h stable/9/contrib/llvm/include/llvm/CodeGen/JITCodeEmitter.h stable/9/contrib/llvm/include/llvm/CodeGen/LatencyPriorityQueue.h stable/9/contrib/llvm/include/llvm/CodeGen/LexicalScopes.h stable/9/contrib/llvm/include/llvm/CodeGen/LinkAllCodegenComponents.h stable/9/contrib/llvm/include/llvm/CodeGen/LiveInterval.h stable/9/contrib/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h stable/9/contrib/llvm/include/llvm/CodeGen/LiveVariables.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineBranchProbabilityInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineCodeEmitter.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineConstantPool.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineDominators.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineFunction.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineFunctionAnalysis.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineInstr.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineInstrBuilder.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineJumpTableInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineMemOperand.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineModuleInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineOperand.h stable/9/contrib/llvm/include/llvm/CodeGen/MachinePassRegistry.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/PBQP/Graph.h stable/9/contrib/llvm/include/llvm/CodeGen/PBQP/HeuristicBase.h stable/9/contrib/llvm/include/llvm/CodeGen/PBQP/Heuristics/Briggs.h stable/9/contrib/llvm/include/llvm/CodeGen/Passes.h stable/9/contrib/llvm/include/llvm/CodeGen/RegisterScavenging.h stable/9/contrib/llvm/include/llvm/CodeGen/ScheduleDAG.h stable/9/contrib/llvm/include/llvm/CodeGen/SchedulerRegistry.h stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAGNodes.h stable/9/contrib/llvm/include/llvm/CodeGen/SlotIndexes.h stable/9/contrib/llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h stable/9/contrib/llvm/include/llvm/CodeGen/ValueTypes.h stable/9/contrib/llvm/include/llvm/CodeGen/ValueTypes.td stable/9/contrib/llvm/include/llvm/Constant.h stable/9/contrib/llvm/include/llvm/Constants.h stable/9/contrib/llvm/include/llvm/DefaultPasses.h stable/9/contrib/llvm/include/llvm/DerivedTypes.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/JITEventListener.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/JITMemoryManager.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h stable/9/contrib/llvm/include/llvm/Function.h stable/9/contrib/llvm/include/llvm/GlobalValue.h stable/9/contrib/llvm/include/llvm/InitializePasses.h stable/9/contrib/llvm/include/llvm/InlineAsm.h stable/9/contrib/llvm/include/llvm/InstrTypes.h stable/9/contrib/llvm/include/llvm/Instruction.def stable/9/contrib/llvm/include/llvm/Instruction.h stable/9/contrib/llvm/include/llvm/Instructions.h stable/9/contrib/llvm/include/llvm/IntrinsicInst.h stable/9/contrib/llvm/include/llvm/Intrinsics.td stable/9/contrib/llvm/include/llvm/IntrinsicsX86.td stable/9/contrib/llvm/include/llvm/LLVMContext.h stable/9/contrib/llvm/include/llvm/LinkAllPasses.h stable/9/contrib/llvm/include/llvm/Linker.h stable/9/contrib/llvm/include/llvm/MC/MCAsmBackend.h stable/9/contrib/llvm/include/llvm/MC/MCAsmInfo.h stable/9/contrib/llvm/include/llvm/MC/MCAsmInfoCOFF.h stable/9/contrib/llvm/include/llvm/MC/MCAsmInfoDarwin.h stable/9/contrib/llvm/include/llvm/MC/MCAsmLayout.h stable/9/contrib/llvm/include/llvm/MC/MCAssembler.h stable/9/contrib/llvm/include/llvm/MC/MCCodeEmitter.h stable/9/contrib/llvm/include/llvm/MC/MCCodeGenInfo.h stable/9/contrib/llvm/include/llvm/MC/MCContext.h stable/9/contrib/llvm/include/llvm/MC/MCDisassembler.h stable/9/contrib/llvm/include/llvm/MC/MCDwarf.h stable/9/contrib/llvm/include/llvm/MC/MCELFObjectWriter.h stable/9/contrib/llvm/include/llvm/MC/MCExpr.h stable/9/contrib/llvm/include/llvm/MC/MCFixup.h stable/9/contrib/llvm/include/llvm/MC/MCInst.h stable/9/contrib/llvm/include/llvm/MC/MCInstPrinter.h stable/9/contrib/llvm/include/llvm/MC/MCInstrAnalysis.h stable/9/contrib/llvm/include/llvm/MC/MCInstrDesc.h stable/9/contrib/llvm/include/llvm/MC/MCInstrInfo.h stable/9/contrib/llvm/include/llvm/MC/MCObjectFileInfo.h stable/9/contrib/llvm/include/llvm/MC/MCObjectStreamer.h stable/9/contrib/llvm/include/llvm/MC/MCObjectWriter.h stable/9/contrib/llvm/include/llvm/MC/MCParser/AsmLexer.h stable/9/contrib/llvm/include/llvm/MC/MCParser/MCAsmLexer.h stable/9/contrib/llvm/include/llvm/MC/MCParser/MCAsmParser.h stable/9/contrib/llvm/include/llvm/MC/MCRegisterInfo.h stable/9/contrib/llvm/include/llvm/MC/MCSection.h stable/9/contrib/llvm/include/llvm/MC/MCSectionCOFF.h stable/9/contrib/llvm/include/llvm/MC/MCSectionELF.h stable/9/contrib/llvm/include/llvm/MC/MCSectionMachO.h stable/9/contrib/llvm/include/llvm/MC/MCStreamer.h stable/9/contrib/llvm/include/llvm/Metadata.h stable/9/contrib/llvm/include/llvm/Module.h stable/9/contrib/llvm/include/llvm/Object/Archive.h stable/9/contrib/llvm/include/llvm/Object/Binary.h stable/9/contrib/llvm/include/llvm/Object/COFF.h stable/9/contrib/llvm/include/llvm/Object/MachO.h stable/9/contrib/llvm/include/llvm/Object/MachOObject.h stable/9/contrib/llvm/include/llvm/Object/ObjectFile.h stable/9/contrib/llvm/include/llvm/Operator.h stable/9/contrib/llvm/include/llvm/Pass.h stable/9/contrib/llvm/include/llvm/PassAnalysisSupport.h stable/9/contrib/llvm/include/llvm/PassManager.h stable/9/contrib/llvm/include/llvm/PassManagers.h stable/9/contrib/llvm/include/llvm/PassSupport.h stable/9/contrib/llvm/include/llvm/Support/BlockFrequency.h stable/9/contrib/llvm/include/llvm/Support/BranchProbability.h stable/9/contrib/llvm/include/llvm/Support/CFG.h stable/9/contrib/llvm/include/llvm/Support/COFF.h stable/9/contrib/llvm/include/llvm/Support/CallSite.h stable/9/contrib/llvm/include/llvm/Support/Capacity.h stable/9/contrib/llvm/include/llvm/Support/CodeGen.h stable/9/contrib/llvm/include/llvm/Support/CommandLine.h stable/9/contrib/llvm/include/llvm/Support/Compiler.h stable/9/contrib/llvm/include/llvm/Support/DOTGraphTraits.h stable/9/contrib/llvm/include/llvm/Support/DataTypes.h.in stable/9/contrib/llvm/include/llvm/Support/Debug.h stable/9/contrib/llvm/include/llvm/Support/Dwarf.h stable/9/contrib/llvm/include/llvm/Support/DynamicLibrary.h stable/9/contrib/llvm/include/llvm/Support/ELF.h stable/9/contrib/llvm/include/llvm/Support/Endian.h stable/9/contrib/llvm/include/llvm/Support/FileSystem.h stable/9/contrib/llvm/include/llvm/Support/GraphWriter.h stable/9/contrib/llvm/include/llvm/Support/Host.h stable/9/contrib/llvm/include/llvm/Support/IRBuilder.h stable/9/contrib/llvm/include/llvm/Support/IRReader.h stable/9/contrib/llvm/include/llvm/Support/InstVisitor.h stable/9/contrib/llvm/include/llvm/Support/MachO.h stable/9/contrib/llvm/include/llvm/Support/ManagedStatic.h stable/9/contrib/llvm/include/llvm/Support/MathExtras.h stable/9/contrib/llvm/include/llvm/Support/MemoryObject.h stable/9/contrib/llvm/include/llvm/Support/PathV1.h stable/9/contrib/llvm/include/llvm/Support/PatternMatch.h stable/9/contrib/llvm/include/llvm/Support/Process.h stable/9/contrib/llvm/include/llvm/Support/Program.h stable/9/contrib/llvm/include/llvm/Support/Recycler.h stable/9/contrib/llvm/include/llvm/Support/SMLoc.h stable/9/contrib/llvm/include/llvm/Support/SourceMgr.h stable/9/contrib/llvm/include/llvm/Support/TargetRegistry.h stable/9/contrib/llvm/include/llvm/Support/TargetSelect.h stable/9/contrib/llvm/include/llvm/Support/Valgrind.h stable/9/contrib/llvm/include/llvm/Support/ValueHandle.h stable/9/contrib/llvm/include/llvm/Support/raw_ostream.h stable/9/contrib/llvm/include/llvm/Support/system_error.h stable/9/contrib/llvm/include/llvm/Support/type_traits.h stable/9/contrib/llvm/include/llvm/TableGen/Error.h stable/9/contrib/llvm/include/llvm/TableGen/Record.h stable/9/contrib/llvm/include/llvm/TableGen/TableGenAction.h stable/9/contrib/llvm/include/llvm/TableGen/TableGenBackend.h stable/9/contrib/llvm/include/llvm/Target/Mangler.h stable/9/contrib/llvm/include/llvm/Target/Target.td stable/9/contrib/llvm/include/llvm/Target/TargetCallingConv.h stable/9/contrib/llvm/include/llvm/Target/TargetCallingConv.td stable/9/contrib/llvm/include/llvm/Target/TargetData.h stable/9/contrib/llvm/include/llvm/Target/TargetELFWriterInfo.h stable/9/contrib/llvm/include/llvm/Target/TargetFrameLowering.h stable/9/contrib/llvm/include/llvm/Target/TargetInstrInfo.h stable/9/contrib/llvm/include/llvm/Target/TargetJITInfo.h stable/9/contrib/llvm/include/llvm/Target/TargetLibraryInfo.h stable/9/contrib/llvm/include/llvm/Target/TargetLowering.h stable/9/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h stable/9/contrib/llvm/include/llvm/Target/TargetMachine.h stable/9/contrib/llvm/include/llvm/Target/TargetOpcodes.h stable/9/contrib/llvm/include/llvm/Target/TargetOptions.h stable/9/contrib/llvm/include/llvm/Target/TargetRegisterInfo.h stable/9/contrib/llvm/include/llvm/Target/TargetSelectionDAG.td stable/9/contrib/llvm/include/llvm/Target/TargetSubtargetInfo.h stable/9/contrib/llvm/include/llvm/Transforms/IPO.h stable/9/contrib/llvm/include/llvm/Transforms/IPO/InlinerPass.h stable/9/contrib/llvm/include/llvm/Transforms/IPO/PassManagerBuilder.h stable/9/contrib/llvm/include/llvm/Transforms/Instrumentation.h stable/9/contrib/llvm/include/llvm/Transforms/Scalar.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/BuildLibCalls.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/Cloning.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/SSAUpdater.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/SSAUpdaterImpl.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/SimplifyIndVar.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/UnrollLoop.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/ValueMapper.h stable/9/contrib/llvm/include/llvm/Type.h stable/9/contrib/llvm/include/llvm/User.h stable/9/contrib/llvm/include/llvm/Value.h stable/9/contrib/llvm/lib/Analysis/AliasAnalysis.cpp stable/9/contrib/llvm/lib/Analysis/AliasAnalysisCounter.cpp stable/9/contrib/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp stable/9/contrib/llvm/lib/Analysis/AliasSetTracker.cpp stable/9/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp stable/9/contrib/llvm/lib/Analysis/BlockFrequencyInfo.cpp stable/9/contrib/llvm/lib/Analysis/BranchProbabilityInfo.cpp stable/9/contrib/llvm/lib/Analysis/CFGPrinter.cpp stable/9/contrib/llvm/lib/Analysis/CaptureTracking.cpp stable/9/contrib/llvm/lib/Analysis/ConstantFolding.cpp stable/9/contrib/llvm/lib/Analysis/DIBuilder.cpp stable/9/contrib/llvm/lib/Analysis/DebugInfo.cpp stable/9/contrib/llvm/lib/Analysis/DominanceFrontier.cpp stable/9/contrib/llvm/lib/Analysis/IPA/CallGraph.cpp stable/9/contrib/llvm/lib/Analysis/IPA/GlobalsModRef.cpp stable/9/contrib/llvm/lib/Analysis/IVUsers.cpp stable/9/contrib/llvm/lib/Analysis/InlineCost.cpp stable/9/contrib/llvm/lib/Analysis/InstructionSimplify.cpp stable/9/contrib/llvm/lib/Analysis/LazyValueInfo.cpp stable/9/contrib/llvm/lib/Analysis/Lint.cpp stable/9/contrib/llvm/lib/Analysis/Loads.cpp stable/9/contrib/llvm/lib/Analysis/LoopDependenceAnalysis.cpp stable/9/contrib/llvm/lib/Analysis/LoopInfo.cpp stable/9/contrib/llvm/lib/Analysis/LoopPass.cpp stable/9/contrib/llvm/lib/Analysis/MemDepPrinter.cpp stable/9/contrib/llvm/lib/Analysis/MemoryBuiltins.cpp stable/9/contrib/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp stable/9/contrib/llvm/lib/Analysis/PHITransAddr.cpp stable/9/contrib/llvm/lib/Analysis/PathNumbering.cpp stable/9/contrib/llvm/lib/Analysis/PathProfileVerifier.cpp stable/9/contrib/llvm/lib/Analysis/ProfileEstimatorPass.cpp stable/9/contrib/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp stable/9/contrib/llvm/lib/Analysis/ProfileVerifierPass.cpp stable/9/contrib/llvm/lib/Analysis/RegionInfo.cpp stable/9/contrib/llvm/lib/Analysis/ScalarEvolution.cpp stable/9/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp stable/9/contrib/llvm/lib/Analysis/ScalarEvolutionNormalization.cpp stable/9/contrib/llvm/lib/Analysis/SparsePropagation.cpp stable/9/contrib/llvm/lib/Analysis/Trace.cpp stable/9/contrib/llvm/lib/Analysis/ValueTracking.cpp stable/9/contrib/llvm/lib/Archive/ArchiveReader.cpp stable/9/contrib/llvm/lib/Archive/ArchiveWriter.cpp stable/9/contrib/llvm/lib/AsmParser/LLLexer.cpp stable/9/contrib/llvm/lib/AsmParser/LLLexer.h stable/9/contrib/llvm/lib/AsmParser/LLParser.cpp stable/9/contrib/llvm/lib/AsmParser/LLParser.h stable/9/contrib/llvm/lib/AsmParser/LLToken.h stable/9/contrib/llvm/lib/AsmParser/Parser.cpp stable/9/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp stable/9/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.h stable/9/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp stable/9/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp stable/9/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.h stable/9/contrib/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp stable/9/contrib/llvm/lib/CodeGen/AllocationOrder.cpp stable/9/contrib/llvm/lib/CodeGen/AllocationOrder.h stable/9/contrib/llvm/lib/CodeGen/Analysis.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.h stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp stable/9/contrib/llvm/lib/CodeGen/BranchFolding.cpp stable/9/contrib/llvm/lib/CodeGen/CallingConvLower.cpp stable/9/contrib/llvm/lib/CodeGen/CodeGen.cpp stable/9/contrib/llvm/lib/CodeGen/CodePlacementOpt.cpp stable/9/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp stable/9/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.h stable/9/contrib/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp stable/9/contrib/llvm/lib/CodeGen/DwarfEHPrepare.cpp stable/9/contrib/llvm/lib/CodeGen/EdgeBundles.cpp stable/9/contrib/llvm/lib/CodeGen/ExecutionDepsFix.cpp stable/9/contrib/llvm/lib/CodeGen/ExpandISelPseudos.cpp stable/9/contrib/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp stable/9/contrib/llvm/lib/CodeGen/GCMetadata.cpp stable/9/contrib/llvm/lib/CodeGen/GCStrategy.cpp stable/9/contrib/llvm/lib/CodeGen/IfConversion.cpp stable/9/contrib/llvm/lib/CodeGen/InlineSpiller.cpp stable/9/contrib/llvm/lib/CodeGen/InterferenceCache.cpp stable/9/contrib/llvm/lib/CodeGen/InterferenceCache.h stable/9/contrib/llvm/lib/CodeGen/IntrinsicLowering.cpp stable/9/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp stable/9/contrib/llvm/lib/CodeGen/LatencyPriorityQueue.cpp stable/9/contrib/llvm/lib/CodeGen/LexicalScopes.cpp stable/9/contrib/llvm/lib/CodeGen/LiveDebugVariables.cpp stable/9/contrib/llvm/lib/CodeGen/LiveInterval.cpp stable/9/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp stable/9/contrib/llvm/lib/CodeGen/LiveIntervalUnion.cpp stable/9/contrib/llvm/lib/CodeGen/LiveIntervalUnion.h stable/9/contrib/llvm/lib/CodeGen/LiveRangeCalc.cpp stable/9/contrib/llvm/lib/CodeGen/LiveRangeEdit.cpp stable/9/contrib/llvm/lib/CodeGen/LiveVariables.cpp stable/9/contrib/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp stable/9/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp stable/9/contrib/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp stable/9/contrib/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp stable/9/contrib/llvm/lib/CodeGen/MachineCSE.cpp stable/9/contrib/llvm/lib/CodeGen/MachineFunction.cpp stable/9/contrib/llvm/lib/CodeGen/MachineFunctionAnalysis.cpp stable/9/contrib/llvm/lib/CodeGen/MachineInstr.cpp stable/9/contrib/llvm/lib/CodeGen/MachineLICM.cpp stable/9/contrib/llvm/lib/CodeGen/MachineModuleInfo.cpp stable/9/contrib/llvm/lib/CodeGen/MachinePassRegistry.cpp stable/9/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp stable/9/contrib/llvm/lib/CodeGen/MachineSSAUpdater.cpp stable/9/contrib/llvm/lib/CodeGen/MachineSink.cpp stable/9/contrib/llvm/lib/CodeGen/MachineVerifier.cpp stable/9/contrib/llvm/lib/CodeGen/OptimizePHIs.cpp stable/9/contrib/llvm/lib/CodeGen/PHIElimination.cpp stable/9/contrib/llvm/lib/CodeGen/Passes.cpp stable/9/contrib/llvm/lib/CodeGen/PeepholeOptimizer.cpp stable/9/contrib/llvm/lib/CodeGen/PostRASchedulerList.cpp stable/9/contrib/llvm/lib/CodeGen/ProcessImplicitDefs.cpp stable/9/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp stable/9/contrib/llvm/lib/CodeGen/PrologEpilogInserter.h stable/9/contrib/llvm/lib/CodeGen/PseudoSourceValue.cpp stable/9/contrib/llvm/lib/CodeGen/RegAllocBase.h stable/9/contrib/llvm/lib/CodeGen/RegAllocBasic.cpp stable/9/contrib/llvm/lib/CodeGen/RegAllocFast.cpp stable/9/contrib/llvm/lib/CodeGen/RegAllocGreedy.cpp stable/9/contrib/llvm/lib/CodeGen/RegAllocPBQP.cpp stable/9/contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp stable/9/contrib/llvm/lib/CodeGen/RegisterClassInfo.h stable/9/contrib/llvm/lib/CodeGen/RegisterCoalescer.cpp stable/9/contrib/llvm/lib/CodeGen/RegisterCoalescer.h stable/9/contrib/llvm/lib/CodeGen/RegisterScavenging.cpp stable/9/contrib/llvm/lib/CodeGen/RenderMachineFunction.cpp stable/9/contrib/llvm/lib/CodeGen/ScheduleDAG.cpp stable/9/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp stable/9/contrib/llvm/lib/CodeGen/ScheduleDAGPrinter.cpp stable/9/contrib/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp stable/9/contrib/llvm/lib/CodeGen/ShadowStackGC.cpp stable/9/contrib/llvm/lib/CodeGen/ShrinkWrapping.cpp stable/9/contrib/llvm/lib/CodeGen/SjLjEHPrepare.cpp stable/9/contrib/llvm/lib/CodeGen/SlotIndexes.cpp stable/9/contrib/llvm/lib/CodeGen/Spiller.cpp stable/9/contrib/llvm/lib/CodeGen/Spiller.h stable/9/contrib/llvm/lib/CodeGen/SplitKit.cpp stable/9/contrib/llvm/lib/CodeGen/SplitKit.h stable/9/contrib/llvm/lib/CodeGen/StackProtector.cpp stable/9/contrib/llvm/lib/CodeGen/StackSlotColoring.cpp stable/9/contrib/llvm/lib/CodeGen/StrongPHIElimination.cpp stable/9/contrib/llvm/lib/CodeGen/TailDuplication.cpp stable/9/contrib/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp stable/9/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp stable/9/contrib/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp stable/9/contrib/llvm/lib/CodeGen/VirtRegMap.cpp stable/9/contrib/llvm/lib/CodeGen/VirtRegMap.h stable/9/contrib/llvm/lib/DebugInfo/DWARFContext.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFContext.h stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugAbbrev.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugAbbrev.h stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugArangeSet.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugAranges.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugInfoEntry.h stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugLine.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFFormValue.cpp stable/9/contrib/llvm/lib/ExecutionEngine/ExecutionEngine.cpp stable/9/contrib/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp stable/9/contrib/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp stable/9/contrib/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp stable/9/contrib/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JIT.cpp stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JIT.h stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp stable/9/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp stable/9/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h stable/9/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp stable/9/contrib/llvm/lib/ExecutionEngine/TargetSelect.cpp stable/9/contrib/llvm/lib/Linker/LinkArchives.cpp stable/9/contrib/llvm/lib/Linker/LinkModules.cpp stable/9/contrib/llvm/lib/Linker/Linker.cpp stable/9/contrib/llvm/lib/MC/ELFObjectWriter.cpp stable/9/contrib/llvm/lib/MC/MCAsmBackend.cpp stable/9/contrib/llvm/lib/MC/MCAsmInfo.cpp stable/9/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp stable/9/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp stable/9/contrib/llvm/lib/MC/MCAsmStreamer.cpp stable/9/contrib/llvm/lib/MC/MCAssembler.cpp stable/9/contrib/llvm/lib/MC/MCCodeGenInfo.cpp stable/9/contrib/llvm/lib/MC/MCContext.cpp stable/9/contrib/llvm/lib/MC/MCDisassembler/Disassembler.cpp stable/9/contrib/llvm/lib/MC/MCDisassembler/Disassembler.h stable/9/contrib/llvm/lib/MC/MCDisassembler/EDDisassembler.cpp stable/9/contrib/llvm/lib/MC/MCDisassembler/EDDisassembler.h stable/9/contrib/llvm/lib/MC/MCDisassembler/EDOperand.cpp stable/9/contrib/llvm/lib/MC/MCDwarf.cpp stable/9/contrib/llvm/lib/MC/MCELF.cpp stable/9/contrib/llvm/lib/MC/MCELFObjectTargetWriter.cpp stable/9/contrib/llvm/lib/MC/MCELFStreamer.cpp stable/9/contrib/llvm/lib/MC/MCExpr.cpp stable/9/contrib/llvm/lib/MC/MCInst.cpp stable/9/contrib/llvm/lib/MC/MCInstPrinter.cpp stable/9/contrib/llvm/lib/MC/MCMachOStreamer.cpp stable/9/contrib/llvm/lib/MC/MCModule.cpp stable/9/contrib/llvm/lib/MC/MCNullStreamer.cpp stable/9/contrib/llvm/lib/MC/MCObjectFileInfo.cpp stable/9/contrib/llvm/lib/MC/MCObjectStreamer.cpp stable/9/contrib/llvm/lib/MC/MCObjectWriter.cpp stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp stable/9/contrib/llvm/lib/MC/MCParser/COFFAsmParser.cpp stable/9/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp stable/9/contrib/llvm/lib/MC/MCParser/MCAsmLexer.cpp stable/9/contrib/llvm/lib/MC/MCParser/MCAsmParser.cpp stable/9/contrib/llvm/lib/MC/MCPureStreamer.cpp stable/9/contrib/llvm/lib/MC/MCStreamer.cpp stable/9/contrib/llvm/lib/MC/MCSymbol.cpp stable/9/contrib/llvm/lib/MC/MachObjectWriter.cpp stable/9/contrib/llvm/lib/MC/SubtargetFeature.cpp stable/9/contrib/llvm/lib/MC/WinCOFFObjectWriter.cpp stable/9/contrib/llvm/lib/MC/WinCOFFStreamer.cpp stable/9/contrib/llvm/lib/Object/Archive.cpp stable/9/contrib/llvm/lib/Object/COFFObjectFile.cpp stable/9/contrib/llvm/lib/Object/ELFObjectFile.cpp stable/9/contrib/llvm/lib/Object/MachOObject.cpp stable/9/contrib/llvm/lib/Object/MachOObjectFile.cpp stable/9/contrib/llvm/lib/Object/Object.cpp stable/9/contrib/llvm/lib/Object/ObjectFile.cpp stable/9/contrib/llvm/lib/Support/APFloat.cpp stable/9/contrib/llvm/lib/Support/APInt.cpp stable/9/contrib/llvm/lib/Support/Allocator.cpp stable/9/contrib/llvm/lib/Support/Atomic.cpp stable/9/contrib/llvm/lib/Support/BlockFrequency.cpp stable/9/contrib/llvm/lib/Support/BranchProbability.cpp stable/9/contrib/llvm/lib/Support/CommandLine.cpp stable/9/contrib/llvm/lib/Support/ConstantRange.cpp stable/9/contrib/llvm/lib/Support/CrashRecoveryContext.cpp stable/9/contrib/llvm/lib/Support/DAGDeltaAlgorithm.cpp stable/9/contrib/llvm/lib/Support/DataExtractor.cpp stable/9/contrib/llvm/lib/Support/Dwarf.cpp stable/9/contrib/llvm/lib/Support/FileUtilities.cpp stable/9/contrib/llvm/lib/Support/FoldingSet.cpp stable/9/contrib/llvm/lib/Support/GraphWriter.cpp stable/9/contrib/llvm/lib/Support/Host.cpp stable/9/contrib/llvm/lib/Support/ManagedStatic.cpp stable/9/contrib/llvm/lib/Support/MemoryBuffer.cpp stable/9/contrib/llvm/lib/Support/Mutex.cpp stable/9/contrib/llvm/lib/Support/Path.cpp stable/9/contrib/llvm/lib/Support/PathV2.cpp stable/9/contrib/llvm/lib/Support/Program.cpp stable/9/contrib/llvm/lib/Support/RWMutex.cpp stable/9/contrib/llvm/lib/Support/SmallPtrSet.cpp stable/9/contrib/llvm/lib/Support/SourceMgr.cpp stable/9/contrib/llvm/lib/Support/Statistic.cpp stable/9/contrib/llvm/lib/Support/StringExtras.cpp stable/9/contrib/llvm/lib/Support/StringMap.cpp stable/9/contrib/llvm/lib/Support/StringRef.cpp stable/9/contrib/llvm/lib/Support/TargetRegistry.cpp stable/9/contrib/llvm/lib/Support/ThreadLocal.cpp stable/9/contrib/llvm/lib/Support/Threading.cpp stable/9/contrib/llvm/lib/Support/Timer.cpp stable/9/contrib/llvm/lib/Support/Triple.cpp stable/9/contrib/llvm/lib/Support/Unix/Host.inc stable/9/contrib/llvm/lib/Support/Unix/Path.inc stable/9/contrib/llvm/lib/Support/Unix/PathV2.inc stable/9/contrib/llvm/lib/Support/Unix/Process.inc stable/9/contrib/llvm/lib/Support/Unix/Program.inc stable/9/contrib/llvm/lib/Support/Unix/Signals.inc stable/9/contrib/llvm/lib/Support/Valgrind.cpp stable/9/contrib/llvm/lib/Support/Windows/Host.inc stable/9/contrib/llvm/lib/Support/Windows/Path.inc stable/9/contrib/llvm/lib/Support/Windows/PathV2.inc stable/9/contrib/llvm/lib/Support/Windows/Process.inc stable/9/contrib/llvm/lib/Support/Windows/Program.inc stable/9/contrib/llvm/lib/Support/Windows/Signals.inc stable/9/contrib/llvm/lib/Support/Windows/Windows.h stable/9/contrib/llvm/lib/Support/raw_ostream.cpp stable/9/contrib/llvm/lib/TableGen/Error.cpp stable/9/contrib/llvm/lib/TableGen/Record.cpp stable/9/contrib/llvm/lib/TableGen/TGLexer.cpp stable/9/contrib/llvm/lib/TableGen/TGLexer.h stable/9/contrib/llvm/lib/TableGen/TGParser.cpp stable/9/contrib/llvm/lib/TableGen/TGParser.h stable/9/contrib/llvm/lib/TableGen/TableGenBackend.cpp stable/9/contrib/llvm/lib/Target/ARM/ARM.h stable/9/contrib/llvm/lib/Target/ARM/ARM.td stable/9/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.h stable/9/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.h stable/9/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h stable/9/contrib/llvm/lib/Target/ARM/ARMBuildAttrs.h stable/9/contrib/llvm/lib/Target/ARM/ARMCallingConv.h stable/9/contrib/llvm/lib/Target/ARM/ARMCallingConv.td stable/9/contrib/llvm/lib/Target/ARM/ARMCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.h stable/9/contrib/llvm/lib/Target/ARM/ARMELFWriterInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMELFWriterInfo.h stable/9/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h stable/9/contrib/llvm/lib/Target/ARM/ARMHazardRecognizer.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMHazardRecognizer.h stable/9/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMISelLowering.h stable/9/contrib/llvm/lib/Target/ARM/ARMInstrFormats.td stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.h stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td stable/9/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td stable/9/contrib/llvm/lib/Target/ARM/ARMInstrThumb.td stable/9/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td stable/9/contrib/llvm/lib/Target/ARM/ARMInstrVFP.td stable/9/contrib/llvm/lib/Target/ARM/ARMJITInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMJITInfo.h stable/9/contrib/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMMCInstLower.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h stable/9/contrib/llvm/lib/Target/ARM/ARMPerfectShuffle.h stable/9/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.h stable/9/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.td stable/9/contrib/llvm/lib/Target/ARM/ARMRelocations.h stable/9/contrib/llvm/lib/Target/ARM/ARMSchedule.td stable/9/contrib/llvm/lib/Target/ARM/ARMScheduleA8.td stable/9/contrib/llvm/lib/Target/ARM/ARMScheduleA9.td stable/9/contrib/llvm/lib/Target/ARM/ARMScheduleV6.td stable/9/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMSubtarget.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMSubtarget.h stable/9/contrib/llvm/lib/Target/ARM/ARMTargetMachine.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMTargetMachine.h stable/9/contrib/llvm/lib/Target/ARM/ARMTargetObjectFile.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMTargetObjectFile.h stable/9/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmLexer.cpp stable/9/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp stable/9/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp stable/9/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp stable/9/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.h stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp stable/9/contrib/llvm/lib/Target/ARM/MLxExpansionPass.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb1InstrInfo.h stable/9/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.h stable/9/contrib/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.h stable/9/contrib/llvm/lib/Target/ARM/Thumb2RegisterInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb2RegisterInfo.h stable/9/contrib/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp stable/9/contrib/llvm/lib/Target/CellSPU/CellSDKIntrinsics.td stable/9/contrib/llvm/lib/Target/CellSPU/MCTargetDesc/SPUMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/CellSPU/MCTargetDesc/SPUMCAsmInfo.h stable/9/contrib/llvm/lib/Target/CellSPU/MCTargetDesc/SPUMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/CellSPU/MCTargetDesc/SPUMCTargetDesc.h stable/9/contrib/llvm/lib/Target/CellSPU/SPU.h stable/9/contrib/llvm/lib/Target/CellSPU/SPU.td stable/9/contrib/llvm/lib/Target/CellSPU/SPU128InstrInfo.td stable/9/contrib/llvm/lib/Target/CellSPU/SPU64InstrInfo.td stable/9/contrib/llvm/lib/Target/CellSPU/SPUAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPUCallingConv.td stable/9/contrib/llvm/lib/Target/CellSPU/SPUFrameLowering.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPUFrameLowering.h stable/9/contrib/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPUISelLowering.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPUISelLowering.h stable/9/contrib/llvm/lib/Target/CellSPU/SPUInstrBuilder.h stable/9/contrib/llvm/lib/Target/CellSPU/SPUInstrFormats.td stable/9/contrib/llvm/lib/Target/CellSPU/SPUInstrInfo.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPUInstrInfo.h stable/9/contrib/llvm/lib/Target/CellSPU/SPUMachineFunction.h stable/9/contrib/llvm/lib/Target/CellSPU/SPUMathInstr.td stable/9/contrib/llvm/lib/Target/CellSPU/SPUNodes.td stable/9/contrib/llvm/lib/Target/CellSPU/SPUNopFiller.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPUOperands.td stable/9/contrib/llvm/lib/Target/CellSPU/SPURegisterInfo.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPURegisterInfo.h stable/9/contrib/llvm/lib/Target/CellSPU/SPURegisterInfo.td stable/9/contrib/llvm/lib/Target/CellSPU/SPUSchedule.td stable/9/contrib/llvm/lib/Target/CellSPU/SPUSubtarget.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPUTargetMachine.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPUTargetMachine.h stable/9/contrib/llvm/lib/Target/CppBackend/CPPBackend.cpp stable/9/contrib/llvm/lib/Target/CppBackend/CPPTargetMachine.h stable/9/contrib/llvm/lib/Target/Hexagon/Hexagon.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormats.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormatsV4.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV3.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV4.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonMCInstLower.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonSchedule.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV4.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp stable/9/contrib/llvm/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp stable/9/contrib/llvm/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.h stable/9/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h stable/9/contrib/llvm/lib/Target/MBlaze/AsmParser/MBlazeAsmLexer.cpp stable/9/contrib/llvm/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp stable/9/contrib/llvm/lib/Target/MBlaze/Disassembler/MBlazeDisassembler.cpp stable/9/contrib/llvm/lib/Target/MBlaze/Disassembler/MBlazeDisassembler.h stable/9/contrib/llvm/lib/Target/MBlaze/InstPrinter/MBlazeInstPrinter.h stable/9/contrib/llvm/lib/Target/MBlaze/MBlaze.td stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeCallingConv.td stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeDelaySlotFiller.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeELFWriterInfo.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeELFWriterInfo.h stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeFrameLowering.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeFrameLowering.h stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeISelLowering.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeISelLowering.h stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeInstrFPU.td stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeInstrFSL.td stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeInstrFormats.td stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.h stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.td stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeIntrinsicInfo.h stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeIntrinsics.td stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeMCInstLower.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeMCInstLower.h stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeMachineFunction.h stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeRegisterInfo.h stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeRegisterInfo.td stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeRelocations.h stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeSchedule.td stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeSchedule3.td stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeSchedule5.td stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeSubtarget.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeSubtarget.h stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeTargetMachine.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeTargetMachine.h stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeBaseInfo.h stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCAsmInfo.h stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.h stable/9/contrib/llvm/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.cpp stable/9/contrib/llvm/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.h stable/9/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.h stable/9/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430.td stable/9/contrib/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430BranchSelector.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430FrameLowering.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430InstrFormats.td stable/9/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.td stable/9/contrib/llvm/lib/Target/MSP430/MSP430MCInstLower.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430MCInstLower.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430MachineFunctionInfo.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.td stable/9/contrib/llvm/lib/Target/MSP430/MSP430Subtarget.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430Subtarget.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.h stable/9/contrib/llvm/lib/Target/Mangler.cpp stable/9/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp stable/9/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.h stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.h stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h stable/9/contrib/llvm/lib/Target/Mips/Mips.h stable/9/contrib/llvm/lib/Target/Mips/Mips.td stable/9/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td stable/9/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.h stable/9/contrib/llvm/lib/Target/Mips/MipsCallingConv.td stable/9/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsEmitGPRestore.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsExpandPseudo.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsFrameLowering.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsFrameLowering.h stable/9/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsISelLowering.h stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.h stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td stable/9/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsJITInfo.h stable/9/contrib/llvm/lib/Target/Mips/MipsMCInstLower.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsMCInstLower.h stable/9/contrib/llvm/lib/Target/Mips/MipsMachineFunction.h stable/9/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.h stable/9/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.td stable/9/contrib/llvm/lib/Target/Mips/MipsRelocations.h stable/9/contrib/llvm/lib/Target/Mips/MipsSchedule.td stable/9/contrib/llvm/lib/Target/Mips/MipsSubtarget.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsSubtarget.h stable/9/contrib/llvm/lib/Target/Mips/MipsTargetMachine.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsTargetMachine.h stable/9/contrib/llvm/lib/Target/Mips/MipsTargetObjectFile.cpp stable/9/contrib/llvm/lib/Target/PTX/InstPrinter/PTXInstPrinter.cpp stable/9/contrib/llvm/lib/Target/PTX/InstPrinter/PTXInstPrinter.h stable/9/contrib/llvm/lib/Target/PTX/MCTargetDesc/PTXBaseInfo.h stable/9/contrib/llvm/lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.h stable/9/contrib/llvm/lib/Target/PTX/MCTargetDesc/PTXMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/PTX/MCTargetDesc/PTXMCTargetDesc.h stable/9/contrib/llvm/lib/Target/PTX/PTX.h stable/9/contrib/llvm/lib/Target/PTX/PTX.td stable/9/contrib/llvm/lib/Target/PTX/PTXAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXAsmPrinter.h stable/9/contrib/llvm/lib/Target/PTX/PTXFPRoundingModePass.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXFrameLowering.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXFrameLowering.h stable/9/contrib/llvm/lib/Target/PTX/PTXISelLowering.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXISelLowering.h stable/9/contrib/llvm/lib/Target/PTX/PTXInstrFormats.td stable/9/contrib/llvm/lib/Target/PTX/PTXInstrInfo.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXInstrInfo.h stable/9/contrib/llvm/lib/Target/PTX/PTXInstrInfo.td stable/9/contrib/llvm/lib/Target/PTX/PTXInstrLoadStore.td stable/9/contrib/llvm/lib/Target/PTX/PTXIntrinsicInstrInfo.td stable/9/contrib/llvm/lib/Target/PTX/PTXMCAsmStreamer.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXMFInfoExtract.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXMachineFunctionInfo.h stable/9/contrib/llvm/lib/Target/PTX/PTXParamManager.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXParamManager.h stable/9/contrib/llvm/lib/Target/PTX/PTXRegAlloc.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXRegisterInfo.h stable/9/contrib/llvm/lib/Target/PTX/PTXRegisterInfo.td stable/9/contrib/llvm/lib/Target/PTX/PTXSelectionDAGInfo.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXSubtarget.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXSubtarget.h stable/9/contrib/llvm/lib/Target/PTX/PTXTargetMachine.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXTargetMachine.h stable/9/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp stable/9/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCBaseInfo.h stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h stable/9/contrib/llvm/lib/Target/PowerPC/PPC.h stable/9/contrib/llvm/lib/Target/PowerPC/PPC.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCCallingConv.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCHazardRecognizers.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrAltivec.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrFormats.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCJITInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCJITInfo.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCPerfectShuffle.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCRelocations.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCSchedule.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCScheduleG3.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCScheduleG4.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCScheduleG4Plus.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCScheduleG5.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.h stable/9/contrib/llvm/lib/Target/Sparc/DelaySlotFiller.cpp stable/9/contrib/llvm/lib/Target/Sparc/FPMover.cpp stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.h stable/9/contrib/llvm/lib/Target/Sparc/Sparc.h stable/9/contrib/llvm/lib/Target/Sparc/Sparc.td stable/9/contrib/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcCallingConv.td stable/9/contrib/llvm/lib/Target/Sparc/SparcFrameLowering.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcFrameLowering.h stable/9/contrib/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcISelLowering.h stable/9/contrib/llvm/lib/Target/Sparc/SparcInstrFormats.td stable/9/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.h stable/9/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.td stable/9/contrib/llvm/lib/Target/Sparc/SparcMachineFunctionInfo.h stable/9/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.h stable/9/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.td stable/9/contrib/llvm/lib/Target/Sparc/SparcSubtarget.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcSubtarget.h stable/9/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.h stable/9/contrib/llvm/lib/Target/TargetData.cpp stable/9/contrib/llvm/lib/Target/TargetInstrInfo.cpp stable/9/contrib/llvm/lib/Target/TargetLibraryInfo.cpp stable/9/contrib/llvm/lib/Target/TargetLoweringObjectFile.cpp stable/9/contrib/llvm/lib/Target/TargetMachine.cpp stable/9/contrib/llvm/lib/Target/TargetRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/X86/AsmParser/X86AsmLexer.cpp stable/9/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.h stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86InstComments.cpp stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86InstComments.h stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86FixupKinds.h stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.h stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h stable/9/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp stable/9/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.h stable/9/contrib/llvm/lib/Target/X86/X86.h stable/9/contrib/llvm/lib/Target/X86/X86.td stable/9/contrib/llvm/lib/Target/X86/X86AsmPrinter.cpp stable/9/contrib/llvm/lib/Target/X86/X86AsmPrinter.h stable/9/contrib/llvm/lib/Target/X86/X86COFFMachineModuleInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86COFFMachineModuleInfo.h stable/9/contrib/llvm/lib/Target/X86/X86CallingConv.td stable/9/contrib/llvm/lib/Target/X86/X86CodeEmitter.cpp stable/9/contrib/llvm/lib/Target/X86/X86ELFWriterInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86FastISel.cpp stable/9/contrib/llvm/lib/Target/X86/X86FloatingPoint.cpp stable/9/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp stable/9/contrib/llvm/lib/Target/X86/X86FrameLowering.h stable/9/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp stable/9/contrib/llvm/lib/Target/X86/X86ISelLowering.h stable/9/contrib/llvm/lib/Target/X86/X86Instr3DNow.td stable/9/contrib/llvm/lib/Target/X86/X86InstrArithmetic.td stable/9/contrib/llvm/lib/Target/X86/X86InstrBuilder.h stable/9/contrib/llvm/lib/Target/X86/X86InstrCMovSetCC.td stable/9/contrib/llvm/lib/Target/X86/X86InstrCompiler.td stable/9/contrib/llvm/lib/Target/X86/X86InstrControl.td stable/9/contrib/llvm/lib/Target/X86/X86InstrExtension.td stable/9/contrib/llvm/lib/Target/X86/X86InstrFMA.td stable/9/contrib/llvm/lib/Target/X86/X86InstrFPStack.td stable/9/contrib/llvm/lib/Target/X86/X86InstrFormats.td stable/9/contrib/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td stable/9/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86InstrInfo.h stable/9/contrib/llvm/lib/Target/X86/X86InstrInfo.td stable/9/contrib/llvm/lib/Target/X86/X86InstrMMX.td stable/9/contrib/llvm/lib/Target/X86/X86InstrSSE.td stable/9/contrib/llvm/lib/Target/X86/X86InstrShiftRotate.td stable/9/contrib/llvm/lib/Target/X86/X86InstrSystem.td stable/9/contrib/llvm/lib/Target/X86/X86InstrVMX.td stable/9/contrib/llvm/lib/Target/X86/X86JITInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86JITInfo.h stable/9/contrib/llvm/lib/Target/X86/X86MCInstLower.cpp stable/9/contrib/llvm/lib/Target/X86/X86MCInstLower.h stable/9/contrib/llvm/lib/Target/X86/X86MachineFunctionInfo.h stable/9/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86RegisterInfo.h stable/9/contrib/llvm/lib/Target/X86/X86RegisterInfo.td stable/9/contrib/llvm/lib/Target/X86/X86Relocations.h stable/9/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86Subtarget.cpp stable/9/contrib/llvm/lib/Target/X86/X86Subtarget.h stable/9/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp stable/9/contrib/llvm/lib/Target/X86/X86TargetMachine.h stable/9/contrib/llvm/lib/Target/X86/X86TargetObjectFile.cpp stable/9/contrib/llvm/lib/Target/X86/X86TargetObjectFile.h stable/9/contrib/llvm/lib/Target/X86/X86VZeroUpper.cpp stable/9/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.h stable/9/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.h stable/9/contrib/llvm/lib/Target/XCore/XCore.h stable/9/contrib/llvm/lib/Target/XCore/XCore.td stable/9/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.h stable/9/contrib/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreISelLowering.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreISelLowering.h stable/9/contrib/llvm/lib/Target/XCore/XCoreInstrFormats.td stable/9/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.h stable/9/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.td stable/9/contrib/llvm/lib/Target/XCore/XCoreMachineFunctionInfo.h stable/9/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.h stable/9/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.td stable/9/contrib/llvm/lib/Target/XCore/XCoreSubtarget.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreSubtarget.h stable/9/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.h stable/9/contrib/llvm/lib/Target/XCore/XCoreTargetObjectFile.h stable/9/contrib/llvm/lib/Transforms/IPO/ConstantMerge.cpp stable/9/contrib/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp stable/9/contrib/llvm/lib/Transforms/IPO/FunctionAttrs.cpp stable/9/contrib/llvm/lib/Transforms/IPO/GlobalOpt.cpp stable/9/contrib/llvm/lib/Transforms/IPO/InlineAlways.cpp stable/9/contrib/llvm/lib/Transforms/IPO/InlineSimple.cpp stable/9/contrib/llvm/lib/Transforms/IPO/Inliner.cpp stable/9/contrib/llvm/lib/Transforms/IPO/Internalize.cpp stable/9/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp stable/9/contrib/llvm/lib/Transforms/IPO/PruneEH.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombine.h stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineWorklist.h stable/9/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/PathProfiling.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/ConstantProp.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/EarlyCSE.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/GVN.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LICM.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/ObjCARC.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/Scalar.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/Sink.cpp stable/9/contrib/llvm/lib/Transforms/Utils/AddrModeMatcher.cpp stable/9/contrib/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp stable/9/contrib/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp stable/9/contrib/llvm/lib/Transforms/Utils/BuildLibCalls.cpp stable/9/contrib/llvm/lib/Transforms/Utils/CloneFunction.cpp stable/9/contrib/llvm/lib/Transforms/Utils/CodeExtractor.cpp stable/9/contrib/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp stable/9/contrib/llvm/lib/Transforms/Utils/InlineFunction.cpp stable/9/contrib/llvm/lib/Transforms/Utils/Local.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LoopSimplify.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LoopUnroll.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LowerExpectIntrinsic.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LowerInvoke.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LowerSwitch.cpp stable/9/contrib/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp stable/9/contrib/llvm/lib/Transforms/Utils/SSAUpdater.cpp stable/9/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp stable/9/contrib/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp stable/9/contrib/llvm/lib/Transforms/Utils/SimplifyInstructions.cpp stable/9/contrib/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp stable/9/contrib/llvm/lib/Transforms/Vectorize/BBVectorize.cpp stable/9/contrib/llvm/lib/VMCore/AsmWriter.cpp stable/9/contrib/llvm/lib/VMCore/Attributes.cpp stable/9/contrib/llvm/lib/VMCore/AutoUpgrade.cpp stable/9/contrib/llvm/lib/VMCore/BasicBlock.cpp stable/9/contrib/llvm/lib/VMCore/ConstantFold.cpp stable/9/contrib/llvm/lib/VMCore/Constants.cpp stable/9/contrib/llvm/lib/VMCore/ConstantsContext.h stable/9/contrib/llvm/lib/VMCore/Core.cpp stable/9/contrib/llvm/lib/VMCore/DebugLoc.cpp stable/9/contrib/llvm/lib/VMCore/Dominators.cpp stable/9/contrib/llvm/lib/VMCore/Function.cpp stable/9/contrib/llvm/lib/VMCore/GCOV.cpp stable/9/contrib/llvm/lib/VMCore/IRBuilder.cpp stable/9/contrib/llvm/lib/VMCore/Instruction.cpp stable/9/contrib/llvm/lib/VMCore/Instructions.cpp stable/9/contrib/llvm/lib/VMCore/LLVMContext.cpp stable/9/contrib/llvm/lib/VMCore/LLVMContextImpl.cpp stable/9/contrib/llvm/lib/VMCore/LLVMContextImpl.h stable/9/contrib/llvm/lib/VMCore/Metadata.cpp stable/9/contrib/llvm/lib/VMCore/Module.cpp stable/9/contrib/llvm/lib/VMCore/Pass.cpp stable/9/contrib/llvm/lib/VMCore/PassManager.cpp stable/9/contrib/llvm/lib/VMCore/Type.cpp stable/9/contrib/llvm/lib/VMCore/Use.cpp stable/9/contrib/llvm/lib/VMCore/User.cpp stable/9/contrib/llvm/lib/VMCore/Value.cpp stable/9/contrib/llvm/lib/VMCore/ValueTypes.cpp stable/9/contrib/llvm/lib/VMCore/Verifier.cpp stable/9/contrib/llvm/tools/bugpoint/BugDriver.cpp stable/9/contrib/llvm/tools/bugpoint/CrashDebugger.cpp stable/9/contrib/llvm/tools/bugpoint/ExecutionDriver.cpp stable/9/contrib/llvm/tools/bugpoint/ExtractFunction.cpp stable/9/contrib/llvm/tools/bugpoint/Miscompilation.cpp stable/9/contrib/llvm/tools/bugpoint/OptimizerDriver.cpp stable/9/contrib/llvm/tools/bugpoint/ToolRunner.cpp stable/9/contrib/llvm/tools/bugpoint/ToolRunner.h stable/9/contrib/llvm/tools/bugpoint/bugpoint.cpp stable/9/contrib/llvm/tools/clang/LICENSE.TXT stable/9/contrib/llvm/tools/clang/include/clang-c/Index.h stable/9/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMT.h stable/9/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMTActions.h stable/9/contrib/llvm/tools/clang/include/clang/ARCMigrate/FileRemapper.h stable/9/contrib/llvm/tools/clang/include/clang/AST/APValue.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTConsumer.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTImporter.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTMutationListener.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Attr.h stable/9/contrib/llvm/tools/clang/include/clang/AST/CanonicalType.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Decl.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclFriend.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclTemplate.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclVisitor.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclarationName.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DependentDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Expr.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ExprCXX.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ExprObjC.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ExternalASTSource.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Mangle.h stable/9/contrib/llvm/tools/clang/include/clang/AST/NestedNameSpecifier.h stable/9/contrib/llvm/tools/clang/include/clang/AST/OperationKinds.h stable/9/contrib/llvm/tools/clang/include/clang/AST/PrettyPrinter.h stable/9/contrib/llvm/tools/clang/include/clang/AST/RecordLayout.h stable/9/contrib/llvm/tools/clang/include/clang/AST/RecursiveASTVisitor.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Redeclarable.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Stmt.h stable/9/contrib/llvm/tools/clang/include/clang/AST/StmtCXX.h stable/9/contrib/llvm/tools/clang/include/clang/AST/StmtIterator.h stable/9/contrib/llvm/tools/clang/include/clang/AST/StmtObjC.h stable/9/contrib/llvm/tools/clang/include/clang/AST/StmtVisitor.h stable/9/contrib/llvm/tools/clang/include/clang/AST/TemplateBase.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Type.h stable/9/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h stable/9/contrib/llvm/tools/clang/include/clang/AST/TypeVisitor.h stable/9/contrib/llvm/tools/clang/include/clang/AST/VTableBuilder.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/FormatString.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/LiveVariables.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ReachableCode.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafety.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/UninitializedValues.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisContext.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/CFG.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/DomainSpecific/CocoaConventions.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/ProgramPoint.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Attr.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/ConvertUTF.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/DeclNodes.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticASTKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticAnalysisKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticIDs.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParseKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/ExceptionSpecificationType.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/ExpressionTraits.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/FileSystemStatCache.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/IdentifierTable.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/LLVM.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Linkage.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/OnDiskHashTable.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/PartialDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/SourceLocation.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/SourceManager.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Specifiers.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/StmtNodes.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/TargetBuiltins.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/TypeTraits.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Version.h stable/9/contrib/llvm/tools/clang/include/clang/CodeGen/CodeGenAction.h stable/9/contrib/llvm/tools/clang/include/clang/CodeGen/ModuleBuilder.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Action.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/ArgList.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/CC1AsOptions.td stable/9/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td stable/9/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Driver.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/DriverDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Job.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/ObjCRuntime.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/OptTable.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Options.td stable/9/contrib/llvm/tools/clang/include/clang/Driver/Tool.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Types.def stable/9/contrib/llvm/tools/clang/include/clang/Frontend/ASTUnit.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/Analyses.def stable/9/contrib/llvm/tools/clang/include/clang/Frontend/AnalyzerOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/ChainedDiagnosticConsumer.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInstance.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInvocation.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/DependencyOutputOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/DiagnosticOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/FrontendAction.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/FrontendActions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/FrontendDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/FrontendOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/LangStandard.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/LangStandards.def stable/9/contrib/llvm/tools/clang/include/clang/Frontend/MultiplexConsumer.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/PreprocessorOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnosticPrinter.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/Utils.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/VerifyDiagnosticConsumer.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/DirectoryLookup.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/ExternalPreprocessorSource.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearch.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/LexDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/LiteralSupport.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/MacroInfo.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/ModuleLoader.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/PPCallbacks.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/PreprocessingRecord.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorLexer.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/Token.h stable/9/contrib/llvm/tools/clang/include/clang/Parse/ParseAST.h stable/9/contrib/llvm/tools/clang/include/clang/Parse/ParseDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Parse/Parser.h stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/ASTConsumers.h stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/FixItRewriter.h stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/FrontendActions.h stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/TokenRewriter.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/AttributeList.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteConsumer.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/DeclSpec.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/DelayedDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/ExternalSemaSource.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/IdentifierResolver.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Initialization.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/LocInfoType.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Lookup.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Overload.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/ParsedTemplate.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/PrettyDeclStackTrace.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Scope.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/ScopeInfo.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Sema.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/SemaConsumer.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/SemaDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/SemaFixItUtils.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Template.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/TemplateDeduction.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/TypoCorrection.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTDeserializationListener.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTReader.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTWriter.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ContinuousRangeMap.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/Module.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ModuleManager.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Checker.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerRegistry.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h stable/9/contrib/llvm/tools/clang/include/clang/Tooling/CompilationDatabase.h stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMT.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMTActions.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/FileRemapper.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/Internals.h stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransARCAssign.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransAutoreleasePool.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransBlockObjCVariable.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransProperties.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransUnusedInitDelegate.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransZeroOutPropsInDealloc.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransformActions.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.h stable/9/contrib/llvm/tools/clang/lib/AST/APValue.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ASTConsumer.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ASTImporter.cpp stable/9/contrib/llvm/tools/clang/lib/AST/AttrImpl.cpp stable/9/contrib/llvm/tools/clang/lib/AST/CXXInheritance.cpp stable/9/contrib/llvm/tools/clang/lib/AST/Decl.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclFriend.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclObjC.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclTemplate.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclarationName.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DumpXML.cpp stable/9/contrib/llvm/tools/clang/lib/AST/Expr.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ExprCXX.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ExprClassification.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ExternalASTSource.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ItaniumMangle.cpp stable/9/contrib/llvm/tools/clang/lib/AST/Mangle.cpp stable/9/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp stable/9/contrib/llvm/tools/clang/lib/AST/NestedNameSpecifier.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ParentMap.cpp stable/9/contrib/llvm/tools/clang/lib/AST/RecordLayout.cpp stable/9/contrib/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/AST/Stmt.cpp stable/9/contrib/llvm/tools/clang/lib/AST/StmtDumper.cpp stable/9/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp stable/9/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp stable/9/contrib/llvm/tools/clang/lib/AST/TemplateBase.cpp stable/9/contrib/llvm/tools/clang/lib/AST/TemplateName.cpp stable/9/contrib/llvm/tools/clang/lib/AST/Type.cpp stable/9/contrib/llvm/tools/clang/lib/AST/TypeLoc.cpp stable/9/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp stable/9/contrib/llvm/tools/clang/lib/AST/VTableBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/CocoaConventions.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/FormatString.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/FormatStringParsing.h stable/9/contrib/llvm/tools/clang/lib/Analysis/LiveVariables.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/ProgramPoint.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/PseudoConstantAnalysis.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/ReachableCode.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/ScanfFormatString.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/ThreadSafety.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/Builtins.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/ConvertUTF.c stable/9/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/FileManager.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/FileSystemStatCache.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/LangOptions.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/Targets.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/Version.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/ABIInfo.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCall.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGClass.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGException.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprCXX.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprComplex.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjC.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjCMac.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGRTTI.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGStmt.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTT.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGValue.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/ModuleBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.h stable/9/contrib/llvm/tools/clang/lib/Driver/Action.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Arg.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ArgList.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/CC1AsOptions.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/CC1Options.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Driver.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/DriverOptions.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Job.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Option.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChains.h stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.h stable/9/contrib/llvm/tools/clang/lib/Driver/Types.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/ASTMerge.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/CacheTokens.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/DependencyFile.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/HeaderIncludeGen.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/LangStandards.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/LogDiagnosticPrinter.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/MultiplexConsumer.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticBuffer.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticPrinter.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/Warnings.cpp stable/9/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp stable/9/contrib/llvm/tools/clang/lib/Headers/avxintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/emmintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/float.h stable/9/contrib/llvm/tools/clang/lib/Headers/immintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/mm3dnow.h stable/9/contrib/llvm/tools/clang/lib/Headers/smmintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/tgmath.h stable/9/contrib/llvm/tools/clang/lib/Headers/tmmintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/wmmintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/x86intrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h stable/9/contrib/llvm/tools/clang/lib/Lex/HeaderMap.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/HeaderSearch.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/LiteralSupport.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/MacroArgs.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/MacroInfo.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PPCaching.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PPDirectives.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PPExpressions.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PPLexerChange.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PTHLexer.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/Pragma.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PreprocessingRecord.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PreprocessorLexer.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/TokenConcatenation.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/TokenLexer.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseInit.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseObjc.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParsePragma.h stable/9/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseTemplate.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseTentative.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/Parser.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/FixItRewriter.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/FrontendActions.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/HTMLPrint.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/HTMLRewrite.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/RewriteMacros.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/RewriteObjC.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/RewriteRope.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/RewriteTest.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/Rewriter.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/AttributeList.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/CodeCompleteConsumer.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/DeclSpec.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/DelayedDiagnostic.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/Scope.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/Sema.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaAccess.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaAttr.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaCast.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDeclObjC.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExprMember.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExprObjC.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaFixItUtils.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaObjCProperty.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/TargetAttributesSema.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderInternals.h stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriterDecl.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriterStmt.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/GeneratePCH.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/Module.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ModuleManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AdjustedReturnValueChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/Checkers.td stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IteratorsChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/OSAtomicChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalysisManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Checker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerContext.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerRegistry.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Environment.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ObjCMessage.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ProgramState.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SVals.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Store.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SymbolManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp stable/9/contrib/llvm/tools/clang/lib/Tooling/CompilationDatabase.cpp stable/9/contrib/llvm/tools/clang/tools/driver/cc1_main.cpp stable/9/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp stable/9/contrib/llvm/tools/clang/tools/driver/driver.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.h stable/9/contrib/llvm/tools/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/NeonEmitter.h stable/9/contrib/llvm/tools/clang/utils/TableGen/TableGen.cpp stable/9/contrib/llvm/tools/llc/llc.cpp stable/9/contrib/llvm/tools/lli/lli.cpp stable/9/contrib/llvm/tools/llvm-as/llvm-as.cpp stable/9/contrib/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp stable/9/contrib/llvm/tools/llvm-diff/DiffConsumer.cpp stable/9/contrib/llvm/tools/llvm-diff/DiffConsumer.h stable/9/contrib/llvm/tools/llvm-diff/DifferenceEngine.cpp stable/9/contrib/llvm/tools/llvm-diff/DifferenceEngine.h stable/9/contrib/llvm/tools/llvm-diff/llvm-diff.cpp stable/9/contrib/llvm/tools/llvm-dis/llvm-dis.cpp stable/9/contrib/llvm/tools/llvm-extract/llvm-extract.cpp stable/9/contrib/llvm/tools/llvm-ld/llvm-ld.cpp stable/9/contrib/llvm/tools/llvm-link/llvm-link.cpp stable/9/contrib/llvm/tools/llvm-mc/Disassembler.cpp stable/9/contrib/llvm/tools/llvm-mc/Disassembler.h stable/9/contrib/llvm/tools/llvm-mc/llvm-mc.cpp stable/9/contrib/llvm/tools/llvm-nm/llvm-nm.cpp stable/9/contrib/llvm/tools/llvm-objdump/MachODump.cpp stable/9/contrib/llvm/tools/llvm-objdump/llvm-objdump.cpp stable/9/contrib/llvm/tools/llvm-objdump/llvm-objdump.h stable/9/contrib/llvm/tools/llvm-prof/llvm-prof.cpp stable/9/contrib/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp stable/9/contrib/llvm/tools/llvm-stress/llvm-stress.cpp stable/9/contrib/llvm/tools/opt/PrintSCC.cpp stable/9/contrib/llvm/tools/opt/opt.cpp stable/9/contrib/llvm/utils/TableGen/AsmMatcherEmitter.cpp stable/9/contrib/llvm/utils/TableGen/AsmWriterEmitter.cpp stable/9/contrib/llvm/utils/TableGen/AsmWriterEmitter.h stable/9/contrib/llvm/utils/TableGen/CallingConvEmitter.cpp stable/9/contrib/llvm/utils/TableGen/CodeEmitterGen.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.h stable/9/contrib/llvm/utils/TableGen/CodeGenInstruction.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenRegisters.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenRegisters.h stable/9/contrib/llvm/utils/TableGen/CodeGenTarget.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenTarget.h stable/9/contrib/llvm/utils/TableGen/DAGISelMatcher.cpp stable/9/contrib/llvm/utils/TableGen/DAGISelMatcher.h stable/9/contrib/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp stable/9/contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp stable/9/contrib/llvm/utils/TableGen/DisassemblerEmitter.cpp stable/9/contrib/llvm/utils/TableGen/EDEmitter.cpp stable/9/contrib/llvm/utils/TableGen/FastISelEmitter.cpp stable/9/contrib/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp stable/9/contrib/llvm/utils/TableGen/FixedLenDecoderEmitter.h stable/9/contrib/llvm/utils/TableGen/InstrInfoEmitter.cpp stable/9/contrib/llvm/utils/TableGen/InstrInfoEmitter.h stable/9/contrib/llvm/utils/TableGen/IntrinsicEmitter.cpp stable/9/contrib/llvm/utils/TableGen/IntrinsicEmitter.h stable/9/contrib/llvm/utils/TableGen/PseudoLoweringEmitter.cpp stable/9/contrib/llvm/utils/TableGen/RegisterInfoEmitter.cpp stable/9/contrib/llvm/utils/TableGen/RegisterInfoEmitter.h stable/9/contrib/llvm/utils/TableGen/SetTheory.cpp stable/9/contrib/llvm/utils/TableGen/SetTheory.h stable/9/contrib/llvm/utils/TableGen/StringToOffsetTable.h stable/9/contrib/llvm/utils/TableGen/SubtargetEmitter.cpp stable/9/contrib/llvm/utils/TableGen/TableGen.cpp stable/9/contrib/llvm/utils/TableGen/X86DisassemblerTables.cpp stable/9/contrib/llvm/utils/TableGen/X86ModRMFilters.h stable/9/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp stable/9/contrib/llvm/utils/TableGen/X86RecognizableInstr.h stable/9/etc/mtree/BSD.include.dist stable/9/lib/clang/Makefile stable/9/lib/clang/clang.build.mk stable/9/lib/clang/include/Makefile stable/9/lib/clang/include/clang/Basic/Version.inc stable/9/lib/clang/include/clang/Config/config.h stable/9/lib/clang/include/llvm/Config/config.h stable/9/lib/clang/include/llvm/Config/llvm-config.h stable/9/lib/clang/libclanganalysis/Makefile stable/9/lib/clang/libclangarcmigrate/Makefile stable/9/lib/clang/libclangast/Makefile stable/9/lib/clang/libclangbasic/Makefile stable/9/lib/clang/libclangcodegen/Makefile stable/9/lib/clang/libclangdriver/Makefile stable/9/lib/clang/libclangfrontend/Makefile stable/9/lib/clang/libclanglex/Makefile stable/9/lib/clang/libclangparse/Makefile stable/9/lib/clang/libclangrewrite/Makefile stable/9/lib/clang/libclangsema/Makefile stable/9/lib/clang/libclangserialization/Makefile stable/9/lib/clang/libclangstaticanalyzercheckers/Makefile stable/9/lib/clang/libclangstaticanalyzercore/Makefile stable/9/lib/clang/libllvmanalysis/Makefile stable/9/lib/clang/libllvmarmcodegen/Makefile stable/9/lib/clang/libllvmarmdesc/Makefile stable/9/lib/clang/libllvmasmprinter/Makefile stable/9/lib/clang/libllvmcodegen/Makefile stable/9/lib/clang/libllvmcore/Makefile stable/9/lib/clang/libllvminstrumentation/Makefile stable/9/lib/clang/libllvmjit/Makefile stable/9/lib/clang/libllvmmc/Makefile stable/9/lib/clang/libllvmmcjit/Makefile stable/9/lib/clang/libllvmmipscodegen/Makefile stable/9/lib/clang/libllvmmipsdesc/Makefile stable/9/lib/clang/libllvmpowerpccodegen/Makefile stable/9/lib/clang/libllvmpowerpcdesc/Makefile stable/9/lib/clang/libllvmruntimedyld/Makefile stable/9/lib/clang/libllvmscalaropts/Makefile stable/9/lib/clang/libllvmselectiondag/Makefile stable/9/lib/clang/libllvmsupport/Makefile stable/9/lib/clang/libllvmtablegen/Makefile stable/9/lib/clang/libllvmtarget/Makefile stable/9/lib/clang/libllvmtransformutils/Makefile stable/9/lib/clang/libllvmx86codegen/Makefile stable/9/lib/clang/libllvmx86desc/Makefile stable/9/share/mk/bsd.sys.mk (contents, props changed) stable/9/usr.bin/clang/bugpoint/Makefile stable/9/usr.bin/clang/bugpoint/bugpoint.1 stable/9/usr.bin/clang/clang/Makefile stable/9/usr.bin/clang/clang/clang.1 stable/9/usr.bin/clang/llc/llc.1 stable/9/usr.bin/clang/lli/Makefile stable/9/usr.bin/clang/lli/lli.1 stable/9/usr.bin/clang/llvm-ar/llvm-ar.1 stable/9/usr.bin/clang/llvm-as/llvm-as.1 stable/9/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 stable/9/usr.bin/clang/llvm-diff/llvm-diff.1 stable/9/usr.bin/clang/llvm-dis/llvm-dis.1 stable/9/usr.bin/clang/llvm-extract/llvm-extract.1 stable/9/usr.bin/clang/llvm-ld/Makefile stable/9/usr.bin/clang/llvm-ld/llvm-ld.1 stable/9/usr.bin/clang/llvm-link/llvm-link.1 stable/9/usr.bin/clang/llvm-nm/llvm-nm.1 stable/9/usr.bin/clang/llvm-prof/llvm-prof.1 stable/9/usr.bin/clang/llvm-ranlib/llvm-ranlib.1 stable/9/usr.bin/clang/opt/Makefile stable/9/usr.bin/clang/opt/opt.1 stable/9/usr.bin/clang/tblgen/Makefile stable/9/usr.bin/clang/tblgen/tblgen.1 Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) stable/9/etc/ (props changed) stable/9/lib/clang/ (props changed) stable/9/share/mk/ (props changed) stable/9/usr.bin/clang/ (props changed) Modified: stable/9/ObsoleteFiles.inc ============================================================================== --- stable/9/ObsoleteFiles.inc Fri May 18 21:46:48 2012 (r235632) +++ stable/9/ObsoleteFiles.inc Fri May 18 21:49:11 2012 (r235633) @@ -38,6 +38,22 @@ # xargs -n1 | sort | uniq -d; # done +# 20120415: new clang import which bumps version from 3.0 to 3.1 +OLD_FILES+=usr/include/clang/3.0/altivec.h +OLD_FILES+=usr/include/clang/3.0/avxintrin.h +OLD_FILES+=usr/include/clang/3.0/emmintrin.h +OLD_FILES+=usr/include/clang/3.0/immintrin.h +OLD_FILES+=usr/include/clang/3.0/mm3dnow.h +OLD_FILES+=usr/include/clang/3.0/mm_malloc.h +OLD_FILES+=usr/include/clang/3.0/mmintrin.h +OLD_FILES+=usr/include/clang/3.0/nmmintrin.h +OLD_FILES+=usr/include/clang/3.0/pmmintrin.h +OLD_FILES+=usr/include/clang/3.0/smmintrin.h +OLD_FILES+=usr/include/clang/3.0/tmmintrin.h +OLD_FILES+=usr/include/clang/3.0/wmmintrin.h +OLD_FILES+=usr/include/clang/3.0/x86intrin.h +OLD_FILES+=usr/include/clang/3.0/xmmintrin.h +OLD_DIRS+=usr/include/clang/3.0 # 20110915: rename congestion control manpages OLD_FILES+=usr/share/man/man4/cc.4.gz OLD_FILES+=usr/share/man/man9/cc.9.gz Modified: stable/9/contrib/llvm/LICENSE.TXT ============================================================================== --- stable/9/contrib/llvm/LICENSE.TXT Fri May 18 21:46:48 2012 (r235632) +++ stable/9/contrib/llvm/LICENSE.TXT Fri May 18 21:49:11 2012 (r235633) @@ -4,7 +4,7 @@ LLVM Release License University of Illinois/NCSA Open Source License -Copyright (c) 2003-2011 University of Illinois at Urbana-Champaign. +Copyright (c) 2003-2012 University of Illinois at Urbana-Champaign. All rights reserved. Developed by: @@ -67,3 +67,4 @@ Autoconf llvm/autoconf CellSPU backend llvm/lib/Target/CellSPU/README.txt Google Test llvm/utils/unittest/googletest OpenBSD regex llvm/lib/Support/{reg*, COPYRIGHT.regex} +pyyaml tests llvm/test/YAMLParser/{*.data, LICENSE.TXT} Modified: stable/9/contrib/llvm/include/llvm-c/Analysis.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/Analysis.h Fri May 18 21:46:48 2012 (r235632) +++ stable/9/contrib/llvm/include/llvm-c/Analysis.h Fri May 18 21:49:11 2012 (r235633) @@ -25,6 +25,12 @@ extern "C" { #endif +/** + * @defgroup LLVMCAnalysis Analysis + * @ingroup LLVMC + * + * @{ + */ typedef enum { LLVMAbortProcessAction, /* verifier will print to stderr and abort() */ @@ -48,6 +54,10 @@ LLVMBool LLVMVerifyFunction(LLVMValueRef void LLVMViewFunctionCFG(LLVMValueRef Fn); void LLVMViewFunctionCFGOnly(LLVMValueRef Fn); +/** + * @} + */ + #ifdef __cplusplus } #endif Modified: stable/9/contrib/llvm/include/llvm-c/BitReader.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/BitReader.h Fri May 18 21:46:48 2012 (r235632) +++ stable/9/contrib/llvm/include/llvm-c/BitReader.h Fri May 18 21:49:11 2012 (r235633) @@ -25,6 +25,12 @@ extern "C" { #endif +/** + * @defgroup LLVMCBitReader Bit Reader + * @ingroup LLVMC + * + * @{ + */ /* Builds a module from the bitcode in the specified memory buffer, returning a reference to the module via the OutModule parameter. Returns 0 on success. @@ -59,6 +65,10 @@ LLVMBool LLVMGetBitcodeModuleProvider(LL LLVMModuleProviderRef *OutMP, char **OutMessage); +/** + * @} + */ + #ifdef __cplusplus } #endif Modified: stable/9/contrib/llvm/include/llvm-c/BitWriter.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/BitWriter.h Fri May 18 21:46:48 2012 (r235632) +++ stable/9/contrib/llvm/include/llvm-c/BitWriter.h Fri May 18 21:49:11 2012 (r235633) @@ -25,6 +25,12 @@ extern "C" { #endif +/** + * @defgroup LLVMCBitWriter Bit Writer + * @ingroup LLVMC + * + * @{ + */ /*===-- Operations on modules ---------------------------------------------===*/ @@ -39,6 +45,10 @@ int LLVMWriteBitcodeToFD(LLVMModuleRef M descriptor. Returns 0 on success. Closes the Handle. */ int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int Handle); +/** + * @} + */ + #ifdef __cplusplus } #endif Modified: stable/9/contrib/llvm/include/llvm-c/Core.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/Core.h Fri May 18 21:46:48 2012 (r235632) +++ stable/9/contrib/llvm/include/llvm-c/Core.h Fri May 18 21:49:11 2012 (r235633) @@ -10,24 +10,6 @@ |* This header declares the C interface to libLLVMCore.a, which implements *| |* the LLVM intermediate representation. *| |* *| -|* LLVM uses a polymorphic type hierarchy which C cannot represent, therefore *| -|* parameters must be passed as base types. Despite the declared types, most *| -|* of the functions provided operate only on branches of the type hierarchy. *| -|* The declared parameter names are descriptive and specify which type is *| -|* required. Additionally, each type hierarchy is documented along with the *| -|* functions that operate upon it. For more detail, refer to LLVM's C++ code. *| -|* If in doubt, refer to Core.cpp, which performs paramter downcasts in the *| -|* form unwrap(Param). *| -|* *| -|* Many exotic languages can interoperate with C code but have a harder time *| -|* with C++ due to name mangling. So in addition to C, this interface enables *| -|* tools written in such languages. *| -|* *| -|* When included into a C++ source file, also declares 'wrap' and 'unwrap' *| -|* helpers to perform opaque reference<-->pointer conversions. These helpers *| -|* are shorter and more tightly typed than writing the casts by hand when *| -|* authoring bindings. In assert builds, they will do runtime type checking. *| -|* *| \*===----------------------------------------------------------------------===*/ #ifndef LLVM_C_CORE_H @@ -46,50 +28,121 @@ extern "C" { #endif +/** + * @defgroup LLVMC LLVM-C: C interface to LLVM + * + * This module exposes parts of the LLVM library as a C API. + * + * @{ + */ + +/** + * @defgroup LLVMCTransforms Transforms + */ + +/** + * @defgroup LLVMCCore Core + * + * This modules provide an interface to libLLVMCore, which implements + * the LLVM intermediate representation as well as other related types + * and utilities. + * + * LLVM uses a polymorphic type hierarchy which C cannot represent, therefore + * parameters must be passed as base types. Despite the declared types, most + * of the functions provided operate only on branches of the type hierarchy. + * The declared parameter names are descriptive and specify which type is + * required. Additionally, each type hierarchy is documented along with the + * functions that operate upon it. For more detail, refer to LLVM's C++ code. + * If in doubt, refer to Core.cpp, which performs paramter downcasts in the + * form unwrap(Param). + * + * Many exotic languages can interoperate with C code but have a harder time + * with C++ due to name mangling. So in addition to C, this interface enables + * tools written in such languages. + * + * When included into a C++ source file, also declares 'wrap' and 'unwrap' + * helpers to perform opaque reference<-->pointer conversions. These helpers + * are shorter and more tightly typed than writing the casts by hand when + * authoring bindings. In assert builds, they will do runtime type checking. + * + * @{ + */ + +/** + * @defgroup LLVMCCoreTypes Types and Enumerations + * + * @{ + */ typedef int LLVMBool; /* Opaque types. */ /** - * The top-level container for all LLVM global data. See the LLVMContext class. + * The top-level container for all LLVM global data. See the LLVMContext class. */ typedef struct LLVMOpaqueContext *LLVMContextRef; /** * The top-level container for all other LLVM Intermediate Representation (IR) - * objects. See the llvm::Module class. + * objects. + * + * @see llvm::Module */ typedef struct LLVMOpaqueModule *LLVMModuleRef; /** - * Each value in the LLVM IR has a type, an LLVMTypeRef. See the llvm::Type - * class. + * Each value in the LLVM IR has a type, an LLVMTypeRef. + * + * @see llvm::Type */ typedef struct LLVMOpaqueType *LLVMTypeRef; +/** + * Represents an individual value in LLVM IR. + * + * This models llvm::Value. + */ typedef struct LLVMOpaqueValue *LLVMValueRef; + +/** + * Represents a basic block of instruction in LLVM IR. + * + * This models llvm::BasicBlock. + */ typedef struct LLVMOpaqueBasicBlock *LLVMBasicBlockRef; + +/** + * Represents an LLVM basic block builder. + * + * This models llvm::IRBuilder. + */ typedef struct LLVMOpaqueBuilder *LLVMBuilderRef; -/* Interface used to provide a module to JIT or interpreter. This is now just a - * synonym for llvm::Module, but we have to keep using the different type to - * keep binary compatibility. +/** + * Interface used to provide a module to JIT or interpreter. + * This is now just a synonym for llvm::Module, but we have to keep using the + * different type to keep binary compatibility. */ typedef struct LLVMOpaqueModuleProvider *LLVMModuleProviderRef; -/* Used to provide a module to JIT or interpreter. - * See the llvm::MemoryBuffer class. +/** + * Used to provide a module to JIT or interpreter. + * + * @see llvm::MemoryBuffer */ typedef struct LLVMOpaqueMemoryBuffer *LLVMMemoryBufferRef; -/** See the llvm::PassManagerBase class. */ +/** @see llvm::PassManagerBase */ typedef struct LLVMOpaquePassManager *LLVMPassManagerRef; -/** See the llvm::PassRegistry class. */ +/** @see llvm::PassRegistry */ typedef struct LLVMOpaquePassRegistry *LLVMPassRegistryRef; -/** Used to get the users and usees of a Value. See the llvm::Use class. */ +/** + * Used to get the users and usees of a Value. + * + * @see llvm::Use */ typedef struct LLVMOpaqueUse *LLVMUseRef; typedef enum { @@ -119,6 +172,11 @@ typedef enum { LLVMReturnsTwice = 1 << 29, LLVMUWTable = 1 << 30, LLVMNonLazyBind = 1 << 31 + + // FIXME: This attribute is currently not included in the C API as + // a temporary measure until the API/ABI impact to the C API is understood + // and the path forward agreed upon. + //LLVMAddressSafety = 1ULL << 32 } LLVMAttribute; typedef enum { @@ -195,14 +253,13 @@ typedef enum { /* Exception Handling Operators */ LLVMResume = 58, - LLVMLandingPad = 59, - LLVMUnwind = 60 - + LLVMLandingPad = 59 } LLVMOpcode; typedef enum { LLVMVoidTypeKind, /**< type with no size */ + LLVMHalfTypeKind, /**< 16 bit floating point type */ LLVMFloatTypeKind, /**< 32 bit floating point type */ LLVMDoubleTypeKind, /**< 64 bit floating point type */ LLVMX86_FP80TypeKind, /**< 80 bit floating point type (X87) */ @@ -294,6 +351,10 @@ typedef enum { LLVMLandingPadFilter /**< A filter clause */ } LLVMLandingPadClauseTy; +/** + * @} + */ + void LLVMInitializeCore(LLVMPassRegistryRef R); @@ -302,49 +363,233 @@ void LLVMInitializeCore(LLVMPassRegistry void LLVMDisposeMessage(char *Message); -/*===-- Contexts ----------------------------------------------------------===*/ +/** + * @defgroup LLVMCCoreContext Contexts + * + * Contexts are execution states for the core LLVM IR system. + * + * Most types are tied to a context instance. Multiple contexts can + * exist simultaneously. A single context is not thread safe. However, + * different contexts can execute on different threads simultaneously. + * + * @{ + */ -/* Create and destroy contexts. */ +/** + * Create a new context. + * + * Every call to this function should be paired with a call to + * LLVMContextDispose() or the context will leak memory. + */ LLVMContextRef LLVMContextCreate(void); + +/** + * Obtain the global context instance. + */ LLVMContextRef LLVMGetGlobalContext(void); + +/** + * Destroy a context instance. + * + * This should be called for every call to LLVMContextCreate() or memory + * will be leaked. + */ void LLVMContextDispose(LLVMContextRef C); unsigned LLVMGetMDKindIDInContext(LLVMContextRef C, const char* Name, unsigned SLen); unsigned LLVMGetMDKindID(const char* Name, unsigned SLen); -/*===-- Modules -----------------------------------------------------------===*/ +/** + * @} + */ + +/** + * @defgroup LLVMCCoreModule Modules + * + * Modules represent the top-level structure in a LLVM program. An LLVM + * module is effectively a translation unit or a collection of + * translation units merged together. + * + * @{ + */ -/* Create and destroy modules. */ -/** See llvm::Module::Module. */ +/** + * Create a new, empty module in the global context. + * + * This is equivalent to calling LLVMModuleCreateWithNameInContext with + * LLVMGetGlobalContext() as the context parameter. + * + * Every invocation should be paired with LLVMDisposeModule() or memory + * will be leaked. + */ LLVMModuleRef LLVMModuleCreateWithName(const char *ModuleID); + +/** + * Create a new, empty module in a specific context. + * + * Every invocation should be paired with LLVMDisposeModule() or memory + * will be leaked. + */ LLVMModuleRef LLVMModuleCreateWithNameInContext(const char *ModuleID, LLVMContextRef C); -/** See llvm::Module::~Module. */ +/** + * Destroy a module instance. + * + * This must be called for every created module or memory will be + * leaked. + */ void LLVMDisposeModule(LLVMModuleRef M); -/** Data layout. See Module::getDataLayout. */ +/** + * Obtain the data layout for a module. + * + * @see Module::getDataLayout() + */ const char *LLVMGetDataLayout(LLVMModuleRef M); + +/** + * Set the data layout for a module. + * + * @see Module::setDataLayout() + */ void LLVMSetDataLayout(LLVMModuleRef M, const char *Triple); -/** Target triple. See Module::getTargetTriple. */ +/** + * Obtain the target triple for a module. + * + * @see Module::getTargetTriple() + */ const char *LLVMGetTarget(LLVMModuleRef M); + +/** + * Set the target triple for a module. + * + * @see Module::setTargetTriple() + */ void LLVMSetTarget(LLVMModuleRef M, const char *Triple); -/** See Module::dump. */ +/** + * Dump a representation of a module to stderr. + * + * @see Module::dump() + */ void LLVMDumpModule(LLVMModuleRef M); -/** See Module::setModuleInlineAsm. */ +/** + * Set inline assembly for a module. + * + * @see Module::setModuleInlineAsm() + */ void LLVMSetModuleInlineAsm(LLVMModuleRef M, const char *Asm); -/** See Module::getContext. */ +/** + * Obtain the context to which this module is associated. + * + * @see Module::getContext() + */ LLVMContextRef LLVMGetModuleContext(LLVMModuleRef M); -/*===-- Types -------------------------------------------------------------===*/ +/** + * Obtain a Type from a module by its registered name. + */ +LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name); + +/** + * Obtain the number of operands for named metadata in a module. + * + * @see llvm::Module::getNamedMetadata() + */ +unsigned LLVMGetNamedMetadataNumOperands(LLVMModuleRef M, const char* name); + +/** + * Obtain the named metadata operands for a module. + * + * The passed LLVMValueRef pointer should refer to an array of + * LLVMValueRef at least LLVMGetNamedMetadataNumOperands long. This + * array will be populated with the LLVMValueRef instances. Each + * instance corresponds to a llvm::MDNode. + * + * @see llvm::Module::getNamedMetadata() + * @see llvm::MDNode::getOperand() + */ +void LLVMGetNamedMetadataOperands(LLVMModuleRef M, const char* name, LLVMValueRef *Dest); + +/** + * Add an operand to named metadata. + * + * @see llvm::Module::getNamedMetadata() + * @see llvm::MDNode::addOperand() + */ +void LLVMAddNamedMetadataOperand(LLVMModuleRef M, const char* name, + LLVMValueRef Val); + +/** + * Add a function to a module under a specified name. + * + * @see llvm::Function::Create() + */ +LLVMValueRef LLVMAddFunction(LLVMModuleRef M, const char *Name, + LLVMTypeRef FunctionTy); + +/** + * Obtain a Function value from a Module by its name. + * + * The returned value corresponds to a llvm::Function value. + * + * @see llvm::Module::getFunction() + */ +LLVMValueRef LLVMGetNamedFunction(LLVMModuleRef M, const char *Name); + +/** + * Obtain an iterator to the first Function in a Module. + * + * @see llvm::Module::begin() + */ +LLVMValueRef LLVMGetFirstFunction(LLVMModuleRef M); + +/** + * Obtain an iterator to the last Function in a Module. + * + * @see llvm::Module::end() + */ +LLVMValueRef LLVMGetLastFunction(LLVMModuleRef M); + +/** + * Advance a Function iterator to the next Function. + * + * Returns NULL if the iterator was already at the end and there are no more + * functions. + */ +LLVMValueRef LLVMGetNextFunction(LLVMValueRef Fn); + +/** + * Decrement a Function iterator to the previous Function. + * + * Returns NULL if the iterator was already at the beginning and there are + * no previous functions. + */ +LLVMValueRef LLVMGetPreviousFunction(LLVMValueRef Fn); + +/** + * @} + */ -/* LLVM types conform to the following hierarchy: - * +/** + * @defgroup LLVMCCoreType Types + * + * Types represent the type of a value. + * + * Types are associated with a context instance. The context internally + * deduplicates types so there is only 1 instance of a specific type + * alive at a time. In other words, a unique type is shared among all + * consumers within a context. + * + * A Type in the C API corresponds to llvm::Type. + * + * Types have the following hierarchy: + * * types: * integer type * real type @@ -356,16 +601,44 @@ LLVMContextRef LLVMGetModuleContext(LLVM * void type * label type * opaque type + * + * @{ */ -/** See llvm::LLVMTypeKind::getTypeID. */ +/** + * Obtain the enumerated type of a Type instance. + * + * @see llvm::Type:getTypeID() + */ LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty); + +/** + * Whether the type has a known size. + * + * Things that don't have a size are abstract types, labels, and void.a + * + * @see llvm::Type::isSized() + */ LLVMBool LLVMTypeIsSized(LLVMTypeRef Ty); -/** See llvm::LLVMType::getContext. */ +/** + * Obtain the context to which this type instance is associated. + * + * @see llvm::Type::getContext() + */ LLVMContextRef LLVMGetTypeContext(LLVMTypeRef Ty); -/* Operations on integer types */ +/** + * @defgroup LLVMCCoreTypeInt Integer Types + * + * Functions in this section operate on integer types. + * + * @{ + */ + +/** + * Obtain an integer type from a context with specified bit width. + */ LLVMTypeRef LLVMInt1TypeInContext(LLVMContextRef C); LLVMTypeRef LLVMInt8TypeInContext(LLVMContextRef C); LLVMTypeRef LLVMInt16TypeInContext(LLVMContextRef C); @@ -373,6 +646,10 @@ LLVMTypeRef LLVMInt32TypeInContext(LLVMC LLVMTypeRef LLVMInt64TypeInContext(LLVMContextRef C); LLVMTypeRef LLVMIntTypeInContext(LLVMContextRef C, unsigned NumBits); +/** + * Obtain an integer type from the global context with a specified bit + * width. + */ LLVMTypeRef LLVMInt1Type(void); LLVMTypeRef LLVMInt8Type(void); LLVMTypeRef LLVMInt16Type(void); @@ -381,68 +658,336 @@ LLVMTypeRef LLVMInt64Type(void); LLVMTypeRef LLVMIntType(unsigned NumBits); unsigned LLVMGetIntTypeWidth(LLVMTypeRef IntegerTy); -/* Operations on real types */ +/** + * @} + */ + +/** + * @defgroup LLVMCCoreTypeFloat Floating Point Types + * + * @{ + */ + +/** + * Obtain a 16-bit floating point type from a context. + */ +LLVMTypeRef LLVMHalfTypeInContext(LLVMContextRef C); + +/** + * Obtain a 32-bit floating point type from a context. + */ LLVMTypeRef LLVMFloatTypeInContext(LLVMContextRef C); + +/** + * Obtain a 64-bit floating point type from a context. + */ LLVMTypeRef LLVMDoubleTypeInContext(LLVMContextRef C); + +/** + * Obtain a 80-bit floating point type (X87) from a context. + */ LLVMTypeRef LLVMX86FP80TypeInContext(LLVMContextRef C); + +/** + * Obtain a 128-bit floating point type (112-bit mantissa) from a + * context. + */ LLVMTypeRef LLVMFP128TypeInContext(LLVMContextRef C); + +/** + * Obtain a 128-bit floating point type (two 64-bits) from a context. + */ LLVMTypeRef LLVMPPCFP128TypeInContext(LLVMContextRef C); +/** + * Obtain a floating point type from the global context. + * + * These map to the functions in this group of the same name. + */ +LLVMTypeRef LLVMHalfType(void); LLVMTypeRef LLVMFloatType(void); LLVMTypeRef LLVMDoubleType(void); LLVMTypeRef LLVMX86FP80Type(void); LLVMTypeRef LLVMFP128Type(void); LLVMTypeRef LLVMPPCFP128Type(void); -/* Operations on function types */ +/** + * @} + */ + +/** + * @defgroup LLVMCCoreTypeFunction Function Types + * + * @{ + */ + +/** + * Obtain a function type consisting of a specified signature. + * + * The function is defined as a tuple of a return Type, a list of + * parameter types, and whether the function is variadic. + */ LLVMTypeRef LLVMFunctionType(LLVMTypeRef ReturnType, LLVMTypeRef *ParamTypes, unsigned ParamCount, LLVMBool IsVarArg); + +/** + * Returns whether a function type is variadic. + */ LLVMBool LLVMIsFunctionVarArg(LLVMTypeRef FunctionTy); + +/** + * Obtain the Type this function Type returns. + */ LLVMTypeRef LLVMGetReturnType(LLVMTypeRef FunctionTy); + +/** + * Obtain the number of parameters this function accepts. + */ unsigned LLVMCountParamTypes(LLVMTypeRef FunctionTy); + +/** + * Obtain the types of a function's parameters. + * + * The Dest parameter should point to a pre-allocated array of + * LLVMTypeRef at least LLVMCountParamTypes() large. On return, the + * first LLVMCountParamTypes() entries in the array will be populated + * with LLVMTypeRef instances. + * + * @param FunctionTy The function type to operate on. + * @param Dest Memory address of an array to be filled with result. + */ void LLVMGetParamTypes(LLVMTypeRef FunctionTy, LLVMTypeRef *Dest); -/* Operations on struct types */ +/** + * @} + */ + +/** + * @defgroup LLVMCCoreTypeStruct Structure Types + * + * These functions relate to LLVMTypeRef instances. + * + * @see llvm::StructType + * + * @{ + */ + +/** + * Create a new structure type in a context. + * + * A structure is specified by a list of inner elements/types and + * whether these can be packed together. + * + * @see llvm::StructType::create() + */ LLVMTypeRef LLVMStructTypeInContext(LLVMContextRef C, LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed); + +/** + * Create a new structure type in the global context. + * + * @see llvm::StructType::create() + */ LLVMTypeRef LLVMStructType(LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed); + +/** + * Create an empty structure in a context having a specified name. + * + * @see llvm::StructType::create() + */ LLVMTypeRef LLVMStructCreateNamed(LLVMContextRef C, const char *Name); + +/** + * Obtain the name of a structure. + * + * @see llvm::StructType::getName() + */ const char *LLVMGetStructName(LLVMTypeRef Ty); + +/** + * Set the contents of a structure type. + * + * @see llvm::StructType::setBody() + */ void LLVMStructSetBody(LLVMTypeRef StructTy, LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed); +/** + * Get the number of elements defined inside the structure. + * + * @see llvm::StructType::getNumElements() + */ unsigned LLVMCountStructElementTypes(LLVMTypeRef StructTy); + +/** + * Get the elements within a structure. + * + * The function is passed the address of a pre-allocated array of + * LLVMTypeRef at least LLVMCountStructElementTypes() long. After + * invocation, this array will be populated with the structure's + * elements. The objects in the destination array will have a lifetime + * of the structure type itself, which is the lifetime of the context it + * is contained in. + */ void LLVMGetStructElementTypes(LLVMTypeRef StructTy, LLVMTypeRef *Dest); + +/** + * Determine whether a structure is packed. + * + * @see llvm::StructType::isPacked() + */ LLVMBool LLVMIsPackedStruct(LLVMTypeRef StructTy); + +/** + * Determine whether a structure is opaque. + * + * @see llvm::StructType::isOpaque() + */ LLVMBool LLVMIsOpaqueStruct(LLVMTypeRef StructTy); -LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name); +/** + * @} + */ -/* Operations on array, pointer, and vector types (sequence types) */ -LLVMTypeRef LLVMArrayType(LLVMTypeRef ElementType, unsigned ElementCount); -LLVMTypeRef LLVMPointerType(LLVMTypeRef ElementType, unsigned AddressSpace); -LLVMTypeRef LLVMVectorType(LLVMTypeRef ElementType, unsigned ElementCount); +/** + * @defgroup LLVMCCoreTypeSequential Sequential Types + * + * Sequential types represents "arrays" of types. This is a super class + * for array, vector, and pointer types. + * + * @{ + */ + +/** + * Obtain the type of elements within a sequential type. + * + * This works on array, vector, and pointer types. + * + * @see llvm::SequentialType::getElementType() + */ LLVMTypeRef LLVMGetElementType(LLVMTypeRef Ty); + +/** + * Create a fixed size array type that refers to a specific type. + * + * The created type will exist in the context that its element type + * exists in. + * + * @see llvm::ArrayType::get() + */ +LLVMTypeRef LLVMArrayType(LLVMTypeRef ElementType, unsigned ElementCount); + +/** + * Obtain the length of an array type. + * + * This only works on types that represent arrays. + * + * @see llvm::ArrayType::getNumElements() + */ unsigned LLVMGetArrayLength(LLVMTypeRef ArrayTy); + +/** + * Create a pointer type that points to a defined type. + * + * The created type will exist in the context that its pointee type + * exists in. + * + * @see llvm::PointerType::get() + */ +LLVMTypeRef LLVMPointerType(LLVMTypeRef ElementType, unsigned AddressSpace); + +/** + * Obtain the address space of a pointer type. + * + * This only works on types that represent pointers. + * + * @see llvm::PointerType::getAddressSpace() + */ unsigned LLVMGetPointerAddressSpace(LLVMTypeRef PointerTy); + +/** + * Create a vector type that contains a defined type and has a specific + * number of elements. + * + * The created type will exist in the context thats its element type + * exists in. + * + * @see llvm::VectorType::get() + */ +LLVMTypeRef LLVMVectorType(LLVMTypeRef ElementType, unsigned ElementCount); + +/** + * Obtain the number of elements in a vector type. + * + * This only works on types that represent vectors. + * + * @see llvm::VectorType::getNumElements() + */ unsigned LLVMGetVectorSize(LLVMTypeRef VectorTy); -/* Operations on other types */ +/** + * @} + */ + +/** + * @defgroup LLVMCCoreTypeOther Other Types + * + * @{ + */ + +/** + * Create a void type in a context. + */ LLVMTypeRef LLVMVoidTypeInContext(LLVMContextRef C); + +/** + * Create a label type in a context. + */ LLVMTypeRef LLVMLabelTypeInContext(LLVMContextRef C); + +/** + * Create a X86 MMX type in a context. + */ LLVMTypeRef LLVMX86MMXTypeInContext(LLVMContextRef C); +/** + * These are similar to the above functions except they operate on the + * global context. + */ LLVMTypeRef LLVMVoidType(void); LLVMTypeRef LLVMLabelType(void); LLVMTypeRef LLVMX86MMXType(void); -/*===-- Values ------------------------------------------------------------===*/ +/** + * @} + */ + +/** + * @} + */ -/* The bulk of LLVM's object model consists of values, which comprise a very +/** + * @defgroup LLVMCCoreValues Values + * + * The bulk of LLVM's object model consists of values, which comprise a very * rich type hierarchy. + * + * LLVMValueRef essentially represents llvm::Value. There is a rich + * hierarchy of classes within this type. Depending on the instance + * obtain, not all APIs are available. + * + * Callers can determine the type of a LLVMValueRef by calling the + * LLVMIsA* family of functions (e.g. LLVMIsAArgument()). These + * functions are defined by a macro, so it isn't obvious which are + * available by looking at the Doxygen source code. Instead, look at the + * source definition of LLVM_FOR_EACH_VALUE_SUBCLASS and note the list + * of value names given. These value names also correspond to classes in + * the llvm::Value hierarchy. + * + * @{ */ #define LLVM_FOR_EACH_VALUE_SUBCLASS(macro) \ @@ -473,8 +1018,6 @@ LLVMTypeRef LLVMX86MMXType(void); macro(IntrinsicInst) \ macro(DbgInfoIntrinsic) \ macro(DbgDeclareInst) \ - macro(EHExceptionInst) \ - macro(EHSelectorInst) \ macro(MemIntrinsic) \ macro(MemCpyInst) \ macro(MemMoveInst) \ @@ -518,92 +1061,399 @@ LLVMTypeRef LLVMX86MMXType(void); macro(LoadInst) \ macro(VAArgInst) -/* Operations on all values */ -LLVMTypeRef LLVMTypeOf(LLVMValueRef Val); +/** + * @defgroup LLVMCCoreValueGeneral General APIs + * + * Functions in this section work on all LLVMValueRef instances, + * regardless of their sub-type. They correspond to functions available + * on llvm::Value. + * + * @{ + */ + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri May 18 21:49:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6F53610657ED; Fri, 18 May 2012 21:49:41 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AED98FC0A; Fri, 18 May 2012 21:49:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4ILnfMJ082503; Fri, 18 May 2012 21:49:41 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4ILnfNq082501; Fri, 18 May 2012 21:49:41 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201205182149.q4ILnfNq082501@svn.freebsd.org> From: Sean Bruno Date: Fri, 18 May 2012 21:49:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235634 - head/sys/dev/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 21:49:41 -0000 Author: sbruno Date: Fri May 18 21:49:40 2012 New Revision: 235634 URL: http://svn.freebsd.org/changeset/base/235634 Log: Fix and update battery status bits according to linux driver Reviewed by: ambrisko@ MFC after: 3 days Modified: head/sys/dev/mfi/mfireg.h Modified: head/sys/dev/mfi/mfireg.h ============================================================================== --- head/sys/dev/mfi/mfireg.h Fri May 18 21:49:11 2012 (r235633) +++ head/sys/dev/mfi/mfireg.h Fri May 18 21:49:40 2012 (r235634) @@ -1377,8 +1377,13 @@ struct mfi_bbu_status { #define MFI_BBU_STATE_PACK_MISSING (1 << 0) #define MFI_BBU_STATE_VOLTAGE_LOW (1 << 1) #define MFI_BBU_STATE_TEMPERATURE_HIGH (1 << 2) -#define MFI_BBU_STATE_CHARGE_ACTIVE (1 << 0) -#define MFI_BBU_STATE_DISCHARGE_ACTIVE (1 << 0) +#define MFI_BBU_STATE_CHARGE_ACTIVE (1 << 3) +#define MFI_BBU_STATE_DISCHARGE_ACTIVE (1 << 4) +#define MFI_BBU_STATE_LEARN_CYC_REQ (1 << 5) +#define MFI_BBU_STATE_LEARN_CYC_ACTIVE (1 << 6) +#define MFI_BBU_STATE_LEARN_CYC_FAIL (1 << 7) +#define MFI_BBU_STATE_LEARN_CYC_TIMEOUT (1 << 8) +#define MFI_BBU_STATE_I2C_ERR_DETECT (1 << 9) uint8_t pad[20]; union mfi_bbu_status_detail detail; } __packed; From owner-svn-src-all@FreeBSD.ORG Fri May 18 21:50:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 940CB10656F6; Fri, 18 May 2012 21:50:27 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F7E88FC12; Fri, 18 May 2012 21:50:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4ILoR4I082573; Fri, 18 May 2012 21:50:27 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4ILoReP082571; Fri, 18 May 2012 21:50:27 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201205182150.q4ILoReP082571@svn.freebsd.org> From: Sean Bruno Date: Fri, 18 May 2012 21:50:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235635 - head/usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 21:50:27 -0000 Author: sbruno Date: Fri May 18 21:50:26 2012 New Revision: 235635 URL: http://svn.freebsd.org/changeset/base/235635 Log: Decode new battery status indications. Requires r235634 Reviewed by: ambrisko@ MFC after: 3 days Modified: head/usr.sbin/mfiutil/mfi_show.c Modified: head/usr.sbin/mfiutil/mfi_show.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_show.c Fri May 18 21:49:40 2012 (r235634) +++ head/usr.sbin/mfiutil/mfi_show.c Fri May 18 21:50:26 2012 (r235635) @@ -224,7 +224,29 @@ show_battery(int ac, char **av) } if (stat.fw_status & MFI_BBU_STATE_DISCHARGE_ACTIVE) { printf("%s DISCHARGING", comma ? "," : ""); + comma = 1; } + if (stat.fw_status & MFI_BBU_STATE_LEARN_CYC_REQ) { + printf("%s LEARN_CYCLE_REQUESTED", comma ? "," : ""); + comma = 1; + } + if (stat.fw_status & MFI_BBU_STATE_LEARN_CYC_ACTIVE) { + printf("%s LEARN_CYCLE_ACTIVE", comma ? "," : ""); + comma = 1; + } + if (stat.fw_status & MFI_BBU_STATE_LEARN_CYC_FAIL) { + printf("%s LEARN_CYCLE_FAIL", comma ? "," : ""); + comma = 1; + } + if (stat.fw_status & MFI_BBU_STATE_LEARN_CYC_TIMEOUT) { + printf("%s LEARN_CYCLE_TIMEOUT", comma ? "," : ""); + comma = 1; + } + if (stat.fw_status & MFI_BBU_STATE_I2C_ERR_DETECT) { + printf("%s I2C_ERROR_DETECT", comma ? "," : ""); + comma = 1; + } + if (!comma) printf(" normal"); printf("\n"); From owner-svn-src-all@FreeBSD.ORG Fri May 18 23:29:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA8BB106566C; Fri, 18 May 2012 23:29:30 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A35288FC0A; Fri, 18 May 2012 23:29:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4INTUIA086655; Fri, 18 May 2012 23:29:30 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4INTU4X086651; Fri, 18 May 2012 23:29:30 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201205182329.q4INTU4X086651@svn.freebsd.org> From: Sean Bruno Date: Fri, 18 May 2012 23:29:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235636 - in stable/7/sys: conf dev/mfi modules/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 23:29:30 -0000 Author: sbruno Date: Fri May 18 23:29:30 2012 New Revision: 235636 URL: http://svn.freebsd.org/changeset/base/235636 Log: MFC of head thunderbolt support for mfi(4) r233711 -- IFV head_mfi into head for initial thunderbolt support r233768 -- atomic_t --> mfi_atomic r233805 -- fix tinderbuild, move megasas_sge to mfivar.h r233877 -- remove atomic.h from includes r235014 -- fix reading of sector >= 2^32 or 2^21, repair RAID handling r235016 -- style(9) r235040 -- fix returns from mfi_tbolt_sync_map_info() r235318 -- repair panic on PAE i386 r235321 -- repair the repair of panics on PAE i386 Added: stable/7/sys/dev/mfi/mfi_syspd.c - copied unchanged from r233711, head/sys/dev/mfi/mfi_syspd.c stable/7/sys/dev/mfi/mfi_tbolt.c - copied, changed from r233711, head/sys/dev/mfi/mfi_tbolt.c Modified: stable/7/sys/conf/files stable/7/sys/dev/mfi/mfi.c stable/7/sys/dev/mfi/mfi_cam.c stable/7/sys/dev/mfi/mfi_debug.c stable/7/sys/dev/mfi/mfi_disk.c stable/7/sys/dev/mfi/mfi_ioctl.h stable/7/sys/dev/mfi/mfi_linux.c stable/7/sys/dev/mfi/mfi_pci.c stable/7/sys/dev/mfi/mfireg.h stable/7/sys/dev/mfi/mfivar.h stable/7/sys/modules/mfi/Makefile Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/conf/files ============================================================================== --- stable/7/sys/conf/files Fri May 18 21:50:26 2012 (r235635) +++ stable/7/sys/conf/files Fri May 18 23:29:30 2012 (r235636) @@ -948,6 +948,8 @@ dev/mfi/mfi.c optional mfi dev/mfi/mfi_debug.c optional mfi dev/mfi/mfi_pci.c optional mfi pci dev/mfi/mfi_disk.c optional mfi +dev/mfi/mfi_syspd.c optional mfi +dev/mfi/mfi_tbolt.c optional mfi dev/mfi/mfi_linux.c optional mfi compat_linux dev/mfi/mfi_cam.c optional mfip scbus dev/mii/acphy.c optional miibus | acphy Modified: stable/7/sys/dev/mfi/mfi.c ============================================================================== --- stable/7/sys/dev/mfi/mfi.c Fri May 18 21:50:26 2012 (r235635) +++ stable/7/sys/dev/mfi/mfi.c Fri May 18 23:29:30 2012 (r235636) @@ -53,6 +53,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" #include "opt_mfi.h" #include @@ -72,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -79,43 +81,52 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include static int mfi_alloc_commands(struct mfi_softc *); static int mfi_comms_init(struct mfi_softc *); -static int mfi_wait_command(struct mfi_softc *, struct mfi_command *); static int mfi_get_controller_info(struct mfi_softc *); static int mfi_get_log_state(struct mfi_softc *, struct mfi_evt_log_state **); static int mfi_parse_entries(struct mfi_softc *, int, int); -static int mfi_dcmd_command(struct mfi_softc *, struct mfi_command **, - uint32_t, void **, size_t); static void mfi_data_cb(void *, bus_dma_segment_t *, int, int); static void mfi_startup(void *arg); static void mfi_intr(void *arg); static void mfi_ldprobe(struct mfi_softc *sc); +static void mfi_syspdprobe(struct mfi_softc *sc); +static void mfi_handle_evt(void *context, int pending); static int mfi_aen_register(struct mfi_softc *sc, int seq, int locale); static void mfi_aen_complete(struct mfi_command *); -static int mfi_aen_setup(struct mfi_softc *, uint32_t); static int mfi_add_ld(struct mfi_softc *sc, int); static void mfi_add_ld_complete(struct mfi_command *); +static int mfi_add_sys_pd(struct mfi_softc *sc, int); +static void mfi_add_sys_pd_complete(struct mfi_command *); static struct mfi_command * mfi_bio_command(struct mfi_softc *); static void mfi_bio_complete(struct mfi_command *); -static int mfi_mapcmd(struct mfi_softc *, struct mfi_command *); +static struct mfi_command *mfi_build_ldio(struct mfi_softc *,struct bio*); +static struct mfi_command *mfi_build_syspdio(struct mfi_softc *,struct bio*); static int mfi_send_frame(struct mfi_softc *, struct mfi_command *); -static void mfi_complete(struct mfi_softc *, struct mfi_command *); static int mfi_abort(struct mfi_softc *, struct mfi_command *); -static int mfi_linux_ioctl_int(struct cdev *, u_long, caddr_t, int, d_thread_t *); +static int mfi_linux_ioctl_int(struct cdev *, u_long, caddr_t, int, struct thread *); static void mfi_timeout(void *); static int mfi_user_command(struct mfi_softc *, struct mfi_ioc_passthru *); -static void mfi_enable_intr_xscale(struct mfi_softc *sc); -static void mfi_enable_intr_ppc(struct mfi_softc *sc); -static int32_t mfi_read_fw_status_xscale(struct mfi_softc *sc); -static int32_t mfi_read_fw_status_ppc(struct mfi_softc *sc); -static int mfi_check_clear_intr_xscale(struct mfi_softc *sc); -static int mfi_check_clear_intr_ppc(struct mfi_softc *sc); -static void mfi_issue_cmd_xscale(struct mfi_softc *sc,uint32_t bus_add,uint32_t frame_cnt); -static void mfi_issue_cmd_ppc(struct mfi_softc *sc,uint32_t bus_add,uint32_t frame_cnt); +static void mfi_enable_intr_xscale(struct mfi_softc *sc); +static void mfi_enable_intr_ppc(struct mfi_softc *sc); +static int32_t mfi_read_fw_status_xscale(struct mfi_softc *sc); +static int32_t mfi_read_fw_status_ppc(struct mfi_softc *sc); +static int mfi_check_clear_intr_xscale(struct mfi_softc *sc); +static int mfi_check_clear_intr_ppc(struct mfi_softc *sc); +static void mfi_issue_cmd_xscale(struct mfi_softc *sc, bus_addr_t bus_add, + uint32_t frame_cnt); +static void mfi_issue_cmd_ppc(struct mfi_softc *sc, bus_addr_t bus_add, + uint32_t frame_cnt); +static int mfi_config_lock(struct mfi_softc *sc, uint32_t opcode); +static void mfi_config_unlock(struct mfi_softc *sc, int locked); +static int mfi_check_command_pre(struct mfi_softc *sc, struct mfi_command *cm); +static void mfi_check_command_post(struct mfi_softc *sc, struct mfi_command *cm); +static int mfi_check_for_sscd(struct mfi_softc *sc, struct mfi_command *cm); SYSCTL_NODE(_hw, OID_AUTO, mfi, CTLFLAG_RD, 0, "MFI driver parameters"); static int mfi_event_locale = MFI_EVT_LOCALE_ALL; @@ -133,6 +144,11 @@ TUNABLE_INT("hw.mfi.max_cmds", &mfi_max_ SYSCTL_INT(_hw_mfi, OID_AUTO, max_cmds, CTLFLAG_RD, &mfi_max_cmds, 0, "Max commands"); +static int mfi_detect_jbod_change = 1; +TUNABLE_INT("hw.mfi.detect_jbod_change", &mfi_detect_jbod_change); +SYSCTL_INT(_hw_mfi, OID_AUTO, detect_jbod_change, CTLFLAG_RW, + &mfi_detect_jbod_change, 0, "Detect a change to a JBOD"); + /* Management interface */ static d_open_t mfi_open; static d_close_t mfi_close; @@ -152,6 +168,7 @@ static struct cdevsw mfi_cdevsw = { MALLOC_DEFINE(M_MFIBUF, "mfibuf", "Buffers for the MFI driver"); #define MFI_INQ_LENGTH SHORT_INQUIRY_LENGTH +struct mfi_skinny_dma_info mfi_skinny; static void mfi_enable_intr_xscale(struct mfi_softc *sc) @@ -162,12 +179,17 @@ mfi_enable_intr_xscale(struct mfi_softc static void mfi_enable_intr_ppc(struct mfi_softc *sc) { - MFI_WRITE4(sc, MFI_ODCR0, 0xFFFFFFFF); if (sc->mfi_flags & MFI_FLAGS_1078) { + MFI_WRITE4(sc, MFI_ODCR0, 0xFFFFFFFF); MFI_WRITE4(sc, MFI_OMSK, ~MFI_1078_EIM); - } else if (sc->mfi_flags & MFI_FLAGS_GEN2) { + } + else if (sc->mfi_flags & MFI_FLAGS_GEN2) { + MFI_WRITE4(sc, MFI_ODCR0, 0xFFFFFFFF); MFI_WRITE4(sc, MFI_OMSK, ~MFI_GEN2_EIM); } + else if (sc->mfi_flags & MFI_FLAGS_SKINNY) { + MFI_WRITE4(sc, MFI_OMSK, ~0x00000001); + } } static int32_t @@ -205,35 +227,51 @@ mfi_check_clear_intr_ppc(struct mfi_soft if (!(status & MFI_1078_RM)) { return 1; } - } else if (sc->mfi_flags & MFI_FLAGS_GEN2) { + } + else if (sc->mfi_flags & MFI_FLAGS_GEN2) { if (!(status & MFI_GEN2_RM)) { return 1; } } - - MFI_WRITE4(sc, MFI_ODCR0, status); + else if (sc->mfi_flags & MFI_FLAGS_SKINNY) { + if (!(status & MFI_SKINNY_RM)) { + return 1; + } + } + if (sc->mfi_flags & MFI_FLAGS_SKINNY) + MFI_WRITE4(sc, MFI_OSTS, status); + else + MFI_WRITE4(sc, MFI_ODCR0, status); return 0; } static void -mfi_issue_cmd_xscale(struct mfi_softc *sc,uint32_t bus_add,uint32_t frame_cnt) +mfi_issue_cmd_xscale(struct mfi_softc *sc, bus_addr_t bus_add, uint32_t frame_cnt) { MFI_WRITE4(sc, MFI_IQP,(bus_add >>3)|frame_cnt); } static void -mfi_issue_cmd_ppc(struct mfi_softc *sc,uint32_t bus_add,uint32_t frame_cnt) +mfi_issue_cmd_ppc(struct mfi_softc *sc, bus_addr_t bus_add, uint32_t frame_cnt) { - MFI_WRITE4(sc, MFI_IQP, (bus_add |frame_cnt <<1)|1 ); + if (sc->mfi_flags & MFI_FLAGS_SKINNY) { + MFI_WRITE4(sc, MFI_IQPL, (bus_add | frame_cnt <<1)|1 ); + MFI_WRITE4(sc, MFI_IQPH, 0x00000000); + } else { + MFI_WRITE4(sc, MFI_IQP, (bus_add | frame_cnt <<1)|1 ); + } } -static int +int mfi_transition_firmware(struct mfi_softc *sc) { - int32_t fw_state, cur_state; + uint32_t fw_state, cur_state; int max_wait, i; + uint32_t cur_abs_reg_val = 0; + uint32_t prev_abs_reg_val = 0; - fw_state = sc->mfi_read_fw_status(sc)& MFI_FWSTATE_MASK; + cur_abs_reg_val = sc->mfi_read_fw_status(sc); + fw_state = cur_abs_reg_val & MFI_FWSTATE_MASK; while (fw_state != MFI_FWSTATE_READY) { if (bootverbose) device_printf(sc->mfi_dev, "Waiting for firmware to " @@ -244,36 +282,62 @@ mfi_transition_firmware(struct mfi_softc device_printf(sc->mfi_dev, "Firmware fault\n"); return (ENXIO); case MFI_FWSTATE_WAIT_HANDSHAKE: - MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_CLEAR_HANDSHAKE); - max_wait = 2; + if (sc->mfi_flags & MFI_FLAGS_SKINNY || sc->mfi_flags & MFI_FLAGS_TBOLT) + MFI_WRITE4(sc, MFI_SKINNY_IDB, MFI_FWINIT_CLEAR_HANDSHAKE); + else + MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_CLEAR_HANDSHAKE); + max_wait = MFI_RESET_WAIT_TIME; break; case MFI_FWSTATE_OPERATIONAL: - MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_READY); - max_wait = 10; + if (sc->mfi_flags & MFI_FLAGS_SKINNY || sc->mfi_flags & MFI_FLAGS_TBOLT) + MFI_WRITE4(sc, MFI_SKINNY_IDB, 7); + else + MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_READY); + max_wait = MFI_RESET_WAIT_TIME; break; case MFI_FWSTATE_UNDEFINED: case MFI_FWSTATE_BB_INIT: - max_wait = 2; + max_wait = MFI_RESET_WAIT_TIME; + break; + case MFI_FWSTATE_FW_INIT_2: + max_wait = MFI_RESET_WAIT_TIME; break; case MFI_FWSTATE_FW_INIT: - case MFI_FWSTATE_DEVICE_SCAN: case MFI_FWSTATE_FLUSH_CACHE: - max_wait = 20; + max_wait = MFI_RESET_WAIT_TIME; + break; + case MFI_FWSTATE_DEVICE_SCAN: + max_wait = MFI_RESET_WAIT_TIME; /* wait for 180 seconds */ + prev_abs_reg_val = cur_abs_reg_val; + break; + case MFI_FWSTATE_BOOT_MESSAGE_PENDING: + if (sc->mfi_flags & MFI_FLAGS_SKINNY || sc->mfi_flags & MFI_FLAGS_TBOLT) + MFI_WRITE4(sc, MFI_SKINNY_IDB, MFI_FWINIT_HOTPLUG); + else + MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_HOTPLUG); + max_wait = MFI_RESET_WAIT_TIME; break; default: - device_printf(sc->mfi_dev,"Unknown firmware state %d\n", + device_printf(sc->mfi_dev, "Unknown firmware state %#x\n", fw_state); return (ENXIO); } for (i = 0; i < (max_wait * 10); i++) { - fw_state = sc->mfi_read_fw_status(sc) & MFI_FWSTATE_MASK; + cur_abs_reg_val = sc->mfi_read_fw_status(sc); + fw_state = cur_abs_reg_val & MFI_FWSTATE_MASK; if (fw_state == cur_state) DELAY(100000); else break; } + if (fw_state == MFI_FWSTATE_DEVICE_SCAN) { + /* Check the device scanning progress */ + if (prev_abs_reg_val != cur_abs_reg_val) { + continue; + } + } if (fw_state == cur_state) { - device_printf(sc->mfi_dev, "firmware stuck in state " + device_printf(sc->mfi_dev, "Firmware stuck in state " "%#x\n", fw_state); return (ENXIO); } @@ -282,26 +346,36 @@ mfi_transition_firmware(struct mfi_softc } static void -mfi_addr32_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +mfi_addr_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) { - uint32_t *addr; + bus_addr_t *addr; addr = arg; *addr = segs[0].ds_addr; } + int mfi_attach(struct mfi_softc *sc) { uint32_t status; int error, commsz, framessz, sensesz; int frames, unit, max_fw_sge; + uint32_t tb_mem_size = 0; - device_printf(sc->mfi_dev, "Megaraid SAS driver Ver 3.00 \n"); + if (sc == NULL) + return EINVAL; + + device_printf(sc->mfi_dev, "Megaraid SAS driver Ver %s \n", + MEGASAS_VERSION); mtx_init(&sc->mfi_io_lock, "MFI I/O lock", NULL, MTX_DEF); sx_init(&sc->mfi_config_lock, "MFI config"); TAILQ_INIT(&sc->mfi_ld_tqh); + TAILQ_INIT(&sc->mfi_syspd_tqh); + TAILQ_INIT(&sc->mfi_evt_queue); + TASK_INIT(&sc->mfi_evt_task, 0, mfi_handle_evt, sc); + TASK_INIT(&sc->mfi_map_sync_task, 0, mfi_handle_map_sync, sc); TAILQ_INIT(&sc->mfi_aen_pids); TAILQ_INIT(&sc->mfi_cam_ccbq); @@ -310,15 +384,29 @@ mfi_attach(struct mfi_softc *sc) mfi_initq_busy(sc); mfi_initq_bio(sc); + sc->adpreset = 0; + sc->last_seq_num = 0; + sc->disableOnlineCtrlReset = 1; + sc->issuepend_done = 1; + sc->hw_crit_error = 0; + if (sc->mfi_flags & MFI_FLAGS_1064R) { sc->mfi_enable_intr = mfi_enable_intr_xscale; sc->mfi_read_fw_status = mfi_read_fw_status_xscale; sc->mfi_check_clear_intr = mfi_check_clear_intr_xscale; sc->mfi_issue_cmd = mfi_issue_cmd_xscale; - } - else { + } else if (sc->mfi_flags & MFI_FLAGS_TBOLT) { + sc->mfi_enable_intr = mfi_tbolt_enable_intr_ppc; + sc->mfi_disable_intr = mfi_tbolt_disable_intr_ppc; + sc->mfi_read_fw_status = mfi_tbolt_read_fw_status_ppc; + sc->mfi_check_clear_intr = mfi_tbolt_check_clear_intr_ppc; + sc->mfi_issue_cmd = mfi_tbolt_issue_cmd_ppc; + sc->mfi_adp_reset = mfi_tbolt_adp_reset; + sc->mfi_tbolt = 1; + TAILQ_INIT(&sc->mfi_cmd_tbolt_tqh); + } else { sc->mfi_enable_intr = mfi_enable_intr_ppc; - sc->mfi_read_fw_status = mfi_read_fw_status_ppc; + sc->mfi_read_fw_status = mfi_read_fw_status_ppc; sc->mfi_check_clear_intr = mfi_check_clear_intr_ppc; sc->mfi_issue_cmd = mfi_issue_cmd_ppc; } @@ -331,6 +419,32 @@ mfi_attach(struct mfi_softc *sc) return (ENXIO); } + /* Start: LSIP200113393 */ + if (bus_dma_tag_create( sc->mfi_parent_dmat, /* parent */ + 1, 0, /* algnmnt, boundary */ + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MEGASAS_MAX_NAME*sizeof(bus_addr_t), /* maxsize */ + 1, /* msegments */ + MEGASAS_MAX_NAME*sizeof(bus_addr_t), /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->verbuf_h_dmat)) { + device_printf(sc->mfi_dev, "Cannot allocate verbuf_h_dmat DMA tag\n"); + return (ENOMEM); + } + if (bus_dmamem_alloc(sc->verbuf_h_dmat, (void **)&sc->verbuf, + BUS_DMA_NOWAIT, &sc->verbuf_h_dmamap)) { + device_printf(sc->mfi_dev, "Cannot allocate verbuf_h_dmamap memory\n"); + return (ENOMEM); + } + bzero(sc->verbuf, MEGASAS_MAX_NAME*sizeof(bus_addr_t)); + bus_dmamap_load(sc->verbuf_h_dmat, sc->verbuf_h_dmamap, + sc->verbuf, MEGASAS_MAX_NAME*sizeof(bus_addr_t), + mfi_addr_cb, &sc->verbuf_h_busaddr, 0); + /* End: LSIP200113393 */ + /* * Get information needed for sizing the contiguous memory for the * frame pool. Size down the sgl parameter since we know that @@ -341,8 +455,102 @@ mfi_attach(struct mfi_softc *sc) status = sc->mfi_read_fw_status(sc); sc->mfi_max_fw_cmds = status & MFI_FWSTATE_MAXCMD_MASK; max_fw_sge = (status & MFI_FWSTATE_MAXSGL_MASK) >> 16; - sc->mfi_max_sge = min(max_fw_sge, ((MAXPHYS / PAGE_SIZE) + 1)); + sc->mfi_max_sge = min(max_fw_sge, ((MFI_MAXPHYS / PAGE_SIZE) + 1)); + + /* ThunderBolt Support get the contiguous memory */ + + if (sc->mfi_flags & MFI_FLAGS_TBOLT) { + mfi_tbolt_init_globals(sc); + device_printf(sc->mfi_dev, "MaxCmd = %x MaxSgl = %x state = %x \n", + sc->mfi_max_fw_cmds, sc->mfi_max_sge, status); + tb_mem_size = mfi_tbolt_get_memory_requirement(sc); + + if (bus_dma_tag_create( sc->mfi_parent_dmat, /* parent */ + 1, 0, /* algnmnt, boundary */ + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + tb_mem_size, /* maxsize */ + 1, /* msegments */ + tb_mem_size, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->mfi_tb_dmat)) { + device_printf(sc->mfi_dev, "Cannot allocate comms DMA tag\n"); + return (ENOMEM); + } + if (bus_dmamem_alloc(sc->mfi_tb_dmat, (void **)&sc->request_message_pool, + BUS_DMA_NOWAIT, &sc->mfi_tb_dmamap)) { + device_printf(sc->mfi_dev, "Cannot allocate comms memory\n"); + return (ENOMEM); + } + bzero(sc->request_message_pool, tb_mem_size); + bus_dmamap_load(sc->mfi_tb_dmat, sc->mfi_tb_dmamap, + sc->request_message_pool, tb_mem_size, mfi_addr_cb, &sc->mfi_tb_busaddr, 0); + + /* For ThunderBolt memory init */ + if (bus_dma_tag_create( sc->mfi_parent_dmat, /* parent */ + 0x100, 0, /* alignmnt, boundary */ + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MFI_FRAME_SIZE, /* maxsize */ + 1, /* msegments */ + MFI_FRAME_SIZE, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->mfi_tb_init_dmat)) { + device_printf(sc->mfi_dev, "Cannot allocate init DMA tag\n"); + return (ENOMEM); + } + if (bus_dmamem_alloc(sc->mfi_tb_init_dmat, (void **)&sc->mfi_tb_init, + BUS_DMA_NOWAIT, &sc->mfi_tb_init_dmamap)) { + device_printf(sc->mfi_dev, "Cannot allocate init memory\n"); + return (ENOMEM); + } + bzero(sc->mfi_tb_init, MFI_FRAME_SIZE); + bus_dmamap_load(sc->mfi_tb_init_dmat, sc->mfi_tb_init_dmamap, + sc->mfi_tb_init, MFI_FRAME_SIZE, mfi_addr_cb, + &sc->mfi_tb_init_busaddr, 0); + if (mfi_tbolt_init_desc_pool(sc, sc->request_message_pool, + tb_mem_size)) { + device_printf(sc->mfi_dev, + "Thunderbolt pool preparation error\n"); + return 0; + } + /* + Allocate DMA memory mapping for MPI2 IOC Init descriptor, + we are taking it diffrent from what we have allocated for Request + and reply descriptors to avoid confusion later + */ + tb_mem_size = sizeof(struct MPI2_IOC_INIT_REQUEST); + if (bus_dma_tag_create( sc->mfi_parent_dmat, /* parent */ + 1, 0, /* algnmnt, boundary */ + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + tb_mem_size, /* maxsize */ + 1, /* msegments */ + tb_mem_size, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->mfi_tb_ioc_init_dmat)) { + device_printf(sc->mfi_dev, + "Cannot allocate comms DMA tag\n"); + return (ENOMEM); + } + if (bus_dmamem_alloc(sc->mfi_tb_ioc_init_dmat, + (void **)&sc->mfi_tb_ioc_init_desc, + BUS_DMA_NOWAIT, &sc->mfi_tb_ioc_init_dmamap)) { + device_printf(sc->mfi_dev, "Cannot allocate comms memory\n"); + return (ENOMEM); + } + bzero(sc->mfi_tb_ioc_init_desc, tb_mem_size); + bus_dmamap_load(sc->mfi_tb_ioc_init_dmat, sc->mfi_tb_ioc_init_dmamap, + sc->mfi_tb_ioc_init_desc, tb_mem_size, mfi_addr_cb, + &sc->mfi_tb_ioc_init_busaddr, 0); + } /* * Create the dma tag for data buffers. Used both for block I/O * and for various internal data queries. @@ -392,8 +600,7 @@ mfi_attach(struct mfi_softc *sc) } bzero(sc->mfi_comms, commsz); bus_dmamap_load(sc->mfi_comms_dmat, sc->mfi_comms_dmamap, - sc->mfi_comms, commsz, mfi_addr32_cb, &sc->mfi_comms_busaddr, 0); - + sc->mfi_comms, commsz, mfi_addr_cb, &sc->mfi_comms_busaddr, 0); /* * Allocate DMA memory for the command frames. Keep them in the * lower 4GB for efficiency. Calculate the size of the commands at @@ -410,6 +617,8 @@ mfi_attach(struct mfi_softc *sc) } else { sc->mfi_sge_size = sizeof(struct mfi_sg32); } + if (sc->mfi_flags & MFI_FLAGS_SKINNY) + sc->mfi_sge_size = sizeof(struct mfi_sg_skinny); frames = (sc->mfi_sge_size * sc->mfi_max_sge - 1) / MFI_FRAME_SIZE + 2; sc->mfi_cmd_size = frames * MFI_FRAME_SIZE; framessz = sc->mfi_cmd_size * sc->mfi_max_fw_cmds; @@ -434,8 +643,7 @@ mfi_attach(struct mfi_softc *sc) } bzero(sc->mfi_frames, framessz); bus_dmamap_load(sc->mfi_frames_dmat, sc->mfi_frames_dmamap, - sc->mfi_frames, framessz, mfi_addr32_cb, &sc->mfi_frames_busaddr,0); - + sc->mfi_frames, framessz, mfi_addr_cb, &sc->mfi_frames_busaddr,0); /* * Allocate DMA memory for the frame sense data. Keep them in the * lower 4GB for efficiency @@ -461,39 +669,46 @@ mfi_attach(struct mfi_softc *sc) return (ENOMEM); } bus_dmamap_load(sc->mfi_sense_dmat, sc->mfi_sense_dmamap, - sc->mfi_sense, sensesz, mfi_addr32_cb, &sc->mfi_sense_busaddr, 0); - + sc->mfi_sense, sensesz, mfi_addr_cb, &sc->mfi_sense_busaddr, 0); if ((error = mfi_alloc_commands(sc)) != 0) return (error); - if ((error = mfi_comms_init(sc)) != 0) - return (error); + /* Before moving the FW to operational state, check whether + * hostmemory is required by the FW or not + */ - if ((error = mfi_get_controller_info(sc)) != 0) - return (error); + /* ThunderBolt MFI_IOC2 INIT */ + if (sc->mfi_flags & MFI_FLAGS_TBOLT) { + sc->mfi_disable_intr(sc); + if ((error = mfi_tbolt_init_MFI_queue(sc)) != 0) { + device_printf(sc->mfi_dev, + "TB Init has failed with error %d\n",error); + return error; + } - mtx_lock(&sc->mfi_io_lock); - if ((error = mfi_aen_setup(sc, 0), 0) != 0) { - mtx_unlock(&sc->mfi_io_lock); - return (error); - } - mtx_unlock(&sc->mfi_io_lock); + if ((error = mfi_tbolt_alloc_cmd(sc)) != 0) + return error; + if (bus_setup_intr(sc->mfi_dev, sc->mfi_irq, + INTR_MPSAFE|INTR_TYPE_BIO, NULL, mfi_intr_tbolt, sc, + &sc->mfi_intr)) { + device_printf(sc->mfi_dev, "Cannot set up interrupt\n"); + return (EINVAL); + } + sc->mfi_enable_intr(sc); + } else { + if ((error = mfi_comms_init(sc)) != 0) + return (error); - /* - * Set up the interrupt handler. XXX This should happen in - * mfi_pci.c - */ - sc->mfi_irq_rid = 0; - if ((sc->mfi_irq = bus_alloc_resource_any(sc->mfi_dev, SYS_RES_IRQ, - &sc->mfi_irq_rid, RF_SHAREABLE | RF_ACTIVE)) == NULL) { - device_printf(sc->mfi_dev, "Cannot allocate interrupt\n"); - return (EINVAL); - } - if (bus_setup_intr(sc->mfi_dev, sc->mfi_irq, INTR_MPSAFE|INTR_TYPE_BIO, - NULL, mfi_intr, sc, &sc->mfi_intr)) { - device_printf(sc->mfi_dev, "Cannot set up interrupt\n"); - return (EINVAL); + if (bus_setup_intr(sc->mfi_dev, sc->mfi_irq, + INTR_MPSAFE|INTR_TYPE_BIO, NULL, mfi_intr, sc, &sc->mfi_intr)) { + device_printf(sc->mfi_dev, "Cannot set up interrupt\n"); + return (EINVAL); + } + sc->mfi_enable_intr(sc); } + if ((error = mfi_get_controller_info(sc)) != 0) + return (error); + sc->disableOnlineCtrlReset = 0; /* Register a config hook to probe the bus for arrays */ sc->mfi_ich.ich_func = mfi_startup; @@ -503,6 +718,10 @@ mfi_attach(struct mfi_softc *sc) "hook\n"); return (EINVAL); } + if ((error = mfi_aen_setup(sc, 0), 0) != 0) { + mtx_unlock(&sc->mfi_io_lock); + return (error); + } /* * Register a shutdown handler. @@ -541,6 +760,10 @@ mfi_attach(struct mfi_softc *sc) callout_reset(&sc->mfi_watchdog_callout, MFI_CMD_TIMEOUT * hz, mfi_timeout, sc); + if (sc->mfi_flags & MFI_FLAGS_TBOLT) { + mfi_tbolt_sync_map_info(sc); + } + return (0); } @@ -574,8 +797,11 @@ mfi_alloc_commands(struct mfi_softc *sc) cm->cm_sc = sc; cm->cm_index = i; if (bus_dmamap_create(sc->mfi_buffer_dmat, 0, - &cm->cm_dmamap) == 0) + &cm->cm_dmamap) == 0) { + mtx_lock(&sc->mfi_io_lock); mfi_release_command(cm); + mtx_unlock(&sc->mfi_io_lock); + } else break; sc->mfi_total_cmds++; @@ -590,6 +816,8 @@ mfi_release_command(struct mfi_command * struct mfi_frame_header *hdr; uint32_t *hdr_data; + mtx_assert(&cm->cm_sc->mfi_io_lock, MA_OWNED); + /* * Zero out the important fields of the frame, but make sure the * context field is preserved. For efficiency, handle the fields @@ -614,24 +842,31 @@ mfi_release_command(struct mfi_command * cm->cm_data = NULL; cm->cm_sg = 0; cm->cm_total_frame_size = 0; + cm->retry_for_fw_reset = 0; mfi_enqueue_free(cm); } -static int -mfi_dcmd_command(struct mfi_softc *sc, struct mfi_command **cmp, uint32_t opcode, - void **bufp, size_t bufsize) +int +mfi_dcmd_command(struct mfi_softc *sc, struct mfi_command **cmp, + uint32_t opcode, void **bufp, size_t bufsize) { struct mfi_command *cm; struct mfi_dcmd_frame *dcmd; void *buf = NULL; - + uint32_t context = 0; + mtx_assert(&sc->mfi_io_lock, MA_OWNED); - + cm = mfi_dequeue_free(sc); if (cm == NULL) return (EBUSY); + /* Zero out the MFI frame */ + context = cm->cm_frame->header.context; + bzero(cm->cm_frame, sizeof(union mfi_frame)); + cm->cm_frame->header.context = context; + if ((bufsize > 0) && (bufp != NULL)) { if (*bufp == NULL) { buf = malloc(bufsize, M_MFIBUF, M_NOWAIT|M_ZERO); @@ -651,6 +886,7 @@ mfi_dcmd_command(struct mfi_softc *sc, s dcmd->header.timeout = 0; dcmd->header.flags = 0; dcmd->header.data_len = bufsize; + dcmd->header.scsi_status = 0; dcmd->opcode = opcode; cm->cm_sg = &dcmd->sgl; cm->cm_total_frame_size = MFI_DCMD_FRAME_SIZE; @@ -672,11 +908,17 @@ mfi_comms_init(struct mfi_softc *sc) struct mfi_init_frame *init; struct mfi_init_qinfo *qinfo; int error; + uint32_t context = 0; mtx_lock(&sc->mfi_io_lock); if ((cm = mfi_dequeue_free(sc)) == NULL) return (EBUSY); + /* Zero out the MFI frame */ + context = cm->cm_frame->header.context; + bzero(cm->cm_frame, sizeof(union mfi_frame)); + cm->cm_frame->header.context = context; + /* * Abuse the SG list area of the frame to hold the init_qinfo * object; @@ -737,9 +979,11 @@ mfi_get_controller_info(struct mfi_softc BUS_DMASYNC_POSTREAD); bus_dmamap_unload(sc->mfi_buffer_dmat, cm->cm_dmamap); - max_sectors_1 = (1 << ci->stripe_sz_ops.min) * ci->max_strips_per_io; + max_sectors_1 = (1 << ci->stripe_sz_ops.max) * ci->max_strips_per_io; max_sectors_2 = ci->max_request_size; sc->mfi_max_io = min(max_sectors_1, max_sectors_2); + sc->disableOnlineCtrlReset = + ci->properties.OnOffProperties.disableOnlineCtrlReset; out: if (ci) @@ -756,6 +1000,7 @@ mfi_get_log_state(struct mfi_softc *sc, struct mfi_command *cm = NULL; int error; + mtx_lock(&sc->mfi_io_lock); error = mfi_dcmd_command(sc, &cm, MFI_DCMD_CTRL_EVENT_GETINFO, (void **)log_state, sizeof(**log_state)); if (error) @@ -774,11 +1019,12 @@ mfi_get_log_state(struct mfi_softc *sc, out: if (cm) mfi_release_command(cm); + mtx_unlock(&sc->mfi_io_lock); return (error); } -static int +int mfi_aen_setup(struct mfi_softc *sc, uint32_t seq_start) { struct mfi_evt_log_state *log_state = NULL; @@ -788,10 +1034,11 @@ mfi_aen_setup(struct mfi_softc *sc, uint class_locale.members.reserved = 0; class_locale.members.locale = mfi_event_locale; - class_locale.members.class = mfi_event_class; + class_locale.members.evt_class = mfi_event_class; if (seq_start == 0) { error = mfi_get_log_state(sc, &log_state); + sc->mfi_boot_seq_num = log_state->boot_seq_num; if (error) { if (log_state) free(log_state, M_MFIBUF); @@ -813,7 +1060,7 @@ mfi_aen_setup(struct mfi_softc *sc, uint return 0; } -static int +int mfi_wait_command(struct mfi_softc *sc, struct mfi_command *cm) { @@ -886,6 +1133,64 @@ mfi_free(struct mfi_softc *sc) if (sc->mfi_comms_dmat != NULL) bus_dma_tag_destroy(sc->mfi_comms_dmat); + /* ThunderBolt contiguous memory free here */ + if (sc->mfi_flags & MFI_FLAGS_TBOLT) { + if (sc->mfi_tb_busaddr != 0) + bus_dmamap_unload(sc->mfi_tb_dmat, sc->mfi_tb_dmamap); + if (sc->request_message_pool != NULL) + bus_dmamem_free(sc->mfi_tb_dmat, sc->request_message_pool, + sc->mfi_tb_dmamap); + if (sc->mfi_tb_dmat != NULL) + bus_dma_tag_destroy(sc->mfi_tb_dmat); + + /* Version buffer memory free */ + /* Start LSIP200113393 */ + if (sc->verbuf_h_busaddr != 0) + bus_dmamap_unload(sc->verbuf_h_dmat, sc->verbuf_h_dmamap); + if (sc->verbuf != NULL) + bus_dmamem_free(sc->verbuf_h_dmat, sc->verbuf, + sc->verbuf_h_dmamap); + if (sc->verbuf_h_dmat != NULL) + bus_dma_tag_destroy(sc->verbuf_h_dmat); + + /* End LSIP200113393 */ + /* ThunderBolt INIT packet memory Free */ + if (sc->mfi_tb_init_busaddr != 0) + bus_dmamap_unload(sc->mfi_tb_init_dmat, sc->mfi_tb_init_dmamap); + if (sc->mfi_tb_init != NULL) + bus_dmamem_free(sc->mfi_tb_init_dmat, sc->mfi_tb_init, + sc->mfi_tb_init_dmamap); + if (sc->mfi_tb_init_dmat != NULL) + bus_dma_tag_destroy(sc->mfi_tb_init_dmat); + + /* ThunderBolt IOC Init Desc memory free here */ + if (sc->mfi_tb_ioc_init_busaddr != 0) + bus_dmamap_unload(sc->mfi_tb_ioc_init_dmat, + sc->mfi_tb_ioc_init_dmamap); + if (sc->mfi_tb_ioc_init_desc != NULL) + bus_dmamem_free(sc->mfi_tb_ioc_init_dmat, + sc->mfi_tb_ioc_init_desc, + sc->mfi_tb_ioc_init_dmamap); + if (sc->mfi_tb_ioc_init_dmat != NULL) + bus_dma_tag_destroy(sc->mfi_tb_ioc_init_dmat); + for (int i = 0; i < sc->mfi_max_fw_cmds; i++) { + if (sc->mfi_cmd_pool_tbolt != NULL) { + if (sc->mfi_cmd_pool_tbolt[i] != NULL) { + free(sc->mfi_cmd_pool_tbolt[i], + M_MFIBUF); + sc->mfi_cmd_pool_tbolt[i] = NULL; + } + } + } + if (sc->mfi_cmd_pool_tbolt != NULL) { + free(sc->mfi_cmd_pool_tbolt, M_MFIBUF); + sc->mfi_cmd_pool_tbolt = NULL; + } + if (sc->request_desc_pool != NULL) { + free(sc->request_desc_pool, M_MFIBUF); + sc->request_desc_pool = NULL; + } + } if (sc->mfi_buffer_dmat != NULL) bus_dma_tag_destroy(sc->mfi_buffer_dmat); if (sc->mfi_parent_dmat != NULL) @@ -912,6 +1217,8 @@ mfi_startup(void *arg) sx_xlock(&sc->mfi_config_lock); mtx_lock(&sc->mfi_io_lock); mfi_ldprobe(sc); + if (sc->mfi_flags & MFI_FLAGS_SKINNY) + mfi_syspdprobe(sc); mtx_unlock(&sc->mfi_io_lock); sx_xunlock(&sc->mfi_config_lock); } @@ -928,12 +1235,7 @@ mfi_intr(void *arg) if (sc->mfi_check_clear_intr(sc)) return; - /* - * Do a dummy read to flush the interrupt ACK that we just performed, - * ensuring that everything is really, truly consistent. - */ - (void)sc->mfi_read_fw_status(sc); - +restart: pi = sc->mfi_comms->hw_pi; ci = sc->mfi_comms->hw_ci; mtx_lock(&sc->mfi_io_lock); @@ -958,6 +1260,14 @@ mfi_intr(void *arg) mfi_startio(sc); mtx_unlock(&sc->mfi_io_lock); + /* + * Dummy read to flush the bus; this ensures that the indexes are up + * to date. Restart processing if more commands have come it. + */ + (void)sc->mfi_read_fw_status(sc); + if (pi != sc->mfi_comms->hw_pi) + goto restart; + return; } @@ -978,6 +1288,9 @@ mfi_shutdown(struct mfi_softc *sc) if (sc->mfi_aen_cm != NULL) mfi_abort(sc, sc->mfi_aen_cm); + if (sc->mfi_map_sync_cm != NULL) + mfi_abort(sc, sc->mfi_map_sync_cm); + dcmd = &cm->cm_frame->dcmd; dcmd->header.flags = MFI_FRAME_DIR_NONE; cm->cm_flags = MFI_CMD_POLLED; @@ -993,6 +1306,81 @@ mfi_shutdown(struct mfi_softc *sc) } static void +mfi_syspdprobe(struct mfi_softc *sc) +{ + struct mfi_frame_header *hdr; + struct mfi_command *cm = NULL; + struct mfi_pd_list *pdlist = NULL; + struct mfi_system_pd *syspd, *tmp; + int error, i, found; + + sx_assert(&sc->mfi_config_lock, SA_XLOCKED); + mtx_assert(&sc->mfi_io_lock, MA_OWNED); + /* Add SYSTEM PD's */ + error = mfi_dcmd_command(sc, &cm, MFI_DCMD_PD_LIST_QUERY, + (void **)&pdlist, sizeof(*pdlist)); + if (error) { + device_printf(sc->mfi_dev, + "Error while forming SYSTEM PD list\n"); + goto out; + } + + cm->cm_flags = MFI_CMD_DATAIN | MFI_CMD_POLLED; + cm->cm_frame->dcmd.mbox[0] = MR_PD_QUERY_TYPE_EXPOSED_TO_HOST; + cm->cm_frame->dcmd.mbox[1] = 0; + if (mfi_mapcmd(sc, cm) != 0) { + device_printf(sc->mfi_dev, + "Failed to get syspd device listing\n"); + goto out; + } + bus_dmamap_sync(sc->mfi_buffer_dmat,cm->cm_dmamap, + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->mfi_buffer_dmat, cm->cm_dmamap); + hdr = &cm->cm_frame->header; + if (hdr->cmd_status != MFI_STAT_OK) { + device_printf(sc->mfi_dev, + "MFI_DCMD_PD_LIST_QUERY failed %x\n", hdr->cmd_status); + goto out; + } + /* Get each PD and add it to the system */ + for (i = 0; i < pdlist->count; i++) { + if (pdlist->addr[i].device_id == + pdlist->addr[i].encl_device_id) + continue; + found = 0; + TAILQ_FOREACH(syspd, &sc->mfi_syspd_tqh, pd_link) { + if (syspd->pd_id == pdlist->addr[i].device_id) + found = 1; + } + if (found == 0) + mfi_add_sys_pd(sc, pdlist->addr[i].device_id); + } + /* Delete SYSPD's whose state has been changed */ + TAILQ_FOREACH_SAFE(syspd, &sc->mfi_syspd_tqh, pd_link, tmp) { + found = 0; + for (i = 0; i < pdlist->count; i++) { + if (syspd->pd_id == pdlist->addr[i].device_id) + found = 1; + } + if (found == 0) { + printf("DELETE\n"); + mtx_unlock(&sc->mfi_io_lock); + mtx_lock(&Giant); + device_delete_child(sc->mfi_dev, syspd->pd_dev); + mtx_unlock(&Giant); + mtx_lock(&sc->mfi_io_lock); + } + } +out: + if (pdlist) + free(pdlist, M_MFIBUF); + if (cm) + mfi_release_command(cm); + + return; +} + +static void mfi_ldprobe(struct mfi_softc *sc) { struct mfi_frame_header *hdr; @@ -1086,10 +1474,124 @@ format_class(int8_t class) static void mfi_decode_evt(struct mfi_softc *sc, struct mfi_evt_detail *detail) { + struct mfi_system_pd *syspd = NULL; device_printf(sc->mfi_dev, "%d (%s/0x%04x/%s) - %s\n", detail->seq, - format_timestamp(detail->time), detail->class.members.locale, - format_class(detail->class.members.class), detail->description); + format_timestamp(detail->time), detail->evt_class.members.locale, + format_class(detail->evt_class.members.evt_class), + detail->description); + + /* Don't act on old AEN's or while shutting down */ + if (detail->seq < sc->mfi_boot_seq_num || sc->mfi_detaching) + return; + + switch (detail->arg_type) { + case MR_EVT_ARGS_NONE: + if (detail->code == MR_EVT_CTRL_HOST_BUS_SCAN_REQUESTED) { + device_printf(sc->mfi_dev, "HostBus scan raised\n"); + if (mfi_detect_jbod_change) { + /* + * Probe for new SYSPD's and Delete + * invalid SYSPD's + */ + sx_xlock(&sc->mfi_config_lock); + mtx_lock(&sc->mfi_io_lock); + mfi_syspdprobe(sc); + mtx_unlock(&sc->mfi_io_lock); + sx_xunlock(&sc->mfi_config_lock); + } + } + break; + case MR_EVT_ARGS_LD_STATE: + /* During load time driver reads all the events starting + * from the one that has been logged after shutdown. Avoid + * these old events. + */ + if (detail->args.ld_state.new_state == MFI_LD_STATE_OFFLINE ) { + /* Remove the LD */ + struct mfi_disk *ld; + TAILQ_FOREACH(ld, &sc->mfi_ld_tqh, ld_link) { + if (ld->ld_id == + detail->args.ld_state.ld.target_id) + break; + } + /* + Fix: for kernel panics when SSCD is removed + KASSERT(ld != NULL, ("volume dissappeared")); + */ + if (ld != NULL) { + mtx_lock(&Giant); + device_delete_child(sc->mfi_dev, ld->ld_dev); + mtx_unlock(&Giant); + } + } + break; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat May 19 00:11:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 986BB1065670; Sat, 19 May 2012 00:11:05 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id D2B7E8FC12; Sat, 19 May 2012 00:11:01 +0000 (UTC) Received: by yenl8 with SMTP id l8so4240995yen.13 for ; Fri, 18 May 2012 17:11:01 -0700 (PDT) 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=n6PICyJkaRxxcq+SKOSdyl3ibqEVPHts1HRtQ2lP394=; b=050I8Zf03IB0QOGbrstEVM6vGTGzi3UI04djPMlLGoNj9csOdMG9AR/VDFLiaKIOi1 +mzjgHPbSHO0WhCE7YBkPnBEYoBWxrcUWJ6SQrzpVMdrRMEvD4sRjwUOa4vCDcG6EDHI IKdnoXiM4k2kAog0hrTs1El/wj0getcUQuR+M//6Zln6wEjbvuAwUoP+rGLlbMKTKMcR f13plFKo7XUHJzT9KHH+Ch3usjxhxWVlrxygqAAUm4E+QaSBUm4FmAY8h+cd6lje41Za PqXbcByHIntLimdKpkkE+LyGrSvrfbFZUknz23dios2jgtZ2xHujSAneZ6BRw2u+1YJh by/Q== MIME-Version: 1.0 Received: by 10.101.143.14 with SMTP id v14mr4352780ann.55.1337386261100; Fri, 18 May 2012 17:11:01 -0700 (PDT) Received: by 10.236.44.73 with HTTP; Fri, 18 May 2012 17:11:01 -0700 (PDT) In-Reply-To: <201205182329.q4INTU4X086651@svn.freebsd.org> References: <201205182329.q4INTU4X086651@svn.freebsd.org> Date: Sat, 19 May 2012 02:11:01 +0200 Message-ID: From: Oliver Pinter To: Sean Bruno Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r235636 - in stable/7/sys: conf dev/mfi modules/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 00:11:05 -0000 cc -O2 -fno-strict-aliasing -pipe -fno-delete-null-pointer-checks -march=core2 - fno-builtin-strftime -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-param eter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -c /usr/src/usr.sbin/mfiutil/mfi_evt.c /usr/src/usr.sbin/mfiutil/mfi_evt.c: In function 'mfi_decode_evt': /usr/src/usr.sbin/mfiutil/mfi_evt.c:366: error: 'struct mfi_evt_detail' has no m ember named 'class' /usr/src/usr.sbin/mfiutil/mfi_evt.c:367: error: 'struct mfi_evt_detail' has no m ember named 'class' /usr/src/usr.sbin/mfiutil/mfi_evt.c: In function 'show_events': /usr/src/usr.sbin/mfiutil/mfi_evt.c:562: error: 'struct ' has no memb er named 'class' /usr/src/usr.sbin/mfiutil/mfi_evt.c:572: error: 'struct ' has no memb er named 'class' cc -O2 -fno-strict-aliasing -pipe -fno-delete-null-pointer-checks -march=core2 - DGTAGS -DSYSV_CURSES -I/usr/src/usr.bin/vi -I/usr/src/usr.bin/vi/../../contrib/n vi -I/usr/src/usr.bin/vi/../../contrib/nvi/include -c /usr/src/usr.bin/vi/../.. /contrib/nvi/ex/ex_put.c *** Error code 1 --------------- diff --git a/usr.sbin/mfiutil/mfi_evt.c b/usr.sbin/mfiutil/mfi_evt.c index a14bb19..336fbd3 100644 --- a/usr.sbin/mfiutil/mfi_evt.c +++ b/usr.sbin/mfiutil/mfi_evt.c @@ -363,8 +363,8 @@ mfi_decode_evt(int fd, struct mfi_evt_detail *detail, int verbose) { printf("%5d (%s/%s/%s) - ", detail->seq, format_timestamp(detail->time), - format_locale(detail->class.members.locale), - format_class(detail->class.members.class)); + format_locale(detail->evt_class.members.locale), + format_class(detail->evt_class.members.evt_class)); switch (detail->arg_type) { case MR_EVT_ARGS_NONE: break; @@ -559,7 +559,7 @@ show_events(int ac, char **av) num_events = 15; filter.members.reserved = 0; filter.members.locale = MFI_EVT_LOCALE_ALL; - filter.members.class = MFI_EVT_CLASS_WARNING; + filter.members.evt_class = MFI_EVT_CLASS_WARNING; start = info.boot_seq_num; stop = info.newest_seq_num; verbose = 0; @@ -569,7 +569,7 @@ show_events(int ac, char **av) while ((ch = getopt(ac, av, "c:l:n:v")) != -1) { switch (ch) { case 'c': - if (parse_class(optarg, &filter.members.class) < 0) { + if (parse_class(optarg, &filter.members.evt_class) < 0) { error = errno; warn("Error parsing event class"); close(fd); -------------- not tested, compiling now On 5/19/12, Sean Bruno wrote: > Author: sbruno > Date: Fri May 18 23:29:30 2012 > New Revision: 235636 > URL: http://svn.freebsd.org/changeset/base/235636 > > Log: > MFC of head thunderbolt support for mfi(4) > > r233711 -- IFV head_mfi into head for initial thunderbolt support > r233768 -- atomic_t --> mfi_atomic > r233805 -- fix tinderbuild, move megasas_sge to mfivar.h > r233877 -- remove atomic.h from includes > r235014 -- fix reading of sector >= 2^32 or 2^21, repair RAID handling > r235016 -- style(9) > r235040 -- fix returns from mfi_tbolt_sync_map_info() > r235318 -- repair panic on PAE i386 > r235321 -- repair the repair of panics on PAE i386 > > Added: > stable/7/sys/dev/mfi/mfi_syspd.c > - copied unchanged from r233711, head/sys/dev/mfi/mfi_syspd.c > stable/7/sys/dev/mfi/mfi_tbolt.c > - copied, changed from r233711, head/sys/dev/mfi/mfi_tbolt.c > Modified: > stable/7/sys/conf/files > stable/7/sys/dev/mfi/mfi.c > stable/7/sys/dev/mfi/mfi_cam.c > stable/7/sys/dev/mfi/mfi_debug.c > stable/7/sys/dev/mfi/mfi_disk.c > stable/7/sys/dev/mfi/mfi_ioctl.h > stable/7/sys/dev/mfi/mfi_linux.c > stable/7/sys/dev/mfi/mfi_pci.c > stable/7/sys/dev/mfi/mfireg.h > stable/7/sys/dev/mfi/mfivar.h > stable/7/sys/modules/mfi/Makefile > Directory Properties: > stable/7/sys/ (props changed) > > Modified: stable/7/sys/conf/files > ============================================================================== > --- stable/7/sys/conf/files Fri May 18 21:50:26 2012 (r235635) > +++ stable/7/sys/conf/files Fri May 18 23:29:30 2012 (r235636) > @@ -948,6 +948,8 @@ dev/mfi/mfi.c optional mfi > dev/mfi/mfi_debug.c optional mfi > dev/mfi/mfi_pci.c optional mfi pci > dev/mfi/mfi_disk.c optional mfi > +dev/mfi/mfi_syspd.c optional mfi > +dev/mfi/mfi_tbolt.c optional mfi > dev/mfi/mfi_linux.c optional mfi compat_linux > dev/mfi/mfi_cam.c optional mfip scbus > dev/mii/acphy.c optional miibus | acphy > > Modified: stable/7/sys/dev/mfi/mfi.c > ============================================================================== > --- stable/7/sys/dev/mfi/mfi.c Fri May 18 21:50:26 2012 (r235635) > +++ stable/7/sys/dev/mfi/mfi.c Fri May 18 23:29:30 2012 (r235636) > @@ -53,6 +53,7 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include "opt_compat.h" > #include "opt_mfi.h" > > #include > @@ -72,6 +73,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > > #include > #include > @@ -79,43 +81,52 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > +#include > > static int mfi_alloc_commands(struct mfi_softc *); > static int mfi_comms_init(struct mfi_softc *); > -static int mfi_wait_command(struct mfi_softc *, struct mfi_command *); > static int mfi_get_controller_info(struct mfi_softc *); > static int mfi_get_log_state(struct mfi_softc *, > struct mfi_evt_log_state **); > static int mfi_parse_entries(struct mfi_softc *, int, int); > -static int mfi_dcmd_command(struct mfi_softc *, struct mfi_command **, > - uint32_t, void **, size_t); > static void mfi_data_cb(void *, bus_dma_segment_t *, int, int); > static void mfi_startup(void *arg); > static void mfi_intr(void *arg); > static void mfi_ldprobe(struct mfi_softc *sc); > +static void mfi_syspdprobe(struct mfi_softc *sc); > +static void mfi_handle_evt(void *context, int pending); > static int mfi_aen_register(struct mfi_softc *sc, int seq, int locale); > static void mfi_aen_complete(struct mfi_command *); > -static int mfi_aen_setup(struct mfi_softc *, uint32_t); > static int mfi_add_ld(struct mfi_softc *sc, int); > static void mfi_add_ld_complete(struct mfi_command *); > +static int mfi_add_sys_pd(struct mfi_softc *sc, int); > +static void mfi_add_sys_pd_complete(struct mfi_command *); > static struct mfi_command * mfi_bio_command(struct mfi_softc *); > static void mfi_bio_complete(struct mfi_command *); > -static int mfi_mapcmd(struct mfi_softc *, struct mfi_command *); > +static struct mfi_command *mfi_build_ldio(struct mfi_softc *,struct bio*); > +static struct mfi_command *mfi_build_syspdio(struct mfi_softc *,struct > bio*); > static int mfi_send_frame(struct mfi_softc *, struct mfi_command *); > -static void mfi_complete(struct mfi_softc *, struct mfi_command *); > static int mfi_abort(struct mfi_softc *, struct mfi_command *); > -static int mfi_linux_ioctl_int(struct cdev *, u_long, caddr_t, int, > d_thread_t *); > +static int mfi_linux_ioctl_int(struct cdev *, u_long, caddr_t, int, struct > thread *); > static void mfi_timeout(void *); > static int mfi_user_command(struct mfi_softc *, > struct mfi_ioc_passthru *); > -static void mfi_enable_intr_xscale(struct mfi_softc *sc); > -static void mfi_enable_intr_ppc(struct mfi_softc *sc); > -static int32_t mfi_read_fw_status_xscale(struct mfi_softc *sc); > -static int32_t mfi_read_fw_status_ppc(struct mfi_softc *sc); > -static int mfi_check_clear_intr_xscale(struct mfi_softc *sc); > -static int mfi_check_clear_intr_ppc(struct mfi_softc *sc); > -static void mfi_issue_cmd_xscale(struct mfi_softc *sc,uint32_t > bus_add,uint32_t frame_cnt); > -static void mfi_issue_cmd_ppc(struct mfi_softc *sc,uint32_t > bus_add,uint32_t frame_cnt); > +static void mfi_enable_intr_xscale(struct mfi_softc *sc); > +static void mfi_enable_intr_ppc(struct mfi_softc *sc); > +static int32_t mfi_read_fw_status_xscale(struct mfi_softc *sc); > +static int32_t mfi_read_fw_status_ppc(struct mfi_softc *sc); > +static int mfi_check_clear_intr_xscale(struct mfi_softc *sc); > +static int mfi_check_clear_intr_ppc(struct mfi_softc *sc); > +static void mfi_issue_cmd_xscale(struct mfi_softc *sc, bus_addr_t > bus_add, > + uint32_t frame_cnt); > +static void mfi_issue_cmd_ppc(struct mfi_softc *sc, bus_addr_t bus_add, > + uint32_t frame_cnt); > +static int mfi_config_lock(struct mfi_softc *sc, uint32_t opcode); > +static void mfi_config_unlock(struct mfi_softc *sc, int locked); > +static int mfi_check_command_pre(struct mfi_softc *sc, struct mfi_command > *cm); > +static void mfi_check_command_post(struct mfi_softc *sc, struct mfi_command > *cm); > +static int mfi_check_for_sscd(struct mfi_softc *sc, struct mfi_command > *cm); > > SYSCTL_NODE(_hw, OID_AUTO, mfi, CTLFLAG_RD, 0, "MFI driver parameters"); > static int mfi_event_locale = MFI_EVT_LOCALE_ALL; > @@ -133,6 +144,11 @@ TUNABLE_INT("hw.mfi.max_cmds", &mfi_max_ > SYSCTL_INT(_hw_mfi, OID_AUTO, max_cmds, CTLFLAG_RD, &mfi_max_cmds, > 0, "Max commands"); > > +static int mfi_detect_jbod_change = 1; > +TUNABLE_INT("hw.mfi.detect_jbod_change", &mfi_detect_jbod_change); > +SYSCTL_INT(_hw_mfi, OID_AUTO, detect_jbod_change, CTLFLAG_RW, > + &mfi_detect_jbod_change, 0, "Detect a change to a JBOD"); > + > /* Management interface */ > static d_open_t mfi_open; > static d_close_t mfi_close; > @@ -152,6 +168,7 @@ static struct cdevsw mfi_cdevsw = { > MALLOC_DEFINE(M_MFIBUF, "mfibuf", "Buffers for the MFI driver"); > > #define MFI_INQ_LENGTH SHORT_INQUIRY_LENGTH > +struct mfi_skinny_dma_info mfi_skinny; > > static void > mfi_enable_intr_xscale(struct mfi_softc *sc) > @@ -162,12 +179,17 @@ mfi_enable_intr_xscale(struct mfi_softc > static void > mfi_enable_intr_ppc(struct mfi_softc *sc) > { > - MFI_WRITE4(sc, MFI_ODCR0, 0xFFFFFFFF); > if (sc->mfi_flags & MFI_FLAGS_1078) { > + MFI_WRITE4(sc, MFI_ODCR0, 0xFFFFFFFF); > MFI_WRITE4(sc, MFI_OMSK, ~MFI_1078_EIM); > - } else if (sc->mfi_flags & MFI_FLAGS_GEN2) { > + } > + else if (sc->mfi_flags & MFI_FLAGS_GEN2) { > + MFI_WRITE4(sc, MFI_ODCR0, 0xFFFFFFFF); > MFI_WRITE4(sc, MFI_OMSK, ~MFI_GEN2_EIM); > } > + else if (sc->mfi_flags & MFI_FLAGS_SKINNY) { > + MFI_WRITE4(sc, MFI_OMSK, ~0x00000001); > + } > } > > static int32_t > @@ -205,35 +227,51 @@ mfi_check_clear_intr_ppc(struct mfi_soft > if (!(status & MFI_1078_RM)) { > return 1; > } > - } else if (sc->mfi_flags & MFI_FLAGS_GEN2) { > + } > + else if (sc->mfi_flags & MFI_FLAGS_GEN2) { > if (!(status & MFI_GEN2_RM)) { > return 1; > } > } > - > - MFI_WRITE4(sc, MFI_ODCR0, status); > + else if (sc->mfi_flags & MFI_FLAGS_SKINNY) { > + if (!(status & MFI_SKINNY_RM)) { > + return 1; > + } > + } > + if (sc->mfi_flags & MFI_FLAGS_SKINNY) > + MFI_WRITE4(sc, MFI_OSTS, status); > + else > + MFI_WRITE4(sc, MFI_ODCR0, status); > return 0; > } > > static void > -mfi_issue_cmd_xscale(struct mfi_softc *sc,uint32_t bus_add,uint32_t > frame_cnt) > +mfi_issue_cmd_xscale(struct mfi_softc *sc, bus_addr_t bus_add, uint32_t > frame_cnt) > { > MFI_WRITE4(sc, MFI_IQP,(bus_add >>3)|frame_cnt); > } > > static void > -mfi_issue_cmd_ppc(struct mfi_softc *sc,uint32_t bus_add,uint32_t > frame_cnt) > +mfi_issue_cmd_ppc(struct mfi_softc *sc, bus_addr_t bus_add, uint32_t > frame_cnt) > { > - MFI_WRITE4(sc, MFI_IQP, (bus_add |frame_cnt <<1)|1 ); > + if (sc->mfi_flags & MFI_FLAGS_SKINNY) { > + MFI_WRITE4(sc, MFI_IQPL, (bus_add | frame_cnt <<1)|1 ); > + MFI_WRITE4(sc, MFI_IQPH, 0x00000000); > + } else { > + MFI_WRITE4(sc, MFI_IQP, (bus_add | frame_cnt <<1)|1 ); > + } > } > > -static int > +int > mfi_transition_firmware(struct mfi_softc *sc) > { > - int32_t fw_state, cur_state; > + uint32_t fw_state, cur_state; > int max_wait, i; > + uint32_t cur_abs_reg_val = 0; > + uint32_t prev_abs_reg_val = 0; > > - fw_state = sc->mfi_read_fw_status(sc)& MFI_FWSTATE_MASK; > + cur_abs_reg_val = sc->mfi_read_fw_status(sc); > + fw_state = cur_abs_reg_val & MFI_FWSTATE_MASK; > while (fw_state != MFI_FWSTATE_READY) { > if (bootverbose) > device_printf(sc->mfi_dev, "Waiting for firmware to " > @@ -244,36 +282,62 @@ mfi_transition_firmware(struct mfi_softc > device_printf(sc->mfi_dev, "Firmware fault\n"); > return (ENXIO); > case MFI_FWSTATE_WAIT_HANDSHAKE: > - MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_CLEAR_HANDSHAKE); > - max_wait = 2; > + if (sc->mfi_flags & MFI_FLAGS_SKINNY || sc->mfi_flags & > MFI_FLAGS_TBOLT) > + MFI_WRITE4(sc, MFI_SKINNY_IDB, MFI_FWINIT_CLEAR_HANDSHAKE); > + else > + MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_CLEAR_HANDSHAKE); > + max_wait = MFI_RESET_WAIT_TIME; > break; > case MFI_FWSTATE_OPERATIONAL: > - MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_READY); > - max_wait = 10; > + if (sc->mfi_flags & MFI_FLAGS_SKINNY || sc->mfi_flags & > MFI_FLAGS_TBOLT) > + MFI_WRITE4(sc, MFI_SKINNY_IDB, 7); > + else > + MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_READY); > + max_wait = MFI_RESET_WAIT_TIME; > break; > case MFI_FWSTATE_UNDEFINED: > case MFI_FWSTATE_BB_INIT: > - max_wait = 2; > + max_wait = MFI_RESET_WAIT_TIME; > + break; > + case MFI_FWSTATE_FW_INIT_2: > + max_wait = MFI_RESET_WAIT_TIME; > break; > case MFI_FWSTATE_FW_INIT: > - case MFI_FWSTATE_DEVICE_SCAN: > case MFI_FWSTATE_FLUSH_CACHE: > - max_wait = 20; > + max_wait = MFI_RESET_WAIT_TIME; > + break; > + case MFI_FWSTATE_DEVICE_SCAN: > + max_wait = MFI_RESET_WAIT_TIME; /* wait for 180 seconds */ > + prev_abs_reg_val = cur_abs_reg_val; > + break; > + case MFI_FWSTATE_BOOT_MESSAGE_PENDING: > + if (sc->mfi_flags & MFI_FLAGS_SKINNY || sc->mfi_flags & > MFI_FLAGS_TBOLT) > + MFI_WRITE4(sc, MFI_SKINNY_IDB, MFI_FWINIT_HOTPLUG); > + else > + MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_HOTPLUG); > + max_wait = MFI_RESET_WAIT_TIME; > break; > default: > - device_printf(sc->mfi_dev,"Unknown firmware state %d\n", > + device_printf(sc->mfi_dev, "Unknown firmware state %#x\n", > fw_state); > return (ENXIO); > } > for (i = 0; i < (max_wait * 10); i++) { > - fw_state = sc->mfi_read_fw_status(sc) & MFI_FWSTATE_MASK; > + cur_abs_reg_val = sc->mfi_read_fw_status(sc); > + fw_state = cur_abs_reg_val & MFI_FWSTATE_MASK; > if (fw_state == cur_state) > DELAY(100000); > else > break; > } > + if (fw_state == MFI_FWSTATE_DEVICE_SCAN) { > + /* Check the device scanning progress */ > + if (prev_abs_reg_val != cur_abs_reg_val) { > + continue; > + } > + } > if (fw_state == cur_state) { > - device_printf(sc->mfi_dev, "firmware stuck in state " > + device_printf(sc->mfi_dev, "Firmware stuck in state " > "%#x\n", fw_state); > return (ENXIO); > } > @@ -282,26 +346,36 @@ mfi_transition_firmware(struct mfi_softc > } > > static void > -mfi_addr32_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) > +mfi_addr_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) > { > - uint32_t *addr; > + bus_addr_t *addr; > > addr = arg; > *addr = segs[0].ds_addr; > } > > + > int > mfi_attach(struct mfi_softc *sc) > { > uint32_t status; > int error, commsz, framessz, sensesz; > int frames, unit, max_fw_sge; > + uint32_t tb_mem_size = 0; > > - device_printf(sc->mfi_dev, "Megaraid SAS driver Ver 3.00 \n"); > + if (sc == NULL) > + return EINVAL; > + > + device_printf(sc->mfi_dev, "Megaraid SAS driver Ver %s \n", > + MEGASAS_VERSION); > > mtx_init(&sc->mfi_io_lock, "MFI I/O lock", NULL, MTX_DEF); > sx_init(&sc->mfi_config_lock, "MFI config"); > TAILQ_INIT(&sc->mfi_ld_tqh); > + TAILQ_INIT(&sc->mfi_syspd_tqh); > + TAILQ_INIT(&sc->mfi_evt_queue); > + TASK_INIT(&sc->mfi_evt_task, 0, mfi_handle_evt, sc); > + TASK_INIT(&sc->mfi_map_sync_task, 0, mfi_handle_map_sync, sc); > TAILQ_INIT(&sc->mfi_aen_pids); > TAILQ_INIT(&sc->mfi_cam_ccbq); > > @@ -310,15 +384,29 @@ mfi_attach(struct mfi_softc *sc) > mfi_initq_busy(sc); > mfi_initq_bio(sc); > > + sc->adpreset = 0; > + sc->last_seq_num = 0; > + sc->disableOnlineCtrlReset = 1; > + sc->issuepend_done = 1; > + sc->hw_crit_error = 0; > + > if (sc->mfi_flags & MFI_FLAGS_1064R) { > sc->mfi_enable_intr = mfi_enable_intr_xscale; > sc->mfi_read_fw_status = mfi_read_fw_status_xscale; > sc->mfi_check_clear_intr = mfi_check_clear_intr_xscale; > sc->mfi_issue_cmd = mfi_issue_cmd_xscale; > - } > - else { > + } else if (sc->mfi_flags & MFI_FLAGS_TBOLT) { > + sc->mfi_enable_intr = mfi_tbolt_enable_intr_ppc; > + sc->mfi_disable_intr = mfi_tbolt_disable_intr_ppc; > + sc->mfi_read_fw_status = mfi_tbolt_read_fw_status_ppc; > + sc->mfi_check_clear_intr = mfi_tbolt_check_clear_intr_ppc; > + sc->mfi_issue_cmd = mfi_tbolt_issue_cmd_ppc; > + sc->mfi_adp_reset = mfi_tbolt_adp_reset; > + sc->mfi_tbolt = 1; > + TAILQ_INIT(&sc->mfi_cmd_tbolt_tqh); > + } else { > sc->mfi_enable_intr = mfi_enable_intr_ppc; > - sc->mfi_read_fw_status = mfi_read_fw_status_ppc; > + sc->mfi_read_fw_status = mfi_read_fw_status_ppc; > sc->mfi_check_clear_intr = mfi_check_clear_intr_ppc; > sc->mfi_issue_cmd = mfi_issue_cmd_ppc; > } > @@ -331,6 +419,32 @@ mfi_attach(struct mfi_softc *sc) > return (ENXIO); > } > > + /* Start: LSIP200113393 */ > + if (bus_dma_tag_create( sc->mfi_parent_dmat, /* parent */ > + 1, 0, /* algnmnt, boundary */ > + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ > + BUS_SPACE_MAXADDR, /* highaddr */ > + NULL, NULL, /* filter, filterarg */ > + MEGASAS_MAX_NAME*sizeof(bus_addr_t), /* maxsize */ > + 1, /* msegments */ > + MEGASAS_MAX_NAME*sizeof(bus_addr_t), /* maxsegsize */ > + 0, /* flags */ > + NULL, NULL, /* lockfunc, lockarg */ > + &sc->verbuf_h_dmat)) { > + device_printf(sc->mfi_dev, "Cannot allocate verbuf_h_dmat DMA tag\n"); > + return (ENOMEM); > + } > + if (bus_dmamem_alloc(sc->verbuf_h_dmat, (void **)&sc->verbuf, > + BUS_DMA_NOWAIT, &sc->verbuf_h_dmamap)) { > + device_printf(sc->mfi_dev, "Cannot allocate verbuf_h_dmamap memory\n"); > + return (ENOMEM); > + } > + bzero(sc->verbuf, MEGASAS_MAX_NAME*sizeof(bus_addr_t)); > + bus_dmamap_load(sc->verbuf_h_dmat, sc->verbuf_h_dmamap, > + sc->verbuf, MEGASAS_MAX_NAME*sizeof(bus_addr_t), > + mfi_addr_cb, &sc->verbuf_h_busaddr, 0); > + /* End: LSIP200113393 */ > + > /* > * Get information needed for sizing the contiguous memory for the > * frame pool. Size down the sgl parameter since we know that > @@ -341,8 +455,102 @@ mfi_attach(struct mfi_softc *sc) > status = sc->mfi_read_fw_status(sc); > sc->mfi_max_fw_cmds = status & MFI_FWSTATE_MAXCMD_MASK; > max_fw_sge = (status & MFI_FWSTATE_MAXSGL_MASK) >> 16; > - sc->mfi_max_sge = min(max_fw_sge, ((MAXPHYS / PAGE_SIZE) + 1)); > + sc->mfi_max_sge = min(max_fw_sge, ((MFI_MAXPHYS / PAGE_SIZE) + 1)); > + > + /* ThunderBolt Support get the contiguous memory */ > + > + if (sc->mfi_flags & MFI_FLAGS_TBOLT) { > + mfi_tbolt_init_globals(sc); > + device_printf(sc->mfi_dev, "MaxCmd = %x MaxSgl = %x state = %x \n", > + sc->mfi_max_fw_cmds, sc->mfi_max_sge, status); > + tb_mem_size = mfi_tbolt_get_memory_requirement(sc); > + > + if (bus_dma_tag_create( sc->mfi_parent_dmat, /* parent */ > + 1, 0, /* algnmnt, boundary */ > + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ > + BUS_SPACE_MAXADDR, /* highaddr */ > + NULL, NULL, /* filter, filterarg */ > + tb_mem_size, /* maxsize */ > + 1, /* msegments */ > + tb_mem_size, /* maxsegsize */ > + 0, /* flags */ > + NULL, NULL, /* lockfunc, lockarg */ > + &sc->mfi_tb_dmat)) { > + device_printf(sc->mfi_dev, "Cannot allocate comms DMA tag\n"); > + return (ENOMEM); > + } > + if (bus_dmamem_alloc(sc->mfi_tb_dmat, (void > **)&sc->request_message_pool, > + BUS_DMA_NOWAIT, &sc->mfi_tb_dmamap)) { > + device_printf(sc->mfi_dev, "Cannot allocate comms memory\n"); > + return (ENOMEM); > + } > + bzero(sc->request_message_pool, tb_mem_size); > + bus_dmamap_load(sc->mfi_tb_dmat, sc->mfi_tb_dmamap, > + sc->request_message_pool, tb_mem_size, mfi_addr_cb, &sc->mfi_tb_busaddr, > 0); > + > + /* For ThunderBolt memory init */ > + if (bus_dma_tag_create( sc->mfi_parent_dmat, /* parent */ > + 0x100, 0, /* alignmnt, boundary */ > + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ > + BUS_SPACE_MAXADDR, /* highaddr */ > + NULL, NULL, /* filter, filterarg */ > + MFI_FRAME_SIZE, /* maxsize */ > + 1, /* msegments */ > + MFI_FRAME_SIZE, /* maxsegsize */ > + 0, /* flags */ > + NULL, NULL, /* lockfunc, lockarg */ > + &sc->mfi_tb_init_dmat)) { > + device_printf(sc->mfi_dev, "Cannot allocate init DMA tag\n"); > + return (ENOMEM); > + } > + if (bus_dmamem_alloc(sc->mfi_tb_init_dmat, (void **)&sc->mfi_tb_init, > + BUS_DMA_NOWAIT, &sc->mfi_tb_init_dmamap)) { > + device_printf(sc->mfi_dev, "Cannot allocate init memory\n"); > + return (ENOMEM); > + } > + bzero(sc->mfi_tb_init, MFI_FRAME_SIZE); > + bus_dmamap_load(sc->mfi_tb_init_dmat, sc->mfi_tb_init_dmamap, > + sc->mfi_tb_init, MFI_FRAME_SIZE, mfi_addr_cb, > + &sc->mfi_tb_init_busaddr, 0); > + if (mfi_tbolt_init_desc_pool(sc, sc->request_message_pool, > + tb_mem_size)) { > + device_printf(sc->mfi_dev, > + "Thunderbolt pool preparation error\n"); > + return 0; > + } > > + /* > + Allocate DMA memory mapping for MPI2 IOC Init descriptor, > + we are taking it diffrent from what we have allocated for Request > + and reply descriptors to avoid confusion later > + */ > + tb_mem_size = sizeof(struct MPI2_IOC_INIT_REQUEST); > + if (bus_dma_tag_create( sc->mfi_parent_dmat, /* parent */ > + 1, 0, /* algnmnt, boundary */ > + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ > + BUS_SPACE_MAXADDR, /* highaddr */ > + NULL, NULL, /* filter, filterarg */ > + tb_mem_size, /* maxsize */ > + 1, /* msegments */ > + tb_mem_size, /* maxsegsize */ > + 0, /* flags */ > + NULL, NULL, /* lockfunc, lockarg */ > + &sc->mfi_tb_ioc_init_dmat)) { > + device_printf(sc->mfi_dev, > + "Cannot allocate comms DMA tag\n"); > + return (ENOMEM); > + } > + if (bus_dmamem_alloc(sc->mfi_tb_ioc_init_dmat, > + (void **)&sc->mfi_tb_ioc_init_desc, > + BUS_DMA_NOWAIT, &sc->mfi_tb_ioc_init_dmamap)) { > + device_printf(sc->mfi_dev, "Cannot allocate comms memory\n"); > + return (ENOMEM); > + } > + bzero(sc->mfi_tb_ioc_init_desc, tb_mem_size); > + bus_dmamap_load(sc->mfi_tb_ioc_init_dmat, sc->mfi_tb_ioc_init_dmamap, > + sc->mfi_tb_ioc_init_desc, tb_mem_size, mfi_addr_cb, > + &sc->mfi_tb_ioc_init_busaddr, 0); > + } > /* > * Create the dma tag for data buffers. Used both for block I/O > * and for various internal data queries. > @@ -392,8 +600,7 @@ mfi_attach(struct mfi_softc *sc) > } > bzero(sc->mfi_comms, commsz); > bus_dmamap_load(sc->mfi_comms_dmat, sc->mfi_comms_dmamap, > - sc->mfi_comms, commsz, mfi_addr32_cb, &sc->mfi_comms_busaddr, 0); > - > + sc->mfi_comms, commsz, mfi_addr_cb, &sc->mfi_comms_busaddr, 0); > /* > * Allocate DMA memory for the command frames. Keep them in the > * lower 4GB for efficiency. Calculate the size of the commands at > @@ -410,6 +617,8 @@ mfi_attach(struct mfi_softc *sc) > } else { > sc->mfi_sge_size = sizeof(struct mfi_sg32); > } > + if (sc->mfi_flags & MFI_FLAGS_SKINNY) > + sc->mfi_sge_size = sizeof(struct mfi_sg_skinny); > frames = (sc->mfi_sge_size * sc->mfi_max_sge - 1) / MFI_FRAME_SIZE + 2; > sc->mfi_cmd_size = frames * MFI_FRAME_SIZE; > framessz = sc->mfi_cmd_size * sc->mfi_max_fw_cmds; > @@ -434,8 +643,7 @@ mfi_attach(struct mfi_softc *sc) > } > bzero(sc->mfi_frames, framessz); > bus_dmamap_load(sc->mfi_frames_dmat, sc->mfi_frames_dmamap, > - sc->mfi_frames, framessz, mfi_addr32_cb, &sc->mfi_frames_busaddr,0); > - > + sc->mfi_frames, framessz, mfi_addr_cb, &sc->mfi_frames_busaddr,0); > /* > * Allocate DMA memory for the frame sense data. Keep them in the > * lower 4GB for efficiency > @@ -461,39 +669,46 @@ mfi_attach(struct mfi_softc *sc) > return (ENOMEM); > } > bus_dmamap_load(sc->mfi_sense_dmat, sc->mfi_sense_dmamap, > - sc->mfi_sense, sensesz, mfi_addr32_cb, &sc->mfi_sense_busaddr, 0); > - > + sc->mfi_sense, sensesz, mfi_addr_cb, &sc->mfi_sense_busaddr, 0); > if ((error = mfi_alloc_commands(sc)) != 0) > return (error); > > - if ((error = mfi_comms_init(sc)) != 0) > - return (error); > + /* Before moving the FW to operational state, check whether > + * hostmemory is required by the FW or not > + */ > > - if ((error = mfi_get_controller_info(sc)) != 0) > - return (error); > + /* ThunderBolt MFI_IOC2 INIT */ > + if (sc->mfi_flags & MFI_FLAGS_TBOLT) { > + sc->mfi_disable_intr(sc); > + if ((error = mfi_tbolt_init_MFI_queue(sc)) != 0) { > + device_printf(sc->mfi_dev, > + "TB Init has failed with error %d\n",error); > + return error; > + } > > - mtx_lock(&sc->mfi_io_lock); > - if ((error = mfi_aen_setup(sc, 0), 0) != 0) { > - mtx_unlock(&sc->mfi_io_lock); > - return (error); > - } > - mtx_unlock(&sc->mfi_io_lock); > + if ((error = mfi_tbolt_alloc_cmd(sc)) != 0) > + return error; > + if (bus_setup_intr(sc->mfi_dev, sc->mfi_irq, > + INTR_MPSAFE|INTR_TYPE_BIO, NULL, mfi_intr_tbolt, sc, > + &sc->mfi_intr)) { > + device_printf(sc->mfi_dev, "Cannot set up interrupt\n"); > + return (EINVAL); > + } > + sc->mfi_enable_intr(sc); > + } else { > + if ((error = mfi_comms_init(sc)) != 0) > + return (error); > > - /* > - * Set up the interrupt handler. XXX This should happen in > - * mfi_pci.c > - */ > - sc->mfi_irq_rid = 0; > - if ((sc->mfi_irq = bus_alloc_resource_any(sc->mfi_dev, SYS_RES_IRQ, > - &sc->mfi_irq_rid, RF_SHAREABLE | RF_ACTIVE)) == NULL) { > - device_printf(sc->mfi_dev, "Cannot allocate interrupt\n"); > - return (EINVAL); > - } > - if (bus_setup_intr(sc->mfi_dev, sc->mfi_irq, INTR_MPSAFE|INTR_TYPE_BIO, > - NULL, mfi_intr, sc, &sc->mfi_intr)) { > - device_printf(sc->mfi_dev, "Cannot set up interrupt\n"); > - return (EINVAL); > + if (bus_setup_intr(sc->mfi_dev, sc->mfi_irq, > + INTR_MPSAFE|INTR_TYPE_BIO, NULL, mfi_intr, sc, &sc->mfi_intr)) { > + device_printf(sc->mfi_dev, "Cannot set up interrupt\n"); > + return (EINVAL); > + } > + sc->mfi_enable_intr(sc); > } > + if ((error = mfi_get_controller_info(sc)) != 0) > + return (error); > + sc->disableOnlineCtrlReset = 0; > > /* Register a config hook to probe the bus for arrays */ > sc->mfi_ich.ich_func = mfi_startup; > @@ -503,6 +718,10 @@ mfi_attach(struct mfi_softc *sc) > "hook\n"); > return (EINVAL); > } > + if ((error = mfi_aen_setup(sc, 0), 0) != 0) { > + mtx_unlock(&sc->mfi_io_lock); > + return (error); > + } > > /* > * Register a shutdown handler. > @@ -541,6 +760,10 @@ mfi_attach(struct mfi_softc *sc) > callout_reset(&sc->mfi_watchdog_callout, MFI_CMD_TIMEOUT * hz, > mfi_timeout, sc); > > + if (sc->mfi_flags & MFI_FLAGS_TBOLT) { > + mfi_tbolt_sync_map_info(sc); > + } > + > return (0); > } > > @@ -574,8 +797,11 @@ mfi_alloc_commands(struct mfi_softc *sc) > cm->cm_sc = sc; > cm->cm_index = i; > if (bus_dmamap_create(sc->mfi_buffer_dmat, 0, > - &cm->cm_dmamap) == 0) > + &cm->cm_dmamap) == 0) { > + mtx_lock(&sc->mfi_io_lock); > mfi_release_command(cm); > + mtx_unlock(&sc->mfi_io_lock); > + } > else > break; > sc->mfi_total_cmds++; > @@ -590,6 +816,8 @@ mfi_release_command(struct mfi_command * > struct mfi_frame_header *hdr; > uint32_t *hdr_data; > > + mtx_assert(&cm->cm_sc->mfi_io_lock, MA_OWNED); > + > /* > * Zero out the important fields of the frame, but make sure the > * context field is preserved. For efficiency, handle the fields > @@ -614,24 +842,31 @@ mfi_release_command(struct mfi_command * > cm->cm_data = NULL; > cm->cm_sg = 0; > cm->cm_total_frame_size = 0; > + cm->retry_for_fw_reset = 0; > > mfi_enqueue_free(cm); > } > > -static int > -mfi_dcmd_command(struct mfi_softc *sc, struct mfi_command **cmp, uint32_t > opcode, > - void **bufp, size_t bufsize) > +int > +mfi_dcmd_command(struct mfi_softc *sc, struct mfi_command **cmp, > + uint32_t opcode, void **bufp, size_t bufsize) > { > struct mfi_command *cm; > struct mfi_dcmd_frame *dcmd; > void *buf = NULL; > - > + uint32_t context = 0; > + > mtx_assert(&sc->mfi_io_lock, MA_OWNED); > - > + > cm = mfi_dequeue_free(sc); > if (cm == NULL) > return (EBUSY); > > + /* Zero out the MFI frame */ > + context = cm->cm_frame->header.context; > + bzero(cm->cm_frame, sizeof(union mfi_frame)); > + cm->cm_frame->header.context = context; > + > if ((bufsize > 0) && (bufp != NULL)) { > if (*bufp == NULL) { > buf = malloc(bufsize, M_MFIBUF, M_NOWAIT|M_ZERO); > @@ -651,6 +886,7 @@ mfi_dcmd_command(struct mfi_softc *sc, s > dcmd->header.timeout = 0; > dcmd->header.flags = 0; > dcmd->header.data_len = bufsize; > + dcmd->header.scsi_status = 0; > dcmd->opcode = opcode; > cm->cm_sg = &dcmd->sgl; > cm->cm_total_frame_size = MFI_DCMD_FRAME_SIZE; > @@ -672,11 +908,17 @@ mfi_comms_init(struct mfi_softc *sc) > struct mfi_init_frame *init; > struct mfi_init_qinfo *qinfo; > int error; > + uint32_t context = 0; > > mtx_lock(&sc->mfi_io_lock); > if ((cm = mfi_dequeue_free(sc)) == NULL) > return (EBUSY); > > + /* Zero out the MFI frame */ > + context = cm->cm_frame->header.context; > + bzero(cm->cm_frame, sizeof(union mfi_frame)); > + cm->cm_frame->header.context = context; > + > /* > * Abuse the SG list area of the frame to hold the init_qinfo > * object; > @@ -737,9 +979,11 @@ mfi_get_controller_info(struct mfi_softc > BUS_DMASYNC_POSTREAD); > bus_dmamap_unload(sc->mfi_buffer_dmat, cm->cm_dmamap); > > - max_sectors_1 = (1 << ci->stripe_sz_ops.min) * ci->max_strips_per_io; > + max_sectors_1 = (1 << ci->stripe_sz_ops.max) * ci->max_strips_per_io; > max_sectors_2 = ci->max_request_size; > sc->mfi_max_io = min(max_sectors_1, max_sectors_2); > + sc->disableOnlineCtrlReset = > + ci->properties.OnOffProperties.disableOnlineCtrlReset; > > out: > if (ci) > @@ -756,6 +1000,7 @@ mfi_get_log_state(struct mfi_softc *sc, > struct mfi_command *cm = NULL; > int error; > > + mtx_lock(&sc->mfi_io_lock); > error = mfi_dcmd_command(sc, &cm, MFI_DCMD_CTRL_EVENT_GETINFO, > (void **)log_state, sizeof(**log_state)); > if (error) > @@ -774,11 +1019,12 @@ mfi_get_log_state(struct mfi_softc *sc, > out: > if (cm) > mfi_release_command(cm); > + mtx_unlock(&sc->mfi_io_lock); > > return (error); > } > > -static int > +int > mfi_aen_setup(struct mfi_softc *sc, uint32_t seq_start) > { > struct mfi_evt_log_state *log_state = NULL; > @@ -788,10 +1034,11 @@ mfi_aen_setup(struct mfi_softc *sc, uint > > class_locale.members.reserved = 0; > class_locale.members.locale = mfi_event_locale; > - class_locale.members.class = mfi_event_class; > + class_locale.members.evt_class = mfi_event_class; > > if (seq_start == 0) { > error = mfi_get_log_state(sc, &log_state); > + sc->mfi_boot_seq_num = log_state->boot_seq_num; > if (error) { > if (log_state) > free(log_state, M_MFIBUF); > @@ -813,7 +1060,7 @@ mfi_aen_setup(struct mfi_softc *sc, uint > return 0; > } > > -static int > +int > mfi_wait_command(struct mfi_softc *sc, struct mfi_command *cm) > { > > @@ -886,6 +1133,64 @@ mfi_free(struct mfi_softc *sc) > if (sc->mfi_comms_dmat != NULL) > bus_dma_tag_destroy(sc->mfi_comms_dmat); > > + /* ThunderBolt contiguous memory free here */ > + if (sc->mfi_flags & MFI_FLAGS_TBOLT) { > + if (sc->mfi_tb_busaddr != 0) > + bus_dmamap_unload(sc->mfi_tb_dmat, sc->mfi_tb_dmamap); > + if (sc->request_message_pool != NULL) > + bus_dmamem_free(sc->mfi_tb_dmat, sc->request_message_pool, > + sc->mfi_tb_dmamap); > + if (sc->mfi_tb_dmat != NULL) > + bus_dma_tag_destroy(sc->mfi_tb_dmat); > + > + /* Version buffer memory free */ > + /* Start LSIP200113393 */ > + if (sc->verbuf_h_busaddr != 0) > + bus_dmamap_unload(sc->verbuf_h_dmat, sc->verbuf_h_dmamap); > + if (sc->verbuf != NULL) > + bus_dmamem_free(sc->verbuf_h_dmat, sc->verbuf, > + sc->verbuf_h_dmamap); > + if (sc->verbuf_h_dmat != NULL) > + bus_dma_tag_destroy(sc->verbuf_h_dmat); > + > + /* End LSIP200113393 */ > + /* ThunderBolt INIT packet memory Free */ > + if (sc->mfi_tb_init_busaddr != 0) > + bus_dmamap_unload(sc->mfi_tb_init_dmat, sc->mfi_tb_init_dmamap); > + if (sc->mfi_tb_init != NULL) > + bus_dmamem_free(sc->mfi_tb_init_dmat, sc->mfi_tb_init, > + sc->mfi_tb_init_dmamap); > + if (sc->mfi_tb_init_dmat != NULL) > + bus_dma_tag_destroy(sc->mfi_tb_init_dmat); > + > + /* ThunderBolt IOC Init Desc memory free here */ > + if (sc->mfi_tb_ioc_init_busaddr != 0) > + bus_dmamap_unload(sc->mfi_tb_ioc_init_dmat, > + sc->mfi_tb_ioc_init_dmamap); > + if (sc->mfi_tb_ioc_init_desc != NULL) > + bus_dmamem_free(sc->mfi_tb_ioc_init_dmat, > + sc->mfi_tb_ioc_init_desc, > + sc->mfi_tb_ioc_init_dmamap); > + if (sc->mfi_tb_ioc_init_dmat != NULL) > + bus_dma_tag_destroy(sc->mfi_tb_ioc_init_dmat); > + for (int i = 0; i < sc->mfi_max_fw_cmds; i++) { > + if (sc->mfi_cmd_pool_tbolt != NULL) { > + if (sc->mfi_cmd_pool_tbolt[i] != NULL) { > + free(sc->mfi_cmd_pool_tbolt[i], > + M_MFIBUF); > + sc->mfi_cmd_pool_tbolt[i] = NULL; > + } > + } > + } > + if (sc->mfi_cmd_pool_tbolt != NULL) { > + free(sc->mfi_cmd_pool_tbolt, M_MFIBUF); > + sc->mfi_cmd_pool_tbolt = NULL; > + } > + if (sc->request_desc_pool != NULL) { > + free(sc->request_desc_pool, M_MFIBUF); > + sc->request_desc_pool = NULL; > + } > + } > if (sc->mfi_buffer_dmat != NULL) > bus_dma_tag_destroy(sc->mfi_buffer_dmat); > if (sc->mfi_parent_dmat != NULL) > @@ -912,6 +1217,8 @@ mfi_startup(void *arg) > sx_xlock(&sc->mfi_config_lock); > mtx_lock(&sc->mfi_io_lock); > mfi_ldprobe(sc); > + if (sc->mfi_flags & MFI_FLAGS_SKINNY) > + mfi_syspdprobe(sc); > mtx_unlock(&sc->mfi_io_lock); > sx_xunlock(&sc->mfi_config_lock); > } > @@ -928,12 +1235,7 @@ mfi_intr(void *arg) > if (sc->mfi_check_clear_intr(sc)) > return; > > - /* > - * Do a dummy read to flush the interrupt ACK that we just performed, > - * ensuring that everything is really, truly consistent. > - */ > - (void)sc->mfi_read_fw_status(sc); > - > +restart: > pi = sc->mfi_comms->hw_pi; > ci = sc->mfi_comms->hw_ci; > mtx_lock(&sc->mfi_io_lock); > @@ -958,6 +1260,14 @@ mfi_intr(void *arg) > mfi_startio(sc); > mtx_unlock(&sc->mfi_io_lock); > > + /* > + * Dummy read to flush the bus; this ensures that the indexes are up > + * to date. Restart processing if more commands have come it. > + */ > + (void)sc->mfi_read_fw_status(sc); > + if (pi != sc->mfi_comms->hw_pi) > + goto restart; > + > return; > } > > @@ -978,6 +1288,9 @@ mfi_shutdown(struct mfi_softc *sc) > if (sc->mfi_aen_cm != NULL) > mfi_abort(sc, sc->mfi_aen_cm); > > + if (sc->mfi_map_sync_cm != NULL) > + mfi_abort(sc, sc->mfi_map_sync_cm); > + > dcmd = &cm->cm_frame->dcmd; > dcmd->header.flags = MFI_FRAME_DIR_NONE; > cm->cm_flags = MFI_CMD_POLLED; > @@ -993,6 +1306,81 @@ mfi_shutdown(struct mfi_softc *sc) > } > > static void > +mfi_syspdprobe(struct mfi_softc *sc) > +{ > + struct mfi_frame_header *hdr; > + struct mfi_command *cm = NULL; > + struct mfi_pd_list *pdlist = NULL; > + struct mfi_system_pd *syspd, *tmp; > + int error, i, found; > + > + sx_assert(&sc->mfi_config_lock, SA_XLOCKED); > + mtx_assert(&sc->mfi_io_lock, MA_OWNED); > + /* Add SYSTEM PD's */ > + error = mfi_dcmd_command(sc, &cm, MFI_DCMD_PD_LIST_QUERY, > + (void **)&pdlist, sizeof(*pdlist)); > + if (error) { > + device_printf(sc->mfi_dev, > + "Error while forming SYSTEM PD list\n"); > + goto out; > + } > + > + cm->cm_flags = MFI_CMD_DATAIN | MFI_CMD_POLLED; > + cm->cm_frame->dcmd.mbox[0] = MR_PD_QUERY_TYPE_EXPOSED_TO_HOST; > + cm->cm_frame->dcmd.mbox[1] = 0; > + if (mfi_mapcmd(sc, cm) != 0) { > + device_printf(sc->mfi_dev, > + "Failed to get syspd device listing\n"); > + goto out; > + } > + bus_dmamap_sync(sc->mfi_buffer_dmat,cm->cm_dmamap, > + BUS_DMASYNC_POSTREAD); > + bus_dmamap_unload(sc->mfi_buffer_dmat, cm->cm_dmamap); > + hdr = &cm->cm_frame->header; > + if (hdr->cmd_status != MFI_STAT_OK) { > + device_printf(sc->mfi_dev, > + "MFI_DCMD_PD_LIST_QUERY failed %x\n", hdr->cmd_status); > + goto out; > + } > + /* Get each PD and add it to the system */ > + for (i = 0; i < pdlist->count; i++) { > + if (pdlist->addr[i].device_id == > + pdlist->addr[i].encl_device_id) > + continue; > + found = 0; > + TAILQ_FOREACH(syspd, &sc->mfi_syspd_tqh, pd_link) { > + if (syspd->pd_id == pdlist->addr[i].device_id) > + found = 1; > + } > + if (found == 0) > + mfi_add_sys_pd(sc, pdlist->addr[i].device_id); > + } > + /* Delete SYSPD's whose state has been changed */ > + TAILQ_FOREACH_SAFE(syspd, &sc->mfi_syspd_tqh, pd_link, tmp) { > + found = 0; > + for (i = 0; i < pdlist->count; i++) { > + if (syspd->pd_id == pdlist->addr[i].device_id) > + found = 1; > + } > + if (found == 0) { > + printf("DELETE\n"); > + mtx_unlock(&sc->mfi_io_lock); > + mtx_lock(&Giant); > + device_delete_child(sc->mfi_dev, syspd->pd_dev); > + mtx_unlock(&Giant); > + mtx_lock(&sc->mfi_io_lock); > + } > + } > +out: > + if (pdlist) > + free(pdlist, M_MFIBUF); > + if (cm) > + mfi_release_command(cm); > + > + return; > +} > + > +static void > mfi_ldprobe(struct mfi_softc *sc) > { > struct mfi_frame_header *hdr; > @@ -1086,10 +1474,124 @@ format_class(int8_t class) > static void > mfi_decode_evt(struct mfi_softc *sc, struct mfi_evt_detail *detail) > { > + struct mfi_system_pd *syspd = NULL; > > device_printf(sc->mfi_dev, "%d (%s/0x%04x/%s) - %s\n", detail->seq, > - format_timestamp(detail->time), detail->class.members.locale, > - format_class(detail->class.members.class), detail->description); > + format_timestamp(detail->time), detail->evt_class.members.locale, > + format_class(detail->evt_class.members.evt_class), > + detail->description); > + > + /* Don't act on old AEN's or while shutting down */ > + if (detail->seq < sc->mfi_boot_seq_num || sc->mfi_detaching) > + return; > + > + switch (detail->arg_type) { > + case MR_EVT_ARGS_NONE: > + if (detail->code == MR_EVT_CTRL_HOST_BUS_SCAN_REQUESTED) { > + device_printf(sc->mfi_dev, "HostBus scan raised\n"); > + if (mfi_detect_jbod_change) { > + /* > + * Probe for new SYSPD's and Delete > + * invalid SYSPD's > + */ > + sx_xlock(&sc->mfi_config_lock); > + mtx_lock(&sc->mfi_io_lock); > + mfi_syspdprobe(sc); > + mtx_unlock(&sc->mfi_io_lock); > + sx_xunlock(&sc->mfi_config_lock); > + } > + } > + break; > + case MR_EVT_ARGS_LD_STATE: > + /* During load time driver reads all the events starting > + * from the one that has been logged after shutdown. Avoid > + * these old events. > + */ > + if (detail->args.ld_state.new_state == MFI_LD_STATE_OFFLINE ) { > + /* Remove the LD */ > + struct mfi_disk *ld; > + TAILQ_FOREACH(ld, &sc->mfi_ld_tqh, ld_link) { > + if (ld->ld_id == > + detail->args.ld_state.ld.target_id) > + break; > + } > + /* > + Fix: for kernel panics when SSCD is removed > + KASSERT(ld != NULL, ("volume dissappeared")); > + */ > + if (ld != NULL) { > + mtx_lock(&Giant); > + device_delete_child(sc->mfi_dev, ld->ld_dev); > + mtx_unlock(&Giant); > + } > + } > + break; > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > _______________________________________________ > svn-src-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-stable > To unsubscribe, send any mail to "svn-src-stable-unsubscribe@freebsd.org" > From owner-svn-src-all@FreeBSD.ORG Sat May 19 00:38:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43EE7106566C; Sat, 19 May 2012 00:38:06 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 97D818FC0A; Sat, 19 May 2012 00:38:05 +0000 (UTC) Received: by yenl8 with SMTP id l8so4251005yen.13 for ; Fri, 18 May 2012 17:37:59 -0700 (PDT) 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=KnHjD09mNOeX2L21L8cZgH+Nd+kpchfoieR8EMIVvO8=; b=NrgqnSn05Uv3T3bRiAQ8VJNsA8j8hyAkDlV1cVSDnSxmWYBgh9rGKmR7EUXJ8D1SU+ pkTqGXwKsWRT4B9RbyvnDgOwcGgIo7R2IflBI0EBBNhtMrhq/6I8RoNO38nOm/tG6fLU RDdnzRBnJULHUD287IBo1CMwjSgVzgQRpz0T+XWqBHcxD60rnIjJkb9gB3QHEECQg7ng /qnkdUz+8SFJP+22/vv+lYArrCO5DB3yVj7Uam+dImRLyWqqc+ptPeMIwpSy1S8s9Eub zSUrwZlXh8wxbT1kIA9qscRV0YJF/JPZKqzvGhrt1r+mQF2c44e0CSr/MBoPAbc+tK79 QZig== MIME-Version: 1.0 Received: by 10.236.76.233 with SMTP id b69mr14724561yhe.52.1337387878846; Fri, 18 May 2012 17:37:58 -0700 (PDT) Received: by 10.236.44.73 with HTTP; Fri, 18 May 2012 17:37:58 -0700 (PDT) In-Reply-To: References: <201205182329.q4INTU4X086651@svn.freebsd.org> Date: Sat, 19 May 2012 02:37:58 +0200 Message-ID: From: Oliver Pinter To: Sean Bruno Content-Type: multipart/mixed; boundary=20cf300fb37172126b04c058e103 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r235636 - in stable/7/sys: conf dev/mfi modules/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 00:38:06 -0000 --20cf300fb37172126b04c058e103 Content-Type: text/plain; charset=ISO-8859-1 On 5/19/12, Oliver Pinter wrote: > cc -O2 -fno-strict-aliasing -pipe -fno-delete-null-pointer-checks > -march=core2 - > fno-builtin-strftime -Wsystem-headers -Wall -Wno-format-y2k -W > -Wno-unused-param > eter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith > -Wno-uninitialized > -Wno-pointer-sign -c /usr/src/usr.sbin/mfiutil/mfi_evt.c > /usr/src/usr.sbin/mfiutil/mfi_evt.c: In function 'mfi_decode_evt': > /usr/src/usr.sbin/mfiutil/mfi_evt.c:366: error: 'struct mfi_evt_detail' has > no m > ember named 'class' > /usr/src/usr.sbin/mfiutil/mfi_evt.c:367: error: 'struct mfi_evt_detail' has > no m > ember named 'class' > /usr/src/usr.sbin/mfiutil/mfi_evt.c: In function 'show_events': > /usr/src/usr.sbin/mfiutil/mfi_evt.c:562: error: 'struct ' has no > memb > er named 'class' > /usr/src/usr.sbin/mfiutil/mfi_evt.c:572: error: 'struct ' has no > memb > er named 'class' > cc -O2 -fno-strict-aliasing -pipe -fno-delete-null-pointer-checks > -march=core2 - > DGTAGS -DSYSV_CURSES -I/usr/src/usr.bin/vi > -I/usr/src/usr.bin/vi/../../contrib/n > vi -I/usr/src/usr.bin/vi/../../contrib/nvi/include -c > /usr/src/usr.bin/vi/../.. > /contrib/nvi/ex/ex_put.c > *** Error code 1 > > --------------- > > diff --git a/usr.sbin/mfiutil/mfi_evt.c b/usr.sbin/mfiutil/mfi_evt.c > index a14bb19..336fbd3 100644 > --- a/usr.sbin/mfiutil/mfi_evt.c > +++ b/usr.sbin/mfiutil/mfi_evt.c > @@ -363,8 +363,8 @@ mfi_decode_evt(int fd, struct mfi_evt_detail > *detail, int verbose) > { > > printf("%5d (%s/%s/%s) - ", detail->seq, > format_timestamp(detail->time), > - format_locale(detail->class.members.locale), > - format_class(detail->class.members.class)); > + format_locale(detail->evt_class.members.locale), > + format_class(detail->evt_class.members.evt_class)); > switch (detail->arg_type) { > case MR_EVT_ARGS_NONE: > break; > @@ -559,7 +559,7 @@ show_events(int ac, char **av) > num_events = 15; > filter.members.reserved = 0; > filter.members.locale = MFI_EVT_LOCALE_ALL; > - filter.members.class = MFI_EVT_CLASS_WARNING; > + filter.members.evt_class = MFI_EVT_CLASS_WARNING; > start = info.boot_seq_num; > stop = info.newest_seq_num; > verbose = 0; > @@ -569,7 +569,7 @@ show_events(int ac, char **av) > while ((ch = getopt(ac, av, "c:l:n:v")) != -1) { > switch (ch) { > case 'c': > - if (parse_class(optarg, &filter.members.class) < 0) > { > + if (parse_class(optarg, > &filter.members.evt_class) < 0) { > error = errno; > warn("Error parsing event class"); > close(fd); > > > -------------- > > not tested, compiling now > > On 5/19/12, Sean Bruno wrote: >> Author: sbruno >> Date: Fri May 18 23:29:30 2012 >> New Revision: 235636 >> URL: http://svn.freebsd.org/changeset/base/235636 >> >> Log: >> MFC of head thunderbolt support for mfi(4) >> >> r233711 -- IFV head_mfi into head for initial thunderbolt support >> r233768 -- atomic_t --> mfi_atomic >> r233805 -- fix tinderbuild, move megasas_sge to mfivar.h >> r233877 -- remove atomic.h from includes >> r235014 -- fix reading of sector >= 2^32 or 2^21, repair RAID handling >> r235016 -- style(9) >> r235040 -- fix returns from mfi_tbolt_sync_map_info() >> r235318 -- repair panic on PAE i386 >> r235321 -- repair the repair of panics on PAE i386 >> >> Added: >> stable/7/sys/dev/mfi/mfi_syspd.c >> - copied unchanged from r233711, head/sys/dev/mfi/mfi_syspd.c >> stable/7/sys/dev/mfi/mfi_tbolt.c >> - copied, changed from r233711, head/sys/dev/mfi/mfi_tbolt.c >> Modified: >> stable/7/sys/conf/files >> stable/7/sys/dev/mfi/mfi.c >> stable/7/sys/dev/mfi/mfi_cam.c >> stable/7/sys/dev/mfi/mfi_debug.c >> stable/7/sys/dev/mfi/mfi_disk.c >> stable/7/sys/dev/mfi/mfi_ioctl.h >> stable/7/sys/dev/mfi/mfi_linux.c >> stable/7/sys/dev/mfi/mfi_pci.c >> stable/7/sys/dev/mfi/mfireg.h >> stable/7/sys/dev/mfi/mfivar.h >> stable/7/sys/modules/mfi/Makefile >> Directory Properties: >> stable/7/sys/ (props changed) >> >> Modified: stable/7/sys/conf/files >> ============================================================================== >> --- stable/7/sys/conf/files Fri May 18 21:50:26 2012 (r235635) >> +++ stable/7/sys/conf/files Fri May 18 23:29:30 2012 (r235636) >> @@ -948,6 +948,8 @@ dev/mfi/mfi.c optional mfi >> dev/mfi/mfi_debug.c optional mfi >> dev/mfi/mfi_pci.c optional mfi pci >> dev/mfi/mfi_disk.c optional mfi >> +dev/mfi/mfi_syspd.c optional mfi >> +dev/mfi/mfi_tbolt.c optional mfi >> dev/mfi/mfi_linux.c optional mfi compat_linux >> dev/mfi/mfi_cam.c optional mfip scbus >> dev/mii/acphy.c optional miibus | acphy >> >> Modified: stable/7/sys/dev/mfi/mfi.c >> ============================================================================== >> --- stable/7/sys/dev/mfi/mfi.c Fri May 18 21:50:26 2012 (r235635) >> +++ stable/7/sys/dev/mfi/mfi.c Fri May 18 23:29:30 2012 (r235636) >> @@ -53,6 +53,7 @@ >> #include >> __FBSDID("$FreeBSD$"); >> >> +#include "opt_compat.h" >> #include "opt_mfi.h" >> >> #include >> @@ -72,6 +73,7 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> #include >> +#include >> >> #include >> #include >> @@ -79,43 +81,52 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> #include >> +#include >> +#include >> >> static int mfi_alloc_commands(struct mfi_softc *); >> static int mfi_comms_init(struct mfi_softc *); >> -static int mfi_wait_command(struct mfi_softc *, struct mfi_command *); >> static int mfi_get_controller_info(struct mfi_softc *); >> static int mfi_get_log_state(struct mfi_softc *, >> struct mfi_evt_log_state **); >> static int mfi_parse_entries(struct mfi_softc *, int, int); >> -static int mfi_dcmd_command(struct mfi_softc *, struct mfi_command **, >> - uint32_t, void **, size_t); >> static void mfi_data_cb(void *, bus_dma_segment_t *, int, int); >> static void mfi_startup(void *arg); >> static void mfi_intr(void *arg); >> static void mfi_ldprobe(struct mfi_softc *sc); >> +static void mfi_syspdprobe(struct mfi_softc *sc); >> +static void mfi_handle_evt(void *context, int pending); >> static int mfi_aen_register(struct mfi_softc *sc, int seq, int locale); >> static void mfi_aen_complete(struct mfi_command *); >> -static int mfi_aen_setup(struct mfi_softc *, uint32_t); >> static int mfi_add_ld(struct mfi_softc *sc, int); >> static void mfi_add_ld_complete(struct mfi_command *); >> +static int mfi_add_sys_pd(struct mfi_softc *sc, int); >> +static void mfi_add_sys_pd_complete(struct mfi_command *); >> static struct mfi_command * mfi_bio_command(struct mfi_softc *); >> static void mfi_bio_complete(struct mfi_command *); >> -static int mfi_mapcmd(struct mfi_softc *, struct mfi_command *); >> +static struct mfi_command *mfi_build_ldio(struct mfi_softc *,struct >> bio*); >> +static struct mfi_command *mfi_build_syspdio(struct mfi_softc *,struct >> bio*); >> static int mfi_send_frame(struct mfi_softc *, struct mfi_command *); >> -static void mfi_complete(struct mfi_softc *, struct mfi_command *); >> static int mfi_abort(struct mfi_softc *, struct mfi_command *); >> -static int mfi_linux_ioctl_int(struct cdev *, u_long, caddr_t, int, >> d_thread_t *); >> +static int mfi_linux_ioctl_int(struct cdev *, u_long, caddr_t, int, >> struct >> thread *); >> static void mfi_timeout(void *); >> static int mfi_user_command(struct mfi_softc *, >> struct mfi_ioc_passthru *); >> -static void mfi_enable_intr_xscale(struct mfi_softc *sc); >> -static void mfi_enable_intr_ppc(struct mfi_softc *sc); >> -static int32_t mfi_read_fw_status_xscale(struct mfi_softc *sc); >> -static int32_t mfi_read_fw_status_ppc(struct mfi_softc *sc); >> -static int mfi_check_clear_intr_xscale(struct mfi_softc *sc); >> -static int mfi_check_clear_intr_ppc(struct mfi_softc *sc); >> -static void mfi_issue_cmd_xscale(struct mfi_softc *sc,uint32_t >> bus_add,uint32_t frame_cnt); >> -static void mfi_issue_cmd_ppc(struct mfi_softc *sc,uint32_t >> bus_add,uint32_t frame_cnt); >> +static void mfi_enable_intr_xscale(struct mfi_softc *sc); >> +static void mfi_enable_intr_ppc(struct mfi_softc *sc); >> +static int32_t mfi_read_fw_status_xscale(struct mfi_softc *sc); >> +static int32_t mfi_read_fw_status_ppc(struct mfi_softc *sc); >> +static int mfi_check_clear_intr_xscale(struct mfi_softc *sc); >> +static int mfi_check_clear_intr_ppc(struct mfi_softc *sc); >> +static void mfi_issue_cmd_xscale(struct mfi_softc *sc, bus_addr_t >> bus_add, >> + uint32_t frame_cnt); >> +static void mfi_issue_cmd_ppc(struct mfi_softc *sc, bus_addr_t bus_add, >> + uint32_t frame_cnt); >> +static int mfi_config_lock(struct mfi_softc *sc, uint32_t opcode); >> +static void mfi_config_unlock(struct mfi_softc *sc, int locked); >> +static int mfi_check_command_pre(struct mfi_softc *sc, struct >> mfi_command >> *cm); >> +static void mfi_check_command_post(struct mfi_softc *sc, struct >> mfi_command >> *cm); >> +static int mfi_check_for_sscd(struct mfi_softc *sc, struct mfi_command >> *cm); >> >> SYSCTL_NODE(_hw, OID_AUTO, mfi, CTLFLAG_RD, 0, "MFI driver parameters"); >> static int mfi_event_locale = MFI_EVT_LOCALE_ALL; >> @@ -133,6 +144,11 @@ TUNABLE_INT("hw.mfi.max_cmds", &mfi_max_ >> SYSCTL_INT(_hw_mfi, OID_AUTO, max_cmds, CTLFLAG_RD, &mfi_max_cmds, >> 0, "Max commands"); >> >> +static int mfi_detect_jbod_change = 1; >> +TUNABLE_INT("hw.mfi.detect_jbod_change", &mfi_detect_jbod_change); >> +SYSCTL_INT(_hw_mfi, OID_AUTO, detect_jbod_change, CTLFLAG_RW, >> + &mfi_detect_jbod_change, 0, "Detect a change to a JBOD"); >> + >> /* Management interface */ >> static d_open_t mfi_open; >> static d_close_t mfi_close; >> @@ -152,6 +168,7 @@ static struct cdevsw mfi_cdevsw = { >> MALLOC_DEFINE(M_MFIBUF, "mfibuf", "Buffers for the MFI driver"); >> >> #define MFI_INQ_LENGTH SHORT_INQUIRY_LENGTH >> +struct mfi_skinny_dma_info mfi_skinny; >> >> static void >> mfi_enable_intr_xscale(struct mfi_softc *sc) >> @@ -162,12 +179,17 @@ mfi_enable_intr_xscale(struct mfi_softc >> static void >> mfi_enable_intr_ppc(struct mfi_softc *sc) >> { >> - MFI_WRITE4(sc, MFI_ODCR0, 0xFFFFFFFF); >> if (sc->mfi_flags & MFI_FLAGS_1078) { >> + MFI_WRITE4(sc, MFI_ODCR0, 0xFFFFFFFF); >> MFI_WRITE4(sc, MFI_OMSK, ~MFI_1078_EIM); >> - } else if (sc->mfi_flags & MFI_FLAGS_GEN2) { >> + } >> + else if (sc->mfi_flags & MFI_FLAGS_GEN2) { >> + MFI_WRITE4(sc, MFI_ODCR0, 0xFFFFFFFF); >> MFI_WRITE4(sc, MFI_OMSK, ~MFI_GEN2_EIM); >> } >> + else if (sc->mfi_flags & MFI_FLAGS_SKINNY) { >> + MFI_WRITE4(sc, MFI_OMSK, ~0x00000001); >> + } >> } >> >> static int32_t >> @@ -205,35 +227,51 @@ mfi_check_clear_intr_ppc(struct mfi_soft >> if (!(status & MFI_1078_RM)) { >> return 1; >> } >> - } else if (sc->mfi_flags & MFI_FLAGS_GEN2) { >> + } >> + else if (sc->mfi_flags & MFI_FLAGS_GEN2) { >> if (!(status & MFI_GEN2_RM)) { >> return 1; >> } >> } >> - >> - MFI_WRITE4(sc, MFI_ODCR0, status); >> + else if (sc->mfi_flags & MFI_FLAGS_SKINNY) { >> + if (!(status & MFI_SKINNY_RM)) { >> + return 1; >> + } >> + } >> + if (sc->mfi_flags & MFI_FLAGS_SKINNY) >> + MFI_WRITE4(sc, MFI_OSTS, status); >> + else >> + MFI_WRITE4(sc, MFI_ODCR0, status); >> return 0; >> } >> >> static void >> -mfi_issue_cmd_xscale(struct mfi_softc *sc,uint32_t bus_add,uint32_t >> frame_cnt) >> +mfi_issue_cmd_xscale(struct mfi_softc *sc, bus_addr_t bus_add, uint32_t >> frame_cnt) >> { >> MFI_WRITE4(sc, MFI_IQP,(bus_add >>3)|frame_cnt); >> } >> >> static void >> -mfi_issue_cmd_ppc(struct mfi_softc *sc,uint32_t bus_add,uint32_t >> frame_cnt) >> +mfi_issue_cmd_ppc(struct mfi_softc *sc, bus_addr_t bus_add, uint32_t >> frame_cnt) >> { >> - MFI_WRITE4(sc, MFI_IQP, (bus_add |frame_cnt <<1)|1 ); >> + if (sc->mfi_flags & MFI_FLAGS_SKINNY) { >> + MFI_WRITE4(sc, MFI_IQPL, (bus_add | frame_cnt <<1)|1 ); >> + MFI_WRITE4(sc, MFI_IQPH, 0x00000000); >> + } else { >> + MFI_WRITE4(sc, MFI_IQP, (bus_add | frame_cnt <<1)|1 ); >> + } >> } >> >> -static int >> +int >> mfi_transition_firmware(struct mfi_softc *sc) >> { >> - int32_t fw_state, cur_state; >> + uint32_t fw_state, cur_state; >> int max_wait, i; >> + uint32_t cur_abs_reg_val = 0; >> + uint32_t prev_abs_reg_val = 0; >> >> - fw_state = sc->mfi_read_fw_status(sc)& MFI_FWSTATE_MASK; >> + cur_abs_reg_val = sc->mfi_read_fw_status(sc); >> + fw_state = cur_abs_reg_val & MFI_FWSTATE_MASK; >> while (fw_state != MFI_FWSTATE_READY) { >> if (bootverbose) >> device_printf(sc->mfi_dev, "Waiting for firmware to " >> @@ -244,36 +282,62 @@ mfi_transition_firmware(struct mfi_softc >> device_printf(sc->mfi_dev, "Firmware fault\n"); >> return (ENXIO); >> case MFI_FWSTATE_WAIT_HANDSHAKE: >> - MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_CLEAR_HANDSHAKE); >> - max_wait = 2; >> + if (sc->mfi_flags & MFI_FLAGS_SKINNY || sc->mfi_flags & >> MFI_FLAGS_TBOLT) >> + MFI_WRITE4(sc, MFI_SKINNY_IDB, MFI_FWINIT_CLEAR_HANDSHAKE); >> + else >> + MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_CLEAR_HANDSHAKE); >> + max_wait = MFI_RESET_WAIT_TIME; >> break; >> case MFI_FWSTATE_OPERATIONAL: >> - MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_READY); >> - max_wait = 10; >> + if (sc->mfi_flags & MFI_FLAGS_SKINNY || sc->mfi_flags & >> MFI_FLAGS_TBOLT) >> + MFI_WRITE4(sc, MFI_SKINNY_IDB, 7); >> + else >> + MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_READY); >> + max_wait = MFI_RESET_WAIT_TIME; >> break; >> case MFI_FWSTATE_UNDEFINED: >> case MFI_FWSTATE_BB_INIT: >> - max_wait = 2; >> + max_wait = MFI_RESET_WAIT_TIME; >> + break; >> + case MFI_FWSTATE_FW_INIT_2: >> + max_wait = MFI_RESET_WAIT_TIME; >> break; >> case MFI_FWSTATE_FW_INIT: >> - case MFI_FWSTATE_DEVICE_SCAN: >> case MFI_FWSTATE_FLUSH_CACHE: >> - max_wait = 20; >> + max_wait = MFI_RESET_WAIT_TIME; >> + break; >> + case MFI_FWSTATE_DEVICE_SCAN: >> + max_wait = MFI_RESET_WAIT_TIME; /* wait for 180 seconds */ >> + prev_abs_reg_val = cur_abs_reg_val; >> + break; >> + case MFI_FWSTATE_BOOT_MESSAGE_PENDING: >> + if (sc->mfi_flags & MFI_FLAGS_SKINNY || sc->mfi_flags & >> MFI_FLAGS_TBOLT) >> + MFI_WRITE4(sc, MFI_SKINNY_IDB, MFI_FWINIT_HOTPLUG); >> + else >> + MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_HOTPLUG); >> + max_wait = MFI_RESET_WAIT_TIME; >> break; >> default: >> - device_printf(sc->mfi_dev,"Unknown firmware state %d\n", >> + device_printf(sc->mfi_dev, "Unknown firmware state %#x\n", >> fw_state); >> return (ENXIO); >> } >> for (i = 0; i < (max_wait * 10); i++) { >> - fw_state = sc->mfi_read_fw_status(sc) & MFI_FWSTATE_MASK; >> + cur_abs_reg_val = sc->mfi_read_fw_status(sc); >> + fw_state = cur_abs_reg_val & MFI_FWSTATE_MASK; >> if (fw_state == cur_state) >> DELAY(100000); >> else >> break; >> } >> + if (fw_state == MFI_FWSTATE_DEVICE_SCAN) { >> + /* Check the device scanning progress */ >> + if (prev_abs_reg_val != cur_abs_reg_val) { >> + continue; >> + } >> + } >> if (fw_state == cur_state) { >> - device_printf(sc->mfi_dev, "firmware stuck in state " >> + device_printf(sc->mfi_dev, "Firmware stuck in state " >> "%#x\n", fw_state); >> return (ENXIO); >> } >> @@ -282,26 +346,36 @@ mfi_transition_firmware(struct mfi_softc >> } >> >> static void >> -mfi_addr32_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) >> +mfi_addr_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) >> { >> - uint32_t *addr; >> + bus_addr_t *addr; >> >> addr = arg; >> *addr = segs[0].ds_addr; >> } >> >> + >> int >> mfi_attach(struct mfi_softc *sc) >> { >> uint32_t status; >> int error, commsz, framessz, sensesz; >> int frames, unit, max_fw_sge; >> + uint32_t tb_mem_size = 0; >> >> - device_printf(sc->mfi_dev, "Megaraid SAS driver Ver 3.00 \n"); >> + if (sc == NULL) >> + return EINVAL; >> + >> + device_printf(sc->mfi_dev, "Megaraid SAS driver Ver %s \n", >> + MEGASAS_VERSION); >> >> mtx_init(&sc->mfi_io_lock, "MFI I/O lock", NULL, MTX_DEF); >> sx_init(&sc->mfi_config_lock, "MFI config"); >> TAILQ_INIT(&sc->mfi_ld_tqh); >> + TAILQ_INIT(&sc->mfi_syspd_tqh); >> + TAILQ_INIT(&sc->mfi_evt_queue); >> + TASK_INIT(&sc->mfi_evt_task, 0, mfi_handle_evt, sc); >> + TASK_INIT(&sc->mfi_map_sync_task, 0, mfi_handle_map_sync, sc); >> TAILQ_INIT(&sc->mfi_aen_pids); >> TAILQ_INIT(&sc->mfi_cam_ccbq); >> >> @@ -310,15 +384,29 @@ mfi_attach(struct mfi_softc *sc) >> mfi_initq_busy(sc); >> mfi_initq_bio(sc); >> >> + sc->adpreset = 0; >> + sc->last_seq_num = 0; >> + sc->disableOnlineCtrlReset = 1; >> + sc->issuepend_done = 1; >> + sc->hw_crit_error = 0; >> + >> if (sc->mfi_flags & MFI_FLAGS_1064R) { >> sc->mfi_enable_intr = mfi_enable_intr_xscale; >> sc->mfi_read_fw_status = mfi_read_fw_status_xscale; >> sc->mfi_check_clear_intr = mfi_check_clear_intr_xscale; >> sc->mfi_issue_cmd = mfi_issue_cmd_xscale; >> - } >> - else { >> + } else if (sc->mfi_flags & MFI_FLAGS_TBOLT) { >> + sc->mfi_enable_intr = mfi_tbolt_enable_intr_ppc; >> + sc->mfi_disable_intr = mfi_tbolt_disable_intr_ppc; >> + sc->mfi_read_fw_status = mfi_tbolt_read_fw_status_ppc; >> + sc->mfi_check_clear_intr = mfi_tbolt_check_clear_intr_ppc; >> + sc->mfi_issue_cmd = mfi_tbolt_issue_cmd_ppc; >> + sc->mfi_adp_reset = mfi_tbolt_adp_reset; >> + sc->mfi_tbolt = 1; >> + TAILQ_INIT(&sc->mfi_cmd_tbolt_tqh); >> + } else { >> sc->mfi_enable_intr = mfi_enable_intr_ppc; >> - sc->mfi_read_fw_status = mfi_read_fw_status_ppc; >> + sc->mfi_read_fw_status = mfi_read_fw_status_ppc; >> sc->mfi_check_clear_intr = mfi_check_clear_intr_ppc; >> sc->mfi_issue_cmd = mfi_issue_cmd_ppc; >> } >> @@ -331,6 +419,32 @@ mfi_attach(struct mfi_softc *sc) >> return (ENXIO); >> } >> >> + /* Start: LSIP200113393 */ >> + if (bus_dma_tag_create( sc->mfi_parent_dmat, /* parent */ >> + 1, 0, /* algnmnt, boundary */ >> + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ >> + BUS_SPACE_MAXADDR, /* highaddr */ >> + NULL, NULL, /* filter, filterarg */ >> + MEGASAS_MAX_NAME*sizeof(bus_addr_t), /* maxsize */ >> + 1, /* msegments */ >> + MEGASAS_MAX_NAME*sizeof(bus_addr_t), /* maxsegsize */ >> + 0, /* flags */ >> + NULL, NULL, /* lockfunc, lockarg */ >> + &sc->verbuf_h_dmat)) { >> + device_printf(sc->mfi_dev, "Cannot allocate verbuf_h_dmat DMA tag\n"); >> + return (ENOMEM); >> + } >> + if (bus_dmamem_alloc(sc->verbuf_h_dmat, (void **)&sc->verbuf, >> + BUS_DMA_NOWAIT, &sc->verbuf_h_dmamap)) { >> + device_printf(sc->mfi_dev, "Cannot allocate verbuf_h_dmamap >> memory\n"); >> + return (ENOMEM); >> + } >> + bzero(sc->verbuf, MEGASAS_MAX_NAME*sizeof(bus_addr_t)); >> + bus_dmamap_load(sc->verbuf_h_dmat, sc->verbuf_h_dmamap, >> + sc->verbuf, MEGASAS_MAX_NAME*sizeof(bus_addr_t), >> + mfi_addr_cb, &sc->verbuf_h_busaddr, 0); >> + /* End: LSIP200113393 */ >> + >> /* >> * Get information needed for sizing the contiguous memory for the >> * frame pool. Size down the sgl parameter since we know that >> @@ -341,8 +455,102 @@ mfi_attach(struct mfi_softc *sc) >> status = sc->mfi_read_fw_status(sc); >> sc->mfi_max_fw_cmds = status & MFI_FWSTATE_MAXCMD_MASK; >> max_fw_sge = (status & MFI_FWSTATE_MAXSGL_MASK) >> 16; >> - sc->mfi_max_sge = min(max_fw_sge, ((MAXPHYS / PAGE_SIZE) + 1)); >> + sc->mfi_max_sge = min(max_fw_sge, ((MFI_MAXPHYS / PAGE_SIZE) + 1)); >> + >> + /* ThunderBolt Support get the contiguous memory */ >> + >> + if (sc->mfi_flags & MFI_FLAGS_TBOLT) { >> + mfi_tbolt_init_globals(sc); >> + device_printf(sc->mfi_dev, "MaxCmd = %x MaxSgl = %x state = %x \n", >> + sc->mfi_max_fw_cmds, sc->mfi_max_sge, status); >> + tb_mem_size = mfi_tbolt_get_memory_requirement(sc); >> + >> + if (bus_dma_tag_create( sc->mfi_parent_dmat, /* parent */ >> + 1, 0, /* algnmnt, boundary */ >> + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ >> + BUS_SPACE_MAXADDR, /* highaddr */ >> + NULL, NULL, /* filter, filterarg */ >> + tb_mem_size, /* maxsize */ >> + 1, /* msegments */ >> + tb_mem_size, /* maxsegsize */ >> + 0, /* flags */ >> + NULL, NULL, /* lockfunc, lockarg */ >> + &sc->mfi_tb_dmat)) { >> + device_printf(sc->mfi_dev, "Cannot allocate comms DMA tag\n"); >> + return (ENOMEM); >> + } >> + if (bus_dmamem_alloc(sc->mfi_tb_dmat, (void >> **)&sc->request_message_pool, >> + BUS_DMA_NOWAIT, &sc->mfi_tb_dmamap)) { >> + device_printf(sc->mfi_dev, "Cannot allocate comms memory\n"); >> + return (ENOMEM); >> + } >> + bzero(sc->request_message_pool, tb_mem_size); >> + bus_dmamap_load(sc->mfi_tb_dmat, sc->mfi_tb_dmamap, >> + sc->request_message_pool, tb_mem_size, mfi_addr_cb, >> &sc->mfi_tb_busaddr, >> 0); >> + >> + /* For ThunderBolt memory init */ >> + if (bus_dma_tag_create( sc->mfi_parent_dmat, /* parent */ >> + 0x100, 0, /* alignmnt, boundary */ >> + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ >> + BUS_SPACE_MAXADDR, /* highaddr */ >> + NULL, NULL, /* filter, filterarg */ >> + MFI_FRAME_SIZE, /* maxsize */ >> + 1, /* msegments */ >> + MFI_FRAME_SIZE, /* maxsegsize */ >> + 0, /* flags */ >> + NULL, NULL, /* lockfunc, lockarg */ >> + &sc->mfi_tb_init_dmat)) { >> + device_printf(sc->mfi_dev, "Cannot allocate init DMA tag\n"); >> + return (ENOMEM); >> + } >> + if (bus_dmamem_alloc(sc->mfi_tb_init_dmat, (void **)&sc->mfi_tb_init, >> + BUS_DMA_NOWAIT, &sc->mfi_tb_init_dmamap)) { >> + device_printf(sc->mfi_dev, "Cannot allocate init memory\n"); >> + return (ENOMEM); >> + } >> + bzero(sc->mfi_tb_init, MFI_FRAME_SIZE); >> + bus_dmamap_load(sc->mfi_tb_init_dmat, sc->mfi_tb_init_dmamap, >> + sc->mfi_tb_init, MFI_FRAME_SIZE, mfi_addr_cb, >> + &sc->mfi_tb_init_busaddr, 0); >> + if (mfi_tbolt_init_desc_pool(sc, sc->request_message_pool, >> + tb_mem_size)) { >> + device_printf(sc->mfi_dev, >> + "Thunderbolt pool preparation error\n"); >> + return 0; >> + } >> >> + /* >> + Allocate DMA memory mapping for MPI2 IOC Init descriptor, >> + we are taking it diffrent from what we have allocated for Request >> + and reply descriptors to avoid confusion later >> + */ >> + tb_mem_size = sizeof(struct MPI2_IOC_INIT_REQUEST); >> + if (bus_dma_tag_create( sc->mfi_parent_dmat, /* parent */ >> + 1, 0, /* algnmnt, boundary */ >> + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ >> + BUS_SPACE_MAXADDR, /* highaddr */ >> + NULL, NULL, /* filter, filterarg */ >> + tb_mem_size, /* maxsize */ >> + 1, /* msegments */ >> + tb_mem_size, /* maxsegsize */ >> + 0, /* flags */ >> + NULL, NULL, /* lockfunc, lockarg */ >> + &sc->mfi_tb_ioc_init_dmat)) { >> + device_printf(sc->mfi_dev, >> + "Cannot allocate comms DMA tag\n"); >> + return (ENOMEM); >> + } >> + if (bus_dmamem_alloc(sc->mfi_tb_ioc_init_dmat, >> + (void **)&sc->mfi_tb_ioc_init_desc, >> + BUS_DMA_NOWAIT, &sc->mfi_tb_ioc_init_dmamap)) { >> + device_printf(sc->mfi_dev, "Cannot allocate comms memory\n"); >> + return (ENOMEM); >> + } >> + bzero(sc->mfi_tb_ioc_init_desc, tb_mem_size); >> + bus_dmamap_load(sc->mfi_tb_ioc_init_dmat, sc->mfi_tb_ioc_init_dmamap, >> + sc->mfi_tb_ioc_init_desc, tb_mem_size, mfi_addr_cb, >> + &sc->mfi_tb_ioc_init_busaddr, 0); >> + } >> /* >> * Create the dma tag for data buffers. Used both for block I/O >> * and for various internal data queries. >> @@ -392,8 +600,7 @@ mfi_attach(struct mfi_softc *sc) >> } >> bzero(sc->mfi_comms, commsz); >> bus_dmamap_load(sc->mfi_comms_dmat, sc->mfi_comms_dmamap, >> - sc->mfi_comms, commsz, mfi_addr32_cb, &sc->mfi_comms_busaddr, 0); >> - >> + sc->mfi_comms, commsz, mfi_addr_cb, &sc->mfi_comms_busaddr, 0); >> /* >> * Allocate DMA memory for the command frames. Keep them in the >> * lower 4GB for efficiency. Calculate the size of the commands at >> @@ -410,6 +617,8 @@ mfi_attach(struct mfi_softc *sc) >> } else { >> sc->mfi_sge_size = sizeof(struct mfi_sg32); >> } >> + if (sc->mfi_flags & MFI_FLAGS_SKINNY) >> + sc->mfi_sge_size = sizeof(struct mfi_sg_skinny); >> frames = (sc->mfi_sge_size * sc->mfi_max_sge - 1) / MFI_FRAME_SIZE + 2; >> sc->mfi_cmd_size = frames * MFI_FRAME_SIZE; >> framessz = sc->mfi_cmd_size * sc->mfi_max_fw_cmds; >> @@ -434,8 +643,7 @@ mfi_attach(struct mfi_softc *sc) >> } >> bzero(sc->mfi_frames, framessz); >> bus_dmamap_load(sc->mfi_frames_dmat, sc->mfi_frames_dmamap, >> - sc->mfi_frames, framessz, mfi_addr32_cb, >> &sc->mfi_frames_busaddr,0); >> - >> + sc->mfi_frames, framessz, mfi_addr_cb, &sc->mfi_frames_busaddr,0); >> /* >> * Allocate DMA memory for the frame sense data. Keep them in the >> * lower 4GB for efficiency >> @@ -461,39 +669,46 @@ mfi_attach(struct mfi_softc *sc) >> return (ENOMEM); >> } >> bus_dmamap_load(sc->mfi_sense_dmat, sc->mfi_sense_dmamap, >> - sc->mfi_sense, sensesz, mfi_addr32_cb, &sc->mfi_sense_busaddr, 0); >> - >> + sc->mfi_sense, sensesz, mfi_addr_cb, &sc->mfi_sense_busaddr, 0); >> if ((error = mfi_alloc_commands(sc)) != 0) >> return (error); >> >> - if ((error = mfi_comms_init(sc)) != 0) >> - return (error); >> + /* Before moving the FW to operational state, check whether >> + * hostmemory is required by the FW or not >> + */ >> >> - if ((error = mfi_get_controller_info(sc)) != 0) >> - return (error); >> + /* ThunderBolt MFI_IOC2 INIT */ >> + if (sc->mfi_flags & MFI_FLAGS_TBOLT) { >> + sc->mfi_disable_intr(sc); >> + if ((error = mfi_tbolt_init_MFI_queue(sc)) != 0) { >> + device_printf(sc->mfi_dev, >> + "TB Init has failed with error %d\n",error); >> + return error; >> + } >> >> - mtx_lock(&sc->mfi_io_lock); >> - if ((error = mfi_aen_setup(sc, 0), 0) != 0) { >> - mtx_unlock(&sc->mfi_io_lock); >> - return (error); >> - } >> - mtx_unlock(&sc->mfi_io_lock); >> + if ((error = mfi_tbolt_alloc_cmd(sc)) != 0) >> + return error; >> + if (bus_setup_intr(sc->mfi_dev, sc->mfi_irq, >> + INTR_MPSAFE|INTR_TYPE_BIO, NULL, mfi_intr_tbolt, sc, >> + &sc->mfi_intr)) { >> + device_printf(sc->mfi_dev, "Cannot set up interrupt\n"); >> + return (EINVAL); >> + } >> + sc->mfi_enable_intr(sc); >> + } else { >> + if ((error = mfi_comms_init(sc)) != 0) >> + return (error); >> >> - /* >> - * Set up the interrupt handler. XXX This should happen in >> - * mfi_pci.c >> - */ >> - sc->mfi_irq_rid = 0; >> - if ((sc->mfi_irq = bus_alloc_resource_any(sc->mfi_dev, SYS_RES_IRQ, >> - &sc->mfi_irq_rid, RF_SHAREABLE | RF_ACTIVE)) == NULL) { >> - device_printf(sc->mfi_dev, "Cannot allocate interrupt\n"); >> - return (EINVAL); >> - } >> - if (bus_setup_intr(sc->mfi_dev, sc->mfi_irq, INTR_MPSAFE|INTR_TYPE_BIO, >> - NULL, mfi_intr, sc, &sc->mfi_intr)) { >> - device_printf(sc->mfi_dev, "Cannot set up interrupt\n"); >> - return (EINVAL); >> + if (bus_setup_intr(sc->mfi_dev, sc->mfi_irq, >> + INTR_MPSAFE|INTR_TYPE_BIO, NULL, mfi_intr, sc, &sc->mfi_intr)) { >> + device_printf(sc->mfi_dev, "Cannot set up interrupt\n"); >> + return (EINVAL); >> + } >> + sc->mfi_enable_intr(sc); >> } >> + if ((error = mfi_get_controller_info(sc)) != 0) >> + return (error); >> + sc->disableOnlineCtrlReset = 0; >> >> /* Register a config hook to probe the bus for arrays */ >> sc->mfi_ich.ich_func = mfi_startup; >> @@ -503,6 +718,10 @@ mfi_attach(struct mfi_softc *sc) >> "hook\n"); >> return (EINVAL); >> } >> + if ((error = mfi_aen_setup(sc, 0), 0) != 0) { >> + mtx_unlock(&sc->mfi_io_lock); >> + return (error); >> + } >> >> /* >> * Register a shutdown handler. >> @@ -541,6 +760,10 @@ mfi_attach(struct mfi_softc *sc) >> callout_reset(&sc->mfi_watchdog_callout, MFI_CMD_TIMEOUT * hz, >> mfi_timeout, sc); >> >> + if (sc->mfi_flags & MFI_FLAGS_TBOLT) { >> + mfi_tbolt_sync_map_info(sc); >> + } >> + >> return (0); >> } >> >> @@ -574,8 +797,11 @@ mfi_alloc_commands(struct mfi_softc *sc) >> cm->cm_sc = sc; >> cm->cm_index = i; >> if (bus_dmamap_create(sc->mfi_buffer_dmat, 0, >> - &cm->cm_dmamap) == 0) >> + &cm->cm_dmamap) == 0) { >> + mtx_lock(&sc->mfi_io_lock); >> mfi_release_command(cm); >> + mtx_unlock(&sc->mfi_io_lock); >> + } >> else >> break; >> sc->mfi_total_cmds++; >> @@ -590,6 +816,8 @@ mfi_release_command(struct mfi_command * >> struct mfi_frame_header *hdr; >> uint32_t *hdr_data; >> >> + mtx_assert(&cm->cm_sc->mfi_io_lock, MA_OWNED); >> + >> /* >> * Zero out the important fields of the frame, but make sure the >> * context field is preserved. For efficiency, handle the fields >> @@ -614,24 +842,31 @@ mfi_release_command(struct mfi_command * >> cm->cm_data = NULL; >> cm->cm_sg = 0; >> cm->cm_total_frame_size = 0; >> + cm->retry_for_fw_reset = 0; >> >> mfi_enqueue_free(cm); >> } >> >> -static int >> -mfi_dcmd_command(struct mfi_softc *sc, struct mfi_command **cmp, >> uint32_t >> opcode, >> - void **bufp, size_t bufsize) >> +int >> +mfi_dcmd_command(struct mfi_softc *sc, struct mfi_command **cmp, >> + uint32_t opcode, void **bufp, size_t bufsize) >> { >> struct mfi_command *cm; >> struct mfi_dcmd_frame *dcmd; >> void *buf = NULL; >> - >> + uint32_t context = 0; >> + >> mtx_assert(&sc->mfi_io_lock, MA_OWNED); >> - >> + >> cm = mfi_dequeue_free(sc); >> if (cm == NULL) >> return (EBUSY); >> >> + /* Zero out the MFI frame */ >> + context = cm->cm_frame->header.context; >> + bzero(cm->cm_frame, sizeof(union mfi_frame)); >> + cm->cm_frame->header.context = context; >> + >> if ((bufsize > 0) && (bufp != NULL)) { >> if (*bufp == NULL) { >> buf = malloc(bufsize, M_MFIBUF, M_NOWAIT|M_ZERO); >> @@ -651,6 +886,7 @@ mfi_dcmd_command(struct mfi_softc *sc, s >> dcmd->header.timeout = 0; >> dcmd->header.flags = 0; >> dcmd->header.data_len = bufsize; >> + dcmd->header.scsi_status = 0; >> dcmd->opcode = opcode; >> cm->cm_sg = &dcmd->sgl; >> cm->cm_total_frame_size = MFI_DCMD_FRAME_SIZE; >> @@ -672,11 +908,17 @@ mfi_comms_init(struct mfi_softc *sc) >> struct mfi_init_frame *init; >> struct mfi_init_qinfo *qinfo; >> int error; >> + uint32_t context = 0; >> >> mtx_lock(&sc->mfi_io_lock); >> if ((cm = mfi_dequeue_free(sc)) == NULL) >> return (EBUSY); >> >> + /* Zero out the MFI frame */ >> + context = cm->cm_frame->header.context; >> + bzero(cm->cm_frame, sizeof(union mfi_frame)); >> + cm->cm_frame->header.context = context; >> + >> /* >> * Abuse the SG list area of the frame to hold the init_qinfo >> * object; >> @@ -737,9 +979,11 @@ mfi_get_controller_info(struct mfi_softc >> BUS_DMASYNC_POSTREAD); >> bus_dmamap_unload(sc->mfi_buffer_dmat, cm->cm_dmamap); >> >> - max_sectors_1 = (1 << ci->stripe_sz_ops.min) * ci->max_strips_per_io; >> + max_sectors_1 = (1 << ci->stripe_sz_ops.max) * ci->max_strips_per_io; >> max_sectors_2 = ci->max_request_size; >> sc->mfi_max_io = min(max_sectors_1, max_sectors_2); >> + sc->disableOnlineCtrlReset = >> + ci->properties.OnOffProperties.disableOnlineCtrlReset; >> >> out: >> if (ci) >> @@ -756,6 +1000,7 @@ mfi_get_log_state(struct mfi_softc *sc, >> struct mfi_command *cm = NULL; >> int error; >> >> + mtx_lock(&sc->mfi_io_lock); >> error = mfi_dcmd_command(sc, &cm, MFI_DCMD_CTRL_EVENT_GETINFO, >> (void **)log_state, sizeof(**log_state)); >> if (error) >> @@ -774,11 +1019,12 @@ mfi_get_log_state(struct mfi_softc *sc, >> out: >> if (cm) >> mfi_release_command(cm); >> + mtx_unlock(&sc->mfi_io_lock); >> >> return (error); >> } >> >> -static int >> +int >> mfi_aen_setup(struct mfi_softc *sc, uint32_t seq_start) >> { >> struct mfi_evt_log_state *log_state = NULL; >> @@ -788,10 +1034,11 @@ mfi_aen_setup(struct mfi_softc *sc, uint >> >> class_locale.members.reserved = 0; >> class_locale.members.locale = mfi_event_locale; >> - class_locale.members.class = mfi_event_class; >> + class_locale.members.evt_class = mfi_event_class; >> >> if (seq_start == 0) { >> error = mfi_get_log_state(sc, &log_state); >> + sc->mfi_boot_seq_num = log_state->boot_seq_num; >> if (error) { >> if (log_state) >> free(log_state, M_MFIBUF); >> @@ -813,7 +1060,7 @@ mfi_aen_setup(struct mfi_softc *sc, uint >> return 0; >> } >> >> -static int >> +int >> mfi_wait_command(struct mfi_softc *sc, struct mfi_command *cm) >> { >> >> @@ -886,6 +1133,64 @@ mfi_free(struct mfi_softc *sc) >> if (sc->mfi_comms_dmat != NULL) >> bus_dma_tag_destroy(sc->mfi_comms_dmat); >> >> + /* ThunderBolt contiguous memory free here */ >> + if (sc->mfi_flags & MFI_FLAGS_TBOLT) { >> + if (sc->mfi_tb_busaddr != 0) >> + bus_dmamap_unload(sc->mfi_tb_dmat, sc->mfi_tb_dmamap); >> + if (sc->request_message_pool != NULL) >> + bus_dmamem_free(sc->mfi_tb_dmat, sc->request_message_pool, >> + sc->mfi_tb_dmamap); >> + if (sc->mfi_tb_dmat != NULL) >> + bus_dma_tag_destroy(sc->mfi_tb_dmat); >> + >> + /* Version buffer memory free */ >> + /* Start LSIP200113393 */ >> + if (sc->verbuf_h_busaddr != 0) >> + bus_dmamap_unload(sc->verbuf_h_dmat, sc->verbuf_h_dmamap); >> + if (sc->verbuf != NULL) >> + bus_dmamem_free(sc->verbuf_h_dmat, sc->verbuf, >> + sc->verbuf_h_dmamap); >> + if (sc->verbuf_h_dmat != NULL) >> + bus_dma_tag_destroy(sc->verbuf_h_dmat); >> + >> + /* End LSIP200113393 */ >> + /* ThunderBolt INIT packet memory Free */ >> + if (sc->mfi_tb_init_busaddr != 0) >> + bus_dmamap_unload(sc->mfi_tb_init_dmat, sc->mfi_tb_init_dmamap); >> + if (sc->mfi_tb_init != NULL) >> + bus_dmamem_free(sc->mfi_tb_init_dmat, sc->mfi_tb_init, >> + sc->mfi_tb_init_dmamap); >> + if (sc->mfi_tb_init_dmat != NULL) >> + bus_dma_tag_destroy(sc->mfi_tb_init_dmat); >> + >> + /* ThunderBolt IOC Init Desc memory free here */ >> + if (sc->mfi_tb_ioc_init_busaddr != 0) >> + bus_dmamap_unload(sc->mfi_tb_ioc_init_dmat, >> + sc->mfi_tb_ioc_init_dmamap); >> + if (sc->mfi_tb_ioc_init_desc != NULL) >> + bus_dmamem_free(sc->mfi_tb_ioc_init_dmat, >> + sc->mfi_tb_ioc_init_desc, >> + sc->mfi_tb_ioc_init_dmamap); >> + if (sc->mfi_tb_ioc_init_dmat != NULL) >> + bus_dma_tag_destroy(sc->mfi_tb_ioc_init_dmat); >> + for (int i = 0; i < sc->mfi_max_fw_cmds; i++) { >> + if (sc->mfi_cmd_pool_tbolt != NULL) { >> + if (sc->mfi_cmd_pool_tbolt[i] != NULL) { >> + free(sc->mfi_cmd_pool_tbolt[i], >> + M_MFIBUF); >> + sc->mfi_cmd_pool_tbolt[i] = NULL; >> + } >> + } >> + } >> + if (sc->mfi_cmd_pool_tbolt != NULL) { >> + free(sc->mfi_cmd_pool_tbolt, M_MFIBUF); >> + sc->mfi_cmd_pool_tbolt = NULL; >> + } >> + if (sc->request_desc_pool != NULL) { >> + free(sc->request_desc_pool, M_MFIBUF); >> + sc->request_desc_pool = NULL; >> + } >> + } >> if (sc->mfi_buffer_dmat != NULL) >> bus_dma_tag_destroy(sc->mfi_buffer_dmat); >> if (sc->mfi_parent_dmat != NULL) >> @@ -912,6 +1217,8 @@ mfi_startup(void *arg) >> sx_xlock(&sc->mfi_config_lock); >> mtx_lock(&sc->mfi_io_lock); >> mfi_ldprobe(sc); >> + if (sc->mfi_flags & MFI_FLAGS_SKINNY) >> + mfi_syspdprobe(sc); >> mtx_unlock(&sc->mfi_io_lock); >> sx_xunlock(&sc->mfi_config_lock); >> } >> @@ -928,12 +1235,7 @@ mfi_intr(void *arg) >> if (sc->mfi_check_clear_intr(sc)) >> return; >> >> - /* >> - * Do a dummy read to flush the interrupt ACK that we just performed, >> - * ensuring that everything is really, truly consistent. >> - */ >> - (void)sc->mfi_read_fw_status(sc); >> - >> +restart: >> pi = sc->mfi_comms->hw_pi; >> ci = sc->mfi_comms->hw_ci; >> mtx_lock(&sc->mfi_io_lock); >> @@ -958,6 +1260,14 @@ mfi_intr(void *arg) >> mfi_startio(sc); >> mtx_unlock(&sc->mfi_io_lock); >> >> + /* >> + * Dummy read to flush the bus; this ensures that the indexes are up >> + * to date. Restart processing if more commands have come it. >> + */ >> + (void)sc->mfi_read_fw_status(sc); >> + if (pi != sc->mfi_comms->hw_pi) >> + goto restart; >> + >> return; >> } >> >> @@ -978,6 +1288,9 @@ mfi_shutdown(struct mfi_softc *sc) >> if (sc->mfi_aen_cm != NULL) >> mfi_abort(sc, sc->mfi_aen_cm); >> >> + if (sc->mfi_map_sync_cm != NULL) >> + mfi_abort(sc, sc->mfi_map_sync_cm); >> + >> dcmd = &cm->cm_frame->dcmd; >> dcmd->header.flags = MFI_FRAME_DIR_NONE; >> cm->cm_flags = MFI_CMD_POLLED; >> @@ -993,6 +1306,81 @@ mfi_shutdown(struct mfi_softc *sc) >> } >> >> static void >> +mfi_syspdprobe(struct mfi_softc *sc) >> +{ >> + struct mfi_frame_header *hdr; >> + struct mfi_command *cm = NULL; >> + struct mfi_pd_list *pdlist = NULL; >> + struct mfi_system_pd *syspd, *tmp; >> + int error, i, found; >> + >> + sx_assert(&sc->mfi_config_lock, SA_XLOCKED); >> + mtx_assert(&sc->mfi_io_lock, MA_OWNED); >> + /* Add SYSTEM PD's */ >> + error = mfi_dcmd_command(sc, &cm, MFI_DCMD_PD_LIST_QUERY, >> + (void **)&pdlist, sizeof(*pdlist)); >> + if (error) { >> + device_printf(sc->mfi_dev, >> + "Error while forming SYSTEM PD list\n"); >> + goto out; >> + } >> + >> + cm->cm_flags = MFI_CMD_DATAIN | MFI_CMD_POLLED; >> + cm->cm_frame->dcmd.mbox[0] = MR_PD_QUERY_TYPE_EXPOSED_TO_HOST; >> + cm->cm_frame->dcmd.mbox[1] = 0; >> + if (mfi_mapcmd(sc, cm) != 0) { >> + device_printf(sc->mfi_dev, >> + "Failed to get syspd device listing\n"); >> + goto out; >> + } >> + bus_dmamap_sync(sc->mfi_buffer_dmat,cm->cm_dmamap, >> + BUS_DMASYNC_POSTREAD); >> + bus_dmamap_unload(sc->mfi_buffer_dmat, cm->cm_dmamap); >> + hdr = &cm->cm_frame->header; >> + if (hdr->cmd_status != MFI_STAT_OK) { >> + device_printf(sc->mfi_dev, >> + "MFI_DCMD_PD_LIST_QUERY failed %x\n", hdr->cmd_status); >> + goto out; >> + } >> + /* Get each PD and add it to the system */ >> + for (i = 0; i < pdlist->count; i++) { >> + if (pdlist->addr[i].device_id == >> + pdlist->addr[i].encl_device_id) >> + continue; >> + found = 0; >> + TAILQ_FOREACH(syspd, &sc->mfi_syspd_tqh, pd_link) { >> + if (syspd->pd_id == pdlist->addr[i].device_id) >> + found = 1; >> + } >> + if (found == 0) >> + mfi_add_sys_pd(sc, pdlist->addr[i].device_id); >> + } >> + /* Delete SYSPD's whose state has been changed */ >> + TAILQ_FOREACH_SAFE(syspd, &sc->mfi_syspd_tqh, pd_link, tmp) { >> + found = 0; >> + for (i = 0; i < pdlist->count; i++) { >> + if (syspd->pd_id == pdlist->addr[i].device_id) >> + found = 1; >> + } >> + if (found == 0) { >> + printf("DELETE\n"); >> + mtx_unlock(&sc->mfi_io_lock); >> + mtx_lock(&Giant); >> + device_delete_child(sc->mfi_dev, syspd->pd_dev); >> + mtx_unlock(&Giant); >> + mtx_lock(&sc->mfi_io_lock); >> + } >> + } >> +out: >> + if (pdlist) >> + free(pdlist, M_MFIBUF); >> + if (cm) >> + mfi_release_command(cm); >> + >> + return; >> +} >> + >> +static void >> mfi_ldprobe(struct mfi_softc *sc) >> { >> struct mfi_frame_header *hdr; >> @@ -1086,10 +1474,124 @@ format_class(int8_t class) >> static void >> mfi_decode_evt(struct mfi_softc *sc, struct mfi_evt_detail *detail) >> { >> + struct mfi_system_pd *syspd = NULL; >> >> device_printf(sc->mfi_dev, "%d (%s/0x%04x/%s) - %s\n", detail->seq, >> - format_timestamp(detail->time), detail->class.members.locale, >> - format_class(detail->class.members.class), detail->description); >> + format_timestamp(detail->time), detail->evt_class.members.locale, >> + format_class(detail->evt_class.members.evt_class), >> + detail->description); >> + >> + /* Don't act on old AEN's or while shutting down */ >> + if (detail->seq < sc->mfi_boot_seq_num || sc->mfi_detaching) >> + return; >> + >> + switch (detail->arg_type) { >> + case MR_EVT_ARGS_NONE: >> + if (detail->code == MR_EVT_CTRL_HOST_BUS_SCAN_REQUESTED) { >> + device_printf(sc->mfi_dev, "HostBus scan raised\n"); >> + if (mfi_detect_jbod_change) { >> + /* >> + * Probe for new SYSPD's and Delete >> + * invalid SYSPD's >> + */ >> + sx_xlock(&sc->mfi_config_lock); >> + mtx_lock(&sc->mfi_io_lock); >> + mfi_syspdprobe(sc); >> + mtx_unlock(&sc->mfi_io_lock); >> + sx_xunlock(&sc->mfi_config_lock); >> + } >> + } >> + break; >> + case MR_EVT_ARGS_LD_STATE: >> + /* During load time driver reads all the events starting >> + * from the one that has been logged after shutdown. Avoid >> + * these old events. >> + */ >> + if (detail->args.ld_state.new_state == MFI_LD_STATE_OFFLINE ) { >> + /* Remove the LD */ >> + struct mfi_disk *ld; >> + TAILQ_FOREACH(ld, &sc->mfi_ld_tqh, ld_link) { >> + if (ld->ld_id == >> + detail->args.ld_state.ld.target_id) >> + break; >> + } >> + /* >> + Fix: for kernel panics when SSCD is removed >> + KASSERT(ld != NULL, ("volume dissappeared")); >> + */ >> + if (ld != NULL) { >> + mtx_lock(&Giant); >> + device_delete_child(sc->mfi_dev, ld->ld_dev); >> + mtx_unlock(&Giant); >> + } >> + } >> + break; >> >> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >> _______________________________________________ >> svn-src-stable@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/svn-src-stable >> To unsubscribe, send any mail to "svn-src-stable-unsubscribe@freebsd.org" >> > --20cf300fb37172126b04c058e103 Content-Type: text/x-diff; charset=US-ASCII; name="20120519023614-mfi-compile-fix-after-r235636.diff" Content-Disposition: attachment; filename="20120519023614-mfi-compile-fix-after-r235636.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: file0 ZGlmZiAtLWdpdCBhL3Vzci5zYmluL21maXV0aWwvbWZpX2V2dC5jIGIvdXNyLnNiaW4vbWZpdXRp bC9tZmlfZXZ0LmMKaW5kZXggYTE0YmIxOS4uMzM2ZmJkMyAxMDA2NDQKLS0tIGEvdXNyLnNiaW4v bWZpdXRpbC9tZmlfZXZ0LmMKKysrIGIvdXNyLnNiaW4vbWZpdXRpbC9tZmlfZXZ0LmMKQEAgLTM2 Myw4ICszNjMsOCBAQCBtZmlfZGVjb2RlX2V2dChpbnQgZmQsIHN0cnVjdCBtZmlfZXZ0X2RldGFp bCAqZGV0YWlsLCBpbnQgdmVyYm9zZSkKIHsKIAogCXByaW50ZigiJTVkICglcy8lcy8lcykgLSAi LCBkZXRhaWwtPnNlcSwgZm9ybWF0X3RpbWVzdGFtcChkZXRhaWwtPnRpbWUpLAotCSAgICBmb3Jt YXRfbG9jYWxlKGRldGFpbC0+Y2xhc3MubWVtYmVycy5sb2NhbGUpLAotCSAgICBmb3JtYXRfY2xh c3MoZGV0YWlsLT5jbGFzcy5tZW1iZXJzLmNsYXNzKSk7CisJICAgIGZvcm1hdF9sb2NhbGUoZGV0 YWlsLT5ldnRfY2xhc3MubWVtYmVycy5sb2NhbGUpLAorCSAgICBmb3JtYXRfY2xhc3MoZGV0YWls LT5ldnRfY2xhc3MubWVtYmVycy5ldnRfY2xhc3MpKTsKIAlzd2l0Y2ggKGRldGFpbC0+YXJnX3R5 cGUpIHsKIAljYXNlIE1SX0VWVF9BUkdTX05PTkU6CiAJCWJyZWFrOwpAQCAtNTU5LDcgKzU1OSw3 IEBAIHNob3dfZXZlbnRzKGludCBhYywgY2hhciAqKmF2KQogCW51bV9ldmVudHMgPSAxNTsKIAlm aWx0ZXIubWVtYmVycy5yZXNlcnZlZCA9IDA7CiAJZmlsdGVyLm1lbWJlcnMubG9jYWxlID0gTUZJ X0VWVF9MT0NBTEVfQUxMOwotCWZpbHRlci5tZW1iZXJzLmNsYXNzID0gTUZJX0VWVF9DTEFTU19X QVJOSU5HOworCWZpbHRlci5tZW1iZXJzLmV2dF9jbGFzcyA9IE1GSV9FVlRfQ0xBU1NfV0FSTklO RzsKIAlzdGFydCA9IGluZm8uYm9vdF9zZXFfbnVtOwogCXN0b3AgPSBpbmZvLm5ld2VzdF9zZXFf bnVtOwogCXZlcmJvc2UgPSAwOwpAQCAtNTY5LDcgKzU2OSw3IEBAIHNob3dfZXZlbnRzKGludCBh YywgY2hhciAqKmF2KQogCXdoaWxlICgoY2ggPSBnZXRvcHQoYWMsIGF2LCAiYzpsOm46diIpKSAh PSAtMSkgewogCQlzd2l0Y2ggKGNoKSB7CiAJCWNhc2UgJ2MnOgotCQkJaWYgKHBhcnNlX2NsYXNz KG9wdGFyZywgJmZpbHRlci5tZW1iZXJzLmNsYXNzKSA8IDApIHsKKwkJCWlmIChwYXJzZV9jbGFz cyhvcHRhcmcsICZmaWx0ZXIubWVtYmVycy5ldnRfY2xhc3MpIDwgMCkgewogCQkJCWVycm9yID0g ZXJybm87CiAJCQkJd2FybigiRXJyb3IgcGFyc2luZyBldmVudCBjbGFzcyIpOwogCQkJCWNsb3Nl KGZkKTsK --20cf300fb37172126b04c058e103-- From owner-svn-src-all@FreeBSD.ORG Sat May 19 02:08:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 720671065674; Sat, 19 May 2012 02:08:53 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E6308FC1A; Sat, 19 May 2012 02:08:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4J28rDH093331; Sat, 19 May 2012 02:08:53 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4J28rKM093329; Sat, 19 May 2012 02:08:53 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205190208.q4J28rKM093329@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 19 May 2012 02:08:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235637 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 02:08:53 -0000 Author: marcel Date: Sat May 19 02:08:52 2012 New Revision: 235637 URL: http://svn.freebsd.org/changeset/base/235637 Log: Fix bootstrapping from FreeBSD 7.x: we also need to build ar. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri May 18 23:29:30 2012 (r235636) +++ head/Makefile.inc1 Sat May 19 02:08:52 2012 (r235637) @@ -1007,6 +1007,10 @@ _gperf= gnu/usr.bin/gperf _groff= gnu/usr.bin/groff .endif +.if ${BOOTSTRAPPING} < 800022 +_ar= usr.bin/ar +.endif + .if ${BOOTSTRAPPING} < 800013 _mklocale= usr.bin/mklocale .endif @@ -1069,6 +1073,7 @@ bootstrap-tools: ${_strfile} \ ${_gperf} \ ${_groff} \ + ${_ar} \ ${_dtc} \ ${_awk} \ usr.bin/lorder \ From owner-svn-src-all@FreeBSD.ORG Sat May 19 02:30:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9AEA6106568E; Sat, 19 May 2012 02:30:15 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9AAD88FC20; Sat, 19 May 2012 02:30:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4J2UB7F094204; Sat, 19 May 2012 02:30:11 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4J2UB98094202; Sat, 19 May 2012 02:30:11 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205190230.q4J2UB98094202@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 19 May 2012 02:30:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235638 - head/lib/libmagic X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 02:30:15 -0000 Author: marcel Date: Sat May 19 02:30:10 2012 New Revision: 235638 URL: http://svn.freebsd.org/changeset/base/235638 Log: Don't depend on getline being on the build machine. That's not the case for FreeBSD 7.x machines. Modified: head/lib/libmagic/Makefile head/lib/libmagic/config.h Modified: head/lib/libmagic/Makefile ============================================================================== --- head/lib/libmagic/Makefile Sat May 19 02:08:52 2012 (r235637) +++ head/lib/libmagic/Makefile Sat May 19 02:30:10 2012 (r235638) @@ -39,8 +39,9 @@ magic.mgc: mkmagic magic CLEANFILES+= mkmagic build-tools: mkmagic -mkmagic: apprentice.c funcs.c magic.c print.c - ${CC} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} +mkmagic: apprentice.c funcs.c getline.c magic.c print.c + ${CC} ${CFLAGS} -DCOMPILE_ONLY -DHOSTPROG ${LDFLAGS} \ + -o ${.TARGET} ${.ALLSRC} FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ ${.CURDIR}/config.h Modified: head/lib/libmagic/config.h ============================================================================== --- head/lib/libmagic/config.h Sat May 19 02:08:52 2012 (r235637) +++ head/lib/libmagic/config.h Sat May 19 02:30:10 2012 (r235638) @@ -39,7 +39,9 @@ #define HAVE_FSEEKO 1 /* Define to 1 if you have the `getline' function. */ +#ifndef HOSTPROG #define HAVE_GETLINE 1 +#endif /* Define to 1 if you have the header file. */ #define HAVE_GETOPT_H 1 From owner-svn-src-all@FreeBSD.ORG Sat May 19 02:31:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B87C1065672; Sat, 19 May 2012 02:31:39 +0000 (UTC) (envelope-from iwasaki@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 279B38FC0C; Sat, 19 May 2012 02:31:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4J2Vd7s094291; Sat, 19 May 2012 02:31:39 GMT (envelope-from iwasaki@svn.freebsd.org) Received: (from iwasaki@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4J2VcAv094289; Sat, 19 May 2012 02:31:38 GMT (envelope-from iwasaki@svn.freebsd.org) Message-Id: <201205190231.q4J2VcAv094289@svn.freebsd.org> From: Mitsuru IWASAKI Date: Sat, 19 May 2012 02:31:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235639 - head/sys/i386/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 02:31:39 -0000 Author: iwasaki Date: Sat May 19 02:31:38 2012 New Revision: 235639 URL: http://svn.freebsd.org/changeset/base/235639 Log: Revert the previous commit on wakecode address verbose printing. This broke PAE kernel building. Modified: head/sys/i386/acpica/acpi_wakeup.c Modified: head/sys/i386/acpica/acpi_wakeup.c ============================================================================== --- head/sys/i386/acpica/acpi_wakeup.c Sat May 19 02:30:10 2012 (r235638) +++ head/sys/i386/acpica/acpi_wakeup.c Sat May 19 02:31:38 2012 (r235639) @@ -375,6 +375,6 @@ acpi_install_wakeup_handler(struct acpi_ WAKECODE_FIXUP(wakeup_ret, void *, resumectx); if (bootverbose) - device_printf(sc->acpi_dev, "wakeup code va %p pa %p\n", - (void *)sc->acpi_wakeaddr, (void *)sc->acpi_wakephys); + device_printf(sc->acpi_dev, "wakeup code va %#x pa %#jx\n", + sc->acpi_wakeaddr, (uintmax_t)sc->acpi_wakephys); } From owner-svn-src-all@FreeBSD.ORG Sat May 19 02:39:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3ADC6106564A; Sat, 19 May 2012 02:39:44 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C91D8FC08; Sat, 19 May 2012 02:39:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4J2dhbC094646; Sat, 19 May 2012 02:39:43 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4J2dhA7094639; Sat, 19 May 2012 02:39:43 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205190239.q4J2dhA7094639@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 19 May 2012 02:39:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235640 - in head: lib/libc/net sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 02:39:44 -0000 Author: marcel Date: Sat May 19 02:39:43 2012 New Revision: 235640 URL: http://svn.freebsd.org/changeset/base/235640 Log: Use the LLINDEX macro to access the link-level I/F index. This makes it possible to work with a different type for the sdl_index field -- it only requires a recompile. Obtained from: Juniper Networks, Inc. Modified: head/lib/libc/net/if_indextoname.c head/lib/libc/net/if_nameindex.c head/lib/libc/net/if_nametoindex.c head/lib/libc/net/sourcefilter.c head/sys/net/if_dl.h Modified: head/lib/libc/net/if_indextoname.c ============================================================================== --- head/lib/libc/net/if_indextoname.c Sat May 19 02:31:38 2012 (r235639) +++ head/lib/libc/net/if_indextoname.c Sat May 19 02:39:43 2012 (r235640) @@ -70,7 +70,7 @@ if_indextoname(unsigned int ifindex, cha for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_LINK && - ifindex == ((struct sockaddr_dl*)ifa->ifa_addr)->sdl_index) + ifindex == LLINDEX((struct sockaddr_dl*)ifa->ifa_addr)) break; } Modified: head/lib/libc/net/if_nameindex.c ============================================================================== --- head/lib/libc/net/if_nameindex.c Sat May 19 02:31:38 2012 (r235639) +++ head/lib/libc/net/if_nameindex.c Sat May 19 02:39:43 2012 (r235640) @@ -123,7 +123,7 @@ if_nameindex(void) if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_LINK) { ifni2->if_index = - ((struct sockaddr_dl*)ifa->ifa_addr)->sdl_index; + LLINDEX((struct sockaddr_dl*)ifa->ifa_addr); ifni2->if_name = cp; strcpy(cp, ifa->ifa_name); ifni2++; Modified: head/lib/libc/net/if_nametoindex.c ============================================================================== --- head/lib/libc/net/if_nametoindex.c Sat May 19 02:31:38 2012 (r235639) +++ head/lib/libc/net/if_nametoindex.c Sat May 19 02:39:43 2012 (r235640) @@ -90,7 +90,7 @@ if_nametoindex(const char *ifname) if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_LINK && strcmp(ifa->ifa_name, ifname) == 0) { - ni = ((struct sockaddr_dl*)ifa->ifa_addr)->sdl_index; + ni = LLINDEX((struct sockaddr_dl*)ifa->ifa_addr); break; } } Modified: head/lib/libc/net/sourcefilter.c ============================================================================== --- head/lib/libc/net/sourcefilter.c Sat May 19 02:31:38 2012 (r235639) +++ head/lib/libc/net/sourcefilter.c Sat May 19 02:39:43 2012 (r235640) @@ -120,7 +120,7 @@ __inaddr_to_index(in_addr_t ifaddr) psu = (sockunion_t *)ifa->ifa_addr; if (psu && psu->ss.ss_family == AF_LINK && strcmp(ifa->ifa_name, ifname) == 0) { - ifindex = psu->sdl.sdl_index; + ifindex = LLINDEX(&psu->sdl); break; } } Modified: head/sys/net/if_dl.h ============================================================================== --- head/sys/net/if_dl.h Sat May 19 02:31:38 2012 (r235639) +++ head/sys/net/if_dl.h Sat May 19 02:39:43 2012 (r235640) @@ -67,6 +67,7 @@ struct sockaddr_dl { }; #define LLADDR(s) ((caddr_t)((s)->sdl_data + (s)->sdl_nlen)) +#define LLINDEX(s) ((s)->sdl_index) #ifndef _KERNEL From owner-svn-src-all@FreeBSD.ORG Sat May 19 04:57:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CACF21065670; Sat, 19 May 2012 04:57:37 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5BB68FC14; Sat, 19 May 2012 04:57:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4J4vbLT000975; Sat, 19 May 2012 04:57:37 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4J4vbMO000973; Sat, 19 May 2012 04:57:37 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205190457.q4J4vbMO000973@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 19 May 2012 04:57:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235641 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 04:57:37 -0000 Author: marcel Date: Sat May 19 04:57:37 2012 New Revision: 235641 URL: http://svn.freebsd.org/changeset/base/235641 Log: Add missing LIBPROCSTAT. Modified: head/share/mk/bsd.libnames.mk Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Sat May 19 02:39:43 2012 (r235640) +++ head/share/mk/bsd.libnames.mk Sat May 19 04:57:37 2012 (r235641) @@ -135,6 +135,7 @@ LIBPANEL?= ${DESTDIR}${LIBDIR}/libpanel. LIBPCAP?= ${DESTDIR}${LIBDIR}/libpcap.a LIBPMC?= ${DESTDIR}${LIBDIR}/libpmc.a LIBPROC?= ${DESTDIR}${LIBDIR}/libproc.a +LIBPROCSTAT?= ${DESTDIR}${LIBDIR}/libprocstat.a LIBPTHREAD?= ${DESTDIR}${LIBDIR}/libpthread.a LIBRADIUS?= ${DESTDIR}${LIBDIR}/libradius.a LIBREADLINE?= ${DESTDIR}${LIBDIR}/libreadline.a From owner-svn-src-all@FreeBSD.ORG Sat May 19 05:07:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5404D106564A; Sat, 19 May 2012 05:07:04 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E9B68FC15; Sat, 19 May 2012 05:07:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4J5747K001423; Sat, 19 May 2012 05:07:04 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4J574m9001420; Sat, 19 May 2012 05:07:04 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205190507.q4J574m9001420@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 19 May 2012 05:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235642 - in head/usr.bin: fstat procstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 05:07:04 -0000 Author: marcel Date: Sat May 19 05:07:03 2012 New Revision: 235642 URL: http://svn.freebsd.org/changeset/base/235642 Log: Bring DPADD in sync with LDADD. Modified: head/usr.bin/fstat/Makefile head/usr.bin/procstat/Makefile Modified: head/usr.bin/fstat/Makefile ============================================================================== --- head/usr.bin/fstat/Makefile Sat May 19 04:57:37 2012 (r235641) +++ head/usr.bin/fstat/Makefile Sat May 19 05:07:03 2012 (r235642) @@ -4,7 +4,7 @@ PROG= fstat SRCS= fstat.c fuser.c main.c LINKS= ${BINDIR}/fstat ${BINDIR}/fuser -DPADD= ${LIBKVM} +DPADD= ${LIBKVM} ${LIBUTIL} ${LIBPROCSTAT} LDADD= -lkvm -lutil -lprocstat MAN1= fuser.1 fstat.1 Modified: head/usr.bin/procstat/Makefile ============================================================================== --- head/usr.bin/procstat/Makefile Sat May 19 04:57:37 2012 (r235641) +++ head/usr.bin/procstat/Makefile Sat May 19 05:07:03 2012 (r235642) @@ -16,6 +16,6 @@ SRCS= procstat.c \ procstat_vm.c LDADD+= -lutil -lprocstat -lkvm -DPADD+= ${LIBUTIL} +DPADD+= ${LIBUTIL} ${LIBPROCSTAT} ${LIBKVM} .include From owner-svn-src-all@FreeBSD.ORG Sat May 19 05:10:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D169D106566B; Sat, 19 May 2012 05:10:47 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD83C8FC12; Sat, 19 May 2012 05:10:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4J5AlLI001603; Sat, 19 May 2012 05:10:47 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4J5AlSa001601; Sat, 19 May 2012 05:10:47 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205190510.q4J5AlSa001601@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 19 May 2012 05:10:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235643 - head/libexec/tftpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 05:10:47 -0000 Author: marcel Date: Sat May 19 05:10:47 2012 New Revision: 235643 URL: http://svn.freebsd.org/changeset/base/235643 Log: Properly use LDADD & DPADD to link against libwrap. Modified: head/libexec/tftpd/Makefile Modified: head/libexec/tftpd/Makefile ============================================================================== --- head/libexec/tftpd/Makefile Sat May 19 05:07:03 2012 (r235642) +++ head/libexec/tftpd/Makefile Sat May 19 05:10:47 2012 (r235643) @@ -6,6 +6,8 @@ MAN= tftpd.8 SRCS= tftp-file.c tftp-io.c tftp-options.c tftp-transfer.c tftp-utils.c SRCS+= tftpd.c WFORMAT=0 -LDFLAGS= -lwrap + +DPADD= ${LIBWRAP} +LDADD= -lwrap .include From owner-svn-src-all@FreeBSD.ORG Sat May 19 05:14:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4C1D1065672; Sat, 19 May 2012 05:14:25 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 312AC8FC19; Sat, 19 May 2012 05:14:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4J5EPAF001790; Sat, 19 May 2012 05:14:25 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4J5EO6u001788; Sat, 19 May 2012 05:14:24 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205190514.q4J5EO6u001788@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 19 May 2012 05:14:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235644 - head/sys/netinet/libalias X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 05:14:25 -0000 Author: marcel Date: Sat May 19 05:14:24 2012 New Revision: 235644 URL: http://svn.freebsd.org/changeset/base/235644 Log: Remove unused inclusion of curses.h Modified: head/sys/netinet/libalias/alias_sctp.h Modified: head/sys/netinet/libalias/alias_sctp.h ============================================================================== --- head/sys/netinet/libalias/alias_sctp.h Sat May 19 05:10:47 2012 (r235643) +++ head/sys/netinet/libalias/alias_sctp.h Sat May 19 05:14:24 2012 (r235644) @@ -92,7 +92,6 @@ #ifndef _KERNEL #include #include -#include #endif //#ifdef _KERNEL From owner-svn-src-all@FreeBSD.ORG Sat May 19 05:44:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9371C106564A; Sat, 19 May 2012 05:44:33 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7AADE8FC12; Sat, 19 May 2012 05:44:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4J5iXEY003482; Sat, 19 May 2012 05:44:33 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4J5iXs4003457; Sat, 19 May 2012 05:44:33 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201205190544.q4J5iXs4003457@svn.freebsd.org> From: Jung-uk Kim Date: Sat, 19 May 2012 05:44:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235645 - in vendor-sys/acpica/dist: . generate/release source/common source/compiler source/components/debugger source/components/dispatcher source/components/events source/components/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 05:44:33 -0000 Author: jkim Date: Sat May 19 05:44:32 2012 New Revision: 235645 URL: http://svn.freebsd.org/changeset/base/235645 Log: Import ACPICA 20120518. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/release/build.sh vendor-sys/acpica/dist/source/common/adfile.c vendor-sys/acpica/dist/source/common/adwalk.c vendor-sys/acpica/dist/source/common/dmextern.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslcompiler.l vendor-sys/acpica/dist/source/compiler/aslcompiler.y vendor-sys/acpica/dist/source/compiler/aslerror.c vendor-sys/acpica/dist/source/compiler/aslfiles.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslmap.c vendor-sys/acpica/dist/source/compiler/aslmessages.h vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/compiler/dtio.c vendor-sys/acpica/dist/source/compiler/prscan.c vendor-sys/acpica/dist/source/compiler/prutils.c vendor-sys/acpica/dist/source/components/debugger/dbfileio.c vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c vendor-sys/acpica/dist/source/components/events/evxface.c vendor-sys/acpica/dist/source/components/tables/tbfadt.c vendor-sys/acpica/dist/source/components/utilities/utmisc.c vendor-sys/acpica/dist/source/include/acobject.h vendor-sys/acpica/dist/source/include/acpiosxf.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswinxf.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/changes.txt Sat May 19 05:44:32 2012 (r235645) @@ -1,8 +1,70 @@ ---------------------------------------- +18 May 2012. Summary of changes for version 20120518: + + +1) ACPICA Core Subsystem: + +Added a new OSL interface, AcpiOsWaitEventsComplete. This interface is defined +to block until asynchronous events such as notifies and GPEs have completed. +Within ACPICA, it is only called before a notify or GPE handler is +removed/uninstalled. It also may be useful for the host OS within related +drivers such as the Embedded Controller driver. See the ACPICA reference for +additional information. ACPICA BZ 868. + +ACPI Tables: Added a new error message for a possible overflow failure during +the conversion of FADT 32-bit legacy register addresses to internal common 64- +bit GAS structure representation. The GAS has a one-byte "bit length" field, +thus limiting the register length to 255 bits. ACPICA BZ 953. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug +version of the code includes the debug output trace mechanism and has a much +larger code and data size. + + Previous Release: + Non-Debug Version: 92.9K Code, 25.0K Data, 117.9K Total + Debug Version: 172.6K Code, 73.4K Data, 246.0K Total + Current Release: + Non-Debug Version: 93.0K Code, 25.1K Data, 118.1K Total + Debug Version: 172.7K Code, 73.6K Data, 246.3K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Added the ACPI 5.0 "PCC" keyword for use in the Register() ASL macro. +This keyword was added late in the ACPI 5.0 release cycle and was not +implemented until now. + +Disassembler: Added support for Operation Region externals. Adds missing +support for operation regions that are defined in another table, and +referenced locally via a Field or BankField ASL operator. Now generates the +correct External statement. + +Disassembler: Several additional fixes for the External() statement generation +related to some ASL operators. Also, order the External() statements +alphabetically in the disassembler output. Fixes the External() generation for +the Create* field, Alias, and Scope operators: + 1) Create* buffer field operators - fix type mismatch warning on disassembly + 2) Alias - implement missing External support + 3) Scope - fix to make sure all necessary externals are emitted. + +iASL: Improved pathname support. For include files, merge the prefix pathname +with the file pathname and eliminate unnecessary components. Convert +backslashes in all pathnames to forward slashes, for readability. Include file +pathname changes affect both #include and Include() type operators. + +iASL/DTC/Preprocessor: Gracefully handle early EOF. Handle an EOF at the end +of a valid line by inserting a newline and then returning the EOF during the +next call to GetNextLine. Prevents the line from being ignored due to EOF +condition. + +iASL: Implemented some changes to enhance the IDE support (-vi option.) Error +and Warning messages are now correctly recognized for both the source code +browser and the global error and warning counts. + +---------------------------------------- 20 April 2012. Summary of changes for version 20120420: -This release is available at www.acpica.org/downloads. -The ACPI 5.0 specification is available at www.acpi.info. 1) ACPICA Core Subsystem: @@ -68,8 +130,6 @@ several extraneous "unrecognized operato ---------------------------------------- 20 March 2012. Summary of changes for version 20120320: -This release is available at www.acpica.org/downloads. -The ACPI 5.0 specification is available at www.acpi.info. 1) ACPICA Core Subsystem: @@ -160,8 +220,6 @@ Versions supported: ---------------------------------------- 15 February 2012. Summary of changes for version 20120215: -This release is available at www.acpica.org/downloads. -The ACPI 5.0 specification is available at www.acpi.info. 1) ACPICA Core Subsystem: @@ -252,8 +310,6 @@ specification. ---------------------------------------- 11 January 2012. Summary of changes for version 20120111: -This release is available at www.acpica.org/downloads. -The ACPI 5.0 specification is available at www.acpi.info. 1) ACPICA Core Subsystem: Modified: vendor-sys/acpica/dist/generate/release/build.sh ============================================================================== --- vendor-sys/acpica/dist/generate/release/build.sh Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/generate/release/build.sh Sat May 19 05:44:32 2012 (r235645) @@ -37,7 +37,7 @@ # Configuration -ZIP_UTILITY="c:/windows/pkzip25.exe" +ZIP_UTILITY="/cygdrive/c/windows/pkzip25.exe" ACPISRC="libraries/acpisrc.exe" DOS2UNIX="dos2unix" UNIX2DOS="unix2dos" Modified: vendor-sys/acpica/dist/source/common/adfile.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adfile.c Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/common/adfile.c Sat May 19 05:44:32 2012 (r235645) @@ -298,20 +298,24 @@ FlSplitInputPathname ( return (AE_NO_MEMORY); } - Substring = strrchr (DirectoryPath, '\\'); + /* Convert backslashes to slashes in the entire path */ + + UtConvertBackslashes (DirectoryPath); + + /* Backup to last slash or colon */ + + Substring = strrchr (DirectoryPath, '/'); if (!Substring) { - Substring = strrchr (DirectoryPath, '/'); - if (!Substring) - { - Substring = strrchr (DirectoryPath, ':'); - } + Substring = strrchr (DirectoryPath, ':'); } + /* Extract the simple filename */ + if (!Substring) { + Filename = FlStrdup (DirectoryPath); DirectoryPath[0] = 0; - Filename = FlStrdup (InputPath); } else { @@ -326,7 +330,6 @@ FlSplitInputPathname ( *OutDirectoryPath = DirectoryPath; *OutFilename = Filename; - return (AE_OK); } Modified: vendor-sys/acpica/dist/source/common/adwalk.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adwalk.c Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/common/adwalk.c Sat May 19 05:44:32 2012 (r235645) @@ -521,6 +521,7 @@ AcpiDmFindOrphanDescending ( if ((OpInfo->Class != AML_CLASS_EXECUTE) && (OpInfo->Class != AML_CLASS_CREATE) && + (OpInfo->ObjectType != ACPI_TYPE_LOCAL_ALIAS) && (ParentOp->Common.AmlOpcode != AML_INT_METHODCALL_OP) && !Op->Common.Node) { @@ -743,13 +744,23 @@ AcpiDmXrefDescendingOp ( if (OpInfo->Flags & AML_NAMED) { - if ((Op->Common.AmlOpcode == AML_ALIAS_OP) || - (Op->Common.AmlOpcode == AML_SCOPE_OP)) + /* + * Only these two operators (Alias, Scope) refer to an existing + * name, it is the first argument + */ + if (Op->Common.AmlOpcode == AML_ALIAS_OP) + { + ObjectType = ACPI_TYPE_ANY; + + NextOp = Op->Common.Value.Arg; + NextOp = NextOp->Common.Value.Arg; + if (NextOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP) + { + Path = NextOp->Common.Value.String; + } + } + else if (Op->Common.AmlOpcode == AML_SCOPE_OP) { - /* - * Only these two operators refer to an existing name, - * first argument - */ Path = (char *) Op->Named.Path; } } @@ -757,6 +768,8 @@ AcpiDmXrefDescendingOp ( { /* Referenced Buffer Name is the first child */ + ObjectType = ACPI_TYPE_BUFFER; /* Change from TYPE_BUFFER_FIELD */ + NextOp = Op->Common.Value.Arg; if (NextOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP) { @@ -783,6 +796,11 @@ AcpiDmXrefDescendingOp ( Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, WalkState, &Node); + if (ACPI_SUCCESS (Status) && (Node->Flags & ANOBJ_IS_EXTERNAL)) + { + Status = AE_NOT_FOUND; + } + if (ACPI_FAILURE (Status)) { if (Status == AE_NOT_FOUND) Modified: vendor-sys/acpica/dist/source/common/dmextern.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmextern.c Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/common/dmextern.c Sat May 19 05:44:32 2012 (r235645) @@ -454,12 +454,12 @@ AcpiDmAddToExternalList ( NewExternal->InternalPath = Path; - /* Link the new descriptor into the global list, ordered by string length */ + /* Link the new descriptor into the global list, alphabetically ordered */ NextExternal = AcpiGbl_ExternalList; while (NextExternal) { - if (NewExternal->Length <= NextExternal->Length) + if (AcpiUtStricmp (NewExternal->Path, NextExternal->Path) < 0) { if (PrevExternal) { @@ -508,7 +508,7 @@ AcpiDmAddExternalsToNamespace ( { ACPI_STATUS Status; ACPI_NAMESPACE_NODE *Node; - ACPI_OPERAND_OBJECT *MethodDesc; + ACPI_OPERAND_OBJECT *ObjDesc; ACPI_EXTERNAL_LIST *External = AcpiGbl_ExternalList; @@ -527,13 +527,29 @@ AcpiDmAddExternalsToNamespace ( "while adding external to namespace [%s]", External->Path)); } - else if (External->Type == ACPI_TYPE_METHOD) + + else switch (External->Type) { + case ACPI_TYPE_METHOD: + /* For methods, we need to save the argument count */ - MethodDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD); - MethodDesc->Method.ParamCount = (UINT8) External->Value; - Node->Object = MethodDesc; + ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD); + ObjDesc->Method.ParamCount = (UINT8) External->Value; + Node->Object = ObjDesc; + break; + + case ACPI_TYPE_REGION: + + /* Regions require a region sub-object */ + + ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION); + ObjDesc->Region.Node = Node; + Node->Object = ObjDesc; + break; + + default: + break; } External = External->Next; Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompile.c Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Sat May 19 05:44:32 2012 (r235645) @@ -59,12 +59,12 @@ CmFlushSourceCode ( static void FlConsumeAnsiComment ( - ASL_FILE_INFO *FileInfo, + FILE *Handle, ASL_FILE_STATUS *Status); static void FlConsumeNewComment ( - ASL_FILE_INFO *FileInfo, + FILE *Handle, ASL_FILE_STATUS *Status); @@ -253,7 +253,8 @@ CmFlushSourceCode ( * * FUNCTION: FlConsume* * - * PARAMETERS: FileInfo - Points to an open input file + * PARAMETERS: Handle - Open input file + * Status - File current status struct * * RETURN: Number of lines consumed * @@ -263,14 +264,14 @@ CmFlushSourceCode ( static void FlConsumeAnsiComment ( - ASL_FILE_INFO *FileInfo, + FILE *Handle, ASL_FILE_STATUS *Status) { UINT8 Byte; BOOLEAN ClosingComment = FALSE; - while (fread (&Byte, 1, 1, FileInfo->Handle)) + while (fread (&Byte, 1, 1, Handle)) { /* Scan until comment close is found */ @@ -307,13 +308,13 @@ FlConsumeAnsiComment ( static void FlConsumeNewComment ( - ASL_FILE_INFO *FileInfo, + FILE *Handle, ASL_FILE_STATUS *Status) { UINT8 Byte; - while (fread (&Byte, 1, 1, FileInfo->Handle)) + while (fread (&Byte, 1, 1, Handle)) { Status->Offset++; @@ -332,7 +333,9 @@ FlConsumeNewComment ( * * FUNCTION: FlCheckForAscii * - * PARAMETERS: FileInfo - Points to an open input file + * PARAMETERS: Handle - Open input file + * Filename - Input filename + * DisplayErrors - TRUE if error messages desired * * RETURN: Status * @@ -347,7 +350,9 @@ FlConsumeNewComment ( ACPI_STATUS FlCheckForAscii ( - ASL_FILE_INFO *FileInfo) + FILE *Handle, + char *Filename, + BOOLEAN DisplayErrors) { UINT8 Byte; ACPI_SIZE BadBytes = 0; @@ -360,7 +365,7 @@ FlCheckForAscii ( /* Read the entire file */ - while (fread (&Byte, 1, 1, FileInfo->Handle)) + while (fread (&Byte, 1, 1, Handle)) { /* Ignore comment fields (allow non-ascii within) */ @@ -370,12 +375,12 @@ FlCheckForAscii ( if (Byte == '*') { - FlConsumeAnsiComment (FileInfo, &Status); + FlConsumeAnsiComment (Handle, &Status); } if (Byte == '/') { - FlConsumeNewComment (FileInfo, &Status); + FlConsumeNewComment (Handle, &Status); } /* Reset */ @@ -391,7 +396,7 @@ FlCheckForAscii ( if (!ACPI_IS_ASCII (Byte)) { - if (BadBytes < 10) + if ((BadBytes < 10) && (DisplayErrors)) { AcpiOsPrintf ( "Non-ASCII character [0x%2.2X] found in line %u, file offset 0x%.2X\n", @@ -413,20 +418,24 @@ FlCheckForAscii ( /* Seek back to the beginning of the source file */ - fseek (FileInfo->Handle, 0, SEEK_SET); + fseek (Handle, 0, SEEK_SET); /* Were there any non-ASCII characters in the file? */ if (BadBytes) { - AcpiOsPrintf ( - "%u non-ASCII characters found in input source text, could be a binary file\n", - BadBytes); - AslError (ASL_ERROR, ASL_MSG_NON_ASCII, NULL, FileInfo->Filename); + if (DisplayErrors) + { + AcpiOsPrintf ( + "%u non-ASCII characters found in input source text, could be a binary file\n", + BadBytes); + AslError (ASL_ERROR, ASL_MSG_NON_ASCII, NULL, Filename); + } + return (AE_BAD_CHARACTER); } - /* File is OK */ + /* File is OK (100% ASCII) */ return (AE_OK); } Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Sat May 19 05:44:32 2012 (r235645) @@ -166,7 +166,9 @@ CmCleanupAndExit ( ACPI_STATUS FlCheckForAscii ( - ASL_FILE_INFO *FileInfo); + FILE *Handle, + char *Filename, + BOOLEAN DisplayErrors); /* @@ -608,6 +610,11 @@ void FlAddIncludeDirectory ( char *Dir); +char * +FlMergePathnames ( + char *PrefixDir, + char *FilePathname); + void FlOpenIncludeFile ( ACPI_PARSE_OBJECT *Op); Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.l ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.l Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.l Sat May 19 05:44:32 2012 (r235645) @@ -523,6 +523,7 @@ NamePathTail [.]{NameSeg} "IPMI" { count (0); return (PARSEOP_REGIONSPACE_IPMI); } "GeneralPurposeIo" { count (0); return (PARSEOP_REGIONSPACE_GPIO); } /* ACPI 5.0 */ "GenericSerialBus" { count (0); return (PARSEOP_REGIONSPACE_GSBUS); } /* ACPI 5.0 */ +"PCC" { count (0); return (PARSEOP_REGIONSPACE_PCC); } /* ACPI 5.0 */ "FFixedHW" { count (0); return (PARSEOP_REGIONSPACE_FFIXEDHW); } /* ResourceTypeKeyword: Resource Usage - Resource Descriptors */ Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.y Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.y Sat May 19 05:44:32 2012 (r235645) @@ -363,6 +363,7 @@ void * AslLocalAllo %token PARSEOP_REGIONSPACE_IO %token PARSEOP_REGIONSPACE_IPMI %token PARSEOP_REGIONSPACE_MEM +%token PARSEOP_REGIONSPACE_PCC %token PARSEOP_REGIONSPACE_PCI %token PARSEOP_REGIONSPACE_PCIBAR %token PARSEOP_REGIONSPACE_SMBUS @@ -2359,6 +2360,7 @@ RegionSpaceKeyword | PARSEOP_REGIONSPACE_IPMI {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_IPMI);} | PARSEOP_REGIONSPACE_GPIO {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_GPIO);} | PARSEOP_REGIONSPACE_GSBUS {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_GSBUS);} + | PARSEOP_REGIONSPACE_PCC {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCC);} | PARSEOP_REGIONSPACE_FFIXEDHW {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_FFIXEDHW);} ; Modified: vendor-sys/acpica/dist/source/compiler/aslerror.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslerror.c Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/compiler/aslerror.c Sat May 19 05:44:32 2012 (r235645) @@ -315,12 +315,16 @@ AePrintException ( } else { + /* + * Less verbose version of the error message, enabled via the + * -vi switch. The format is compatible with MS Visual Studio. + */ fprintf (OutputFile, "%s", Enode->Filename); if (Enode->LineNumber) { - fprintf (OutputFile, "(%u) i:%6u : ", - Enode->LineNumber, Enode->LineNumber); + fprintf (OutputFile, "(%u) : ", + Enode->LineNumber); } } } @@ -335,9 +339,18 @@ AePrintException ( { /* Decode the message ID */ - fprintf (OutputFile, "%s %4.4d - ", - AslErrorLevel[Enode->Level], - Enode->MessageId + ((Enode->Level+1) * 1000)); + if (Gbl_VerboseErrors) + { + fprintf (OutputFile, "%s %4.4d - ", + AslErrorLevel[Enode->Level], + Enode->MessageId + ((Enode->Level+1) * 1000)); + } + else /* IDE case */ + { + fprintf (OutputFile, "%s %4.4d:", + AslErrorLevelIde[Enode->Level], + Enode->MessageId + ((Enode->Level+1) * 1000)); + } MainMessage = AslMessages[Enode->MessageId]; ExtraMessage = Enode->Message; Modified: vendor-sys/acpica/dist/source/compiler/aslfiles.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfiles.c Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/compiler/aslfiles.c Sat May 19 05:44:32 2012 (r235645) @@ -492,6 +492,107 @@ FlAddIncludeDirectory ( /******************************************************************************* * + * FUNCTION: FlMergePathnames + * + * PARAMETERS: PrefixDir - Prefix directory pathname. Can be NULL or + * a zero length string. + * FilePathname - The include filename from the source ASL. + * + * RETURN: Merged pathname string + * + * DESCRIPTION: Merge two pathnames that (probably) have common elements, to + * arrive at a minimal length string. Merge can occur if the + * FilePathname is relative to the PrefixDir. + * + ******************************************************************************/ + +char * +FlMergePathnames ( + char *PrefixDir, + char *FilePathname) +{ + char *CommonPath; + char *Pathname; + char *LastElement; + + + DbgPrint (ASL_PARSE_OUTPUT, "Include: Prefix path - \"%s\"\n" + "Include: FilePathname - \"%s\"\n", + PrefixDir, FilePathname); + + /* + * If there is no prefix directory or if the file pathname is absolute, + * just return the original file pathname + */ + if (!PrefixDir || (!*PrefixDir) || + (*FilePathname == '/') || + (FilePathname[1] == ':')) + { + Pathname = ACPI_ALLOCATE (strlen (FilePathname) + 1); + strcpy (Pathname, FilePathname); + goto ConvertBackslashes; + } + + /* Need a local copy of the prefix directory path */ + + CommonPath = ACPI_ALLOCATE (strlen (PrefixDir) + 1); + strcpy (CommonPath, PrefixDir); + + /* + * Walk forward through the file path, and simultaneously backward + * through the prefix directory path until there are no more + * relative references at the start of the file path. + */ + while (*FilePathname && (!strncmp (FilePathname, "../", 3))) + { + /* Remove last element of the prefix directory path */ + + LastElement = strrchr (CommonPath, '/'); + if (!LastElement) + { + goto ConcatenatePaths; + } + + *LastElement = 0; /* Terminate CommonPath string */ + FilePathname += 3; /* Point to next path element */ + } + + /* + * Remove the last element of the prefix directory path (it is the same as + * the first element of the file pathname), and build the final merged + * pathname. + */ + LastElement = strrchr (CommonPath, '/'); + if (LastElement) + { + *LastElement = 0; + } + + /* Build the final merged pathname */ + +ConcatenatePaths: + Pathname = ACPI_ALLOCATE_ZEROED (strlen (CommonPath) + strlen (FilePathname) + 2); + if (LastElement && *CommonPath) + { + strcpy (Pathname, CommonPath); + strcat (Pathname, "/"); + } + strcat (Pathname, FilePathname); + ACPI_FREE (CommonPath); + + /* Convert all backslashes to normal slashes */ + +ConvertBackslashes: + UtConvertBackslashes (Pathname); + + DbgPrint (ASL_PARSE_OUTPUT, "Include: Merged Pathname - \"%s\"\n", + Pathname); + return (Pathname); +} + + +/******************************************************************************* + * * FUNCTION: FlOpenIncludeWithPrefix * * PARAMETERS: PrefixDir - Prefix directory pathname. Can be a zero @@ -515,12 +616,9 @@ FlOpenIncludeWithPrefix ( /* Build the full pathname to the file */ - Pathname = ACPI_ALLOCATE (strlen (PrefixDir) + strlen (Filename) + 1); - - strcpy (Pathname, PrefixDir); - strcat (Pathname, Filename); + Pathname = FlMergePathnames (PrefixDir, Filename); - DbgPrint (ASL_PARSE_OUTPUT, "\nAttempt to open include file: path %s\n\n", + DbgPrint (ASL_PARSE_OUTPUT, "Include: Opening file - \"%s\"\n\n", Pathname); /* Attempt to open the file, push if successful */ Modified: vendor-sys/acpica/dist/source/compiler/aslmain.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmain.c Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/compiler/aslmain.c Sat May 19 05:44:32 2012 (r235645) @@ -765,9 +765,18 @@ AslDoOptions ( break; case 'i': - /* Less verbose error messages */ - + /* + * Support for integrated development environment(s). + * + * 1) No compiler signon + * 2) Send stderr messages to stdout + * 3) Less verbose error messages (single line only for each) + * 4) Error/warning messages are formatted appropriately to + * be recognized by MS Visual Studio + */ Gbl_VerboseErrors = FALSE; + Gbl_DoSignon = FALSE; + Gbl_Files[ASL_FILE_STDERR].Handle = stdout; break; case 'o': Modified: vendor-sys/acpica/dist/source/compiler/aslmap.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmap.c Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/compiler/aslmap.c Sat May 19 05:44:32 2012 (r235645) @@ -367,6 +367,7 @@ const ASL_MAPPING_ENTRY AslKeywordMa /* REGIONSPACE_IO */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_SYSTEM_IO, 0, 0), /* REGIONSPACE_IPMI */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_IPMI, 0, 0), /* REGIONSPACE_MEM */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_SYSTEM_MEMORY, 0, 0), +/* REGIONSPACE_PCC */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_PLATFORM_COMM, 0, 0), /* REGIONSPACE_PCI */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_PCI_CONFIG, 0, 0), /* REGIONSPACE_PCIBAR */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_PCI_BAR_TARGET, 0, 0), /* REGIONSPACE_SMBUS */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_SMBUS, 0, 0), Modified: vendor-sys/acpica/dist/source/compiler/aslmessages.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmessages.h Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/compiler/aslmessages.h Sat May 19 05:44:32 2012 (r235645) @@ -402,7 +402,7 @@ char *AslMessages }; -char *AslErrorLevel [ASL_NUM_REPORT_LEVELS] = { +const char *AslErrorLevel [ASL_NUM_REPORT_LEVELS] = { "Warning ", "Warning ", "Warning ", @@ -411,6 +411,15 @@ char *AslErrorLevel [ "Optimize" }; +const char *AslErrorLevelIde [ASL_NUM_REPORT_LEVELS] = { + "warning ", + "warning ", + "warning ", + "error ", + "remark ", + "optimize" +}; + #define ASL_ERROR_LEVEL_LENGTH 8 /* Length of strings above */ #endif /* ASL_EXCEPTIONS */ Modified: vendor-sys/acpica/dist/source/compiler/aslstartup.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslstartup.c Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/compiler/aslstartup.c Sat May 19 05:44:32 2012 (r235645) @@ -227,7 +227,7 @@ AslDetectSourceFileType ( /* Check for 100% ASCII source file (comments are ignored) */ - Status = FlCheckForAscii (Info); + Status = FlCheckForAscii (Info->Handle, Info->Filename, TRUE); if (ACPI_FAILURE (Status)) { printf ("Non-ascii input file - %s\n", Info->Filename); Modified: vendor-sys/acpica/dist/source/compiler/dtio.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtio.c Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/compiler/dtio.c Sat May 19 05:44:32 2012 (r235645) @@ -427,7 +427,6 @@ DtGetNextLine ( { case DT_START_QUOTED_STRING: case DT_SLASH_ASTERISK_COMMENT: - case DT_SLASH_SLASH_COMMENT: AcpiOsPrintf ("**** EOF within comment/string %u\n", State); break; @@ -436,7 +435,22 @@ DtGetNextLine ( break; } - return (ASL_EOF); + /* Standalone EOF is OK */ + + if (i == 0) + { + return (ASL_EOF); + } + + /* + * Received an EOF in the middle of a line. Terminate the + * line with a newline. The next call to this function will + * return a standalone EOF. Thus, the upper parsing software + * never has to deal with an EOF within a valid line (or + * the last line does not get tossed on the floor.) + */ + c = '\n'; + State = DT_NORMAL_TEXT; } switch (State) Modified: vendor-sys/acpica/dist/source/compiler/prscan.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/prscan.c Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/compiler/prscan.c Sat May 19 05:44:32 2012 (r235645) @@ -654,7 +654,7 @@ PrDoDirective ( } DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID - "Start #include file %s\n", Gbl_CurrentLineNumber, + "Start #include file \"%s\"\n", Gbl_CurrentLineNumber, Token, Gbl_CurrentLineNumber); PrOpenIncludeFile (Token); Modified: vendor-sys/acpica/dist/source/compiler/prutils.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/prutils.c Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/compiler/prutils.c Sat May 19 05:44:32 2012 (r235645) @@ -246,13 +246,11 @@ PrOpenIncludeFile ( ASL_INCLUDE_DIR *NextDir; - /* - * start the actual include file on the next line - */ + /* Start the actual include file on the next line */ + Gbl_CurrentLineOffset++; /* Attempt to open the include file */ - /* If the file specifies an absolute path, just open it */ if ((Filename[0] == '/') || @@ -330,13 +328,10 @@ PrOpenIncludeWithPrefix ( /* Build the full pathname to the file */ - Pathname = ACPI_ALLOCATE (strlen (PrefixDir) + strlen (Filename) + 1); + Pathname = FlMergePathnames (PrefixDir, Filename); - strcpy (Pathname, PrefixDir); - strcat (Pathname, Filename); - - DbgPrint (ASL_PARSE_OUTPUT, "\n" PR_PREFIX_ID - "Opening include file: path %s\n", + DbgPrint (ASL_PARSE_OUTPUT, PR_PREFIX_ID + "Include: Opening file - \"%s\"\n", Gbl_CurrentLineNumber, Pathname); /* Attempt to open the file, push if successful */ Modified: vendor-sys/acpica/dist/source/components/debugger/dbfileio.c ============================================================================== --- vendor-sys/acpica/dist/source/components/debugger/dbfileio.c Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/components/debugger/dbfileio.c Sat May 19 05:44:32 2012 (r235645) @@ -51,6 +51,10 @@ #include "actables.h" #endif +#ifdef ACPI_ASL_COMPILER +#include "aslcompiler.h" +#endif + #if (defined ACPI_DEBUGGER || defined ACPI_DISASSEMBLER) #define _COMPONENT ACPI_CA_DEBUGGER @@ -309,6 +313,15 @@ AcpiDbReadTable ( AcpiOsPrintf ( "TableHeader length [0x%X] greater than the input file size [0x%X]\n", TableHeader.Length, FileSize); + +#ifdef ACPI_ASL_COMPILER + Status = FlCheckForAscii (fp, NULL, FALSE); + if (ACPI_SUCCESS (Status)) + { + AcpiOsPrintf ("File appears to be ASCII only, must be binary\n", + TableHeader.Length, FileSize); + } +#endif return (AE_BAD_HEADER); } Modified: vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c ============================================================================== --- vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c Sat May 19 05:44:32 2012 (r235645) @@ -57,6 +57,18 @@ /* Local prototypes */ +#ifdef ACPI_ASL_COMPILER +#include "acdisasm.h" + +static ACPI_STATUS +AcpiDsCreateExternalRegion ( + ACPI_STATUS LookupStatus, + ACPI_PARSE_OBJECT *Op, + char *Path, + ACPI_WALK_STATE *WalkState, + ACPI_NAMESPACE_NODE **Node); +#endif + static ACPI_STATUS AcpiDsGetFieldNames ( ACPI_CREATE_FIELD_INFO *Info, @@ -64,6 +76,69 @@ AcpiDsGetFieldNames ( ACPI_PARSE_OBJECT *Arg); +#ifdef ACPI_ASL_COMPILER +/******************************************************************************* + * + * FUNCTION: AcpiDsCreateExternalRegion (iASL Disassembler only) + * + * PARAMETERS: LookupStatus - Status from NsLookup operation + * Op - Op containing the Field definition and args + * Path - Pathname of the region + * ` WalkState - Current method state + * Node - Where the new region node is returned + * + * RETURN: Status + * + * DESCRIPTION: Add region to the external list if NOT_FOUND. Create a new + * region node/object. + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiDsCreateExternalRegion ( + ACPI_STATUS LookupStatus, + ACPI_PARSE_OBJECT *Op, + char *Path, + ACPI_WALK_STATE *WalkState, + ACPI_NAMESPACE_NODE **Node) +{ + ACPI_STATUS Status; + ACPI_OPERAND_OBJECT *ObjDesc; + + + if (LookupStatus != AE_NOT_FOUND) + { + return (LookupStatus); + } + + /* + * Table disassembly: + * OperationRegion not found. Generate an External for it, and + * insert the name into the namespace. + */ + AcpiDmAddToExternalList (Op, Path, ACPI_TYPE_REGION, 0); + Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_REGION, + ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT, WalkState, Node); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + /* Must create and install a region object for the new node */ + + ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION); + if (!ObjDesc) + { + return (AE_NO_MEMORY); + } + + ObjDesc->Region.Node = *Node; + Status = AcpiNsAttachObject (*Node, ObjDesc, ACPI_TYPE_REGION); + return (Status); +} +#endif + + /******************************************************************************* * * FUNCTION: AcpiDsCreateBufferField @@ -438,11 +513,16 @@ AcpiDsCreateField ( /* First arg is the name of the parent OpRegion (must already exist) */ Arg = Op->Common.Value.Arg; + if (!RegionNode) { Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.Name, ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode); +#ifdef ACPI_ASL_COMPILER + Status = AcpiDsCreateExternalRegion (Status, Arg, + Arg->Common.Value.Name, WalkState, &RegionNode); +#endif if (ACPI_FAILURE (Status)) { ACPI_ERROR_NAMESPACE (Arg->Common.Value.Name, Status); @@ -628,6 +708,10 @@ AcpiDsCreateBankField ( Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.Name, ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode); +#ifdef ACPI_ASL_COMPILER + Status = AcpiDsCreateExternalRegion (Status, Arg, + Arg->Common.Value.Name, WalkState, &RegionNode); +#endif if (ACPI_FAILURE (Status)) { ACPI_ERROR_NAMESPACE (Arg->Common.Value.Name, Status); Modified: vendor-sys/acpica/dist/source/components/events/evxface.c ============================================================================== --- vendor-sys/acpica/dist/source/components/events/evxface.c Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/components/events/evxface.c Sat May 19 05:44:32 2012 (r235645) @@ -280,11 +280,9 @@ AcpiRemoveNotifyHandler ( return_ACPI_STATUS (AE_BAD_PARAMETER); } -#ifdef _UNDER_DEVELOPMENT - /* Make sure all deferred tasks are completed */ + /* Make sure all deferred notify tasks are completed */ - AcpiOsWaitEventsComplete (NULL); -#endif + AcpiOsWaitEventsComplete (); Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); if (ACPI_FAILURE (Status)) @@ -802,6 +800,10 @@ AcpiRemoveGpeHandler ( return_ACPI_STATUS (AE_BAD_PARAMETER); } + /* Make sure all deferred GPE tasks are completed */ + + AcpiOsWaitEventsComplete (); + Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS); if (ACPI_FAILURE (Status)) { Modified: vendor-sys/acpica/dist/source/components/tables/tbfadt.c ============================================================================== --- vendor-sys/acpica/dist/source/components/tables/tbfadt.c Sat May 19 05:14:24 2012 (r235644) +++ vendor-sys/acpica/dist/source/components/tables/tbfadt.c Sat May 19 05:44:32 2012 (r235645) @@ -52,12 +52,13 @@ /* Local prototypes */ -static ACPI_INLINE void +static void AcpiTbInitGenericAddress ( ACPI_GENERIC_ADDRESS *GenericAddress, UINT8 SpaceId, UINT8 ByteWidth, - UINT64 Address); + UINT64 Address, + char *RegisterName); static void AcpiTbConvertFadt ( @@ -202,13 +203,30 @@ static ACPI_FADT_PM_INFO FadtPmInfoTa * ******************************************************************************/ -static ACPI_INLINE void +static void AcpiTbInitGenericAddress ( ACPI_GENERIC_ADDRESS *GenericAddress, UINT8 SpaceId, UINT8 ByteWidth, - UINT64 Address) + UINT64 Address, + char *RegisterName) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat May 19 05:45:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3FADA1065673; Sat, 19 May 2012 05:45:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11D518FC1B; Sat, 19 May 2012 05:45:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4J5jchR003564; Sat, 19 May 2012 05:45:38 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4J5jcXZ003563; Sat, 19 May 2012 05:45:38 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201205190545.q4J5jcXZ003563@svn.freebsd.org> From: Jung-uk Kim Date: Sat, 19 May 2012 05:45:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235646 - vendor-sys/acpica/20120518 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 05:45:39 -0000 Author: jkim Date: Sat May 19 05:45:38 2012 New Revision: 235646 URL: http://svn.freebsd.org/changeset/base/235646 Log: Tag ACPICA 20120518. Added: vendor-sys/acpica/20120518/ - copied from r235645, vendor-sys/acpica/dist/ From owner-svn-src-all@FreeBSD.ORG Sat May 19 12:44:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9698A1065675; Sat, 19 May 2012 12:44:28 +0000 (UTC) (envelope-from gleb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DDE68FC17; Sat, 19 May 2012 12:44:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JCiSp6022431; Sat, 19 May 2012 12:44:28 GMT (envelope-from gleb@svn.freebsd.org) Received: (from gleb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JCiSmO022413; Sat, 19 May 2012 12:44:28 GMT (envelope-from gleb@svn.freebsd.org) Message-Id: <201205191244.q4JCiSmO022413@svn.freebsd.org> From: Gleb Kurtsou Date: Sat, 19 May 2012 12:44:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235647 - in head: include lib/libc/gen usr.sbin/cpucontrol usr.sbin/lpr/common_source usr.sbin/newsyslog X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 12:44:28 -0000 Author: gleb Date: Sat May 19 12:44:27 2012 New Revision: 235647 URL: http://svn.freebsd.org/changeset/base/235647 Log: Hide DIR definition by making it an opaque struct typedef. Introduce dirfd() libc exported symbol replacing macro with same name, preserve _dirfd() macro for internal use. Replace dirp->dd_fd with dirfd() call. Avoid using dirfd as variable name to prevent shadowing global symbol. Sponsored by: Google Summer Of Code 2011 Added: head/lib/libc/gen/dirfd.c (contents, props changed) head/lib/libc/gen/gen-private.h (contents, props changed) Modified: head/include/dirent.h head/lib/libc/gen/Makefile.inc head/lib/libc/gen/Symbol.map head/lib/libc/gen/closedir.c head/lib/libc/gen/fts-compat.c head/lib/libc/gen/fts.c head/lib/libc/gen/getcwd.c head/lib/libc/gen/opendir.c head/lib/libc/gen/readdir.c head/lib/libc/gen/rewinddir.c head/lib/libc/gen/seekdir.c head/lib/libc/gen/telldir.c head/usr.sbin/cpucontrol/cpucontrol.c head/usr.sbin/lpr/common_source/common.c head/usr.sbin/newsyslog/newsyslog.c Modified: head/include/dirent.h ============================================================================== --- head/include/dirent.h Sat May 19 05:45:38 2012 (r235646) +++ head/include/dirent.h Sat May 19 12:44:27 2012 (r235647) @@ -55,24 +55,8 @@ /* definitions for library routines operating on directories. */ #define DIRBLKSIZ 1024 -struct _telldir; /* see telldir.h */ -struct pthread_mutex; - -/* structure describing an open directory. */ -typedef struct _dirdesc { - int dd_fd; /* file descriptor associated with directory */ - long dd_loc; /* offset in current buffer */ - long dd_size; /* amount of data returned by getdirentries */ - char *dd_buf; /* data buffer */ - int dd_len; /* size of data buffer */ - long dd_seek; /* magic cookie returned by getdirentries */ - long dd_rewind; /* magic cookie for rewinding */ - int dd_flags; /* flags for readdir */ - struct pthread_mutex *dd_lock; /* lock */ - struct _telldir *dd_td; /* telldir position recording */ -} DIR; - -#define dirfd(dirp) ((dirp)->dd_fd) +struct _dirdesc; +typedef struct _dirdesc DIR; /* flags for opendir2 */ #define DTF_HIDEW 0x0001 /* hide whiteout entries */ @@ -91,6 +75,7 @@ typedef void * DIR; __BEGIN_DECLS #if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 700 int alphasort(const struct dirent **, const struct dirent **); +int dirfd(DIR *); #endif #if __BSD_VISIBLE DIR *__opendir2(const char *, int); Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Sat May 19 05:45:38 2012 (r235646) +++ head/lib/libc/gen/Makefile.inc Sat May 19 12:44:27 2012 (r235647) @@ -9,7 +9,7 @@ SRCS+= __getosreldate.c __xuname.c \ _thread_init.c \ alarm.c arc4random.c assert.c aux.c basename.c check_utility_compat.c \ clock.c closedir.c confstr.c \ - crypt.c ctermid.c daemon.c devname.c dirname.c disklabel.c \ + crypt.c ctermid.c daemon.c devname.c dirfd.c dirname.c disklabel.c \ dlfcn.c drand48.c elf_utils.c erand48.c err.c errlst.c errno.c \ exec.c fdevname.c feature_present.c fmtcheck.c fmtmsg.c fnmatch.c \ fpclassify.c frexp.c fstab.c ftok.c fts.c fts-compat.c ftw.c \ Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Sat May 19 05:45:38 2012 (r235646) +++ head/lib/libc/gen/Symbol.map Sat May 19 12:44:27 2012 (r235647) @@ -382,6 +382,7 @@ FBSD_1.2 { }; FBSD_1.3 { + dirfd; fdlopen; __FreeBSD_libc_enter_restricted_mode; getcontextx; Modified: head/lib/libc/gen/closedir.c ============================================================================== --- head/lib/libc/gen/closedir.c Sat May 19 05:45:38 2012 (r235646) +++ head/lib/libc/gen/closedir.c Sat May 19 12:44:27 2012 (r235647) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "libc_private.h" +#include "gen-private.h" #include "telldir.h" /* Added: head/lib/libc/gen/dirfd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/gen/dirfd.c Sat May 19 12:44:27 2012 (r235647) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "namespace.h" +#include + +#include +#include "un-namespace.h" + +#include "gen-private.h" + +int +dirfd(DIR *dirp) +{ + + return (_dirfd(dirp)); +} Modified: head/lib/libc/gen/fts-compat.c ============================================================================== --- head/lib/libc/gen/fts-compat.c Sat May 19 05:45:38 2012 (r235646) +++ head/lib/libc/gen/fts-compat.c Sat May 19 12:44:27 2012 (r235647) @@ -52,6 +52,8 @@ __FBSDID("$FreeBSD$"); #include "fts-compat.h" #include "un-namespace.h" +#include "gen-private.h" + FTSENT *__fts_children_44bsd(FTS *, int); int __fts_close_44bsd(FTS *); void *__fts_get_clientptr_44bsd(FTS *); @@ -711,7 +713,7 @@ fts_build(sp, type) */ cderrno = 0; if (nlinks || type == BREAD) { - if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) { + if (fts_safe_changedir(sp, cur, _dirfd(dirp), NULL)) { if (nlinks && type == BREAD) cur->fts_errno = errno; cur->fts_flags |= FTS_DONTCHDIR; Modified: head/lib/libc/gen/fts.c ============================================================================== --- head/lib/libc/gen/fts.c Sat May 19 05:45:38 2012 (r235646) +++ head/lib/libc/gen/fts.c Sat May 19 12:44:27 2012 (r235647) @@ -52,6 +52,8 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" +#include "gen-private.h" + static FTSENT *fts_alloc(FTS *, char *, size_t); static FTSENT *fts_build(FTS *, int); static void fts_lfree(FTSENT *); @@ -697,7 +699,7 @@ fts_build(FTS *sp, int type) */ cderrno = 0; if (nlinks || type == BREAD) { - if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) { + if (fts_safe_changedir(sp, cur, _dirfd(dirp), NULL)) { if (nlinks && type == BREAD) cur->fts_errno = errno; cur->fts_flags |= FTS_DONTCHDIR; Added: head/lib/libc/gen/gen-private.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/gen/gen-private.h Sat May 19 12:44:27 2012 (r235647) @@ -0,0 +1,59 @@ +/*- + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _GEN_PRIVATE_H_ +#define _GEN_PRIVATE_H_ + +struct _telldir; /* see telldir.h */ +struct pthread_mutex; + +/* + * Structure describing an open directory. + * + * NOTE. Change structure layout with care, at least dd_fd field has to + * remain unchanged to guarantee backward compatibility. + */ +struct _dirdesc { + int dd_fd; /* file descriptor associated with directory */ + long dd_loc; /* offset in current buffer */ + long dd_size; /* amount of data returned by getdirentries */ + char *dd_buf; /* data buffer */ + int dd_len; /* size of data buffer */ + long dd_seek; /* magic cookie returned by getdirentries */ + long dd_rewind; /* magic cookie for rewinding */ + int dd_flags; /* flags for readdir */ + struct pthread_mutex *dd_lock; /* lock */ + struct _telldir *dd_td; /* telldir position recording */ +}; + +#define _dirfd(dirp) ((dirp)->dd_fd) + +#endif /* !_GEN_PRIVATE_H_ */ Modified: head/lib/libc/gen/getcwd.c ============================================================================== --- head/lib/libc/gen/getcwd.c Sat May 19 05:45:38 2012 (r235646) +++ head/lib/libc/gen/getcwd.c Sat May 19 12:44:27 2012 (r235647) @@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" +#include "gen-private.h" + #define ISDOT(dp) \ (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \ (dp->d_name[1] == '.' && dp->d_name[2] == '\0'))) @@ -117,7 +119,7 @@ getcwd(pt, size) for (first = 1;; first = 0) { /* Stat the current level. */ - if (dir != NULL ? _fstat(dirfd(dir), &s) : lstat(".", &s)) + if (dir != NULL ? _fstat(_dirfd(dir), &s) : lstat(".", &s)) goto err; /* Save current node values. */ @@ -139,13 +141,13 @@ getcwd(pt, size) } /* Open and stat parent directory. */ - fd = _openat(dir != NULL ? dirfd(dir) : AT_FDCWD, + fd = _openat(dir != NULL ? _dirfd(dir) : AT_FDCWD, "..", O_RDONLY); if (fd == -1) goto err; if (dir) (void) closedir(dir); - if (!(dir = fdopendir(fd)) || _fstat(dirfd(dir), &s)) { + if (!(dir = fdopendir(fd)) || _fstat(_dirfd(dir), &s)) { _close(fd); goto err; } @@ -171,7 +173,7 @@ getcwd(pt, size) continue; /* Save the first error for later. */ - if (fstatat(dirfd(dir), dp->d_name, &s, + if (fstatat(_dirfd(dir), dp->d_name, &s, AT_SYMLINK_NOFOLLOW)) { if (!save_errno) save_errno = errno; Modified: head/lib/libc/gen/opendir.c ============================================================================== --- head/lib/libc/gen/opendir.c Sat May 19 05:45:38 2012 (r235646) +++ head/lib/libc/gen/opendir.c Sat May 19 12:44:27 2012 (r235647) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" +#include "gen-private.h" #include "telldir.h" static DIR * __opendir_common(int, const char *, int); Modified: head/lib/libc/gen/readdir.c ============================================================================== --- head/lib/libc/gen/readdir.c Sat May 19 05:45:38 2012 (r235646) +++ head/lib/libc/gen/readdir.c Sat May 19 12:44:27 2012 (r235647) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "libc_private.h" +#include "gen-private.h" #include "telldir.h" /* Modified: head/lib/libc/gen/rewinddir.c ============================================================================== --- head/lib/libc/gen/rewinddir.c Sat May 19 05:45:38 2012 (r235646) +++ head/lib/libc/gen/rewinddir.c Sat May 19 12:44:27 2012 (r235647) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "gen-private.h" #include "telldir.h" void Modified: head/lib/libc/gen/seekdir.c ============================================================================== --- head/lib/libc/gen/seekdir.c Sat May 19 05:45:38 2012 (r235646) +++ head/lib/libc/gen/seekdir.c Sat May 19 12:44:27 2012 (r235647) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "libc_private.h" +#include "gen-private.h" #include "telldir.h" /* Modified: head/lib/libc/gen/telldir.c ============================================================================== --- head/lib/libc/gen/telldir.c Sat May 19 05:45:38 2012 (r235646) +++ head/lib/libc/gen/telldir.c Sat May 19 12:44:27 2012 (r235647) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "libc_private.h" +#include "gen-private.h" #include "telldir.h" /* Modified: head/usr.sbin/cpucontrol/cpucontrol.c ============================================================================== --- head/usr.sbin/cpucontrol/cpucontrol.c Sat May 19 05:45:38 2012 (r235646) +++ head/usr.sbin/cpucontrol/cpucontrol.c Sat May 19 12:44:27 2012 (r235647) @@ -292,7 +292,7 @@ do_update(const char *dev) int error; struct ucode_handler *handler; struct datadir *dir; - DIR *dirfd; + DIR *dirp; struct dirent *direntry; char buf[MAXPATHLEN]; @@ -321,12 +321,12 @@ do_update(const char *dev) * Process every image in specified data directories. */ SLIST_FOREACH(dir, &datadirs, next) { - dirfd = opendir(dir->path); - if (dirfd == NULL) { + dirp = opendir(dir->path); + if (dirp == NULL) { WARNX(1, "skipping directory %s: not accessible", dir->path); continue; } - while ((direntry = readdir(dirfd)) != NULL) { + while ((direntry = readdir(dirp)) != NULL) { if (direntry->d_namlen == 0) continue; error = snprintf(buf, sizeof(buf), "%s/%s", dir->path, @@ -340,7 +340,7 @@ do_update(const char *dev) } handler->update(dev, buf); } - error = closedir(dirfd); + error = closedir(dirp); if (error != 0) WARN(0, "closedir(%s)", dir->path); } Modified: head/usr.sbin/lpr/common_source/common.c ============================================================================== --- head/usr.sbin/lpr/common_source/common.c Sat May 19 05:45:38 2012 (r235646) +++ head/usr.sbin/lpr/common_source/common.c Sat May 19 12:44:27 2012 (r235647) @@ -130,7 +130,7 @@ getq(const struct printer *pp, struct jo seteuid(uid); return (-1); } - if (fstat(dirp->dd_fd, &stbuf) < 0) + if (fstat(dirfd(dirp), &stbuf) < 0) goto errdone; seteuid(uid); Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Sat May 19 05:45:38 2012 (r235646) +++ head/usr.sbin/newsyslog/newsyslog.c Sat May 19 12:44:27 2012 (r235647) @@ -1451,7 +1451,7 @@ static void delete_oldest_timelog(const struct conf_entry *ent, const char *archive_dir) { char *logfname, *s, *dir, errbuf[80]; - int dirfd, i, logcnt, max_logcnt, valid; + int dir_fd, i, logcnt, max_logcnt, valid; struct oldlog_entry *oldlogs; size_t logfname_len; struct dirent *dp; @@ -1486,7 +1486,7 @@ delete_oldest_timelog(const struct conf_ /* First we create a 'list' of all archived logfiles */ if ((dirp = opendir(dir)) == NULL) err(1, "Cannot open log directory '%s'", dir); - dirfd = dirfd(dirp); + dir_fd = dirfd(dirp); while ((dp = readdir(dirp)) != NULL) { if (dp->d_type != DT_REG) continue; @@ -1578,7 +1578,7 @@ delete_oldest_timelog(const struct conf_ if (noaction) printf("\trm -f %s/%s\n", dir, oldlogs[i].fname); - else if (unlinkat(dirfd, oldlogs[i].fname, 0) != 0) { + else if (unlinkat(dir_fd, oldlogs[i].fname, 0) != 0) { snprintf(errbuf, sizeof(errbuf), "Could not delet old logfile '%s'", oldlogs[i].fname); From owner-svn-src-all@FreeBSD.ORG Sat May 19 13:38:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D838B106564A; Sat, 19 May 2012 13:38:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 518538FC12; Sat, 19 May 2012 13:38:14 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4JDc8cT091976; Sat, 19 May 2012 16:38:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q4JDc8eI099149; Sat, 19 May 2012 16:38:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4JDc8W8099148; Sat, 19 May 2012 16:38:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 19 May 2012 16:38:08 +0300 From: Konstantin Belousov To: Gleb Kurtsou Message-ID: <20120519133808.GI2358@deviant.kiev.zoral.com.ua> References: <201205191244.q4JCiSmO022413@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vDuE8pp2+RlIQOrG" Content-Disposition: inline In-Reply-To: <201205191244.q4JCiSmO022413@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r235647 - in head: include lib/libc/gen usr.sbin/cpucontrol usr.sbin/lpr/common_source usr.sbin/newsyslog X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 13:38:15 -0000 --vDuE8pp2+RlIQOrG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 19, 2012 at 12:44:28PM +0000, Gleb Kurtsou wrote: > Author: gleb > Date: Sat May 19 12:44:27 2012 > New Revision: 235647 > URL: http://svn.freebsd.org/changeset/base/235647 >=20 > Log: > Hide DIR definition by making it an opaque struct typedef. > =20 > Introduce dirfd() libc exported symbol replacing macro with same name, > preserve _dirfd() macro for internal use. > =20 > Replace dirp->dd_fd with dirfd() call. Avoid using dirfd as variable > name to prevent shadowing global symbol. > =20 > Sponsored by: Google Summer Of Code 2011 >=20 > Added: > head/lib/libc/gen/dirfd.c (contents, props changed) > head/lib/libc/gen/gen-private.h (contents, props changed) I could agree with attribution of the gen-private.h content to 'regents of the university' in the copyright, but I very much doubt that this is right thing to do for dirfd.c. I think you should put your name, instead of university, as the copyright owner. --vDuE8pp2+RlIQOrG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+3okAACgkQC3+MBN1Mb4jcUQCfcTQ3I5WQwzlC2g8OXFotoxvR X10An23kNkiB2tLNwtPk2fZiWPQR8tYB =bLfw -----END PGP SIGNATURE----- --vDuE8pp2+RlIQOrG-- From owner-svn-src-all@FreeBSD.ORG Sat May 19 14:13:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C19F8106566C; Sat, 19 May 2012 14:13:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ABB788FC08; Sat, 19 May 2012 14:13:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JEDGxG026281; Sat, 19 May 2012 14:13:16 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JEDGCD026278; Sat, 19 May 2012 14:13:16 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205191413.q4JEDGCD026278@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 19 May 2012 14:13:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235648 - stable/7/usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 14:13:16 -0000 Author: bz Date: Sat May 19 14:13:16 2012 New Revision: 235648 URL: http://svn.freebsd.org/changeset/base/235648 Log: MFC r222589: There are a couple of structs in mfireg.h with members named 'class'. These cause problems when trying to include the header in a C++ project. Rename them to 'evt_class', and track the change in mfi and mfiutil. Submitted by: Mark Johnston Sponsored by: Sandvine Incorporated Missed with: r235636 Submitted by: Oliver Pinter (oliver.pntr gmail.com) to unbreak the build Modified: stable/7/usr.sbin/mfiutil/mfi_evt.c Directory Properties: stable/7/usr.sbin/mfiutil/ (props changed) Modified: stable/7/usr.sbin/mfiutil/mfi_evt.c ============================================================================== --- stable/7/usr.sbin/mfiutil/mfi_evt.c Sat May 19 12:44:27 2012 (r235647) +++ stable/7/usr.sbin/mfiutil/mfi_evt.c Sat May 19 14:13:16 2012 (r235648) @@ -363,8 +363,8 @@ mfi_decode_evt(int fd, struct mfi_evt_de { printf("%5d (%s/%s/%s) - ", detail->seq, format_timestamp(detail->time), - format_locale(detail->class.members.locale), - format_class(detail->class.members.class)); + format_locale(detail->evt_class.members.locale), + format_class(detail->evt_class.members.evt_class)); switch (detail->arg_type) { case MR_EVT_ARGS_NONE: break; @@ -559,7 +559,7 @@ show_events(int ac, char **av) num_events = 15; filter.members.reserved = 0; filter.members.locale = MFI_EVT_LOCALE_ALL; - filter.members.class = MFI_EVT_CLASS_WARNING; + filter.members.evt_class = MFI_EVT_CLASS_WARNING; start = info.boot_seq_num; stop = info.newest_seq_num; verbose = 0; @@ -569,7 +569,7 @@ show_events(int ac, char **av) while ((ch = getopt(ac, av, "c:l:n:v")) != -1) { switch (ch) { case 'c': - if (parse_class(optarg, &filter.members.class) < 0) { + if (parse_class(optarg, &filter.members.evt_class) < 0) { error = errno; warn("Error parsing event class"); close(fd); From owner-svn-src-all@FreeBSD.ORG Sat May 19 14:15:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EF827106567B; Sat, 19 May 2012 14:15:39 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) by mx1.freebsd.org (Postfix) with ESMTP id 9963C8FC16; Sat, 19 May 2012 14:15:39 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 0E14F25D3897; Sat, 19 May 2012 14:15:37 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id EB398BE748A; Sat, 19 May 2012 14:15:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id zIcknlT2yHVN; Sat, 19 May 2012 14:15:36 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id F157EBE7489; Sat, 19 May 2012 14:15:35 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: Date: Sat, 19 May 2012 14:15:34 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <72892663-EFC5-4050-8D46-162BCCCD46AA@FreeBSD.org> References: <201205182329.q4INTU4X086651@svn.freebsd.org> To: Oliver Pinter X-Mailer: Apple Mail (2.1084) Cc: svn-src-stable@freebsd.org, Sean Bruno , src-committers@freebsd.org, svn-src-stable-7@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r235636 - in stable/7/sys: conf dev/mfi modules/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 14:15:40 -0000 On 19. May 2012, at 00:37 , Oliver Pinter wrote: > <20120519023614-mfi-compile-fix-after-r235636.diff> I did a proper MFC of the missing change; I think stable/7 should be = good now. Thanks! /bz going to look at 8 and the others now as well. --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Sat May 19 14:30:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E1F21106564A; Sat, 19 May 2012 14:30:49 +0000 (UTC) (envelope-from gleb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC7F48FC19; Sat, 19 May 2012 14:30:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JEUnf6027111; Sat, 19 May 2012 14:30:49 GMT (envelope-from gleb@svn.freebsd.org) Received: (from gleb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JEUnD0027109; Sat, 19 May 2012 14:30:49 GMT (envelope-from gleb@svn.freebsd.org) Message-Id: <201205191430.q4JEUnD0027109@svn.freebsd.org> From: Gleb Kurtsou Date: Sat, 19 May 2012 14:30:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235649 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 14:30:50 -0000 Author: gleb Date: Sat May 19 14:30:49 2012 New Revision: 235649 URL: http://svn.freebsd.org/changeset/base/235649 Log: Put my name as copyright owner of lib/libc/gen/dirfd.c added in r235647. Requested by: kib@ Modified: head/lib/libc/gen/dirfd.c Modified: head/lib/libc/gen/dirfd.c ============================================================================== --- head/lib/libc/gen/dirfd.c Sat May 19 14:13:16 2012 (r235648) +++ head/lib/libc/gen/dirfd.c Sat May 19 14:30:49 2012 (r235649) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. + * Copyright (c) 2011 Gleb Kurtsou + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,14 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * 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 REGENTS OR CONTRIBUTORS BE LIABLE + * 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) From owner-svn-src-all@FreeBSD.ORG Sat May 19 14:32:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B9BDB1065673; Sat, 19 May 2012 14:32:47 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A79A8FC0A; Sat, 19 May 2012 14:32:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JEWlVN027228; Sat, 19 May 2012 14:32:47 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JEWle6027225; Sat, 19 May 2012 14:32:47 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205191432.q4JEWle6027225@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 19 May 2012 14:32:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235650 - stable/8/usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 14:32:47 -0000 Author: bz Date: Sat May 19 14:32:47 2012 New Revision: 235650 URL: http://svn.freebsd.org/changeset/base/235650 Log: MFC r233713: Remove the magic mfi_array is 288 bytes and just use the sizeof the array since it is not 288 bytes. Change reporting of a "SYSTEM" disk to "JBOD" to match LSI MegaCli and firmware reporting. This means that mfiutil command to "create jbod" is now a little confusing since a RAID per drive is not really what LSI defines JBOD to be. This should be fixed in the future and support added to really create LSI JBOD and enable that feature on cards that support it. To unbreak the build after: r235625 (?) Modified: stable/8/usr.sbin/mfiutil/mfi_config.c stable/8/usr.sbin/mfiutil/mfi_drive.c Directory Properties: stable/8/usr.sbin/mfiutil/ (props changed) Modified: stable/8/usr.sbin/mfiutil/mfi_config.c ============================================================================== --- stable/8/usr.sbin/mfiutil/mfi_config.c Sat May 19 14:30:49 2012 (r235649) +++ stable/8/usr.sbin/mfiutil/mfi_config.c Sat May 19 14:32:47 2012 (r235650) @@ -211,9 +211,8 @@ clear_config(int ac, char **av) } MFI_COMMAND(top, clear, clear_config); -#define MFI_ARRAY_SIZE 288 -#define MAX_DRIVES_PER_ARRAY \ - ((MFI_ARRAY_SIZE - sizeof(struct mfi_array)) / 8) +#define MAX_DRIVES_PER_ARRAY MFI_MAX_ROW_SIZE +#define MFI_ARRAY_SIZE sizeof(struct mfi_array) #define RT_RAID0 0 #define RT_RAID1 1 @@ -305,7 +304,7 @@ parse_array(int fd, int raid_type, char /* Validate the number of drives for this array. */ if (count >= MAX_DRIVES_PER_ARRAY) { - warnx("Too many drives for a single array: max is %zu", + warnx("Too many drives for a single array: max is %d", MAX_DRIVES_PER_ARRAY); return (EINVAL); } Modified: stable/8/usr.sbin/mfiutil/mfi_drive.c ============================================================================== --- stable/8/usr.sbin/mfiutil/mfi_drive.c Sat May 19 14:30:49 2012 (r235649) +++ stable/8/usr.sbin/mfiutil/mfi_drive.c Sat May 19 14:32:47 2012 (r235650) @@ -149,7 +149,7 @@ mfi_pdstate(enum mfi_pd_state state) case MFI_PD_STATE_COPYBACK: return ("COPYBACK"); case MFI_PD_STATE_SYSTEM: - return ("SYSTEM"); + return ("JBOD"); default: sprintf(buf, "PSTATE 0x%04x", state); return (buf); From owner-svn-src-all@FreeBSD.ORG Sat May 19 14:38:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 944B4106566B; Sat, 19 May 2012 14:38:15 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D0888FC18; Sat, 19 May 2012 14:38:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JEcF4k027504; Sat, 19 May 2012 14:38:15 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JEcFch027499; Sat, 19 May 2012 14:38:15 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205191438.q4JEcFch027499@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 19 May 2012 14:38:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235651 - in stable/7: lib/libc/gen sys/net sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 14:38:15 -0000 Author: bz Date: Sat May 19 14:38:14 2012 New Revision: 235651 URL: http://svn.freebsd.org/changeset/base/235651 Log: MFC r231505,231520: Introduce a new NET_RT_IFLISTL API to query the address list. It works on extended and extensible structs if_msghdrl and ifa_msghdrl. This will allow us to extend both the msghdrl structs and eventually if_data in the future without breaking the ABI. The MFC is just to provide the new API to old stable branches to make updating and if needed downgrading a lot easier for updates to 10. Modified: stable/7/lib/libc/gen/sysctl.3 stable/7/sys/net/if.h stable/7/sys/net/rtsock.c stable/7/sys/sys/socket.h Directory Properties: stable/7/lib/libc/ (props changed) stable/7/sys/ (props changed) Modified: stable/7/lib/libc/gen/sysctl.3 ============================================================================== --- stable/7/lib/libc/gen/sysctl.3 Sat May 19 14:32:47 2012 (r235650) +++ stable/7/lib/libc/gen/sysctl.3 Sat May 19 14:38:14 2012 (r235651) @@ -28,7 +28,7 @@ .\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd April 25, 2010 +.Dd February 11, 2012 .Dt SYSCTL 3 .Os .Sh NAME @@ -568,6 +568,7 @@ The fifth and sixth level names are as f .It "NET_RT_DUMP None" .It "NET_RT_IFLIST 0 or if_index" .It "NET_RT_IFMALIST 0 or if_index" +.It "NET_RT_IFLISTL 0 or if_index" .El .Pp The @@ -575,6 +576,19 @@ The name returns information about multicast group memberships on all interfaces if 0 is specified, or for the interface specified by .Va if_index . +.Pp +The +.Dv NET_RT_IFLISTL +is like +.Dv NET_RT_IFLIST , +just returning message header structs with additional fields allowing the +interface to be extended without breaking binary compatibility. +The +.Dv NET_RT_IFLISTL +uses 'l' versions of the message header structures: +.Va struct if_msghdrl +and +.Va struct ifa_msghdrl . .It Li PF_INET Get or set various global information about the IPv4 (Internet Protocol version 4). Modified: stable/7/sys/net/if.h ============================================================================== --- stable/7/sys/net/if.h Sat May 19 14:32:47 2012 (r235650) +++ stable/7/sys/net/if.h Sat May 19 14:38:14 2012 (r235651) @@ -230,6 +230,7 @@ struct if_data { /* * Message format for use in obtaining information about interfaces * from getkerninfo and the routing socket + * For the new, extensible interface see struct if_msghdrl below. */ struct if_msghdr { u_short ifm_msglen; /* to skip over non-understood messages */ @@ -242,8 +243,34 @@ struct if_msghdr { }; /* + * The 'l' version shall be used by new interfaces, like NET_RT_IFLISTL. It is + * extensible after ifm_data_off or within ifm_data. Both the if_msghdr and + * if_data now have a member field detailing the struct length in addition to + * the routing message length. Macros are provided to find the start of + * ifm_data and the start of the socket address strucutres immediately following + * struct if_msghdrl given a pointer to struct if_msghdrl. + */ +#define IF_MSGHDRL_IFM_DATA(_l) \ + (struct if_data *)((char *)(_l) + (_l)->ifm_data_off) +#define IF_MSGHDRL_RTA(_l) \ + (void *)((uintptr_t)(_l) + (_l)->ifm_len) +struct if_msghdrl { + u_short ifm_msglen; /* to skip over non-understood messages */ + u_char ifm_version; /* future binary compatibility */ + u_char ifm_type; /* message type */ + int ifm_addrs; /* like rtm_addrs */ + int ifm_flags; /* value of if_flags */ + u_short ifm_index; /* index for associated ifp */ + u_short _ifm_spare1; /* spare space to grow if_index, see if_var.h */ + u_short ifm_len; /* length of if_msghdrl incl. if_data */ + u_short ifm_data_off; /* offset of if_data from beginning */ + struct if_data ifm_data;/* statistics and other data about if */ +}; + +/* * Message format for use in obtaining information about interface addresses * from getkerninfo and the routing socket + * For the new, extensible interface see struct ifa_msghdrl below. */ struct ifa_msghdr { u_short ifam_msglen; /* to skip over non-understood messages */ @@ -256,6 +283,33 @@ struct ifa_msghdr { }; /* + * The 'l' version shall be used by new interfaces, like NET_RT_IFLISTL. It is + * extensible after ifam_metric or within ifam_data. Both the ifa_msghdrl and + * if_data now have a member field detailing the struct length in addition to + * the routing message length. Macros are provided to find the start of + * ifm_data and the start of the socket address strucutres immediately following + * struct ifa_msghdrl given a pointer to struct ifa_msghdrl. + */ +#define IFA_MSGHDRL_IFAM_DATA(_l) \ + (struct if_data *)((char *)(_l) + (_l)->ifam_data_off) +#define IFA_MSGHDRL_RTA(_l) \ + (void *)((uintptr_t)(_l) + (_l)->ifam_len) +struct ifa_msghdrl { + u_short ifam_msglen; /* to skip over non-understood messages */ + u_char ifam_version; /* future binary compatibility */ + u_char ifam_type; /* message type */ + int ifam_addrs; /* like rtm_addrs */ + int ifam_flags; /* value of ifa_flags */ + u_short ifam_index; /* index for associated ifp */ + u_short _ifam_spare1; /* spare space to grow if_index, see if_var.h */ + u_short ifam_len; /* length of ifa_msghdrl incl. if_data */ + u_short ifam_data_off; /* offset of if_data from beginning */ + int ifam_metric; /* value of ifa_metric */ + struct if_data ifam_data;/* statistics and other data about if or + * address */ +}; + +/* * Message format for use in obtaining information about multicast addresses * from the routing socket */ Modified: stable/7/sys/net/rtsock.c ============================================================================== --- stable/7/sys/net/rtsock.c Sat May 19 14:32:47 2012 (r235650) +++ stable/7/sys/net/rtsock.c Sat May 19 14:38:14 2012 (r235651) @@ -62,6 +62,76 @@ extern void sctp_addr_change(struct ifaddr *ifa, int cmd); #endif /* SCTP */ +#ifdef COMPAT_FREEBSD32 +#include +#include + +struct if_data32 { + uint8_t ifi_type; + uint8_t ifi_physical; + uint8_t ifi_addrlen; + uint8_t ifi_hdrlen; + uint8_t ifi_link_state; + uint8_t ifi_spare_char1; + uint8_t ifi_spare_char2; + uint8_t ifi_datalen; + uint32_t ifi_mtu; + uint32_t ifi_metric; + uint32_t ifi_baudrate; + uint32_t ifi_ipackets; + uint32_t ifi_ierrors; + uint32_t ifi_opackets; + uint32_t ifi_oerrors; + uint32_t ifi_collisions; + uint32_t ifi_ibytes; + uint32_t ifi_obytes; + uint32_t ifi_imcasts; + uint32_t ifi_omcasts; + uint32_t ifi_iqdrops; + uint32_t ifi_noproto; + uint32_t ifi_hwassist; + int32_t ifi_epoch; + struct timeval32 ifi_lastchange; +}; + +struct if_msghdr32 { + uint16_t ifm_msglen; + uint8_t ifm_version; + uint8_t ifm_type; + int32_t ifm_addrs; + int32_t ifm_flags; + uint16_t ifm_index; + struct if_data32 ifm_data; +}; + +struct if_msghdrl32 { + uint16_t ifm_msglen; + uint8_t ifm_version; + uint8_t ifm_type; + int32_t ifm_addrs; + int32_t ifm_flags; + uint16_t ifm_index; + uint16_t _ifm_spare1; + uint16_t ifm_len; + uint16_t ifm_data_off; + struct if_data32 ifm_data; +}; + +struct ifa_msghdrl32 { + uint16_t ifam_msglen; + uint8_t ifam_version; + uint8_t ifam_type; + int32_t ifam_addrs; + int32_t ifam_flags; + uint16_t ifam_index; + uint16_t _ifam_spare1; + uint16_t ifam_len; + uint16_t ifam_data_off; + int32_t ifam_metric; + struct if_data32 ifam_data; +}; +#endif /* COMPAT_FREEBSD32 */ + MALLOC_DEFINE(M_RTABLE, "routetbl", "routing tables"); /* NB: these are not modified */ @@ -845,6 +915,9 @@ rt_xaddrs(caddr_t cp, caddr_t cplim, str return (0); } +/* + * Used by the routing socket. + */ static struct mbuf * rt_msg1(int type, struct rt_addrinfo *rtinfo) { @@ -912,6 +985,9 @@ rt_msg1(int type, struct rt_addrinfo *rt return (m); } +/* + * Used by the sysctl code and routing socket. + */ static int rt_msg2(int type, struct rt_addrinfo *rtinfo, caddr_t cp, struct walkarg *w) { @@ -925,11 +1001,31 @@ again: case RTM_DELADDR: case RTM_NEWADDR: - len = sizeof(struct ifa_msghdr); + if (w != NULL && w->w_op == NET_RT_IFLISTL) { +#ifdef COMPAT_FREEBSD32 + if (w->w_req->flags & SCTL_MASK32) + len = sizeof(struct ifa_msghdrl32); + else +#endif + len = sizeof(struct ifa_msghdrl); + } else + len = sizeof(struct ifa_msghdr); break; case RTM_IFINFO: - len = sizeof(struct if_msghdr); +#ifdef COMPAT_FREEBSD32 + if (w != NULL && w->w_req->flags & SCTL_MASK32) { + if (w->w_op == NET_RT_IFLISTL) + len = sizeof(struct if_msghdrl32); + else + len = sizeof(struct if_msghdr32); + break; + } +#endif + if (w != NULL && w->w_op == NET_RT_IFLISTL) + len = sizeof(struct if_msghdrl); + else + len = sizeof(struct if_msghdr); break; case RTM_NEWMADDR: @@ -1314,6 +1410,127 @@ sysctl_dumpentry(struct radix_node *rn, } static int +sysctl_iflist_ifml(struct ifnet *ifp, struct rt_addrinfo *info, + struct walkarg *w, int len) +{ + struct if_msghdrl *ifm; + +#ifdef COMPAT_FREEBSD32 + if (w->w_req->flags & SCTL_MASK32) { + struct if_msghdrl32 *ifm32; + + ifm32 = (struct if_msghdrl32 *)w->w_tmem; + ifm32->ifm_addrs = info->rti_addrs; + ifm32->ifm_flags = ifp->if_flags | ifp->if_drv_flags; + ifm32->ifm_index = ifp->if_index; + ifm32->_ifm_spare1 = 0; + ifm32->ifm_len = sizeof(*ifm32); + ifm32->ifm_data_off = offsetof(struct if_msghdrl32, ifm_data); + + copy_ifdata32(&ifp->if_data, &ifm32->ifm_data); + + return (SYSCTL_OUT(w->w_req, (caddr_t)ifm32, len)); + } +#endif + ifm = (struct if_msghdrl *)w->w_tmem; + ifm->ifm_addrs = info->rti_addrs; + ifm->ifm_flags = ifp->if_flags | ifp->if_drv_flags; + ifm->ifm_index = ifp->if_index; + ifm->_ifm_spare1 = 0; + ifm->ifm_len = sizeof(*ifm); + ifm->ifm_data_off = offsetof(struct if_msghdrl, ifm_data); + + ifm->ifm_data = ifp->if_data; + + return (SYSCTL_OUT(w->w_req, (caddr_t)ifm, len)); +} + +static int +sysctl_iflist_ifm(struct ifnet *ifp, struct rt_addrinfo *info, + struct walkarg *w, int len) +{ + struct if_msghdr *ifm; + +#ifdef COMPAT_FREEBSD32 + if (w->w_req->flags & SCTL_MASK32) { + struct if_msghdr32 *ifm32; + + ifm32 = (struct if_msghdr32 *)w->w_tmem; + ifm32->ifm_addrs = info->rti_addrs; + ifm32->ifm_flags = ifp->if_flags | ifp->if_drv_flags; + ifm32->ifm_index = ifp->if_index; + + copy_ifdata32(&ifp->if_data, &ifm32->ifm_data); + + return (SYSCTL_OUT(w->w_req, (caddr_t)ifm32, len)); + } +#endif + ifm = (struct if_msghdr *)w->w_tmem; + ifm->ifm_addrs = info->rti_addrs; + ifm->ifm_flags = ifp->if_flags | ifp->if_drv_flags; + ifm->ifm_index = ifp->if_index; + + ifm->ifm_data = ifp->if_data; + + return (SYSCTL_OUT(w->w_req, (caddr_t)ifm, len)); +} + +static int +sysctl_iflist_ifaml(struct ifaddr *ifa, struct rt_addrinfo *info, + struct walkarg *w, int len) +{ + struct ifa_msghdrl *ifam; + +#ifdef COMPAT_FREEBSD32 + if (w->w_req->flags & SCTL_MASK32) { + struct ifa_msghdrl32 *ifam32; + + ifam32 = (struct ifa_msghdrl32 *)w->w_tmem; + ifam32->ifam_addrs = info->rti_addrs; + ifam32->ifam_flags = ifa->ifa_flags; + ifam32->ifam_index = ifa->ifa_ifp->if_index; + ifam32->_ifam_spare1 = 0; + ifam32->ifam_len = sizeof(*ifam32); + ifam32->ifam_data_off = + offsetof(struct ifa_msghdrl32, ifam_data); + ifam32->ifam_metric = ifa->ifa_metric; + + copy_ifdata32(&ifa->ifa_ifp->if_data, &ifam32->ifam_data); + + return (SYSCTL_OUT(w->w_req, (caddr_t)ifam32, len)); + } +#endif + + ifam = (struct ifa_msghdrl *)w->w_tmem; + ifam->ifam_addrs = info->rti_addrs; + ifam->ifam_flags = ifa->ifa_flags; + ifam->ifam_index = ifa->ifa_ifp->if_index; + ifam->_ifam_spare1 = 0; + ifam->ifam_len = sizeof(*ifam); + ifam->ifam_data_off = offsetof(struct ifa_msghdrl, ifam_data); + ifam->ifam_metric = ifa->ifa_metric; + + ifam->ifam_data = ifa->if_data; + + return (SYSCTL_OUT(w->w_req, w->w_tmem, len)); +} + +static int +sysctl_iflist_ifam(struct ifaddr *ifa, struct rt_addrinfo *info, + struct walkarg *w, int len) +{ + struct ifa_msghdr *ifam; + + ifam = (struct ifa_msghdr *)w->w_tmem; + ifam->ifam_addrs = info->rti_addrs; + ifam->ifam_flags = ifa->ifa_flags; + ifam->ifam_index = ifa->ifa_ifp->if_index; + ifam->ifam_metric = ifa->ifa_metric; + + return (SYSCTL_OUT(w->w_req, w->w_tmem, len)); +} + +static int sysctl_iflist(int af, struct walkarg *w) { struct ifnet *ifp; @@ -1332,14 +1549,10 @@ sysctl_iflist(int af, struct walkarg *w) len = rt_msg2(RTM_IFINFO, &info, NULL, w); info.rti_info[RTAX_IFP] = NULL; if (w->w_req && w->w_tmem) { - struct if_msghdr *ifm; - - ifm = (struct if_msghdr *)w->w_tmem; - ifm->ifm_index = ifp->if_index; - ifm->ifm_flags = ifp->if_flags | ifp->if_drv_flags; - ifm->ifm_data = ifp->if_data; - ifm->ifm_addrs = info.rti_addrs; - error = SYSCTL_OUT(w->w_req,(caddr_t)ifm, len); + if (w->w_op == NET_RT_IFLISTL) + error = sysctl_iflist_ifml(ifp, &info, w, len); + else + error = sysctl_iflist_ifm(ifp, &info, w, len); if (error) goto done; } @@ -1354,14 +1567,12 @@ sysctl_iflist(int af, struct walkarg *w) info.rti_info[RTAX_BRD] = ifa->ifa_dstaddr; len = rt_msg2(RTM_NEWADDR, &info, NULL, w); if (w->w_req && w->w_tmem) { - struct ifa_msghdr *ifam; - - ifam = (struct ifa_msghdr *)w->w_tmem; - ifam->ifam_index = ifa->ifa_ifp->if_index; - ifam->ifam_flags = ifa->ifa_flags; - ifam->ifam_metric = ifa->ifa_metric; - ifam->ifam_addrs = info.rti_addrs; - error = SYSCTL_OUT(w->w_req, w->w_tmem, len); + if (w->w_op == NET_RT_IFLISTL) + error = sysctl_iflist_ifaml(ifa, &info, + w, len); + else + error = sysctl_iflist_ifam(ifa, &info, + w, len); if (error) goto done; } @@ -1473,6 +1684,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) break; case NET_RT_IFLIST: + case NET_RT_IFLISTL: error = sysctl_iflist(af, &w); break; Modified: stable/7/sys/sys/socket.h ============================================================================== --- stable/7/sys/sys/socket.h Sat May 19 14:32:47 2012 (r235650) +++ stable/7/sys/sys/socket.h Sat May 19 14:38:14 2012 (r235651) @@ -416,7 +416,9 @@ struct sockaddr_storage { #define NET_RT_FLAGS 2 /* by flags, e.g. RESOLVING */ #define NET_RT_IFLIST 3 /* survey interface list */ #define NET_RT_IFMALIST 4 /* return multicast address list */ -#define NET_RT_MAXID 5 +#define NET_RT_IFLISTL 5 /* Survey interface list, using 'l'en + * versions of msghdr structs. */ +#define NET_RT_MAXID 6 #define CTL_NET_RT_NAMES { \ { 0, 0 }, \ @@ -424,6 +426,7 @@ struct sockaddr_storage { { "flags", CTLTYPE_STRUCT }, \ { "iflist", CTLTYPE_STRUCT }, \ { "ifmalist", CTLTYPE_STRUCT }, \ + { "iflistl", CTLTYPE_STRUCT }, \ } #endif /* __BSD_VISIBLE */ From owner-svn-src-all@FreeBSD.ORG Sat May 19 14:41:08 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 731B21065677; Sat, 19 May 2012 14:41:08 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 0AF338FC21; Sat, 19 May 2012 14:41:07 +0000 (UTC) Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q4JEexGx009322 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 20 May 2012 00:41:00 +1000 Date: Sun, 20 May 2012 00:40:59 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov In-Reply-To: <20120519133808.GI2358@deviant.kiev.zoral.com.ua> Message-ID: <20120520000910.D1142@besplex.bde.org> References: <201205191244.q4JCiSmO022413@svn.freebsd.org> <20120519133808.GI2358@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, Gleb Kurtsou , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r235647 - in head: include lib/libc/gen usr.sbin/cpucontrol usr.sbin/lpr/common_source usr.sbin/newsyslog X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 14:41:08 -0000 On Sat, 19 May 2012, Konstantin Belousov wrote: >> Log: >> Hide DIR definition by making it an opaque struct typedef. >> >> Introduce dirfd() libc exported symbol replacing macro with same name, >> preserve _dirfd() macro for internal use. >> >> Replace dirp->dd_fd with dirfd() call. Avoid using dirfd as variable >> name to prevent shadowing global symbol. >> >> Sponsored by: Google Summer Of Code 2011 >> >> Added: >> head/lib/libc/gen/dirfd.c (contents, props changed) >> head/lib/libc/gen/gen-private.h (contents, props changed) > I could agree with attribution of the gen-private.h content to 'regents > of the university' in the copyright, but I very much doubt that this > is right thing to do for dirfd.c. > > I think you should put your name, instead of university, as the copyright > owner. gen-private.h is also missing all history and in particular is missing the history needed to connect it to the regents. gen-private.h also has a gnu-style name. If it had been provided by the regents or their direct contributors, then it would have a BSD-style name (gen_private.h or just genprivate.h, or maybe gen.h or dirfd.h (headers in libc/gen are private by definition; if they were private to libc and not just libc/gen, then they would be in libc/include)). In 4.4BSD-Lite2, there are 22246 files; 1237 of these are named *-*, but most of these are in src/contrib and other contribed files (mainly usr.sbin/amd); there are about 20 files whose name has a hyphen and whose contents has a regents copyright; none of these are in src/lib but 5 are in src/sys. In FreeBSD now, the naming scheme has already rotted to about 55 names with a hyphen in src/lib and 524 in src/sys (more than 1/2 of the latter in contrib/octeon and almost 1/4 in contribed drivers). Bruce From owner-svn-src-all@FreeBSD.ORG Sat May 19 17:42:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C994106566B; Sat, 19 May 2012 17:42:12 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBB708FC08; Sat, 19 May 2012 17:42:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JHgB4u035944; Sat, 19 May 2012 17:42:11 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JHgBvU035942; Sat, 19 May 2012 17:42:11 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205191742.q4JHgBvU035942@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 19 May 2012 17:42:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235652 - head/sys/dev/iicbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 17:42:12 -0000 Author: marcel Date: Sat May 19 17:42:11 2012 New Revision: 235652 URL: http://svn.freebsd.org/changeset/base/235652 Log: Don't include MIPS machine headers. There's no need for it. Modified: head/sys/dev/iicbus/ds1374.c Modified: head/sys/dev/iicbus/ds1374.c ============================================================================== --- head/sys/dev/iicbus/ds1374.c Sat May 19 14:38:14 2012 (r235651) +++ head/sys/dev/iicbus/ds1374.c Sat May 19 17:42:11 2012 (r235652) @@ -39,12 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include -#include -#include - #include #include From owner-svn-src-all@FreeBSD.ORG Sat May 19 17:49:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 74B82106566B; Sat, 19 May 2012 17:49:21 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5FF748FC0C; Sat, 19 May 2012 17:49:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JHnLp8036294; Sat, 19 May 2012 17:49:21 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JHnLaq036292; Sat, 19 May 2012 17:49:21 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205191749.q4JHnLaq036292@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 19 May 2012 17:49:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235653 - head/lib/libc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 17:49:21 -0000 Author: marcel Date: Sat May 19 17:49:20 2012 New Revision: 235653 URL: http://svn.freebsd.org/changeset/base/235653 Log: Don't link against libssp if MK_SSP is set to no. Note that this still misses a proper dependency at this time. Modified: head/lib/libc/Makefile Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Sat May 19 17:42:11 2012 (r235652) +++ head/lib/libc/Makefile Sat May 19 17:49:20 2012 (r235653) @@ -41,7 +41,11 @@ CFLAGS+=${CANCELPOINTS_CFLAGS} # DPADD+= ${LIBGCC} LDFLAGS+= -nodefaultlibs -LDADD+= -lgcc -lssp_nonshared +LDADD+= -lgcc + +.if ${MK_SSP} != "no" +LDADD+= -lssp_nonshared +.endif # Define (empty) variables so that make doesn't give substitution # errors if the included makefiles don't change these: From owner-svn-src-all@FreeBSD.ORG Sat May 19 17:55:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2195106566C; Sat, 19 May 2012 17:55:49 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D30B8FC08; Sat, 19 May 2012 17:55:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JHtnIX036631; Sat, 19 May 2012 17:55:49 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JHtncx036628; Sat, 19 May 2012 17:55:49 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205191755.q4JHtncx036628@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 19 May 2012 17:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235654 - in head: bin/ed share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 17:55:49 -0000 Author: marcel Date: Sat May 19 17:55:49 2012 New Revision: 235654 URL: http://svn.freebsd.org/changeset/base/235654 Log: Add build option MK_ED_CRYPTO to control whether ed(1) is to have the ability to encrypt/decrypt files. Embedded systems can typically have OpenSSL, but not for ed(1) to use it. Obtained from: Juniper Networks, Inc. Modified: head/bin/ed/Makefile head/share/mk/bsd.own.mk Modified: head/bin/ed/Makefile ============================================================================== --- head/bin/ed/Makefile Sat May 19 17:49:20 2012 (r235653) +++ head/bin/ed/Makefile Sat May 19 17:55:49 2012 (r235654) @@ -7,12 +7,12 @@ SRCS= buf.c cbc.c glbl.c io.c main.c re. LINKS= ${BINDIR}/ed ${BINDIR}/red MLINKS= ed.1 red.1 -.if !defined(RELEASE_CRUNCH) -.if ${MK_OPENSSL} != "no" +.if !defined(RELEASE_CRUNCH) && \ + ${MK_OPENSSL} != "no" && \ + ${MK_ED_CRYPTO} != "no" CFLAGS+=-DDES DPADD= ${LIBCRYPTO} LDADD= -lcrypto .endif -.endif .include Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Sat May 19 17:49:20 2012 (r235653) +++ head/share/mk/bsd.own.mk Sat May 19 17:55:49 2012 (r235654) @@ -334,6 +334,7 @@ __DEFAULT_YES_OPTIONS = \ CXX \ DICT \ DYNAMICROOT \ + ED_CRYPTO \ EXAMPLES \ FLOPPY \ FORTH \ From owner-svn-src-all@FreeBSD.ORG Sat May 19 18:05:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91440106564A; Sat, 19 May 2012 18:05:01 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BBA88FC0A; Sat, 19 May 2012 18:05:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JI51Iv037130; Sat, 19 May 2012 18:05:01 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JI513M037128; Sat, 19 May 2012 18:05:01 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205191805.q4JI513M037128@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 19 May 2012 18:05:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235655 - in head: bin/ls share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 18:05:01 -0000 Author: marcel Date: Sat May 19 18:05:00 2012 New Revision: 235655 URL: http://svn.freebsd.org/changeset/base/235655 Log: Add build opton MK_LS_COLORS to control whether ls(1) supports colors (and thus needs to depend on libtermcap). Embedded systems may not want or need colors. Obtained from: Juniper Networks, Inc. Modified: head/bin/ls/Makefile head/share/mk/bsd.own.mk Modified: head/bin/ls/Makefile ============================================================================== --- head/bin/ls/Makefile Sat May 19 17:55:49 2012 (r235654) +++ head/bin/ls/Makefile Sat May 19 18:05:00 2012 (r235655) @@ -1,12 +1,15 @@ # @(#)Makefile 8.1 (Berkeley) 6/2/93 # $FreeBSD$ +.include + PROG= ls SRCS= cmp.c ls.c print.c util.c DPADD= ${LIBUTIL} LDADD= -lutil -.if !defined(RELEASE_CRUNCH) +.if !defined(RELEASE_CRUNCH) && \ + ${MK_LS_COLORS} != no CFLAGS+= -DCOLORLS DPADD+= ${LIBTERMCAP} LDADD+= -ltermcap Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Sat May 19 17:55:49 2012 (r235654) +++ head/share/mk/bsd.own.mk Sat May 19 18:05:00 2012 (r235655) @@ -367,6 +367,7 @@ __DEFAULT_YES_OPTIONS = \ LOCALES \ LOCATE \ LPR \ + LS_COLORS \ MAIL \ MAILWRAPPER \ MAKE \ From owner-svn-src-all@FreeBSD.ORG Sat May 19 18:16:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A36A61065672; Sat, 19 May 2012 18:16:49 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F1F58FC08; Sat, 19 May 2012 18:16:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JIGnJu037664; Sat, 19 May 2012 18:16:49 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JIGnS1037662; Sat, 19 May 2012 18:16:49 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205191816.q4JIGnS1037662@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 19 May 2012 18:16:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235656 - head/sys/arm/mv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 18:16:49 -0000 Author: marcel Date: Sat May 19 18:16:49 2012 New Revision: 235656 URL: http://svn.freebsd.org/changeset/base/235656 Log: Unbreak LINT for ARM: DEBUG is a kernel configuration option. Modified: head/sys/arm/mv/mv_localbus.c Modified: head/sys/arm/mv/mv_localbus.c ============================================================================== --- head/sys/arm/mv/mv_localbus.c Sat May 19 18:05:00 2012 (r235655) +++ head/sys/arm/mv/mv_localbus.c Sat May 19 18:16:49 2012 (r235656) @@ -48,9 +48,6 @@ __FBSDID("$FreeBSD$"); #include -#define DEBUG -#undef DEBUG - #ifdef DEBUG #define debugf(fmt, args...) do { printf("%s(): ", __func__); \ printf(fmt,##args); } while (0) From owner-svn-src-all@FreeBSD.ORG Sat May 19 18:22:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 548B8106566B; Sat, 19 May 2012 18:22:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) by mx1.freebsd.org (Postfix) with ESMTP id C73948FC0C; Sat, 19 May 2012 18:22:48 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id BEA8625D3857; Sat, 19 May 2012 18:22:47 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id DA92CBE74BC; Sat, 19 May 2012 18:22:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 46DySP-qdvR3; Sat, 19 May 2012 18:22:45 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 9EB97BE74BB; Sat, 19 May 2012 18:22:45 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201205191755.q4JHtncx036628@svn.freebsd.org> Date: Sat, 19 May 2012 18:22:44 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <4CFA3665-472D-49E4-8832-3B304C2908D1@FreeBSD.org> References: <201205191755.q4JHtncx036628@svn.freebsd.org> To: Marcel Moolenaar X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r235654 - in head: bin/ed share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 18:22:49 -0000 On 19. May 2012, at 17:55 , Marcel Moolenaar wrote: > Author: marcel > Date: Sat May 19 17:55:49 2012 > New Revision: 235654 > URL: http://svn.freebsd.org/changeset/base/235654 >=20 > Log: > Add build option MK_ED_CRYPTO to control whether ed(1) is to have the > ability to encrypt/decrypt files. Embedded systems can typically have > OpenSSL, but not for ed(1) to use it. This is totally wrong in my view and lacks documentation. 1) I really see no reason why ED needs it's own crypto flag for = src.conf, if we go that route what about telnet, and all the others? 2) If I do not build with OPENSSL this should as well turn off = MK_ED_CRYPTO automatically (but let's not go there, if avoidable). 3) if you insist on keeping it as a src.conf option please fix (2) and properly document it. >=20 > Obtained from: Juniper Networks, Inc. >=20 > Modified: > head/bin/ed/Makefile > head/share/mk/bsd.own.mk >=20 > Modified: head/bin/ed/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/bin/ed/Makefile Sat May 19 17:49:20 2012 = (r235653) > +++ head/bin/ed/Makefile Sat May 19 17:55:49 2012 = (r235654) > @@ -7,12 +7,12 @@ SRCS=3D buf.c cbc.c glbl.c io.c main.c re. > LINKS=3D ${BINDIR}/ed ${BINDIR}/red > MLINKS=3D ed.1 red.1 >=20 > -.if !defined(RELEASE_CRUNCH) > -.if ${MK_OPENSSL} !=3D "no" > +.if !defined(RELEASE_CRUNCH) && \ > + ${MK_OPENSSL} !=3D "no" && \ > + ${MK_ED_CRYPTO} !=3D "no" > CFLAGS+=3D-DDES > DPADD=3D ${LIBCRYPTO} > LDADD=3D -lcrypto > .endif > -.endif >=20 > .include >=20 > Modified: head/share/mk/bsd.own.mk > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/share/mk/bsd.own.mk Sat May 19 17:49:20 2012 = (r235653) > +++ head/share/mk/bsd.own.mk Sat May 19 17:55:49 2012 = (r235654) > @@ -334,6 +334,7 @@ __DEFAULT_YES_OPTIONS =3D \ > CXX \ > DICT \ > DYNAMICROOT \ > + ED_CRYPTO \ > EXAMPLES \ > FLOPPY \ > FORTH \ --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Sat May 19 18:23:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A49211065676; Sat, 19 May 2012 18:23:57 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 2E4718FC15; Sat, 19 May 2012 18:23:57 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 24B2825D3857; Sat, 19 May 2012 18:23:56 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 970D3BE74BE; Sat, 19 May 2012 18:23:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id q-PhJAntCe9i; Sat, 19 May 2012 18:23:54 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 09F2FBE74BD; Sat, 19 May 2012 18:23:53 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201205191805.q4JI513M037128@svn.freebsd.org> Date: Sat, 19 May 2012 18:23:53 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201205191805.q4JI513M037128@svn.freebsd.org> To: Marcel Moolenaar X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r235655 - in head: bin/ls share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 18:23:57 -0000 On 19. May 2012, at 18:05 , Marcel Moolenaar wrote: > Author: marcel > Date: Sat May 19 18:05:00 2012 > New Revision: 235655 > URL: http://svn.freebsd.org/changeset/base/235655 >=20 > Log: > Add build opton MK_LS_COLORS to control whether ls(1) supports colors > (and thus needs to depend on libtermcap). Embedded systems may not > want or need colors. This once again is missing documentation. Please also understand that each src.conf option DOES come with a cost = and if you plan to bring another 20 I'd love to have discussion upfront. = Thanks. > Obtained from: Juniper Networks, Inc. >=20 > Modified: > head/bin/ls/Makefile > head/share/mk/bsd.own.mk >=20 > Modified: head/bin/ls/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/bin/ls/Makefile Sat May 19 17:55:49 2012 = (r235654) > +++ head/bin/ls/Makefile Sat May 19 18:05:00 2012 = (r235655) > @@ -1,12 +1,15 @@ > # @(#)Makefile 8.1 (Berkeley) 6/2/93 > # $FreeBSD$ >=20 > +.include > + > PROG=3D ls > SRCS=3D cmp.c ls.c print.c util.c > DPADD=3D ${LIBUTIL} > LDADD=3D -lutil >=20 > -.if !defined(RELEASE_CRUNCH) > +.if !defined(RELEASE_CRUNCH) && \ > + ${MK_LS_COLORS} !=3D no > CFLAGS+=3D -DCOLORLS > DPADD+=3D ${LIBTERMCAP} > LDADD+=3D -ltermcap >=20 > Modified: head/share/mk/bsd.own.mk > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/share/mk/bsd.own.mk Sat May 19 17:55:49 2012 = (r235654) > +++ head/share/mk/bsd.own.mk Sat May 19 18:05:00 2012 = (r235655) > @@ -367,6 +367,7 @@ __DEFAULT_YES_OPTIONS =3D \ > LOCALES \ > LOCATE \ > LPR \ > + LS_COLORS \ > MAIL \ > MAILWRAPPER \ > MAKE \ --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Sat May 19 18:32:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07ED41065672; Sat, 19 May 2012 18:32:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E57948FC0A; Sat, 19 May 2012 18:32:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JIWVfh038396; Sat, 19 May 2012 18:32:31 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JIWVXv038390; Sat, 19 May 2012 18:32:31 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205191832.q4JIWVXv038390@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 19 May 2012 18:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235657 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 18:32:32 -0000 Author: bz Date: Sat May 19 18:32:31 2012 New Revision: 235657 URL: http://svn.freebsd.org/changeset/base/235657 Log: MFC r231767: Fix PAWS (Protect Against Wrapped Sequence numbers) in cases when hz >> 1000 and thus getting outside the timestamp clock frequenceny of 1ms < x < 1s per tick as mandated by RFC1323, leading to connection resets on idle connections. Always use a granularity of 1ms using getmicrouptime() making all but relevant callouts independent of hz. Use getmicrouptime(), not getmicrotime() as the latter may make a jump possibly breaking TCP nfsroot mounts having our timestamps move forward for more than 24.8 days in a second without having been idle for that long. PR: kern/61404 Modified: stable/9/sys/netinet/tcp_input.c stable/9/sys/netinet/tcp_output.c stable/9/sys/netinet/tcp_seq.h stable/9/sys/netinet/tcp_syncache.c stable/9/sys/netinet/tcp_timewait.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/tcp_input.c ============================================================================== --- stable/9/sys/netinet/tcp_input.c Sat May 19 18:16:49 2012 (r235656) +++ stable/9/sys/netinet/tcp_input.c Sat May 19 18:32:31 2012 (r235657) @@ -1524,7 +1524,7 @@ tcp_do_segment(struct mbuf *m, struct tc */ if ((to.to_flags & TOF_TS) && (to.to_tsecr != 0)) { to.to_tsecr -= tp->ts_offset; - if (TSTMP_GT(to.to_tsecr, ticks)) + if (TSTMP_GT(to.to_tsecr, tcp_ts_getticks())) to.to_tsecr = 0; } @@ -1549,7 +1549,7 @@ tcp_do_segment(struct mbuf *m, struct tc if (to.to_flags & TOF_TS) { tp->t_flags |= TF_RCVD_TSTMP; tp->ts_recent = to.to_tsval; - tp->ts_recent_age = ticks; + tp->ts_recent_age = tcp_ts_getticks(); } if (to.to_flags & TOF_MSS) tcp_mss(tp, to.to_mss); @@ -1593,7 +1593,7 @@ tcp_do_segment(struct mbuf *m, struct tc */ if ((to.to_flags & TOF_TS) != 0 && SEQ_LEQ(th->th_seq, tp->last_ack_sent)) { - tp->ts_recent_age = ticks; + tp->ts_recent_age = tcp_ts_getticks(); tp->ts_recent = to.to_tsval; } @@ -1631,11 +1631,13 @@ tcp_do_segment(struct mbuf *m, struct tc */ if ((to.to_flags & TOF_TS) != 0 && to.to_tsecr) { - if (!tp->t_rttlow || - tp->t_rttlow > ticks - to.to_tsecr) - tp->t_rttlow = ticks - to.to_tsecr; + u_int t; + + t = tcp_ts_getticks() - to.to_tsecr; + if (!tp->t_rttlow || tp->t_rttlow > t) + tp->t_rttlow = t; tcp_xmit_timer(tp, - ticks - to.to_tsecr + 1); + TCP_TS_TO_TICKS(t) + 1); } else if (tp->t_rtttime && SEQ_GT(th->th_ack, tp->t_rtseq)) { if (!tp->t_rttlow || @@ -2101,7 +2103,7 @@ tcp_do_segment(struct mbuf *m, struct tc TSTMP_LT(to.to_tsval, tp->ts_recent)) { /* Check to see if ts_recent is over 24 days old. */ - if (ticks - tp->ts_recent_age > TCP_PAWS_IDLE) { + if (tcp_ts_getticks() - tp->ts_recent_age > TCP_PAWS_IDLE) { /* * Invalidate ts_recent. If this segment updates * ts_recent, the age will be reset later and ts_recent @@ -2260,7 +2262,7 @@ tcp_do_segment(struct mbuf *m, struct tc SEQ_LEQ(th->th_seq, tp->last_ack_sent) && SEQ_LEQ(tp->last_ack_sent, th->th_seq + tlen + ((thflags & (TH_SYN|TH_FIN)) != 0))) { - tp->ts_recent_age = ticks; + tp->ts_recent_age = tcp_ts_getticks(); tp->ts_recent = to.to_tsval; } @@ -2574,11 +2576,13 @@ process_ACK: * timestamps of 0 or we could calculate a * huge RTT and blow up the retransmit timer. */ - if ((to.to_flags & TOF_TS) != 0 && - to.to_tsecr) { - if (!tp->t_rttlow || tp->t_rttlow > ticks - to.to_tsecr) - tp->t_rttlow = ticks - to.to_tsecr; - tcp_xmit_timer(tp, ticks - to.to_tsecr + 1); + if ((to.to_flags & TOF_TS) != 0 && to.to_tsecr) { + u_int t; + + t = tcp_ts_getticks() - to.to_tsecr; + if (!tp->t_rttlow || tp->t_rttlow > t) + tp->t_rttlow = t; + tcp_xmit_timer(tp, TCP_TS_TO_TICKS(t) + 1); } else if (tp->t_rtttime && SEQ_GT(th->th_ack, tp->t_rtseq)) { if (!tp->t_rttlow || tp->t_rttlow > ticks - tp->t_rtttime) tp->t_rttlow = ticks - tp->t_rtttime; Modified: stable/9/sys/netinet/tcp_output.c ============================================================================== --- stable/9/sys/netinet/tcp_output.c Sat May 19 18:16:49 2012 (r235656) +++ stable/9/sys/netinet/tcp_output.c Sat May 19 18:32:31 2012 (r235657) @@ -685,13 +685,13 @@ send: /* Timestamps. */ if ((tp->t_flags & TF_RCVD_TSTMP) || ((flags & TH_SYN) && (tp->t_flags & TF_REQ_TSTMP))) { - to.to_tsval = ticks + tp->ts_offset; + to.to_tsval = tcp_ts_getticks() + tp->ts_offset; to.to_tsecr = tp->ts_recent; to.to_flags |= TOF_TS; /* Set receive buffer autosizing timestamp. */ if (tp->rfbuf_ts == 0 && (so->so_rcv.sb_flags & SB_AUTOSIZE)) - tp->rfbuf_ts = ticks; + tp->rfbuf_ts = tcp_ts_getticks(); } /* Selective ACK's. */ if (tp->t_flags & TF_SACK_PERMIT) { Modified: stable/9/sys/netinet/tcp_seq.h ============================================================================== --- stable/9/sys/netinet/tcp_seq.h Sat May 19 18:16:49 2012 (r235656) +++ stable/9/sys/netinet/tcp_seq.h Sat May 19 18:32:31 2012 (r235657) @@ -62,7 +62,34 @@ (tp)->snd_una = (tp)->snd_nxt = (tp)->snd_max = (tp)->snd_up = \ (tp)->snd_recover = (tp)->iss -#define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * hz) - /* timestamp wrap-around time */ +#ifdef _KERNEL +/* + * Clock macros for RFC 1323 timestamps. + */ +#define TCP_TS_TO_TICKS(_t) ((_t) * hz / 1000) + +/* Timestamp wrap-around time, 24 days. */ +#define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * 1000) + +/* + * tcp_ts_getticks() in ms, should be 1ms < x < 1000ms according to RFC 1323. + * We always use 1ms granularity independent of hz. + */ +static __inline u_int +tcp_ts_getticks(void) +{ + struct timeval tv; + u_long ms; + + /* + * getmicrouptime() should be good enough for any 1-1000ms granularity. + * Do not use getmicrotime() here as it might break nfsroot/tcp. + */ + getmicrouptime(&tv); + ms = tv.tv_sec * 1000 + tv.tv_usec / 1000; + + return (ms); +} +#endif /* _KERNEL */ #endif /* _NETINET_TCP_SEQ_H_ */ Modified: stable/9/sys/netinet/tcp_syncache.c ============================================================================== --- stable/9/sys/netinet/tcp_syncache.c Sat May 19 18:16:49 2012 (r235656) +++ stable/9/sys/netinet/tcp_syncache.c Sat May 19 18:32:31 2012 (r235657) @@ -818,7 +818,7 @@ syncache_socket(struct syncache *sc, str if (sc->sc_flags & SCF_TIMESTAMP) { tp->t_flags |= TF_REQ_TSTMP|TF_RCVD_TSTMP; tp->ts_recent = sc->sc_tsreflect; - tp->ts_recent_age = ticks; + tp->ts_recent_age = tcp_ts_getticks(); tp->ts_offset = sc->sc_tsoff; } #ifdef TCP_SIGNATURE @@ -1225,7 +1225,7 @@ _syncache_add(struct in_conninfo *inc, s */ if (to->to_flags & TOF_TS) { sc->sc_tsreflect = to->to_tsval; - sc->sc_ts = ticks; + sc->sc_ts = tcp_ts_getticks(); sc->sc_flags |= SCF_TIMESTAMP; } if (to->to_flags & TOF_SCALE) { @@ -1666,7 +1666,7 @@ syncookie_generate(struct syncache_head data |= md5_buffer[2] << 10; /* more digest bits */ data ^= md5_buffer[3]; sc->sc_ts = data; - sc->sc_tsoff = data - ticks; /* after XOR */ + sc->sc_tsoff = data - tcp_ts_getticks(); /* after XOR */ } TCPSTAT_INC(tcps_sc_sendcookie); @@ -1751,7 +1751,7 @@ syncookie_lookup(struct in_conninfo *inc sc->sc_flags |= SCF_TIMESTAMP; sc->sc_tsreflect = to->to_tsval; sc->sc_ts = to->to_tsecr; - sc->sc_tsoff = to->to_tsecr - ticks; + sc->sc_tsoff = to->to_tsecr - tcp_ts_getticks(); sc->sc_flags |= (data & 0x1) ? SCF_SIGNATURE : 0; sc->sc_flags |= ((data >> 1) & 0x1) ? SCF_SACK : 0; sc->sc_requested_s_scale = min((data >> 2) & 0xf, Modified: stable/9/sys/netinet/tcp_timewait.c ============================================================================== --- stable/9/sys/netinet/tcp_timewait.c Sat May 19 18:16:49 2012 (r235656) +++ stable/9/sys/netinet/tcp_timewait.c Sat May 19 18:32:31 2012 (r235657) @@ -558,7 +558,7 @@ tcp_twrespond(struct tcptw *tw, int flag */ if (tw->t_recent && flags == TH_ACK) { to.to_flags |= TOF_TS; - to.to_tsval = ticks + tw->ts_offset; + to.to_tsval = tcp_ts_getticks() + tw->ts_offset; to.to_tsecr = tw->t_recent; } optlen = tcp_addoptions(&to, (u_char *)(th + 1)); From owner-svn-src-all@FreeBSD.ORG Sat May 19 18:33:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0472D1065781; Sat, 19 May 2012 18:33:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E2DF98FC0A; Sat, 19 May 2012 18:33:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JIX8NF038479; Sat, 19 May 2012 18:33:08 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JIX81C038473; Sat, 19 May 2012 18:33:08 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205191833.q4JIX81C038473@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 19 May 2012 18:33:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235658 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 18:33:09 -0000 Author: bz Date: Sat May 19 18:33:08 2012 New Revision: 235658 URL: http://svn.freebsd.org/changeset/base/235658 Log: MFC r231767: Fix PAWS (Protect Against Wrapped Sequence numbers) in cases when hz >> 1000 and thus getting outside the timestamp clock frequenceny of 1ms < x < 1s per tick as mandated by RFC1323, leading to connection resets on idle connections. Always use a granularity of 1ms using getmicrouptime() making all but relevant callouts independent of hz. Use getmicrouptime(), not getmicrotime() as the latter may make a jump possibly breaking TCP nfsroot mounts having our timestamps move forward for more than 24.8 days in a second without having been idle for that long. PR: kern/61404 Modified: stable/8/sys/netinet/tcp_input.c stable/8/sys/netinet/tcp_output.c stable/8/sys/netinet/tcp_seq.h stable/8/sys/netinet/tcp_syncache.c stable/8/sys/netinet/tcp_timewait.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/netinet/tcp_input.c ============================================================================== --- stable/8/sys/netinet/tcp_input.c Sat May 19 18:32:31 2012 (r235657) +++ stable/8/sys/netinet/tcp_input.c Sat May 19 18:33:08 2012 (r235658) @@ -1463,7 +1463,7 @@ tcp_do_segment(struct mbuf *m, struct tc */ if ((to.to_flags & TOF_TS) && (to.to_tsecr != 0)) { to.to_tsecr -= tp->ts_offset; - if (TSTMP_GT(to.to_tsecr, ticks)) + if (TSTMP_GT(to.to_tsecr, tcp_ts_getticks())) to.to_tsecr = 0; } @@ -1488,7 +1488,7 @@ tcp_do_segment(struct mbuf *m, struct tc if (to.to_flags & TOF_TS) { tp->t_flags |= TF_RCVD_TSTMP; tp->ts_recent = to.to_tsval; - tp->ts_recent_age = ticks; + tp->ts_recent_age = tcp_ts_getticks(); } if (to.to_flags & TOF_MSS) tcp_mss(tp, to.to_mss); @@ -1532,7 +1532,7 @@ tcp_do_segment(struct mbuf *m, struct tc */ if ((to.to_flags & TOF_TS) != 0 && SEQ_LEQ(th->th_seq, tp->last_ack_sent)) { - tp->ts_recent_age = ticks; + tp->ts_recent_age = tcp_ts_getticks(); tp->ts_recent = to.to_tsval; } @@ -1575,11 +1575,13 @@ tcp_do_segment(struct mbuf *m, struct tc */ if ((to.to_flags & TOF_TS) != 0 && to.to_tsecr) { - if (!tp->t_rttlow || - tp->t_rttlow > ticks - to.to_tsecr) - tp->t_rttlow = ticks - to.to_tsecr; + u_int t; + + t = tcp_ts_getticks() - to.to_tsecr; + if (!tp->t_rttlow || tp->t_rttlow > t) + tp->t_rttlow = t; tcp_xmit_timer(tp, - ticks - to.to_tsecr + 1); + TCP_TS_TO_TICKS(t) + 1); } else if (tp->t_rtttime && SEQ_GT(th->th_ack, tp->t_rtseq)) { if (!tp->t_rttlow || @@ -2050,7 +2052,7 @@ tcp_do_segment(struct mbuf *m, struct tc TSTMP_LT(to.to_tsval, tp->ts_recent)) { /* Check to see if ts_recent is over 24 days old. */ - if (ticks - tp->ts_recent_age > TCP_PAWS_IDLE) { + if (tcp_ts_getticks() - tp->ts_recent_age > TCP_PAWS_IDLE) { /* * Invalidate ts_recent. If this segment updates * ts_recent, the age will be reset later and ts_recent @@ -2209,7 +2211,7 @@ tcp_do_segment(struct mbuf *m, struct tc SEQ_LEQ(th->th_seq, tp->last_ack_sent) && SEQ_LEQ(tp->last_ack_sent, th->th_seq + tlen + ((thflags & (TH_SYN|TH_FIN)) != 0))) { - tp->ts_recent_age = ticks; + tp->ts_recent_age = tcp_ts_getticks(); tp->ts_recent = to.to_tsval; } @@ -2526,11 +2528,13 @@ process_ACK: * timestamps of 0 or we could calculate a * huge RTT and blow up the retransmit timer. */ - if ((to.to_flags & TOF_TS) != 0 && - to.to_tsecr) { - if (!tp->t_rttlow || tp->t_rttlow > ticks - to.to_tsecr) - tp->t_rttlow = ticks - to.to_tsecr; - tcp_xmit_timer(tp, ticks - to.to_tsecr + 1); + if ((to.to_flags & TOF_TS) != 0 && to.to_tsecr) { + u_int t; + + t = tcp_ts_getticks() - to.to_tsecr; + if (!tp->t_rttlow || tp->t_rttlow > t) + tp->t_rttlow = t; + tcp_xmit_timer(tp, TCP_TS_TO_TICKS(t) + 1); } else if (tp->t_rtttime && SEQ_GT(th->th_ack, tp->t_rtseq)) { if (!tp->t_rttlow || tp->t_rttlow > ticks - tp->t_rtttime) tp->t_rttlow = ticks - tp->t_rtttime; Modified: stable/8/sys/netinet/tcp_output.c ============================================================================== --- stable/8/sys/netinet/tcp_output.c Sat May 19 18:32:31 2012 (r235657) +++ stable/8/sys/netinet/tcp_output.c Sat May 19 18:33:08 2012 (r235658) @@ -702,13 +702,13 @@ send: /* Timestamps. */ if ((tp->t_flags & TF_RCVD_TSTMP) || ((flags & TH_SYN) && (tp->t_flags & TF_REQ_TSTMP))) { - to.to_tsval = ticks + tp->ts_offset; + to.to_tsval = tcp_ts_getticks() + tp->ts_offset; to.to_tsecr = tp->ts_recent; to.to_flags |= TOF_TS; /* Set receive buffer autosizing timestamp. */ if (tp->rfbuf_ts == 0 && (so->so_rcv.sb_flags & SB_AUTOSIZE)) - tp->rfbuf_ts = ticks; + tp->rfbuf_ts = tcp_ts_getticks(); } /* Selective ACK's. */ if (tp->t_flags & TF_SACK_PERMIT) { Modified: stable/8/sys/netinet/tcp_seq.h ============================================================================== --- stable/8/sys/netinet/tcp_seq.h Sat May 19 18:32:31 2012 (r235657) +++ stable/8/sys/netinet/tcp_seq.h Sat May 19 18:33:08 2012 (r235658) @@ -62,7 +62,34 @@ (tp)->snd_una = (tp)->snd_nxt = (tp)->snd_max = (tp)->snd_up = \ (tp)->snd_recover = (tp)->iss -#define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * hz) - /* timestamp wrap-around time */ +#ifdef _KERNEL +/* + * Clock macros for RFC 1323 timestamps. + */ +#define TCP_TS_TO_TICKS(_t) ((_t) * hz / 1000) + +/* Timestamp wrap-around time, 24 days. */ +#define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * 1000) + +/* + * tcp_ts_getticks() in ms, should be 1ms < x < 1000ms according to RFC 1323. + * We always use 1ms granularity independent of hz. + */ +static __inline u_int +tcp_ts_getticks(void) +{ + struct timeval tv; + u_long ms; + + /* + * getmicrouptime() should be good enough for any 1-1000ms granularity. + * Do not use getmicrotime() here as it might break nfsroot/tcp. + */ + getmicrouptime(&tv); + ms = tv.tv_sec * 1000 + tv.tv_usec / 1000; + + return (ms); +} +#endif /* _KERNEL */ #endif /* _NETINET_TCP_SEQ_H_ */ Modified: stable/8/sys/netinet/tcp_syncache.c ============================================================================== --- stable/8/sys/netinet/tcp_syncache.c Sat May 19 18:32:31 2012 (r235657) +++ stable/8/sys/netinet/tcp_syncache.c Sat May 19 18:33:08 2012 (r235658) @@ -801,7 +801,7 @@ syncache_socket(struct syncache *sc, str if (sc->sc_flags & SCF_TIMESTAMP) { tp->t_flags |= TF_REQ_TSTMP|TF_RCVD_TSTMP; tp->ts_recent = sc->sc_tsreflect; - tp->ts_recent_age = ticks; + tp->ts_recent_age = tcp_ts_getticks(); tp->ts_offset = sc->sc_tsoff; } #ifdef TCP_SIGNATURE @@ -1196,7 +1196,7 @@ _syncache_add(struct in_conninfo *inc, s */ if (to->to_flags & TOF_TS) { sc->sc_tsreflect = to->to_tsval; - sc->sc_ts = ticks; + sc->sc_ts = tcp_ts_getticks(); sc->sc_flags |= SCF_TIMESTAMP; } if (to->to_flags & TOF_SCALE) { @@ -1627,7 +1627,7 @@ syncookie_generate(struct syncache_head data |= md5_buffer[2] << 10; /* more digest bits */ data ^= md5_buffer[3]; sc->sc_ts = data; - sc->sc_tsoff = data - ticks; /* after XOR */ + sc->sc_tsoff = data - tcp_ts_getticks(); /* after XOR */ } TCPSTAT_INC(tcps_sc_sendcookie); @@ -1712,7 +1712,7 @@ syncookie_lookup(struct in_conninfo *inc sc->sc_flags |= SCF_TIMESTAMP; sc->sc_tsreflect = to->to_tsval; sc->sc_ts = to->to_tsecr; - sc->sc_tsoff = to->to_tsecr - ticks; + sc->sc_tsoff = to->to_tsecr - tcp_ts_getticks(); sc->sc_flags |= (data & 0x1) ? SCF_SIGNATURE : 0; sc->sc_flags |= ((data >> 1) & 0x1) ? SCF_SACK : 0; sc->sc_requested_s_scale = min((data >> 2) & 0xf, Modified: stable/8/sys/netinet/tcp_timewait.c ============================================================================== --- stable/8/sys/netinet/tcp_timewait.c Sat May 19 18:32:31 2012 (r235657) +++ stable/8/sys/netinet/tcp_timewait.c Sat May 19 18:33:08 2012 (r235658) @@ -535,7 +535,7 @@ tcp_twrespond(struct tcptw *tw, int flag */ if (tw->t_recent && flags == TH_ACK) { to.to_flags |= TOF_TS; - to.to_tsval = ticks + tw->ts_offset; + to.to_tsval = tcp_ts_getticks() + tw->ts_offset; to.to_tsecr = tw->t_recent; } optlen = tcp_addoptions(&to, (u_char *)(th + 1)); From owner-svn-src-all@FreeBSD.ORG Sat May 19 18:33:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F84C10657F4; Sat, 19 May 2012 18:33:29 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 898418FC08; Sat, 19 May 2012 18:33:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JIXTc6038533; Sat, 19 May 2012 18:33:29 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JIXTiJ038527; Sat, 19 May 2012 18:33:29 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205191833.q4JIXTiJ038527@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 19 May 2012 18:33:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235659 - stable/7/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 18:33:29 -0000 Author: bz Date: Sat May 19 18:33:28 2012 New Revision: 235659 URL: http://svn.freebsd.org/changeset/base/235659 Log: MFC r231767: Fix PAWS (Protect Against Wrapped Sequence numbers) in cases when hz >> 1000 and thus getting outside the timestamp clock frequenceny of 1ms < x < 1s per tick as mandated by RFC1323, leading to connection resets on idle connections. Always use a granularity of 1ms using getmicrouptime() making all but relevant callouts independent of hz. Use getmicrouptime(), not getmicrotime() as the latter may make a jump possibly breaking TCP nfsroot mounts having our timestamps move forward for more than 24.8 days in a second without having been idle for that long. PR: kern/61404 Modified: stable/7/sys/netinet/tcp_input.c stable/7/sys/netinet/tcp_output.c stable/7/sys/netinet/tcp_seq.h stable/7/sys/netinet/tcp_syncache.c stable/7/sys/netinet/tcp_timewait.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/netinet/tcp_input.c ============================================================================== --- stable/7/sys/netinet/tcp_input.c Sat May 19 18:33:08 2012 (r235658) +++ stable/7/sys/netinet/tcp_input.c Sat May 19 18:33:28 2012 (r235659) @@ -933,7 +933,7 @@ tcp_do_segment(struct mbuf *m, struct tc */ if ((to.to_flags & TOF_TS) && (to.to_tsecr != 0)) { to.to_tsecr -= tp->ts_offset; - if (TSTMP_GT(to.to_tsecr, ticks)) + if (TSTMP_GT(to.to_tsecr, tcp_ts_getticks())) to.to_tsecr = 0; } @@ -958,7 +958,7 @@ tcp_do_segment(struct mbuf *m, struct tc if (to.to_flags & TOF_TS) { tp->t_flags |= TF_RCVD_TSTMP; tp->ts_recent = to.to_tsval; - tp->ts_recent_age = ticks; + tp->ts_recent_age = tcp_ts_getticks(); } if (to.to_flags & TOF_MSS) tcp_mss(tp, to.to_mss); @@ -1002,7 +1002,7 @@ tcp_do_segment(struct mbuf *m, struct tc */ if ((to.to_flags & TOF_TS) != 0 && SEQ_LEQ(th->th_seq, tp->last_ack_sent)) { - tp->ts_recent_age = ticks; + tp->ts_recent_age = tcp_ts_getticks(); tp->ts_recent = to.to_tsval; } @@ -1054,11 +1054,13 @@ tcp_do_segment(struct mbuf *m, struct tc */ if ((to.to_flags & TOF_TS) != 0 && to.to_tsecr) { - if (!tp->t_rttlow || - tp->t_rttlow > ticks - to.to_tsecr) - tp->t_rttlow = ticks - to.to_tsecr; + u_int t; + + t = tcp_ts_getticks() - to.to_tsecr; + if (!tp->t_rttlow || tp->t_rttlow > t) + tp->t_rttlow = t; tcp_xmit_timer(tp, - ticks - to.to_tsecr + 1); + TCP_TS_TO_TICKS(t) + 1); } else if (tp->t_rtttime && SEQ_GT(th->th_ack, tp->t_rtseq)) { if (!tp->t_rttlow || @@ -1499,7 +1501,7 @@ tcp_do_segment(struct mbuf *m, struct tc TSTMP_LT(to.to_tsval, tp->ts_recent)) { /* Check to see if ts_recent is over 24 days old. */ - if ((int)(ticks - tp->ts_recent_age) > TCP_PAWS_IDLE) { + if (tcp_ts_getticks() - tp->ts_recent_age > TCP_PAWS_IDLE) { /* * Invalidate ts_recent. If this segment updates * ts_recent, the age will be reset later and ts_recent @@ -1652,7 +1654,7 @@ tcp_do_segment(struct mbuf *m, struct tc SEQ_LEQ(th->th_seq, tp->last_ack_sent) && SEQ_LEQ(tp->last_ack_sent, th->th_seq + tlen + ((thflags & (TH_SYN|TH_FIN)) != 0))) { - tp->ts_recent_age = ticks; + tp->ts_recent_age = tcp_ts_getticks(); tp->ts_recent = to.to_tsval; } @@ -1994,11 +1996,13 @@ process_ACK: * timestamps of 0 or we could calculate a * huge RTT and blow up the retransmit timer. */ - if ((to.to_flags & TOF_TS) != 0 && - to.to_tsecr) { - if (!tp->t_rttlow || tp->t_rttlow > ticks - to.to_tsecr) - tp->t_rttlow = ticks - to.to_tsecr; - tcp_xmit_timer(tp, ticks - to.to_tsecr + 1); + if ((to.to_flags & TOF_TS) != 0 && to.to_tsecr) { + u_int t; + + t = tcp_ts_getticks() - to.to_tsecr; + if (!tp->t_rttlow || tp->t_rttlow > t) + tp->t_rttlow = t; + tcp_xmit_timer(tp, TCP_TS_TO_TICKS(t) + 1); } else if (tp->t_rtttime && SEQ_GT(th->th_ack, tp->t_rtseq)) { if (!tp->t_rttlow || tp->t_rttlow > ticks - tp->t_rtttime) tp->t_rttlow = ticks - tp->t_rtttime; Modified: stable/7/sys/netinet/tcp_output.c ============================================================================== --- stable/7/sys/netinet/tcp_output.c Sat May 19 18:33:08 2012 (r235658) +++ stable/7/sys/netinet/tcp_output.c Sat May 19 18:33:28 2012 (r235659) @@ -685,13 +685,13 @@ send: /* Timestamps. */ if ((tp->t_flags & TF_RCVD_TSTMP) || ((flags & TH_SYN) && (tp->t_flags & TF_REQ_TSTMP))) { - to.to_tsval = ticks + tp->ts_offset; + to.to_tsval = tcp_ts_getticks() + tp->ts_offset; to.to_tsecr = tp->ts_recent; to.to_flags |= TOF_TS; /* Set receive buffer autosizing timestamp. */ if (tp->rfbuf_ts == 0 && (so->so_rcv.sb_flags & SB_AUTOSIZE)) - tp->rfbuf_ts = ticks; + tp->rfbuf_ts = tcp_ts_getticks(); } /* Selective ACK's. */ if (tp->t_flags & TF_SACK_PERMIT) { Modified: stable/7/sys/netinet/tcp_seq.h ============================================================================== --- stable/7/sys/netinet/tcp_seq.h Sat May 19 18:33:08 2012 (r235658) +++ stable/7/sys/netinet/tcp_seq.h Sat May 19 18:33:28 2012 (r235659) @@ -62,7 +62,34 @@ (tp)->snd_una = (tp)->snd_nxt = (tp)->snd_max = (tp)->snd_up = \ (tp)->snd_recover = (tp)->iss -#define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * hz) - /* timestamp wrap-around time */ +#ifdef _KERNEL +/* + * Clock macros for RFC 1323 timestamps. + */ +#define TCP_TS_TO_TICKS(_t) ((_t) * hz / 1000) + +/* Timestamp wrap-around time, 24 days. */ +#define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * 1000) + +/* + * tcp_ts_getticks() in ms, should be 1ms < x < 1000ms according to RFC 1323. + * We always use 1ms granularity independent of hz. + */ +static __inline u_int +tcp_ts_getticks(void) +{ + struct timeval tv; + u_long ms; + + /* + * getmicrouptime() should be good enough for any 1-1000ms granularity. + * Do not use getmicrotime() here as it might break nfsroot/tcp. + */ + getmicrouptime(&tv); + ms = tv.tv_sec * 1000 + tv.tv_usec / 1000; + + return (ms); +} +#endif /* _KERNEL */ #endif /* _NETINET_TCP_SEQ_H_ */ Modified: stable/7/sys/netinet/tcp_syncache.c ============================================================================== --- stable/7/sys/netinet/tcp_syncache.c Sat May 19 18:33:08 2012 (r235658) +++ stable/7/sys/netinet/tcp_syncache.c Sat May 19 18:33:28 2012 (r235659) @@ -821,7 +821,7 @@ syncache_socket(struct syncache *sc, str if (sc->sc_flags & SCF_TIMESTAMP) { tp->t_flags |= TF_REQ_TSTMP|TF_RCVD_TSTMP; tp->ts_recent = sc->sc_tsreflect; - tp->ts_recent_age = ticks; + tp->ts_recent_age = tcp_ts_getticks(); tp->ts_offset = sc->sc_tsoff; } #ifdef TCP_SIGNATURE @@ -1224,7 +1224,7 @@ _syncache_add(struct in_conninfo *inc, s */ if (to->to_flags & TOF_TS) { sc->sc_tsreflect = to->to_tsval; - sc->sc_ts = ticks; + sc->sc_ts = tcp_ts_getticks(); sc->sc_flags |= SCF_TIMESTAMP; } if (to->to_flags & TOF_SCALE) { @@ -1640,7 +1640,7 @@ syncookie_generate(struct syncache_head data |= md5_buffer[2] << 10; /* more digest bits */ data ^= md5_buffer[3]; sc->sc_ts = data; - sc->sc_tsoff = data - ticks; /* after XOR */ + sc->sc_tsoff = data - tcp_ts_getticks(); /* after XOR */ } tcpstat.tcps_sc_sendcookie++; @@ -1725,7 +1725,7 @@ syncookie_lookup(struct in_conninfo *inc sc->sc_flags |= SCF_TIMESTAMP; sc->sc_tsreflect = to->to_tsval; sc->sc_ts = to->to_tsecr; - sc->sc_tsoff = to->to_tsecr - ticks; + sc->sc_tsoff = to->to_tsecr - tcp_ts_getticks(); sc->sc_flags |= (data & 0x1) ? SCF_SIGNATURE : 0; sc->sc_flags |= ((data >> 1) & 0x1) ? SCF_SACK : 0; sc->sc_requested_s_scale = min((data >> 2) & 0xf, Modified: stable/7/sys/netinet/tcp_timewait.c ============================================================================== --- stable/7/sys/netinet/tcp_timewait.c Sat May 19 18:33:08 2012 (r235658) +++ stable/7/sys/netinet/tcp_timewait.c Sat May 19 18:33:28 2012 (r235659) @@ -517,7 +517,7 @@ tcp_twrespond(struct tcptw *tw, int flag */ if (tw->t_recent && flags == TH_ACK) { to.to_flags |= TOF_TS; - to.to_tsval = ticks + tw->ts_offset; + to.to_tsval = tcp_ts_getticks() + tw->ts_offset; to.to_tsecr = tw->t_recent; } optlen = tcp_addoptions(&to, (u_char *)(th + 1)); From owner-svn-src-all@FreeBSD.ORG Sat May 19 18:57:13 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19D7A106566B; Sat, 19 May 2012 18:57:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 7DABB8FC20; Sat, 19 May 2012 18:57:11 +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 VAA04908; Sat, 19 May 2012 21:57:03 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SVopr-000Bto-3I; Sat, 19 May 2012 21:57:03 +0300 Message-ID: <4FB7ECFC.2020509@FreeBSD.org> Date: Sat, 19 May 2012 21:57:00 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <201205191432.q4JEWle6027225@svn.freebsd.org> In-Reply-To: <201205191432.q4JEWle6027225@svn.freebsd.org> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r235650 - stable/8/usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 18:57:13 -0000 on 19/05/2012 17:32 Bjoern A. Zeeb said the following: > Author: bz > Date: Sat May 19 14:32:47 2012 > New Revision: 235650 > URL: http://svn.freebsd.org/changeset/base/235650 > > Log: > MFC r233713: > > Remove the magic mfi_array is 288 bytes and just use the > sizeof the array since it is not 288 bytes. > > Change reporting of a "SYSTEM" disk to "JBOD" to match > LSI MegaCli and firmware reporting. > > This means that mfiutil command to "create jbod" is now a > little confusing since a RAID per drive is not really what > LSI defines JBOD to be. This should be fixed in the future > and support added to really create LSI JBOD and enable that > feature on cards that support it. > > To unbreak the build after: r235625 (?) > > Modified: > stable/8/usr.sbin/mfiutil/mfi_config.c > stable/8/usr.sbin/mfiutil/mfi_drive.c > Directory Properties: > stable/8/usr.sbin/mfiutil/ (props changed) > > Modified: stable/8/usr.sbin/mfiutil/mfi_config.c > ============================================================================== > --- stable/8/usr.sbin/mfiutil/mfi_config.c Sat May 19 14:30:49 2012 (r235649) > +++ stable/8/usr.sbin/mfiutil/mfi_config.c Sat May 19 14:32:47 2012 (r235650) > @@ -211,9 +211,8 @@ clear_config(int ac, char **av) > } > MFI_COMMAND(top, clear, clear_config); > > -#define MFI_ARRAY_SIZE 288 > -#define MAX_DRIVES_PER_ARRAY \ > - ((MFI_ARRAY_SIZE - sizeof(struct mfi_array)) / 8) > +#define MAX_DRIVES_PER_ARRAY MFI_MAX_ROW_SIZE > +#define MFI_ARRAY_SIZE sizeof(struct mfi_array) A small nit: previously MFI_ARRAY_SIZE wasn't used for anything except MAX_DRIVES_PER_ARRAY, now it's not used for anything. > #define RT_RAID0 0 > #define RT_RAID1 1 > @@ -305,7 +304,7 @@ parse_array(int fd, int raid_type, char > > /* Validate the number of drives for this array. */ > if (count >= MAX_DRIVES_PER_ARRAY) { > - warnx("Too many drives for a single array: max is %zu", > + warnx("Too many drives for a single array: max is %d", > MAX_DRIVES_PER_ARRAY); > return (EINVAL); > } > > Modified: stable/8/usr.sbin/mfiutil/mfi_drive.c > ============================================================================== > --- stable/8/usr.sbin/mfiutil/mfi_drive.c Sat May 19 14:30:49 2012 (r235649) > +++ stable/8/usr.sbin/mfiutil/mfi_drive.c Sat May 19 14:32:47 2012 (r235650) > @@ -149,7 +149,7 @@ mfi_pdstate(enum mfi_pd_state state) > case MFI_PD_STATE_COPYBACK: > return ("COPYBACK"); > case MFI_PD_STATE_SYSTEM: > - return ("SYSTEM"); > + return ("JBOD"); > default: > sprintf(buf, "PSTATE 0x%04x", state); > return (buf); -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Sat May 19 19:34:58 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6C645106566C; Sat, 19 May 2012 19:34:58 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) by mx1.freebsd.org (Postfix) with ESMTP id D0FC48FC0A; Sat, 19 May 2012 19:34:57 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id E3EF825D389C; Sat, 19 May 2012 19:34:55 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id E816BBE74CB; Sat, 19 May 2012 19:34:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id IeN0Qm4pnK3K; Sat, 19 May 2012 19:34:53 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id A8B11BE74CA; Sat, 19 May 2012 19:34:53 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <4FB7ECFC.2020509@FreeBSD.org> Date: Sat, 19 May 2012 19:34:52 +0000 Content-Transfer-Encoding: 7bit Message-Id: <3CC44A84-4FF8-4850-B38B-DF0A3C26EAC1@FreeBSD.org> References: <201205191432.q4JEWle6027225@svn.freebsd.org> <4FB7ECFC.2020509@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.1084) Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r235650 - stable/8/usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 19:34:58 -0000 On 19. May 2012, at 18:57 , Andriy Gapon wrote: > on 19/05/2012 17:32 Bjoern A. Zeeb said the following: >> Author: bz >> Date: Sat May 19 14:32:47 2012 >> New Revision: 235650 >> URL: http://svn.freebsd.org/changeset/base/235650 >> >> Log: >> MFC r233713: >> >> Remove the magic mfi_array is 288 bytes and just use the >> sizeof the array since it is not 288 bytes. >> >> Change reporting of a "SYSTEM" disk to "JBOD" to match >> LSI MegaCli and firmware reporting. >> >> This means that mfiutil command to "create jbod" is now a >> little confusing since a RAID per drive is not really what >> LSI defines JBOD to be. This should be fixed in the future >> and support added to really create LSI JBOD and enable that >> feature on cards that support it. >> >> To unbreak the build after: r235625 (?) .. >> @@ -211,9 +211,8 @@ clear_config(int ac, char **av) >> } >> MFI_COMMAND(top, clear, clear_config); >> >> -#define MFI_ARRAY_SIZE 288 >> -#define MAX_DRIVES_PER_ARRAY \ >> - ((MFI_ARRAY_SIZE - sizeof(struct mfi_array)) / 8) >> +#define MAX_DRIVES_PER_ARRAY MFI_MAX_ROW_SIZE >> +#define MFI_ARRAY_SIZE sizeof(struct mfi_array) > > A small nit: previously MFI_ARRAY_SIZE wasn't used for anything except > MAX_DRIVES_PER_ARRAY, now it's not used for anything. Whatever else needs to be fixed in HEAD or MFCed to stable I don't know; see the last line of my commit message and talk to the other suspects like jhb, sbruno, ambrisko, emaste.... -- Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Sat May 19 19:47:02 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E1311065670; Sat, 19 May 2012 19:47:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 7D9D68FC0A; Sat, 19 May 2012 19:47:00 +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 WAA05221; Sat, 19 May 2012 22:46:58 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SVpcA-000BxI-K4; Sat, 19 May 2012 22:46:58 +0300 Message-ID: <4FB7F8B1.8070403@FreeBSD.org> Date: Sat, 19 May 2012 22:46:57 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <201205191432.q4JEWle6027225@svn.freebsd.org> <4FB7ECFC.2020509@FreeBSD.org> <3CC44A84-4FF8-4850-B38B-DF0A3C26EAC1@FreeBSD.org> In-Reply-To: <3CC44A84-4FF8-4850-B38B-DF0A3C26EAC1@FreeBSD.org> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r235650 - stable/8/usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 19:47:02 -0000 on 19/05/2012 22:34 Bjoern A. Zeeb said the following: > > On 19. May 2012, at 18:57 , Andriy Gapon wrote: > >> on 19/05/2012 17:32 Bjoern A. Zeeb said the following: >>> Author: bz >>> Date: Sat May 19 14:32:47 2012 >>> New Revision: 235650 >>> URL: http://svn.freebsd.org/changeset/base/235650 >>> >>> Log: >>> MFC r233713: [snip] >>> To unbreak the build after: r235625 (?) > > > .. >>> @@ -211,9 +211,8 @@ clear_config(int ac, char **av) >>> } >>> MFI_COMMAND(top, clear, clear_config); >>> >>> -#define MFI_ARRAY_SIZE 288 >>> -#define MAX_DRIVES_PER_ARRAY \ >>> - ((MFI_ARRAY_SIZE - sizeof(struct mfi_array)) / 8) >>> +#define MAX_DRIVES_PER_ARRAY MFI_MAX_ROW_SIZE >>> +#define MFI_ARRAY_SIZE sizeof(struct mfi_array) >> >> A small nit: previously MFI_ARRAY_SIZE wasn't used for anything except >> MAX_DRIVES_PER_ARRAY, now it's not used for anything. > > Whatever else needs to be fixed in HEAD or MFCed to stable I don't know; > see the last line of my commit message and talk to the other suspects like > jhb, sbruno, ambrisko, emaste.... > I actually missed the first line, that is the fact that it was an MFC. Somehow I mistook it for a direct commit to fix the build. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Sat May 19 20:05:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBA56106564A; Sat, 19 May 2012 20:05:29 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6D828FC0C; Sat, 19 May 2012 20:05:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JK5St0042684; Sat, 19 May 2012 20:05:28 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JK5SGq042682; Sat, 19 May 2012 20:05:28 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205192005.q4JK5SGq042682@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 19 May 2012 20:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235660 - head/tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 20:05:29 -0000 Author: marcel Date: Sat May 19 20:05:27 2012 New Revision: 235660 URL: http://svn.freebsd.org/changeset/base/235660 Log: Document the ED_CRYPTO and LS_COLORS options. Obtained from: Juniper Networks, Inc. Added: head/tools/build/options/WITHOUT_ED_CRYPTO (contents, props changed) head/tools/build/options/WITHOUT_LS_COLORS (contents, props changed) Added: head/tools/build/options/WITHOUT_ED_CRYPTO ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_ED_CRYPTO Sat May 19 20:05:27 2012 (r235660) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to build +.Xr ed 1 +without support for encryption/decryption. Added: head/tools/build/options/WITHOUT_LS_COLORS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_LS_COLORS Sat May 19 20:05:27 2012 (r235660) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to build +.Xr ls 1 +without support for colors to distinguish file types. From owner-svn-src-all@FreeBSD.ORG Sat May 19 20:11:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A048106564A; Sat, 19 May 2012 20:11:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01B5C8FC15; Sat, 19 May 2012 20:11:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JKBIGN042972; Sat, 19 May 2012 20:11:18 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JKBICn042969; Sat, 19 May 2012 20:11:18 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205192011.q4JKBICn042969@svn.freebsd.org> From: Adrian Chadd Date: Sat, 19 May 2012 20:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235661 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 20:11:19 -0000 Author: adrian Date: Sat May 19 20:11:18 2012 New Revision: 235661 URL: http://svn.freebsd.org/changeset/base/235661 Log: Enable the AR8316 switch on the routerstation pro board. The configuration is: * RGMII, both ports * arge0 - connected to PHY4 as a dedicated port (CPU port) * arge1 - connected to the switch ports I've verified this on my routerstation pro board. Modified: head/sys/mips/conf/RSPRO head/sys/mips/conf/RSPRO.hints Modified: head/sys/mips/conf/RSPRO ============================================================================== --- head/sys/mips/conf/RSPRO Sat May 19 20:05:27 2012 (r235660) +++ head/sys/mips/conf/RSPRO Sat May 19 20:11:18 2012 (r235661) @@ -21,6 +21,12 @@ options GEOM_PART_BSD options GEOM_PART_MBR options MSDOSFS +# For etherswitch support +options ARGE_MDIO +device miiproxy +device etherswitch +device arswitch + # Boot off of flash options ROOTDEVNAME=\"ufs:redboot/rootfs.uzip\" Modified: head/sys/mips/conf/RSPRO.hints ============================================================================== --- head/sys/mips/conf/RSPRO.hints Sat May 19 20:05:27 2012 (r235660) +++ head/sys/mips/conf/RSPRO.hints Sat May 19 20:11:18 2012 (r235661) @@ -1,10 +1,27 @@ # $FreeBSD$ -hint.arge.0.phymask=0x10 - -hint.arge.1.media=1000 -hint.arge.1.fduplex=1 -hint.arge.1.phymask=0x0e +# arge0 mdio bus +hint.argemdio.0.at="nexus0" +hint.argemdio.0.maddr=0x19000000 +hint.argemdio.0.msize=0x1000 +hint.argemdio.0.order=0 + +# arge0: dedicated switch port +hint.arge.0.phymask=0x10 # PHY4 +hint.arge.0.miimode=3 # RGMII +hint.arge.0.mdio=mdioproxy1 # .. off of the switch mdiobus + +# arge1: nail to 1000/full, RGMII - connected to the switch +hint.arge.1.media=1000 # Map to 1000/full +hint.arge.1.fduplex=1 # +hint.arge.1.phymask=0x0 # no directly mapped PHYs +hint.arge.1.miimode=3 # RGMII + +hint.arswitch.0.is_7240=0 +hint.arswitch.0.numphys=4 +hint.arswitch.0.phy4cpu=1 +hint.arswitch.0.is_rgmii=1 +hint.arswitch.0.is_gmii=0 # Don't flip on anything that isn't already enabled. # This includes leaving the SPI CS1/CS2 pins as GPIO pins as they're From owner-svn-src-all@FreeBSD.ORG Sat May 19 21:29:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C33EF1065674; Sat, 19 May 2012 21:29:19 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEF558FC17; Sat, 19 May 2012 21:29:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JLTJVq046436; Sat, 19 May 2012 21:29:19 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JLTJAW046434; Sat, 19 May 2012 21:29:19 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205192129.q4JLTJAW046434@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 19 May 2012 21:29:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235662 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 21:29:20 -0000 Author: marcel Date: Sat May 19 21:29:18 2012 New Revision: 235662 URL: http://svn.freebsd.org/changeset/base/235662 Log: Regenerate after the additions of: WITHOUT_ED_CRYPTO WITHOUT_LS_COLORS WITH_NAND Pointed out by: Garrett Cooper Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat May 19 20:11:18 2012 (r235661) +++ head/share/man/man5/src.conf.5 Sat May 19 21:29:18 2012 (r235662) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru .\" $FreeBSD$ -.Dd May 12, 2012 +.Dd May 19, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -207,7 +207,7 @@ and Set to enable the http statistics interface for named. This requires ports/textproc/libxml2 to be installed in /usr/local. .It Va WITHOUT_BINUTILS -.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 222090 2011-05-19 05:13:25Z imp +.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 235342 2012-05-12 16:12:36Z gjb Set to not install binutils (as, c++-filt, gconv, gnu-ar, gnu-randlib, ld, nm, objcopy, objdump, readelf, size and strip). .Bf -symbolic @@ -292,7 +292,7 @@ amd64/amd64, i386/i386, pc98/i386, power .\" from FreeBSD: head/tools/build/options/WITH_CLANG_EXTRAS 231057 2012-02-05 23:56:22Z dim Set to build additional clang and llvm tools, such as bugpoint. .It Va WITH_CLANG_IS_CC -.\" from FreeBSD: head/tools/build/options/WITH_CLANG_IS_CC 232322 2012-02-29 22:58:51Z dim +.\" from FreeBSD: head/tools/build/options/WITH_CLANG_IS_CC 235342 2012-05-12 16:12:36Z gjb Set to install the Clang C/C++ compiler as .Pa /usr/bin/cc , .Pa /usr/bin/c++ @@ -368,6 +368,11 @@ Set this if you do not want to link and .Pa /sbin dynamically. +.It Va WITHOUT_ED_CRYPTO +.\" from FreeBSD: head/tools/build/options/WITHOUT_ED_CRYPTO 235660 2012-05-19 20:05:27Z marcel +Set to build +.Xr ed 1 +without support for encryption/decryption. .It Va WITHOUT_EXAMPLES .\" from FreeBSD: head/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru Set to avoid installing examples to @@ -667,6 +672,11 @@ and related programs. Set to not build .Xr lpr 1 and related programs. +.It Va WITHOUT_LS_COLORS +.\" from FreeBSD: head/tools/build/options/WITHOUT_LS_COLORS 235660 2012-05-19 20:05:27Z marcel +Set to build +.Xr ls 1 +without support for colors to distinguish file types. .It Va WITHOUT_MAIL .\" from FreeBSD: head/tools/build/options/WITHOUT_MAIL 183242 2008-09-21 22:02:26Z sam Set to not build any mail support (MUA or MTA). @@ -709,6 +719,9 @@ Set to not build utilities for manual pa .Xr whatis 1 , .Xr manctl 8 , and related support files. +.It Va WITH_NAND +.\" from FreeBSD: head/tools/build/options/WITH_NAND 235537 2012-05-17 10:11:18Z gber +Set to build the NAND Flash components. .It Va WITHOUT_NCP .\" from FreeBSD: head/tools/build/options/WITHOUT_NCP 156932 2006-03-21 07:50:50Z ru Set to not build programs, libraries, and kernel modules @@ -893,7 +906,7 @@ Set to not build the .Bx 4.4 legacy docs. .It Va WITH_SHARED_TOOLCHAIN -.\" from FreeBSD: head/tools/build/options/WITH_SHARED_TOOLCHAIN 234782 2012-04-29 09:32:44Z kib +.\" from FreeBSD: head/tools/build/options/WITH_SHARED_TOOLCHAIN 235342 2012-05-12 16:12:36Z gjb Set to build the toolchain binaries shared. The set includes .Xr cc 1 , @@ -1015,7 +1028,7 @@ protocols (usable only via 802.1X). .\" from FreeBSD: head/tools/build/options/WITHOUT_ZFS 168409 2007-04-06 02:13:30Z pjd Set to not build ZFS file system. .It Va WITHOUT_ZONEINFO -.\" from FreeBSD: head/tools/build/options/WITHOUT_ZONEINFO 171994 2007-08-27 20:01:08Z remko +.\" from FreeBSD: head/tools/build/options/WITHOUT_ZONEINFO 235342 2012-05-12 16:12:36Z gjb Set to not build the timezone database. .El .Sh FILES From owner-svn-src-all@FreeBSD.ORG Sat May 19 21:36:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5020F106566B; Sat, 19 May 2012 21:36:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B3F18FC08; Sat, 19 May 2012 21:36:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JLaqI5046805; Sat, 19 May 2012 21:36:52 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JLaqAA046803; Sat, 19 May 2012 21:36:52 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205192136.q4JLaqAA046803@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 19 May 2012 21:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235663 - stable/9/sys/dev/qlxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 21:36:53 -0000 Author: bz Date: Sat May 19 21:36:52 2012 New Revision: 235663 URL: http://svn.freebsd.org/changeset/base/235663 Log: MFC r234617: Do not announce IPv6 TSO support yet. The in-tree driver does not seem to fully handle this yet. Modified: stable/9/sys/dev/qlxgb/qla_os.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/qlxgb/qla_os.c ============================================================================== --- stable/9/sys/dev/qlxgb/qla_os.c Sat May 19 21:29:18 2012 (r235662) +++ stable/9/sys/dev/qlxgb/qla_os.c Sat May 19 21:36:52 2012 (r235663) @@ -678,7 +678,6 @@ qla_init_ifnet(device_t dev, qla_host_t ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_TSO4 | - IFCAP_TSO6 | IFCAP_JUMBO_MTU; ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; From owner-svn-src-all@FreeBSD.ORG Sat May 19 21:45:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F1F41065674; Sat, 19 May 2012 21:45:11 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AB1E8FC27; Sat, 19 May 2012 21:45:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JLjBXP047234; Sat, 19 May 2012 21:45:11 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JLjBIl047232; Sat, 19 May 2012 21:45:11 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205192145.q4JLjBIl047232@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 19 May 2012 21:45:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235664 - stable/9/sys/ofed/drivers/net/mlx4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 21:45:11 -0000 Author: bz Date: Sat May 19 21:45:11 2012 New Revision: 235664 URL: http://svn.freebsd.org/changeset/base/235664 Log: MFC r234618: Do not announce IPv6 TSO support yet. The driver seems to make assumptions based on IPv4 header parsing only. Modified: stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Sat May 19 21:36:52 2012 (r235663) +++ stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Sat May 19 21:45:11 2012 (r235664) @@ -1561,7 +1561,7 @@ int mlx4_en_init_netdev(struct mlx4_en_d dev->if_capabilities |= IFCAP_VLAN_HWCSUM | IFCAP_VLAN_HWFILTER; dev->if_capabilities |= IFCAP_LINKSTATE | IFCAP_JUMBO_MTU; if (mdev->LSO_support) - dev->if_capabilities |= IFCAP_TSO | IFCAP_VLAN_HWTSO; + dev->if_capabilities |= IFCAP_TSO4 | IFCAP_VLAN_HWTSO; if (mdev->profile.num_lro) dev->if_capabilities |= IFCAP_LRO; dev->if_capenable = dev->if_capabilities; From owner-svn-src-all@FreeBSD.ORG Sat May 19 21:56:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EC300106566B; Sat, 19 May 2012 21:56:27 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 827FD8FC08; Sat, 19 May 2012 21:56:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JLuQAW047812; Sat, 19 May 2012 21:56:26 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JLuQCo047811; Sat, 19 May 2012 21:56:26 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205192156.q4JLuQCo047811@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 19 May 2012 21:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235665 - stable/9/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 21:56:28 -0000 Author: bz Date: Sat May 19 21:56:26 2012 New Revision: 235665 URL: http://svn.freebsd.org/changeset/base/235665 Log: MFC r234620 (record mergeinfo only): Modified: Directory Properties: stable/9/sys/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sat May 19 22:10:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D696A106566C; Sat, 19 May 2012 22:10:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 5C57D8FC16; Sat, 19 May 2012 22:10:17 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id B83AA25D3860; Sat, 19 May 2012 22:10:15 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id D1DADBE74E9; Sat, 19 May 2012 22:10:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id I8WCpsuS6Odt; Sat, 19 May 2012 22:10:13 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 80EB8BE74E8; Sat, 19 May 2012 22:10:13 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=iso-8859-1 From: "Bjoern A. Zeeb" In-Reply-To: <201205192156.q4JLuQCo047811@svn.freebsd.org> Date: Sat, 19 May 2012 22:10:12 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201205192156.q4JLuQCo047811@svn.freebsd.org> To: src-committers@freebsd.org X-Mailer: Apple Mail (2.1084) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r235665 - stable/9/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 22:10:18 -0000 On 19. May 2012, at 21:56 , Bjoern A. Zeeb wrote: > Author: bz > Date: Sat May 19 21:56:26 2012 > New Revision: 235665 > URL: http://svn.freebsd.org/changeset/base/235665 >=20 > Log: > MFC r234620 (record mergeinfo only): that was truncated by accident but doesn't harm in this case. The change was merged with r235527 by jfv and was: If we pass down 64k - L2 hdr size + 1 to 64K L3+ data adding an ether header will make the data go over the 64k limits announced to busdma as maxsize and the transaction will fail. With TSO this can result in a TCP regression due to the lost packet. According to the data sheets ixgbe(4) 82598 and 82599 can handle up to 256k so increase the maximum. Reported by: Jon K=E5re Hellan, UNINETT (jon.kare.hellan uninett.no) Tested by: Jon K=E5re Hellan, UNINETT (jon.kare.hellan uninett.no) Just the merge-info was missing on stable/9. > Modified: > Directory Properties: > stable/9/sys/ (props changed) --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Sat May 19 22:16:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 957621065670; Sat, 19 May 2012 22:16:12 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 807538FC0C; Sat, 19 May 2012 22:16:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JMGC0S048828; Sat, 19 May 2012 22:16:12 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JMGCnE048826; Sat, 19 May 2012 22:16:12 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205192216.q4JMGCnE048826@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 19 May 2012 22:16:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235666 - stable/8/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 22:16:12 -0000 Author: bz Date: Sat May 19 22:16:12 2012 New Revision: 235666 URL: http://svn.freebsd.org/changeset/base/235666 Log: MFC r234620: If we pass down 64k - L2 hdr size + 1 to 64K L3+ data adding an ether header will make the data go over the 64k limits announced to busdma as maxsize and the transaction will fail. With TSO this can result in a TCP regression due to the lost packet. According to the data sheets ixgbe(4) 82598 and 82599 can handle up to 256k so increase the maximum. Reported by: Jon Kåre Hellan, UNINETT (jon.kare.hellan uninett.no) Tested by: Jon Kåre Hellan, UNINETT (jon.kare.hellan uninett.no) Modified: stable/8/sys/dev/ixgbe/ixgbe.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/ixgbe/ixgbe.h ============================================================================== --- stable/8/sys/dev/ixgbe/ixgbe.h Sat May 19 21:56:26 2012 (r235665) +++ stable/8/sys/dev/ixgbe/ixgbe.h Sat May 19 22:16:12 2012 (r235666) @@ -179,7 +179,7 @@ #define IXGBE_82599_SCATTER 32 #define MSIX_82598_BAR 3 #define MSIX_82599_BAR 4 -#define IXGBE_TSO_SIZE 65535 +#define IXGBE_TSO_SIZE 262140 #define IXGBE_TX_BUFFER_SIZE ((u32) 1514) #define IXGBE_RX_HDR 128 #define IXGBE_VFTA_SIZE 128 From owner-svn-src-all@FreeBSD.ORG Sat May 19 22:17:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D91B81065670; Sat, 19 May 2012 22:17:35 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C44358FC16; Sat, 19 May 2012 22:17:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JMHZek048918; Sat, 19 May 2012 22:17:35 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JMHZNu048916; Sat, 19 May 2012 22:17:35 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205192217.q4JMHZNu048916@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 19 May 2012 22:17:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235667 - stable/7/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 22:17:36 -0000 Author: bz Date: Sat May 19 22:17:34 2012 New Revision: 235667 URL: http://svn.freebsd.org/changeset/base/235667 Log: MFC r234620: If we pass down 64k - L2 hdr size + 1 to 64K L3+ data adding an ether header will make the data go over the 64k limits announced to busdma as maxsize and the transaction will fail. With TSO this can result in a TCP regression due to the lost packet. According to the data sheets ixgbe(4) 82598 and 82599 can handle up to 256k so increase the maximum. Reported by: Jon Kåre Hellan, UNINETT (jon.kare.hellan uninett.no) Tested by: Jon Kåre Hellan, UNINETT (jon.kare.hellan uninett.no) Modified: stable/7/sys/dev/ixgbe/ixgbe.h Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/ixgbe/ixgbe.h ============================================================================== --- stable/7/sys/dev/ixgbe/ixgbe.h Sat May 19 22:16:12 2012 (r235666) +++ stable/7/sys/dev/ixgbe/ixgbe.h Sat May 19 22:17:34 2012 (r235667) @@ -168,7 +168,7 @@ #define IXGBE_82599_SCATTER 32 #define MSIX_82598_BAR 3 #define MSIX_82599_BAR 4 -#define IXGBE_TSO_SIZE 65535 +#define IXGBE_TSO_SIZE 262140 #define IXGBE_TX_BUFFER_SIZE ((u32) 1514) #define IXGBE_RX_HDR 128 #define CSUM_OFFLOAD 7 /* Bits in csum flags */ From owner-svn-src-all@FreeBSD.ORG Sat May 19 22:18:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B060C106566C; Sat, 19 May 2012 22:18:46 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B8428FC0C; Sat, 19 May 2012 22:18:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JMIkHq049044; Sat, 19 May 2012 22:18:46 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JMIk2P049042; Sat, 19 May 2012 22:18:46 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205192218.q4JMIk2P049042@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 19 May 2012 22:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235668 - stable/9/sys/dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 22:18:46 -0000 Author: bz Date: Sat May 19 22:18:45 2012 New Revision: 235668 URL: http://svn.freebsd.org/changeset/base/235668 Log: MFC r234643: Do not toggle IFCAP_TSO4 if we would also do TSO6. Given the driver does not currently announce/support TSO6 that cannot happen. Clean it up anyway for consistency. Modified: stable/9/sys/dev/re/if_re.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/re/if_re.c ============================================================================== --- stable/9/sys/dev/re/if_re.c Sat May 19 22:17:34 2012 (r235667) +++ stable/9/sys/dev/re/if_re.c Sat May 19 22:18:45 2012 (r235668) @@ -3432,7 +3432,7 @@ re_ioctl(struct ifnet *ifp, u_long comma reinit = 1; } if ((mask & IFCAP_TSO4) != 0 && - (ifp->if_capabilities & IFCAP_TSO) != 0) { + (ifp->if_capabilities & IFCAP_TSO4) != 0) { ifp->if_capenable ^= IFCAP_TSO4; if ((IFCAP_TSO4 & ifp->if_capenable) != 0) ifp->if_hwassist |= CSUM_TSO; From owner-svn-src-all@FreeBSD.ORG Sat May 19 22:50:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3346E106566C; Sat, 19 May 2012 22:50:23 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DE8B8FC12; Sat, 19 May 2012 22:50:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JMoMII050522; Sat, 19 May 2012 22:50:22 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JMoMEj050520; Sat, 19 May 2012 22:50:22 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205192250.q4JMoMEj050520@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 19 May 2012 22:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235669 - stable/8/sys/dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 22:50:23 -0000 Author: bz Date: Sat May 19 22:50:22 2012 New Revision: 235669 URL: http://svn.freebsd.org/changeset/base/235669 Log: MFC r234643: Do not toggle IFCAP_TSO4 if we would also do TSO6. Given the driver does not currently announce/support TSO6 that cannot happen. Clean it up anyway for consistency. Modified: stable/8/sys/dev/re/if_re.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/re/if_re.c ============================================================================== --- stable/8/sys/dev/re/if_re.c Sat May 19 22:18:45 2012 (r235668) +++ stable/8/sys/dev/re/if_re.c Sat May 19 22:50:22 2012 (r235669) @@ -3388,7 +3388,7 @@ re_ioctl(struct ifnet *ifp, u_long comma reinit = 1; } if ((mask & IFCAP_TSO4) != 0 && - (ifp->if_capabilities & IFCAP_TSO) != 0) { + (ifp->if_capabilities & IFCAP_TSO4) != 0) { ifp->if_capenable ^= IFCAP_TSO4; if ((IFCAP_TSO4 & ifp->if_capenable) != 0) ifp->if_hwassist |= CSUM_TSO; From owner-svn-src-all@FreeBSD.ORG Sat May 19 22:50:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 712321065675; Sat, 19 May 2012 22:50:39 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5BEE18FC12; Sat, 19 May 2012 22:50:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JModp5050567; Sat, 19 May 2012 22:50:39 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JModox050565; Sat, 19 May 2012 22:50:39 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205192250.q4JModox050565@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 19 May 2012 22:50:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235670 - stable/7/sys/dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 22:50:39 -0000 Author: bz Date: Sat May 19 22:50:38 2012 New Revision: 235670 URL: http://svn.freebsd.org/changeset/base/235670 Log: MFC r234643: Do not toggle IFCAP_TSO4 if we would also do TSO6. Given the driver does not currently announce/support TSO6 that cannot happen. Clean it up anyway for consistency. Modified: stable/7/sys/dev/re/if_re.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Sat May 19 22:50:22 2012 (r235669) +++ stable/7/sys/dev/re/if_re.c Sat May 19 22:50:38 2012 (r235670) @@ -3386,7 +3386,7 @@ re_ioctl(struct ifnet *ifp, u_long comma reinit = 1; } if ((mask & IFCAP_TSO4) != 0 && - (ifp->if_capabilities & IFCAP_TSO) != 0) { + (ifp->if_capabilities & IFCAP_TSO4) != 0) { ifp->if_capenable ^= IFCAP_TSO4; if ((IFCAP_TSO4 & ifp->if_capenable) != 0) ifp->if_hwassist |= CSUM_TSO; From owner-svn-src-all@FreeBSD.ORG Sat May 19 23:25:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B65C106566C; Sat, 19 May 2012 23:25:59 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02F938FC08; Sat, 19 May 2012 23:25:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4JNPwdm052288; Sat, 19 May 2012 23:25:58 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4JNPwkK052285; Sat, 19 May 2012 23:25:58 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205192325.q4JNPwkK052285@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 19 May 2012 23:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235671 - head/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 23:25:59 -0000 Author: bz Date: Sat May 19 23:25:57 2012 New Revision: 235671 URL: http://svn.freebsd.org/changeset/base/235671 Log: MFp4 bz_ipv6_fast: Allow tso4 and tso6 be set individually given we have the bits. This will help with drivers not working as expected during the transition time and later. Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems Reviewed by: gnn MFC After: 1 week Modified: head/sbin/ifconfig/ifconfig.8 head/sbin/ifconfig/ifconfig.c Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Sat May 19 22:50:38 2012 (r235670) +++ head/sbin/ifconfig/ifconfig.8 Sat May 19 23:25:57 2012 (r235671) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd May 1, 2012 +.Dd May 19, 2012 .Dt IFCONFIG 8 .Os .Sh NAME @@ -400,6 +400,22 @@ It will always disable TSO for .Xr ip 4 and .Xr ip6 4 . +.It Cm tso6 , tso4 +If the driver supports +.Xr tcp 4 +segmentation offloading for +.Xr ip6 4 +or +.Xr ip 4 +use one of these to selectively enabled it only for one protocol family. +.It Fl tso6 , tso4 +If the driver supports +.Xr tcp 4 +segmentation offloading for +.Xr ip6 4 +or +.Xr ip 4 +use one of these to selectively disable it only for one protocol family. .It Cm lro If the driver supports .Xr tcp 4 Modified: head/sbin/ifconfig/ifconfig.c ============================================================================== --- head/sbin/ifconfig/ifconfig.c Sat May 19 22:50:38 2012 (r235670) +++ head/sbin/ifconfig/ifconfig.c Sat May 19 23:25:57 2012 (r235671) @@ -1201,6 +1201,10 @@ static struct cmd basic_cmds[] = { DEF_CMD("-netcons", -IFCAP_NETCONS, setifcap), DEF_CMD("polling", IFCAP_POLLING, setifcap), DEF_CMD("-polling", -IFCAP_POLLING, setifcap), + DEF_CMD("tso6", IFCAP_TSO6, setifcap), + DEF_CMD("-tso6", -IFCAP_TSO6, setifcap), + DEF_CMD("tso4", IFCAP_TSO4, setifcap), + DEF_CMD("-tso4", -IFCAP_TSO4, setifcap), DEF_CMD("tso", IFCAP_TSO, setifcap), DEF_CMD("-tso", -IFCAP_TSO, setifcap), DEF_CMD("lro", IFCAP_LRO, setifcap),