From owner-svn-src-stable@FreeBSD.ORG Sun May 13 01:29:50 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 01:30:22 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 01:30:34 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 01:59:51 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 02:09:28 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 10:31:09 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 12:50:43 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 13:35:50 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 13:57:54 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 14:02:41 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 17:01:33 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 17:04:47 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 17:05:55 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 17:10:39 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 17:10:39 -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-stable@FreeBSD.ORG Sun May 13 17:11:50 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 17:13:21 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 17:14:27 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 17:15:31 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 17:32:13 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sun May 13 20:28:44 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 03:11:08 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 04:21:28 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 04:24:24 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 09:48:39 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 09:51:44 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 09:54:16 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 10:12:03 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 10:14:43 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 10:18:31 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 13:49:06 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 15:05:19 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 15:06:05 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 15:08:46 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 15:13:15 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 15:15:14 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 15:18:48 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 15:20:40 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Mon May 14 15:46:37 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Tue May 15 09:09:15 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Tue May 15 09:37:23 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Tue May 15 17:21:47 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 17:21:48 -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-stable@FreeBSD.ORG Tue May 15 18:28:01 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Tue May 15 20:08:49 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Tue May 15 20:38:46 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Tue May 15 20:47:01 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Tue May 15 20:48:10 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Tue May 15 20:49:26 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Tue May 15 20:53:56 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Tue May 15 21:06:25 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 00:01:40 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 00:03:58 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 00:10:43 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 00:36:52 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 00:37:16 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 00:37:37 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 08:26:24 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 09:03:30 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 15:17:52 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 17:26:15 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 19:25:51 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 19:47:03 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 20:00:34 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 20:02:30 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 20:04:46 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 20:05:22 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 20:05:32 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 20:06:18 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 20:31:38 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 20:33:30 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 21:06:57 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 21:06:58 -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-stable@FreeBSD.ORG Wed May 16 21:07:20 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 22:19:22 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Wed May 16 22:22:53 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 00:06:54 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 07:59:16 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 08:14:11 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 10:25:35 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 10:36:33 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 12:59:44 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 13:31:01 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 14:37:02 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 15:02:51 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 15:03:17 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 15:04:19 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 15:20:22 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 15:22:09 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 15:45:00 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 17:46:47 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 19:01:14 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 20:04:25 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 20:27:24 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Thu May 17 20:36:21 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 00:00:47 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 00:02:12 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 00:03:14 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 00:07:48 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 00:08:10 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 00:31:21 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 00:32:30 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 00:40:50 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 00:55:49 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 00:56:13 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 01:04:03 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 01:04:29 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 01:10:13 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 01:10:35 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 01:13:19 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 01:50:35 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 01:51:12 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 02:00:02 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 02:00:41 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 02:06:11 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 02:06:35 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 02:13:19 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 02:14:09 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 02:16:15 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 02:16:36 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 02:19:54 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 02:20:16 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 03:11:18 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 03:24:59 2012 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 45A181065679 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 057B88FC15 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 14:29:55 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 16:16:47 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 18:26:04 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 18:29:45 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 18:32:44 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 18:34:30 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 18:51:13 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 18:53:29 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 19:08:11 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 19:48:34 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 19:48:39 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 20:24:32 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 20:40:25 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 20:43:49 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 21:40:18 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 21:49:13 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Fri May 18 23:29:30 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 00:11:05 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 00:38:06 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 14:13:16 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 14:15:39 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 14:32:47 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 14:38:15 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 18:32:32 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 18:33:09 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 18:33:29 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 18:57:13 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 19:34:58 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 19:47:02 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 21:36:53 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 21:45:11 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 21:56:27 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 22:10:17 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 22:16:12 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 22:17:35 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 22:18:46 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 22:50:23 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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-stable@FreeBSD.ORG Sat May 19 22:50:39 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree 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;