From owner-svn-src-all@FreeBSD.ORG Sun Aug 1 01:06:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 091791065673; Sun, 1 Aug 2010 01:06:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB3F38FC15; Sun, 1 Aug 2010 01:06:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7116HST048006; Sun, 1 Aug 2010 01:06:17 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7116HO6048004; Sun, 1 Aug 2010 01:06:17 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201008010106.o7116HO6048004@svn.freebsd.org> From: Rick Macklem Date: Sun, 1 Aug 2010 01:06:17 +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: r210706 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Aug 2010 01:06:18 -0000 Author: rmacklem Date: Sun Aug 1 01:06:17 2010 New Revision: 210706 URL: http://svn.freebsd.org/changeset/base/210706 Log: MFC: r210032 For the experimental NFSv4 client, do not use cached attributes that were invalidated even when a delegation for the file is held. Modified: stable/8/sys/fs/nfsclient/nfs_clsubs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (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/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clsubs.c Sat Jul 31 23:15:51 2010 (r210705) +++ stable/8/sys/fs/nfsclient/nfs_clsubs.c Sun Aug 1 01:06:17 2010 (r210706) @@ -230,7 +230,7 @@ ncl_getattrcache(struct vnode *vp, struc #endif if ((time_second - np->n_attrstamp) >= timeo && - mustflush != 0) { + (mustflush != 0 || np->n_attrstamp == 0)) { newnfsstats.attrcache_misses++; mtx_unlock(&np->n_mtx); #ifdef NFS_ACDEBUG From owner-svn-src-all@FreeBSD.ORG Sun Aug 1 02:11:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29A031065670; Sun, 1 Aug 2010 02:11:13 +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 F1A3B8FC0A; Sun, 1 Aug 2010 02:11:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o712BCYp062461; Sun, 1 Aug 2010 02:11:12 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o712BCww062459; Sun, 1 Aug 2010 02:11:12 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201008010211.o712BCww062459@svn.freebsd.org> From: Rick Macklem Date: Sun, 1 Aug 2010 02:11: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: r210711 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Aug 2010 02:11:13 -0000 Author: rmacklem Date: Sun Aug 1 02:11:12 2010 New Revision: 210711 URL: http://svn.freebsd.org/changeset/base/210711 Log: MFC: r210034 For the experimental NFSv4 client, make sure that attributes that predate the issue of a delegation are not cached once the delegation is held. This is necessary, since cached attributes remain valid while the delegation is held. Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (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/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clrpcops.c Sun Aug 1 01:39:06 2010 (r210710) +++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c Sun Aug 1 02:11:12 2010 (r210711) @@ -270,6 +270,14 @@ else printf(" fhl=0\n"); #else NFSLOCKNODE(np); np->n_flag &= ~NDELEGMOD; + /* + * Invalidate the attribute cache, so that + * attributes that pre-date the issue of a + * delegation are not cached, since the + * cached attributes will remain valid while + * the delegation is held. + */ + NFSINVALATTRCACHE(np); NFSUNLOCKNODE(np); #endif (void) nfscl_deleg(nmp->nm_mountp, @@ -1731,6 +1739,12 @@ nfsrpc_create(vnode_t dvp, char *name, i error = nfsrpc_createv4(dvp, name, namelen, vap, cverf, fmode, owp, &dp, cred, p, dnap, nnap, nfhpp, attrflagp, dattrflagp, dstuff, &unlocked); + /* + * There is no need to invalidate cached attributes here, + * since new post-delegation issue attributes are always + * returned by nfsrpc_createv4() and these will update the + * attribute cache. + */ if (dp != NULL) (void) nfscl_deleg(nmp->nm_mountp, owp->nfsow_clp, (*nfhpp)->nfh_fh, (*nfhpp)->nfh_len, cred, p, &dp); From owner-svn-src-all@FreeBSD.ORG Sun Aug 1 03:09:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 570871065675; Sun, 1 Aug 2010 03:09:17 +0000 (UTC) (envelope-from kris@pcbsd.org) Received: from mail.iXsystems.com (newknight.ixsystems.com [206.40.55.70]) by mx1.freebsd.org (Postfix) with ESMTP id 3A0D38FC08; Sun, 1 Aug 2010 03:09:17 +0000 (UTC) Received: from mail.ixsystems.com (localhost [127.0.0.1]) by mail.iXsystems.com (Postfix) with ESMTP id 20728A66466; Sat, 31 Jul 2010 19:51:14 -0700 (PDT) Received: from mail.iXsystems.com ([127.0.0.1]) by mail.ixsystems.com (mail.ixsystems.com [127.0.0.1]) (amavisd-maia, port 10024) with ESMTP id 14646-08; Sat, 31 Jul 2010 19:51:13 -0700 (PDT) Received: from [192.168.0.198] (unknown [96.38.85.215]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.iXsystems.com (Postfix) with ESMTPSA id 0AE9DA66410; Sat, 31 Jul 2010 19:51:12 -0700 (PDT) X-User-Agent: K-9 Mail for Android References: <201007311925.o6VJPps1072001@svn.freebsd.org> <20100731210210.GE1760@garage.freebsd.pl> In-Reply-To: <20100731210210.GE1760@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: Kris Moore Date: Sat, 31 Jul 2010 22:51:24 -0400 To: Pawel Jakub Dawidek ,Warner Losh Message-ID: <8857d69f-e79b-4a4d-8dff-fd3792a73850@email.android.com> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210700 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Aug 2010 03:09:17 -0000 "Pawel Jakub Dawidek" wrote: >On Sat, Jul 31, 2010 at 07:25:51PM +0000, Warner Losh wrote: >> Author: imp >> Date: Sat Jul 31 19:25:51 2010 >> New Revision: 210700 >> URL: http://svn.freebsd.org/changeset/base/210700 >> >> Log: >> Adds the async option for journaled file systems (UFS + journaling) >> >> Submitted by: kris moore (kris at pcbsd org) > >Are you sure async is recommended for SU+J? It is for gjournal, but this >is different story. > >-- >Pawel Jakub Dawidek http://www.wheelsystems.com >pjd@FreeBSD.org http://www.FreeBSD.org >FreeBSD committer Am I Evil? Yes, I Am! This is for gjournal specifically. SU+J support will be added later with its own set of options. -- Kris Moore PC-BSD / iXsystems From owner-svn-src-all@FreeBSD.ORG Sun Aug 1 08:06:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A888A106566B; Sun, 1 Aug 2010 08:06:59 +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 989F98FC0C; Sun, 1 Aug 2010 08:06:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7186xPJ040128; Sun, 1 Aug 2010 08:06:59 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7186xlL040126; Sun, 1 Aug 2010 08:06:59 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201008010806.o7186xlL040126@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Aug 2010 08:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210714 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Aug 2010 08:06:59 -0000 Author: tuexen Date: Sun Aug 1 08:06:59 2010 New Revision: 210714 URL: http://svn.freebsd.org/changeset/base/210714 Log: Cleanup code. MFC after: 2 weeks Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun Aug 1 06:36:41 2010 (r210713) +++ head/sys/netinet/sctp_output.c Sun Aug 1 08:06:59 2010 (r210714) @@ -9748,8 +9748,7 @@ sctp_fill_in_rest: unsigned int cnt_of_skipped = 0; TAILQ_FOREACH(at, &asoc->sent_queue, sctp_next) { - if ((at->sent != SCTP_FORWARD_TSN_SKIP) /* && (at->sent != - SCTP_DATAGRAM_ACKED) */ ) { + if (at->sent != SCTP_FORWARD_TSN_SKIP) { /* no more to look at */ break; } From owner-svn-src-all@FreeBSD.ORG Sun Aug 1 08:47:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08AFB106566B; Sun, 1 Aug 2010 08:47:34 +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 D132D8FC0C; Sun, 1 Aug 2010 08:47:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o718lXtH049016; Sun, 1 Aug 2010 08:47:33 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o718lXXk049014; Sun, 1 Aug 2010 08:47:33 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201008010847.o718lXXk049014@svn.freebsd.org> From: Martin Matuska Date: Sun, 1 Aug 2010 08:47: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: r210715 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Aug 2010 08:47:34 -0000 Author: mm Date: Sun Aug 1 08:47:33 2010 New Revision: 210715 URL: http://svn.freebsd.org/changeset/base/210715 Log: MFC r210457: Consider snapshots as descendants via zfs allow -d OpenSolaris onnv changeset: 9847:2f3ba86e857a Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6809340) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (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/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c Sun Aug 1 08:06:59 2010 (r210714) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c Sun Aug 1 08:47:33 2010 (r210715) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -66,8 +66,6 @@ * The ZAP OBJ is referred to as the jump object. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -540,7 +538,7 @@ dsl_deleg_access(const char *dsname, con dsl_pool_t *dp; void *cookie; int error; - char checkflag = ZFS_DELEG_LOCAL; + char checkflag; objset_t *mos; avl_tree_t permsets; perm_set_t *setnode; @@ -563,6 +561,16 @@ dsl_deleg_access(const char *dsname, con return (EPERM); } + if (dsl_dataset_is_snapshot(ds)) { + /* + * Snapshots are treated as descendents only, + * local permissions do not apply. + */ + checkflag = ZFS_DELEG_DESCENDENT; + } else { + checkflag = ZFS_DELEG_LOCAL; + } + avl_create(&permsets, perm_set_compare, sizeof (perm_set_t), offsetof(perm_set_t, p_node)); From owner-svn-src-all@FreeBSD.ORG Sun Aug 1 08:53:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B137A106564A; Sun, 1 Aug 2010 08:53:44 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F9B68FC19; Sun, 1 Aug 2010 08:53:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o718ridV050433; Sun, 1 Aug 2010 08:53:44 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o718ri7E050425; Sun, 1 Aug 2010 08:53:44 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201008010853.o718ri7E050425@svn.freebsd.org> From: Edwin Groothuis Date: Sun, 1 Aug 2010 08:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210716 - vendor/tzdata/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Aug 2010 08:53:44 -0000 Author: edwin Date: Sun Aug 1 08:53:44 2010 New Revision: 210716 URL: http://svn.freebsd.org/changeset/base/210716 Log: Vendor import of tzdata2010k - Daylight Saving Time will not be used in Egypt during Ramadan this year. - Proper names for Pacific/Pohnpei and Pacific/Chuuk - Fix historical information for Finland for 1981 and 1982 - No leap-second for December 2010. - Fix historical information for Ontario (Canada) Obtained from: ftp://elsie.nci.nih.gov/pub/ Modified: vendor/tzdata/dist/africa vendor/tzdata/dist/australasia vendor/tzdata/dist/backward vendor/tzdata/dist/europe vendor/tzdata/dist/leapseconds vendor/tzdata/dist/northamerica vendor/tzdata/dist/zone.tab Modified: vendor/tzdata/dist/africa ============================================================================== --- vendor/tzdata/dist/africa Sun Aug 1 08:47:33 2010 (r210715) +++ vendor/tzdata/dist/africa Sun Aug 1 08:53:44 2010 (r210716) @@ -1,5 +1,5 @@ #
-# @(#)africa	8.26
+# @(#)africa	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -294,8 +294,25 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	23:00s
 # and can be found by searching for "winter" in their search engine
 # (at least today).
 
+# From Alexander Krivenyshev (2010-07-20):
+# According to News from Egypt -  Al-Masry Al-Youm Egypt's cabinet has
+# decided that Daylight Saving Time will not be used in Egypt during
+# Ramadan.
+#
+# Arabic translation:
+# "Clocks to go back during Ramadan--and then forward again"
+# 
+# http://www.almasryalyoum.com/en/news/clocks-go-back-during-ramadan-and-then-forward-again
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_egypt02.html
+# 
+
 Rule	Egypt	2008	only	-	Aug	lastThu	23:00s	0	-
 Rule	Egypt	2009	only	-	Aug	20	23:00s	0	-
+Rule	Egypt	2010	only	-	Aug	10	23:00s	0	-
+Rule	Egypt	2010	only	-	Sep	9	0:00s	1:00	S
 Rule	Egypt	2010	max	-	Sep	lastThu	23:00s	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: vendor/tzdata/dist/australasia
==============================================================================
--- vendor/tzdata/dist/australasia	Sun Aug  1 08:47:33 2010	(r210715)
+++ vendor/tzdata/dist/australasia	Sun Aug  1 08:53:44 2010	(r210716)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.17
+# @(#)australasia	8.18
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -346,10 +346,10 @@ Zone Pacific/Kwajalein	11:09:20 -	LMT	19
 
 # Micronesia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Pacific/Truk	10:07:08 -	LMT	1901
-			10:00	-	TRUT			# Truk Time
-Zone Pacific/Ponape	10:32:52 -	LMT	1901		# Kolonia
-			11:00	-	PONT			# Ponape Time
+Zone Pacific/Chuuk	10:07:08 -	LMT	1901
+			10:00	-	CHUT			# Chuuk Time
+Zone Pacific/Pohnpei	10:32:52 -	LMT	1901		# Kolonia
+			11:00	-	PONT			# Pohnpei Time
 Zone Pacific/Kosrae	10:51:56 -	LMT	1901
 			11:00	-	KOST	1969 Oct	# Kosrae Time
 			12:00	-	KOST	1999

Modified: vendor/tzdata/dist/backward
==============================================================================
--- vendor/tzdata/dist/backward	Sun Aug  1 08:47:33 2010	(r210715)
+++ vendor/tzdata/dist/backward	Sun Aug  1 08:53:44 2010	(r210716)
@@ -1,5 +1,5 @@
 # 
-# @(#)backward	8.8
+# @(#)backward	8.9
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -90,7 +90,9 @@ Link	Pacific/Chatham		NZ-CHAT
 Link	America/Denver		Navajo
 Link	Asia/Shanghai		PRC
 Link	Pacific/Pago_Pago	Pacific/Samoa
-Link	Pacific/Truk		Pacific/Yap
+Link	Pacific/Chuuk		Pacific/Yap
+Link	Pacific/Chuuk		Pacific/Truk
+Link	Pacific/Pohnpei		Pacific/Ponape
 Link	Europe/Warsaw		Poland
 Link	Europe/Lisbon		Portugal
 Link	Asia/Taipei		ROC

Modified: vendor/tzdata/dist/europe
==============================================================================
--- vendor/tzdata/dist/europe	Sun Aug  1 08:47:33 2010	(r210715)
+++ vendor/tzdata/dist/europe	Sun Aug  1 08:53:44 2010	(r210716)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.26
+# @(#)europe	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1013,22 +1013,47 @@ Zone	Europe/Tallinn	1:39:00	-	LMT	1880
 			2:00	EU	EE%sT
 
 # Finland
-#
+
 # From Hannu Strang (1994-09-25 06:03:37 UTC):
 # Well, here in Helsinki we're just changing from summer time to regular one,
 # and it's supposed to change at 4am...
+
+# From Janne Snabb (2010-0715):
 #
-# From Paul Eggert (2006-03-22):
-# Shanks & Pottenger say Finland has switched at 02:00 standard time
-# since 1981.  Go with Strang instead.
+# I noticed that the Finland data is not accurate for years 1981 and 1982.
+# During these two first trial years the DST adjustment was made one hour
+# earlier than in forthcoming years. Starting 1983 the adjustment was made
+# according to the central European standards.
+#
+# This is documented in Heikki Oja: Aikakirja 2007, published by The Almanac
+# Office of University of Helsinki, ISBN 952-10-3221-9, available online (in
+# Finnish) at
+#
+# 
+# http://almanakka.helsinki.fi/aikakirja/Aikakirja2007kokonaan.pdf
+# 
 #
+# Page 105 (56 in PDF version) has a handy table of all past daylight savings
+# transitions. It is easy enough to interpret without Finnish skills.
+#
+# This is also confirmed by Finnish Broadcasting Company's archive at:
+#
+# 
+# http://www.yle.fi/elavaarkisto/?s=s&g=1&ag=5&t=&a=3401
+# 
+#
+# The news clip from 1981 says that "the time between 2 and 3 o'clock does not
+# exist tonight."
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Finland	1942	only	-	Apr	3	0:00	1:00	S
 Rule	Finland	1942	only	-	Oct	3	0:00	0	-
+Rule	Finland	1981	1982	-	Mar	lastSun	2:00	1:00	S
+Rule	Finland	1981	1982	-	Sep	lastSun	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Helsinki	1:39:52 -	LMT	1878 May 31
 			1:39:52	-	HMT	1921 May    # Helsinki Mean Time
-			2:00	Finland	EE%sT	1981 Mar 29 2:00
+			2:00	Finland	EE%sT	1983
 			2:00	EU	EE%sT
 
 # Aaland Is

Modified: vendor/tzdata/dist/leapseconds
==============================================================================
--- vendor/tzdata/dist/leapseconds	Sun Aug  1 08:47:33 2010	(r210715)
+++ vendor/tzdata/dist/leapseconds	Sun Aug  1 08:53:44 2010	(r210716)
@@ -1,5 +1,5 @@
 # 
-# @(#)leapseconds	8.9
+# @(#)leapseconds	8.10
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -60,9 +60,9 @@ Leap	2008	Dec	31	23:59:60	+	S
 # FAX       : 33 (0) 1 40 51 22 91
 # Internet  : services.iers@obspm.fr
 #
-# Paris, 4 July 2009
+# Paris, 14 July 2010
 #
-# Bulletin C 38
+# Bulletin C 40
 #
 # To authorities responsible
 # for the measurement and
@@ -70,9 +70,9 @@ Leap	2008	Dec	31	23:59:60	+	S
 #
 # INFORMATION ON UTC - TAI
 #
-# NO positive leap second will be introduced at the end of December 2009.
+# NO positive leap second will be introduced at the end of December 2010.
 # The difference between Coordinated Universal Time UTC and the
-# International Atomic Time TAI is :		
+# International Atomic Time TAI is :
 #
 # from 2009 January 1, 0h UTC, until further notice : UTC-TAI = -34 s
 #
@@ -82,6 +82,6 @@ Leap	2008	Dec	31	23:59:60	+	S
 # will be no time step at the next possible date.
 #
 # Daniel GAMBIS
-# Director			
+# Director
 # Earth Orientation Center of IERS
 # Observatoire de Paris, France

Modified: vendor/tzdata/dist/northamerica
==============================================================================
--- vendor/tzdata/dist/northamerica	Sun Aug  1 08:47:33 2010	(r210715)
+++ vendor/tzdata/dist/northamerica	Sun Aug  1 08:53:44 2010	(r210716)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.31
+# @(#)northamerica	8.34
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1324,6 +1324,83 @@ Zone America/Montreal	-4:54:16 -	LMT	188
 # entry since our cutoff date of 1970, so we can move
 # America/Coral_Harbour to the 'backward' file.
 
+# From Mark Brader (2010-03-06):
+#
+# Currently the database has:
+#
+# # Ontario
+#
+# # From Paul Eggert (2006-07-09):
+# # Shanks & Pottenger write that since 1970 most of Ontario has been like
+# # Toronto.
+# # Thunder Bay skipped DST in 1973.
+# # Many smaller locales did not observe peacetime DST until 1974;
+# # Nipigon (EST) and Rainy River (CST) are the largest that we know of.
+#
+# In the (Toronto) Globe and Mail for Saturday, 1955-09-24, in the bottom
+# right corner of page 1, it says that Toronto will return to standard
+# time at 2 am Sunday morning (which agrees with the database), and that:
+#
+#     The one-hour setback will go into effect throughout most of Ontario,
+#     except in areas like Windsor which remains on standard time all year.
+#
+# Windsor is, of course, a lot larger than Nipigon.
+#
+# I only came across this incidentally.  I don't know if Windsor began
+# observing DST when Detroit did, or in 1974, or on some other date.
+#
+# By the way, the article continues by noting that:
+#
+#     Some cities in the United States have pushed the deadline back
+#     three weeks and will change over from daylight saving in October.
+
+# From Arthur David Olson (2010-07-17):
+#
+# "Standard Time and Time Zones in Canada" appeared in
+# The Journal of The Royal Astronomical Society of Canada,
+# volume 26, number 2 (February 1932) and, as of 2010-07-17,
+# was available at
+# 
+# http://adsabs.harvard.edu/full/1932JRASC..26...49S
+# 
+#
+# It includes the text below (starting on page 57):
+#
+#   A list of the places in Canada using daylight saving time would
+# require yearly revision. From information kindly furnished by
+# the provincial governments and by the postmasters in many cities
+# and towns, it is found that the following places used daylight sav-
+# ing in 1930. The information for the province of Quebec is definite,
+# for the other provinces only approximate:
+#
+# 	Province	Daylight saving time used
+# Prince Edward Island	Not used.
+# Nova Scotia		In Halifax only.
+# New Brunswick		In St. John only.
+# Quebec		In the following places:
+# 			Montreal	Lachine
+# 			Quebec		Mont-Royal
+# 			Levis		Iberville
+# 			St. Lambert	Cap de la Madeleine
+# 			Verdun		Loretteville
+# 			Westmount	Richmond
+# 			Outremont	St. Jerome
+# 			Longueuil	Greenfield Park
+# 			Arvida		Waterloo
+# 			Chambly-Canton	Beaulieu
+# 			Melbourne	La Tuque
+# 			St. Theophile	Buckingham
+# Ontario		Used generally in the cities and towns along
+# 			the southerly part of the province. Not
+# 			used in the northwesterlhy part.
+# Manitoba		Not used.
+# Saskatchewan		In Regina only.
+# Alberta		Not used.
+# British Columbia	Not used.
+#
+#   With some exceptions, the use of daylight saving may be said to be limited
+# to those cities and towns lying between Quebec city and Windsor, Ont.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Toronto	1919	only	-	Mar	30	23:30	1:00	D
 Rule	Toronto	1919	only	-	Oct	26	0:00	0	S
@@ -2147,7 +2224,7 @@ Zone America/Bahia_Banderas	-7:01:00 -	L
 			-6:00	-	CST	1942 Apr 24
 			-7:00	-	MST	1949 Jan 14
 			-8:00	-	PST	1970
-			-7:00	Mexico	M%sT	2010 Apr 4
+			-7:00	Mexico	M%sT	2010 Apr 4 2:00
 			-6:00	Mexico	C%sT
 
 # Baja California (near US border)

Modified: vendor/tzdata/dist/zone.tab
==============================================================================
--- vendor/tzdata/dist/zone.tab	Sun Aug  1 08:47:33 2010	(r210715)
+++ vendor/tzdata/dist/zone.tab	Sun Aug  1 08:53:44 2010	(r210716)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.36
+# @(#)zone.tab	8.37
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -177,8 +177,8 @@ ET	+0902+03842	Africa/Addis_Ababa
 FI	+6010+02458	Europe/Helsinki
 FJ	-1808+17825	Pacific/Fiji
 FK	-5142-05751	Atlantic/Stanley
-FM	+0725+15147	Pacific/Truk	Truk (Chuuk) and Yap
-FM	+0658+15813	Pacific/Ponape	Ponape (Pohnpei)
+FM	+0725+15147	Pacific/Chuuk	Chuuk (Truk) and Yap
+FM	+0658+15813	Pacific/Pohnpei	Pohnpei (Ponape)
 FM	+0519+16259	Pacific/Kosrae	Kosrae
 FO	+6201-00646	Atlantic/Faroe
 FR	+4852+00220	Europe/Paris

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 08:57:31 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 100A81065670;
	Sun,  1 Aug 2010 08:57:31 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D9E518FC1C;
	Sun,  1 Aug 2010 08:57:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o718vUdR051291;
	Sun, 1 Aug 2010 08:57:30 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o718vUxt051290;
	Sun, 1 Aug 2010 08:57:30 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201008010857.o718vUxt051290@svn.freebsd.org>
From: Edwin Groothuis 
Date: Sun, 1 Aug 2010 08:57:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210717 - vendor/tzdata/tzdata2010k
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 08:57:31 -0000

Author: edwin
Date: Sun Aug  1 08:57:30 2010
New Revision: 210717
URL: http://svn.freebsd.org/changeset/base/210717

Log:
  Tag of tzdata2010k

Added:
  vendor/tzdata/tzdata2010k/
     - copied from r210716, vendor/tzdata/dist/

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 09:03:11 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 46B85106566B;
	Sun,  1 Aug 2010 09:03:11 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 34F8A8FC16;
	Sun,  1 Aug 2010 09:03:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7193BKa052572;
	Sun, 1 Aug 2010 09:03:11 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7193BMf052564;
	Sun, 1 Aug 2010 09:03:11 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201008010903.o7193BMf052564@svn.freebsd.org>
From: Edwin Groothuis 
Date: Sun, 1 Aug 2010 09:03:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210718 - head/contrib/tzdata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 09:03:11 -0000

Author: edwin
Date: Sun Aug  1 09:03:10 2010
New Revision: 210718
URL: http://svn.freebsd.org/changeset/base/210718

Log:
  MFV of r210716, tzdata2010k
  
  - Daylight Saving Time will not be used in Egypt during Ramadan.
  - Proper names for Pacific/Pohnpei and Pacific/Chuuk
  - Fix historical information for Finland for 1981 and 1982
  - No leap-second for December 2010.
  - Fix historical information for Ontario (Canada)

Modified:
  head/contrib/tzdata/africa
  head/contrib/tzdata/australasia
  head/contrib/tzdata/backward
  head/contrib/tzdata/europe
  head/contrib/tzdata/leapseconds
  head/contrib/tzdata/northamerica
  head/contrib/tzdata/zone.tab
Directory Properties:
  head/contrib/tzdata/   (props changed)

Modified: head/contrib/tzdata/africa
==============================================================================
--- head/contrib/tzdata/africa	Sun Aug  1 08:57:30 2010	(r210717)
+++ head/contrib/tzdata/africa	Sun Aug  1 09:03:10 2010	(r210718)
@@ -1,5 +1,5 @@
 # 
-# @(#)africa	8.26
+# @(#)africa	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -294,8 +294,25 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	23:00s
 # and can be found by searching for "winter" in their search engine
 # (at least today).
 
+# From Alexander Krivenyshev (2010-07-20):
+# According to News from Egypt -  Al-Masry Al-Youm Egypt's cabinet has
+# decided that Daylight Saving Time will not be used in Egypt during
+# Ramadan.
+#
+# Arabic translation:
+# "Clocks to go back during Ramadan--and then forward again"
+# 
+# http://www.almasryalyoum.com/en/news/clocks-go-back-during-ramadan-and-then-forward-again
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_egypt02.html
+# 
+
 Rule	Egypt	2008	only	-	Aug	lastThu	23:00s	0	-
 Rule	Egypt	2009	only	-	Aug	20	23:00s	0	-
+Rule	Egypt	2010	only	-	Aug	10	23:00s	0	-
+Rule	Egypt	2010	only	-	Sep	9	0:00s	1:00	S
 Rule	Egypt	2010	max	-	Sep	lastThu	23:00s	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: head/contrib/tzdata/australasia
==============================================================================
--- head/contrib/tzdata/australasia	Sun Aug  1 08:57:30 2010	(r210717)
+++ head/contrib/tzdata/australasia	Sun Aug  1 09:03:10 2010	(r210718)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.17
+# @(#)australasia	8.18
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -346,10 +346,10 @@ Zone Pacific/Kwajalein	11:09:20 -	LMT	19
 
 # Micronesia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Pacific/Truk	10:07:08 -	LMT	1901
-			10:00	-	TRUT			# Truk Time
-Zone Pacific/Ponape	10:32:52 -	LMT	1901		# Kolonia
-			11:00	-	PONT			# Ponape Time
+Zone Pacific/Chuuk	10:07:08 -	LMT	1901
+			10:00	-	CHUT			# Chuuk Time
+Zone Pacific/Pohnpei	10:32:52 -	LMT	1901		# Kolonia
+			11:00	-	PONT			# Pohnpei Time
 Zone Pacific/Kosrae	10:51:56 -	LMT	1901
 			11:00	-	KOST	1969 Oct	# Kosrae Time
 			12:00	-	KOST	1999

Modified: head/contrib/tzdata/backward
==============================================================================
--- head/contrib/tzdata/backward	Sun Aug  1 08:57:30 2010	(r210717)
+++ head/contrib/tzdata/backward	Sun Aug  1 09:03:10 2010	(r210718)
@@ -1,5 +1,5 @@
 # 
-# @(#)backward	8.8
+# @(#)backward	8.9
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -90,7 +90,9 @@ Link	Pacific/Chatham		NZ-CHAT
 Link	America/Denver		Navajo
 Link	Asia/Shanghai		PRC
 Link	Pacific/Pago_Pago	Pacific/Samoa
-Link	Pacific/Truk		Pacific/Yap
+Link	Pacific/Chuuk		Pacific/Yap
+Link	Pacific/Chuuk		Pacific/Truk
+Link	Pacific/Pohnpei		Pacific/Ponape
 Link	Europe/Warsaw		Poland
 Link	Europe/Lisbon		Portugal
 Link	Asia/Taipei		ROC

Modified: head/contrib/tzdata/europe
==============================================================================
--- head/contrib/tzdata/europe	Sun Aug  1 08:57:30 2010	(r210717)
+++ head/contrib/tzdata/europe	Sun Aug  1 09:03:10 2010	(r210718)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.26
+# @(#)europe	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1013,22 +1013,47 @@ Zone	Europe/Tallinn	1:39:00	-	LMT	1880
 			2:00	EU	EE%sT
 
 # Finland
-#
+
 # From Hannu Strang (1994-09-25 06:03:37 UTC):
 # Well, here in Helsinki we're just changing from summer time to regular one,
 # and it's supposed to change at 4am...
+
+# From Janne Snabb (2010-0715):
 #
-# From Paul Eggert (2006-03-22):
-# Shanks & Pottenger say Finland has switched at 02:00 standard time
-# since 1981.  Go with Strang instead.
+# I noticed that the Finland data is not accurate for years 1981 and 1982.
+# During these two first trial years the DST adjustment was made one hour
+# earlier than in forthcoming years. Starting 1983 the adjustment was made
+# according to the central European standards.
+#
+# This is documented in Heikki Oja: Aikakirja 2007, published by The Almanac
+# Office of University of Helsinki, ISBN 952-10-3221-9, available online (in
+# Finnish) at
+#
+# 
+# http://almanakka.helsinki.fi/aikakirja/Aikakirja2007kokonaan.pdf
+# 
 #
+# Page 105 (56 in PDF version) has a handy table of all past daylight savings
+# transitions. It is easy enough to interpret without Finnish skills.
+#
+# This is also confirmed by Finnish Broadcasting Company's archive at:
+#
+# 
+# http://www.yle.fi/elavaarkisto/?s=s&g=1&ag=5&t=&a=3401
+# 
+#
+# The news clip from 1981 says that "the time between 2 and 3 o'clock does not
+# exist tonight."
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Finland	1942	only	-	Apr	3	0:00	1:00	S
 Rule	Finland	1942	only	-	Oct	3	0:00	0	-
+Rule	Finland	1981	1982	-	Mar	lastSun	2:00	1:00	S
+Rule	Finland	1981	1982	-	Sep	lastSun	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Helsinki	1:39:52 -	LMT	1878 May 31
 			1:39:52	-	HMT	1921 May    # Helsinki Mean Time
-			2:00	Finland	EE%sT	1981 Mar 29 2:00
+			2:00	Finland	EE%sT	1983
 			2:00	EU	EE%sT
 
 # Aaland Is

Modified: head/contrib/tzdata/leapseconds
==============================================================================
--- head/contrib/tzdata/leapseconds	Sun Aug  1 08:57:30 2010	(r210717)
+++ head/contrib/tzdata/leapseconds	Sun Aug  1 09:03:10 2010	(r210718)
@@ -1,5 +1,5 @@
 # 
-# @(#)leapseconds	8.9
+# @(#)leapseconds	8.10
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -60,9 +60,9 @@ Leap	2008	Dec	31	23:59:60	+	S
 # FAX       : 33 (0) 1 40 51 22 91
 # Internet  : services.iers@obspm.fr
 #
-# Paris, 4 July 2009
+# Paris, 14 July 2010
 #
-# Bulletin C 38
+# Bulletin C 40
 #
 # To authorities responsible
 # for the measurement and
@@ -70,9 +70,9 @@ Leap	2008	Dec	31	23:59:60	+	S
 #
 # INFORMATION ON UTC - TAI
 #
-# NO positive leap second will be introduced at the end of December 2009.
+# NO positive leap second will be introduced at the end of December 2010.
 # The difference between Coordinated Universal Time UTC and the
-# International Atomic Time TAI is :		
+# International Atomic Time TAI is :
 #
 # from 2009 January 1, 0h UTC, until further notice : UTC-TAI = -34 s
 #
@@ -82,6 +82,6 @@ Leap	2008	Dec	31	23:59:60	+	S
 # will be no time step at the next possible date.
 #
 # Daniel GAMBIS
-# Director			
+# Director
 # Earth Orientation Center of IERS
 # Observatoire de Paris, France

Modified: head/contrib/tzdata/northamerica
==============================================================================
--- head/contrib/tzdata/northamerica	Sun Aug  1 08:57:30 2010	(r210717)
+++ head/contrib/tzdata/northamerica	Sun Aug  1 09:03:10 2010	(r210718)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.31
+# @(#)northamerica	8.34
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1324,6 +1324,83 @@ Zone America/Montreal	-4:54:16 -	LMT	188
 # entry since our cutoff date of 1970, so we can move
 # America/Coral_Harbour to the 'backward' file.
 
+# From Mark Brader (2010-03-06):
+#
+# Currently the database has:
+#
+# # Ontario
+#
+# # From Paul Eggert (2006-07-09):
+# # Shanks & Pottenger write that since 1970 most of Ontario has been like
+# # Toronto.
+# # Thunder Bay skipped DST in 1973.
+# # Many smaller locales did not observe peacetime DST until 1974;
+# # Nipigon (EST) and Rainy River (CST) are the largest that we know of.
+#
+# In the (Toronto) Globe and Mail for Saturday, 1955-09-24, in the bottom
+# right corner of page 1, it says that Toronto will return to standard
+# time at 2 am Sunday morning (which agrees with the database), and that:
+#
+#     The one-hour setback will go into effect throughout most of Ontario,
+#     except in areas like Windsor which remains on standard time all year.
+#
+# Windsor is, of course, a lot larger than Nipigon.
+#
+# I only came across this incidentally.  I don't know if Windsor began
+# observing DST when Detroit did, or in 1974, or on some other date.
+#
+# By the way, the article continues by noting that:
+#
+#     Some cities in the United States have pushed the deadline back
+#     three weeks and will change over from daylight saving in October.
+
+# From Arthur David Olson (2010-07-17):
+#
+# "Standard Time and Time Zones in Canada" appeared in
+# The Journal of The Royal Astronomical Society of Canada,
+# volume 26, number 2 (February 1932) and, as of 2010-07-17,
+# was available at
+# 
+# http://adsabs.harvard.edu/full/1932JRASC..26...49S
+# 
+#
+# It includes the text below (starting on page 57):
+#
+#   A list of the places in Canada using daylight saving time would
+# require yearly revision. From information kindly furnished by
+# the provincial governments and by the postmasters in many cities
+# and towns, it is found that the following places used daylight sav-
+# ing in 1930. The information for the province of Quebec is definite,
+# for the other provinces only approximate:
+#
+# 	Province	Daylight saving time used
+# Prince Edward Island	Not used.
+# Nova Scotia		In Halifax only.
+# New Brunswick		In St. John only.
+# Quebec		In the following places:
+# 			Montreal	Lachine
+# 			Quebec		Mont-Royal
+# 			Levis		Iberville
+# 			St. Lambert	Cap de la Madeleine
+# 			Verdun		Loretteville
+# 			Westmount	Richmond
+# 			Outremont	St. Jerome
+# 			Longueuil	Greenfield Park
+# 			Arvida		Waterloo
+# 			Chambly-Canton	Beaulieu
+# 			Melbourne	La Tuque
+# 			St. Theophile	Buckingham
+# Ontario		Used generally in the cities and towns along
+# 			the southerly part of the province. Not
+# 			used in the northwesterlhy part.
+# Manitoba		Not used.
+# Saskatchewan		In Regina only.
+# Alberta		Not used.
+# British Columbia	Not used.
+#
+#   With some exceptions, the use of daylight saving may be said to be limited
+# to those cities and towns lying between Quebec city and Windsor, Ont.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Toronto	1919	only	-	Mar	30	23:30	1:00	D
 Rule	Toronto	1919	only	-	Oct	26	0:00	0	S
@@ -2147,7 +2224,7 @@ Zone America/Bahia_Banderas	-7:01:00 -	L
 			-6:00	-	CST	1942 Apr 24
 			-7:00	-	MST	1949 Jan 14
 			-8:00	-	PST	1970
-			-7:00	Mexico	M%sT	2010 Apr 4
+			-7:00	Mexico	M%sT	2010 Apr 4 2:00
 			-6:00	Mexico	C%sT
 
 # Baja California (near US border)

Modified: head/contrib/tzdata/zone.tab
==============================================================================
--- head/contrib/tzdata/zone.tab	Sun Aug  1 08:57:30 2010	(r210717)
+++ head/contrib/tzdata/zone.tab	Sun Aug  1 09:03:10 2010	(r210718)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.36
+# @(#)zone.tab	8.37
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -177,8 +177,8 @@ ET	+0902+03842	Africa/Addis_Ababa
 FI	+6010+02458	Europe/Helsinki
 FJ	-1808+17825	Pacific/Fiji
 FK	-5142-05751	Atlantic/Stanley
-FM	+0725+15147	Pacific/Truk	Truk (Chuuk) and Yap
-FM	+0658+15813	Pacific/Ponape	Ponape (Pohnpei)
+FM	+0725+15147	Pacific/Chuuk	Chuuk (Truk) and Yap
+FM	+0658+15813	Pacific/Pohnpei	Pohnpei (Ponape)
 FM	+0519+16259	Pacific/Kosrae	Kosrae
 FO	+6201-00646	Atlantic/Faroe
 FR	+4852+00220	Europe/Paris

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 09:08:34 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 01110106566B;
	Sun,  1 Aug 2010 09:08:34 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E2EC78FC18;
	Sun,  1 Aug 2010 09:08:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7198Xn7053784;
	Sun, 1 Aug 2010 09:08:33 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7198XH0053776;
	Sun, 1 Aug 2010 09:08:33 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201008010908.o7198XH0053776@svn.freebsd.org>
From: Edwin Groothuis 
Date: Sun, 1 Aug 2010 09:08: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: r210719 - stable/8/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 09:08:34 -0000

Author: edwin
Date: Sun Aug  1 09:08:33 2010
New Revision: 210719
URL: http://svn.freebsd.org/changeset/base/210719

Log:
  MFC of 210718, tzdata2010k:
  
  - Daylight Saving Time will not be used in Egypt during Ramadan.
  - Proper names for Pacific/Pohnpei and Pacific/Chuuk
  - Fix historical information for Finland for 1981 and 1982
  - No leap-second for December 2010.
  - Fix historical information for Ontario (Canada)

Modified:
  stable/8/share/zoneinfo/africa
  stable/8/share/zoneinfo/australasia
  stable/8/share/zoneinfo/backward
  stable/8/share/zoneinfo/europe
  stable/8/share/zoneinfo/leapseconds
  stable/8/share/zoneinfo/northamerica
  stable/8/share/zoneinfo/zone.tab
Directory Properties:
  stable/8/share/zoneinfo/   (props changed)

Modified: stable/8/share/zoneinfo/africa
==============================================================================
--- stable/8/share/zoneinfo/africa	Sun Aug  1 09:03:10 2010	(r210718)
+++ stable/8/share/zoneinfo/africa	Sun Aug  1 09:08:33 2010	(r210719)
@@ -1,5 +1,5 @@
 # 
-# @(#)africa	8.26
+# @(#)africa	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -294,8 +294,25 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	23:00s
 # and can be found by searching for "winter" in their search engine
 # (at least today).
 
+# From Alexander Krivenyshev (2010-07-20):
+# According to News from Egypt -  Al-Masry Al-Youm Egypt's cabinet has
+# decided that Daylight Saving Time will not be used in Egypt during
+# Ramadan.
+#
+# Arabic translation:
+# "Clocks to go back during Ramadan--and then forward again"
+# 
+# http://www.almasryalyoum.com/en/news/clocks-go-back-during-ramadan-and-then-forward-again
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_egypt02.html
+# 
+
 Rule	Egypt	2008	only	-	Aug	lastThu	23:00s	0	-
 Rule	Egypt	2009	only	-	Aug	20	23:00s	0	-
+Rule	Egypt	2010	only	-	Aug	10	23:00s	0	-
+Rule	Egypt	2010	only	-	Sep	9	0:00s	1:00	S
 Rule	Egypt	2010	max	-	Sep	lastThu	23:00s	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: stable/8/share/zoneinfo/australasia
==============================================================================
--- stable/8/share/zoneinfo/australasia	Sun Aug  1 09:03:10 2010	(r210718)
+++ stable/8/share/zoneinfo/australasia	Sun Aug  1 09:08:33 2010	(r210719)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.17
+# @(#)australasia	8.18
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -346,10 +346,10 @@ Zone Pacific/Kwajalein	11:09:20 -	LMT	19
 
 # Micronesia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Pacific/Truk	10:07:08 -	LMT	1901
-			10:00	-	TRUT			# Truk Time
-Zone Pacific/Ponape	10:32:52 -	LMT	1901		# Kolonia
-			11:00	-	PONT			# Ponape Time
+Zone Pacific/Chuuk	10:07:08 -	LMT	1901
+			10:00	-	CHUT			# Chuuk Time
+Zone Pacific/Pohnpei	10:32:52 -	LMT	1901		# Kolonia
+			11:00	-	PONT			# Pohnpei Time
 Zone Pacific/Kosrae	10:51:56 -	LMT	1901
 			11:00	-	KOST	1969 Oct	# Kosrae Time
 			12:00	-	KOST	1999

Modified: stable/8/share/zoneinfo/backward
==============================================================================
--- stable/8/share/zoneinfo/backward	Sun Aug  1 09:03:10 2010	(r210718)
+++ stable/8/share/zoneinfo/backward	Sun Aug  1 09:08:33 2010	(r210719)
@@ -1,5 +1,5 @@
 # 
-# @(#)backward	8.8
+# @(#)backward	8.9
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -90,7 +90,9 @@ Link	Pacific/Chatham		NZ-CHAT
 Link	America/Denver		Navajo
 Link	Asia/Shanghai		PRC
 Link	Pacific/Pago_Pago	Pacific/Samoa
-Link	Pacific/Truk		Pacific/Yap
+Link	Pacific/Chuuk		Pacific/Yap
+Link	Pacific/Chuuk		Pacific/Truk
+Link	Pacific/Pohnpei		Pacific/Ponape
 Link	Europe/Warsaw		Poland
 Link	Europe/Lisbon		Portugal
 Link	Asia/Taipei		ROC

Modified: stable/8/share/zoneinfo/europe
==============================================================================
--- stable/8/share/zoneinfo/europe	Sun Aug  1 09:03:10 2010	(r210718)
+++ stable/8/share/zoneinfo/europe	Sun Aug  1 09:08:33 2010	(r210719)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.26
+# @(#)europe	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1013,22 +1013,47 @@ Zone	Europe/Tallinn	1:39:00	-	LMT	1880
 			2:00	EU	EE%sT
 
 # Finland
-#
+
 # From Hannu Strang (1994-09-25 06:03:37 UTC):
 # Well, here in Helsinki we're just changing from summer time to regular one,
 # and it's supposed to change at 4am...
+
+# From Janne Snabb (2010-0715):
 #
-# From Paul Eggert (2006-03-22):
-# Shanks & Pottenger say Finland has switched at 02:00 standard time
-# since 1981.  Go with Strang instead.
+# I noticed that the Finland data is not accurate for years 1981 and 1982.
+# During these two first trial years the DST adjustment was made one hour
+# earlier than in forthcoming years. Starting 1983 the adjustment was made
+# according to the central European standards.
+#
+# This is documented in Heikki Oja: Aikakirja 2007, published by The Almanac
+# Office of University of Helsinki, ISBN 952-10-3221-9, available online (in
+# Finnish) at
+#
+# 
+# http://almanakka.helsinki.fi/aikakirja/Aikakirja2007kokonaan.pdf
+# 
 #
+# Page 105 (56 in PDF version) has a handy table of all past daylight savings
+# transitions. It is easy enough to interpret without Finnish skills.
+#
+# This is also confirmed by Finnish Broadcasting Company's archive at:
+#
+# 
+# http://www.yle.fi/elavaarkisto/?s=s&g=1&ag=5&t=&a=3401
+# 
+#
+# The news clip from 1981 says that "the time between 2 and 3 o'clock does not
+# exist tonight."
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Finland	1942	only	-	Apr	3	0:00	1:00	S
 Rule	Finland	1942	only	-	Oct	3	0:00	0	-
+Rule	Finland	1981	1982	-	Mar	lastSun	2:00	1:00	S
+Rule	Finland	1981	1982	-	Sep	lastSun	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Helsinki	1:39:52 -	LMT	1878 May 31
 			1:39:52	-	HMT	1921 May    # Helsinki Mean Time
-			2:00	Finland	EE%sT	1981 Mar 29 2:00
+			2:00	Finland	EE%sT	1983
 			2:00	EU	EE%sT
 
 # Aaland Is

Modified: stable/8/share/zoneinfo/leapseconds
==============================================================================
--- stable/8/share/zoneinfo/leapseconds	Sun Aug  1 09:03:10 2010	(r210718)
+++ stable/8/share/zoneinfo/leapseconds	Sun Aug  1 09:08:33 2010	(r210719)
@@ -1,5 +1,5 @@
 # 
-# @(#)leapseconds	8.9
+# @(#)leapseconds	8.10
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -60,9 +60,9 @@ Leap	2008	Dec	31	23:59:60	+	S
 # FAX       : 33 (0) 1 40 51 22 91
 # Internet  : services.iers@obspm.fr
 #
-# Paris, 4 July 2009
+# Paris, 14 July 2010
 #
-# Bulletin C 38
+# Bulletin C 40
 #
 # To authorities responsible
 # for the measurement and
@@ -70,9 +70,9 @@ Leap	2008	Dec	31	23:59:60	+	S
 #
 # INFORMATION ON UTC - TAI
 #
-# NO positive leap second will be introduced at the end of December 2009.
+# NO positive leap second will be introduced at the end of December 2010.
 # The difference between Coordinated Universal Time UTC and the
-# International Atomic Time TAI is :		
+# International Atomic Time TAI is :
 #
 # from 2009 January 1, 0h UTC, until further notice : UTC-TAI = -34 s
 #
@@ -82,6 +82,6 @@ Leap	2008	Dec	31	23:59:60	+	S
 # will be no time step at the next possible date.
 #
 # Daniel GAMBIS
-# Director			
+# Director
 # Earth Orientation Center of IERS
 # Observatoire de Paris, France

Modified: stable/8/share/zoneinfo/northamerica
==============================================================================
--- stable/8/share/zoneinfo/northamerica	Sun Aug  1 09:03:10 2010	(r210718)
+++ stable/8/share/zoneinfo/northamerica	Sun Aug  1 09:08:33 2010	(r210719)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.31
+# @(#)northamerica	8.34
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1324,6 +1324,83 @@ Zone America/Montreal	-4:54:16 -	LMT	188
 # entry since our cutoff date of 1970, so we can move
 # America/Coral_Harbour to the 'backward' file.
 
+# From Mark Brader (2010-03-06):
+#
+# Currently the database has:
+#
+# # Ontario
+#
+# # From Paul Eggert (2006-07-09):
+# # Shanks & Pottenger write that since 1970 most of Ontario has been like
+# # Toronto.
+# # Thunder Bay skipped DST in 1973.
+# # Many smaller locales did not observe peacetime DST until 1974;
+# # Nipigon (EST) and Rainy River (CST) are the largest that we know of.
+#
+# In the (Toronto) Globe and Mail for Saturday, 1955-09-24, in the bottom
+# right corner of page 1, it says that Toronto will return to standard
+# time at 2 am Sunday morning (which agrees with the database), and that:
+#
+#     The one-hour setback will go into effect throughout most of Ontario,
+#     except in areas like Windsor which remains on standard time all year.
+#
+# Windsor is, of course, a lot larger than Nipigon.
+#
+# I only came across this incidentally.  I don't know if Windsor began
+# observing DST when Detroit did, or in 1974, or on some other date.
+#
+# By the way, the article continues by noting that:
+#
+#     Some cities in the United States have pushed the deadline back
+#     three weeks and will change over from daylight saving in October.
+
+# From Arthur David Olson (2010-07-17):
+#
+# "Standard Time and Time Zones in Canada" appeared in
+# The Journal of The Royal Astronomical Society of Canada,
+# volume 26, number 2 (February 1932) and, as of 2010-07-17,
+# was available at
+# 
+# http://adsabs.harvard.edu/full/1932JRASC..26...49S
+# 
+#
+# It includes the text below (starting on page 57):
+#
+#   A list of the places in Canada using daylight saving time would
+# require yearly revision. From information kindly furnished by
+# the provincial governments and by the postmasters in many cities
+# and towns, it is found that the following places used daylight sav-
+# ing in 1930. The information for the province of Quebec is definite,
+# for the other provinces only approximate:
+#
+# 	Province	Daylight saving time used
+# Prince Edward Island	Not used.
+# Nova Scotia		In Halifax only.
+# New Brunswick		In St. John only.
+# Quebec		In the following places:
+# 			Montreal	Lachine
+# 			Quebec		Mont-Royal
+# 			Levis		Iberville
+# 			St. Lambert	Cap de la Madeleine
+# 			Verdun		Loretteville
+# 			Westmount	Richmond
+# 			Outremont	St. Jerome
+# 			Longueuil	Greenfield Park
+# 			Arvida		Waterloo
+# 			Chambly-Canton	Beaulieu
+# 			Melbourne	La Tuque
+# 			St. Theophile	Buckingham
+# Ontario		Used generally in the cities and towns along
+# 			the southerly part of the province. Not
+# 			used in the northwesterlhy part.
+# Manitoba		Not used.
+# Saskatchewan		In Regina only.
+# Alberta		Not used.
+# British Columbia	Not used.
+#
+#   With some exceptions, the use of daylight saving may be said to be limited
+# to those cities and towns lying between Quebec city and Windsor, Ont.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Toronto	1919	only	-	Mar	30	23:30	1:00	D
 Rule	Toronto	1919	only	-	Oct	26	0:00	0	S
@@ -2147,7 +2224,7 @@ Zone America/Bahia_Banderas	-7:01:00 -	L
 			-6:00	-	CST	1942 Apr 24
 			-7:00	-	MST	1949 Jan 14
 			-8:00	-	PST	1970
-			-7:00	Mexico	M%sT	2010 Apr 4
+			-7:00	Mexico	M%sT	2010 Apr 4 2:00
 			-6:00	Mexico	C%sT
 
 # Baja California (near US border)

Modified: stable/8/share/zoneinfo/zone.tab
==============================================================================
--- stable/8/share/zoneinfo/zone.tab	Sun Aug  1 09:03:10 2010	(r210718)
+++ stable/8/share/zoneinfo/zone.tab	Sun Aug  1 09:08:33 2010	(r210719)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.36
+# @(#)zone.tab	8.37
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -177,8 +177,8 @@ ET	+0902+03842	Africa/Addis_Ababa
 FI	+6010+02458	Europe/Helsinki
 FJ	-1808+17825	Pacific/Fiji
 FK	-5142-05751	Atlantic/Stanley
-FM	+0725+15147	Pacific/Truk	Truk (Chuuk) and Yap
-FM	+0658+15813	Pacific/Ponape	Ponape (Pohnpei)
+FM	+0725+15147	Pacific/Chuuk	Chuuk (Truk) and Yap
+FM	+0658+15813	Pacific/Pohnpei	Pohnpei (Ponape)
 FM	+0519+16259	Pacific/Kosrae	Kosrae
 FO	+6201-00646	Atlantic/Faroe
 FR	+4852+00220	Europe/Paris

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 09:10:09 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C09871065674;
	Sun,  1 Aug 2010 09:10:09 +0000 (UTC)
	(envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B05378FC16;
	Sun,  1 Aug 2010 09:10:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o719A9LV054188;
	Sun, 1 Aug 2010 09:10:09 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o719A9u5054185;
	Sun, 1 Aug 2010 09:10:09 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201008010910.o719A9u5054185@svn.freebsd.org>
From: Joel Dahl 
Date: Sun, 1 Aug 2010 09:10:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210720 - in head/usr.bin: tar unifdef
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 09:10:09 -0000

Author: joel (doc committer)
Date: Sun Aug  1 09:10:09 2010
New Revision: 210720
URL: http://svn.freebsd.org/changeset/base/210720

Log:
  Fix typos.

Modified:
  head/usr.bin/tar/bsdtar.1
  head/usr.bin/unifdef/unifdef.1

Modified: head/usr.bin/tar/bsdtar.1
==============================================================================
--- head/usr.bin/tar/bsdtar.1	Sun Aug  1 09:08:33 2010	(r210719)
+++ head/usr.bin/tar/bsdtar.1	Sun Aug  1 09:10:09 2010	(r210720)
@@ -495,7 +495,7 @@ This option is provided as a performance
 Extract files as sparse files.
 For every block on disk, check first if it contains only NULL bytes and seek
 over it otherwise.
-This works similiar to the conv=sparse option of dd.
+This works similar to the conv=sparse option of dd.
 .It Fl Fl same-owner
 (x mode only)
 Extract owner and group IDs.

Modified: head/usr.bin/unifdef/unifdef.1
==============================================================================
--- head/usr.bin/unifdef/unifdef.1	Sun Aug  1 09:08:33 2010	(r210719)
+++ head/usr.bin/unifdef/unifdef.1	Sun Aug  1 09:10:09 2010	(r210720)
@@ -206,7 +206,7 @@ i.e., the lines that would have been rem
 are retained and vice versa.
 .Pp
 .It Fl d
-Turn on printing of degugging messages.
+Turn on printing of debugging messages.
 .Pp
 .It Fl e
 Because

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 09:11:57 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 289431065670;
	Sun,  1 Aug 2010 09:11:57 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 161C98FC1A;
	Sun,  1 Aug 2010 09:11:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o719Bu1W054723;
	Sun, 1 Aug 2010 09:11:56 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o719Bunx054715;
	Sun, 1 Aug 2010 09:11:56 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201008010911.o719Bunx054715@svn.freebsd.org>
From: Edwin Groothuis 
Date: Sun, 1 Aug 2010 09:11:56 +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: r210721 - stable/7/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 09:11:57 -0000

Author: edwin
Date: Sun Aug  1 09:11:56 2010
New Revision: 210721
URL: http://svn.freebsd.org/changeset/base/210721

Log:
  MFC of 210718, tzdata2010k:
  
  - Daylight Saving Time will not be used in Egypt during Ramadan.
  - Proper names for Pacific/Pohnpei and Pacific/Chuuk
  - Fix historical information for Finland for 1981 and 1982
  - No leap-second for December 2010.
  - Fix historical information for Ontario (Canada)

Modified:
  stable/7/share/zoneinfo/africa
  stable/7/share/zoneinfo/australasia
  stable/7/share/zoneinfo/backward
  stable/7/share/zoneinfo/europe
  stable/7/share/zoneinfo/leapseconds
  stable/7/share/zoneinfo/northamerica
  stable/7/share/zoneinfo/zone.tab
Directory Properties:
  stable/7/share/zoneinfo/   (props changed)

Modified: stable/7/share/zoneinfo/africa
==============================================================================
--- stable/7/share/zoneinfo/africa	Sun Aug  1 09:10:09 2010	(r210720)
+++ stable/7/share/zoneinfo/africa	Sun Aug  1 09:11:56 2010	(r210721)
@@ -1,5 +1,5 @@
 # 
-# @(#)africa	8.26
+# @(#)africa	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -294,8 +294,25 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	23:00s
 # and can be found by searching for "winter" in their search engine
 # (at least today).
 
+# From Alexander Krivenyshev (2010-07-20):
+# According to News from Egypt -  Al-Masry Al-Youm Egypt's cabinet has
+# decided that Daylight Saving Time will not be used in Egypt during
+# Ramadan.
+#
+# Arabic translation:
+# "Clocks to go back during Ramadan--and then forward again"
+# 
+# http://www.almasryalyoum.com/en/news/clocks-go-back-during-ramadan-and-then-forward-again
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_egypt02.html
+# 
+
 Rule	Egypt	2008	only	-	Aug	lastThu	23:00s	0	-
 Rule	Egypt	2009	only	-	Aug	20	23:00s	0	-
+Rule	Egypt	2010	only	-	Aug	10	23:00s	0	-
+Rule	Egypt	2010	only	-	Sep	9	0:00s	1:00	S
 Rule	Egypt	2010	max	-	Sep	lastThu	23:00s	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: stable/7/share/zoneinfo/australasia
==============================================================================
--- stable/7/share/zoneinfo/australasia	Sun Aug  1 09:10:09 2010	(r210720)
+++ stable/7/share/zoneinfo/australasia	Sun Aug  1 09:11:56 2010	(r210721)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.17
+# @(#)australasia	8.18
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -346,10 +346,10 @@ Zone Pacific/Kwajalein	11:09:20 -	LMT	19
 
 # Micronesia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Pacific/Truk	10:07:08 -	LMT	1901
-			10:00	-	TRUT			# Truk Time
-Zone Pacific/Ponape	10:32:52 -	LMT	1901		# Kolonia
-			11:00	-	PONT			# Ponape Time
+Zone Pacific/Chuuk	10:07:08 -	LMT	1901
+			10:00	-	CHUT			# Chuuk Time
+Zone Pacific/Pohnpei	10:32:52 -	LMT	1901		# Kolonia
+			11:00	-	PONT			# Pohnpei Time
 Zone Pacific/Kosrae	10:51:56 -	LMT	1901
 			11:00	-	KOST	1969 Oct	# Kosrae Time
 			12:00	-	KOST	1999

Modified: stable/7/share/zoneinfo/backward
==============================================================================
--- stable/7/share/zoneinfo/backward	Sun Aug  1 09:10:09 2010	(r210720)
+++ stable/7/share/zoneinfo/backward	Sun Aug  1 09:11:56 2010	(r210721)
@@ -1,5 +1,5 @@
 # 
-# @(#)backward	8.8
+# @(#)backward	8.9
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -90,7 +90,9 @@ Link	Pacific/Chatham		NZ-CHAT
 Link	America/Denver		Navajo
 Link	Asia/Shanghai		PRC
 Link	Pacific/Pago_Pago	Pacific/Samoa
-Link	Pacific/Truk		Pacific/Yap
+Link	Pacific/Chuuk		Pacific/Yap
+Link	Pacific/Chuuk		Pacific/Truk
+Link	Pacific/Pohnpei		Pacific/Ponape
 Link	Europe/Warsaw		Poland
 Link	Europe/Lisbon		Portugal
 Link	Asia/Taipei		ROC

Modified: stable/7/share/zoneinfo/europe
==============================================================================
--- stable/7/share/zoneinfo/europe	Sun Aug  1 09:10:09 2010	(r210720)
+++ stable/7/share/zoneinfo/europe	Sun Aug  1 09:11:56 2010	(r210721)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.26
+# @(#)europe	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1013,22 +1013,47 @@ Zone	Europe/Tallinn	1:39:00	-	LMT	1880
 			2:00	EU	EE%sT
 
 # Finland
-#
+
 # From Hannu Strang (1994-09-25 06:03:37 UTC):
 # Well, here in Helsinki we're just changing from summer time to regular one,
 # and it's supposed to change at 4am...
+
+# From Janne Snabb (2010-0715):
 #
-# From Paul Eggert (2006-03-22):
-# Shanks & Pottenger say Finland has switched at 02:00 standard time
-# since 1981.  Go with Strang instead.
+# I noticed that the Finland data is not accurate for years 1981 and 1982.
+# During these two first trial years the DST adjustment was made one hour
+# earlier than in forthcoming years. Starting 1983 the adjustment was made
+# according to the central European standards.
+#
+# This is documented in Heikki Oja: Aikakirja 2007, published by The Almanac
+# Office of University of Helsinki, ISBN 952-10-3221-9, available online (in
+# Finnish) at
+#
+# 
+# http://almanakka.helsinki.fi/aikakirja/Aikakirja2007kokonaan.pdf
+# 
 #
+# Page 105 (56 in PDF version) has a handy table of all past daylight savings
+# transitions. It is easy enough to interpret without Finnish skills.
+#
+# This is also confirmed by Finnish Broadcasting Company's archive at:
+#
+# 
+# http://www.yle.fi/elavaarkisto/?s=s&g=1&ag=5&t=&a=3401
+# 
+#
+# The news clip from 1981 says that "the time between 2 and 3 o'clock does not
+# exist tonight."
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Finland	1942	only	-	Apr	3	0:00	1:00	S
 Rule	Finland	1942	only	-	Oct	3	0:00	0	-
+Rule	Finland	1981	1982	-	Mar	lastSun	2:00	1:00	S
+Rule	Finland	1981	1982	-	Sep	lastSun	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Helsinki	1:39:52 -	LMT	1878 May 31
 			1:39:52	-	HMT	1921 May    # Helsinki Mean Time
-			2:00	Finland	EE%sT	1981 Mar 29 2:00
+			2:00	Finland	EE%sT	1983
 			2:00	EU	EE%sT
 
 # Aaland Is

Modified: stable/7/share/zoneinfo/leapseconds
==============================================================================
--- stable/7/share/zoneinfo/leapseconds	Sun Aug  1 09:10:09 2010	(r210720)
+++ stable/7/share/zoneinfo/leapseconds	Sun Aug  1 09:11:56 2010	(r210721)
@@ -1,5 +1,5 @@
 # 
-# @(#)leapseconds	8.9
+# @(#)leapseconds	8.10
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -60,9 +60,9 @@ Leap	2008	Dec	31	23:59:60	+	S
 # FAX       : 33 (0) 1 40 51 22 91
 # Internet  : services.iers@obspm.fr
 #
-# Paris, 4 July 2009
+# Paris, 14 July 2010
 #
-# Bulletin C 38
+# Bulletin C 40
 #
 # To authorities responsible
 # for the measurement and
@@ -70,9 +70,9 @@ Leap	2008	Dec	31	23:59:60	+	S
 #
 # INFORMATION ON UTC - TAI
 #
-# NO positive leap second will be introduced at the end of December 2009.
+# NO positive leap second will be introduced at the end of December 2010.
 # The difference between Coordinated Universal Time UTC and the
-# International Atomic Time TAI is :		
+# International Atomic Time TAI is :
 #
 # from 2009 January 1, 0h UTC, until further notice : UTC-TAI = -34 s
 #
@@ -82,6 +82,6 @@ Leap	2008	Dec	31	23:59:60	+	S
 # will be no time step at the next possible date.
 #
 # Daniel GAMBIS
-# Director			
+# Director
 # Earth Orientation Center of IERS
 # Observatoire de Paris, France

Modified: stable/7/share/zoneinfo/northamerica
==============================================================================
--- stable/7/share/zoneinfo/northamerica	Sun Aug  1 09:10:09 2010	(r210720)
+++ stable/7/share/zoneinfo/northamerica	Sun Aug  1 09:11:56 2010	(r210721)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.31
+# @(#)northamerica	8.34
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1324,6 +1324,83 @@ Zone America/Montreal	-4:54:16 -	LMT	188
 # entry since our cutoff date of 1970, so we can move
 # America/Coral_Harbour to the 'backward' file.
 
+# From Mark Brader (2010-03-06):
+#
+# Currently the database has:
+#
+# # Ontario
+#
+# # From Paul Eggert (2006-07-09):
+# # Shanks & Pottenger write that since 1970 most of Ontario has been like
+# # Toronto.
+# # Thunder Bay skipped DST in 1973.
+# # Many smaller locales did not observe peacetime DST until 1974;
+# # Nipigon (EST) and Rainy River (CST) are the largest that we know of.
+#
+# In the (Toronto) Globe and Mail for Saturday, 1955-09-24, in the bottom
+# right corner of page 1, it says that Toronto will return to standard
+# time at 2 am Sunday morning (which agrees with the database), and that:
+#
+#     The one-hour setback will go into effect throughout most of Ontario,
+#     except in areas like Windsor which remains on standard time all year.
+#
+# Windsor is, of course, a lot larger than Nipigon.
+#
+# I only came across this incidentally.  I don't know if Windsor began
+# observing DST when Detroit did, or in 1974, or on some other date.
+#
+# By the way, the article continues by noting that:
+#
+#     Some cities in the United States have pushed the deadline back
+#     three weeks and will change over from daylight saving in October.
+
+# From Arthur David Olson (2010-07-17):
+#
+# "Standard Time and Time Zones in Canada" appeared in
+# The Journal of The Royal Astronomical Society of Canada,
+# volume 26, number 2 (February 1932) and, as of 2010-07-17,
+# was available at
+# 
+# http://adsabs.harvard.edu/full/1932JRASC..26...49S
+# 
+#
+# It includes the text below (starting on page 57):
+#
+#   A list of the places in Canada using daylight saving time would
+# require yearly revision. From information kindly furnished by
+# the provincial governments and by the postmasters in many cities
+# and towns, it is found that the following places used daylight sav-
+# ing in 1930. The information for the province of Quebec is definite,
+# for the other provinces only approximate:
+#
+# 	Province	Daylight saving time used
+# Prince Edward Island	Not used.
+# Nova Scotia		In Halifax only.
+# New Brunswick		In St. John only.
+# Quebec		In the following places:
+# 			Montreal	Lachine
+# 			Quebec		Mont-Royal
+# 			Levis		Iberville
+# 			St. Lambert	Cap de la Madeleine
+# 			Verdun		Loretteville
+# 			Westmount	Richmond
+# 			Outremont	St. Jerome
+# 			Longueuil	Greenfield Park
+# 			Arvida		Waterloo
+# 			Chambly-Canton	Beaulieu
+# 			Melbourne	La Tuque
+# 			St. Theophile	Buckingham
+# Ontario		Used generally in the cities and towns along
+# 			the southerly part of the province. Not
+# 			used in the northwesterlhy part.
+# Manitoba		Not used.
+# Saskatchewan		In Regina only.
+# Alberta		Not used.
+# British Columbia	Not used.
+#
+#   With some exceptions, the use of daylight saving may be said to be limited
+# to those cities and towns lying between Quebec city and Windsor, Ont.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Toronto	1919	only	-	Mar	30	23:30	1:00	D
 Rule	Toronto	1919	only	-	Oct	26	0:00	0	S
@@ -2147,7 +2224,7 @@ Zone America/Bahia_Banderas	-7:01:00 -	L
 			-6:00	-	CST	1942 Apr 24
 			-7:00	-	MST	1949 Jan 14
 			-8:00	-	PST	1970
-			-7:00	Mexico	M%sT	2010 Apr 4
+			-7:00	Mexico	M%sT	2010 Apr 4 2:00
 			-6:00	Mexico	C%sT
 
 # Baja California (near US border)

Modified: stable/7/share/zoneinfo/zone.tab
==============================================================================
--- stable/7/share/zoneinfo/zone.tab	Sun Aug  1 09:10:09 2010	(r210720)
+++ stable/7/share/zoneinfo/zone.tab	Sun Aug  1 09:11:56 2010	(r210721)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.36
+# @(#)zone.tab	8.37
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -177,8 +177,8 @@ ET	+0902+03842	Africa/Addis_Ababa
 FI	+6010+02458	Europe/Helsinki
 FJ	-1808+17825	Pacific/Fiji
 FK	-5142-05751	Atlantic/Stanley
-FM	+0725+15147	Pacific/Truk	Truk (Chuuk) and Yap
-FM	+0658+15813	Pacific/Ponape	Ponape (Pohnpei)
+FM	+0725+15147	Pacific/Chuuk	Chuuk (Truk) and Yap
+FM	+0658+15813	Pacific/Pohnpei	Pohnpei (Ponape)
 FM	+0519+16259	Pacific/Kosrae	Kosrae
 FO	+6201-00646	Atlantic/Faroe
 FR	+4852+00220	Europe/Paris

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 09:17:05 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7F6EB106564A;
	Sun,  1 Aug 2010 09:17:05 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6D19F8FC16;
	Sun,  1 Aug 2010 09:17:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o719H53P055878;
	Sun, 1 Aug 2010 09:17:05 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o719H56u055870;
	Sun, 1 Aug 2010 09:17:05 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201008010917.o719H56u055870@svn.freebsd.org>
From: Edwin Groothuis 
Date: Sun, 1 Aug 2010 09:17:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210722 - stable/6/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 09:17:05 -0000

Author: edwin
Date: Sun Aug  1 09:17:05 2010
New Revision: 210722
URL: http://svn.freebsd.org/changeset/base/210722

Log:
  MFC of 210718, tzdata2010k:
  
  - Daylight Saving Time will not be used in Egypt during Ramadan.
  - Proper names for Pacific/Pohnpei and Pacific/Chuuk
  - Fix historical information for Finland for 1981 and 1982
  - No leap-second for December 2010.
  - Fix historical information for Ontario (Canada)

Modified:
  stable/6/share/zoneinfo/africa
  stable/6/share/zoneinfo/australasia
  stable/6/share/zoneinfo/backward
  stable/6/share/zoneinfo/europe
  stable/6/share/zoneinfo/leapseconds
  stable/6/share/zoneinfo/northamerica
  stable/6/share/zoneinfo/zone.tab
Directory Properties:
  stable/6/share/zoneinfo/   (props changed)

Modified: stable/6/share/zoneinfo/africa
==============================================================================
--- stable/6/share/zoneinfo/africa	Sun Aug  1 09:11:56 2010	(r210721)
+++ stable/6/share/zoneinfo/africa	Sun Aug  1 09:17:05 2010	(r210722)
@@ -1,5 +1,5 @@
 # 
-# @(#)africa	8.26
+# @(#)africa	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -294,8 +294,25 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	23:00s
 # and can be found by searching for "winter" in their search engine
 # (at least today).
 
+# From Alexander Krivenyshev (2010-07-20):
+# According to News from Egypt -  Al-Masry Al-Youm Egypt's cabinet has
+# decided that Daylight Saving Time will not be used in Egypt during
+# Ramadan.
+#
+# Arabic translation:
+# "Clocks to go back during Ramadan--and then forward again"
+# 
+# http://www.almasryalyoum.com/en/news/clocks-go-back-during-ramadan-and-then-forward-again
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_egypt02.html
+# 
+
 Rule	Egypt	2008	only	-	Aug	lastThu	23:00s	0	-
 Rule	Egypt	2009	only	-	Aug	20	23:00s	0	-
+Rule	Egypt	2010	only	-	Aug	10	23:00s	0	-
+Rule	Egypt	2010	only	-	Sep	9	0:00s	1:00	S
 Rule	Egypt	2010	max	-	Sep	lastThu	23:00s	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: stable/6/share/zoneinfo/australasia
==============================================================================
--- stable/6/share/zoneinfo/australasia	Sun Aug  1 09:11:56 2010	(r210721)
+++ stable/6/share/zoneinfo/australasia	Sun Aug  1 09:17:05 2010	(r210722)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.17
+# @(#)australasia	8.18
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -346,10 +346,10 @@ Zone Pacific/Kwajalein	11:09:20 -	LMT	19
 
 # Micronesia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Pacific/Truk	10:07:08 -	LMT	1901
-			10:00	-	TRUT			# Truk Time
-Zone Pacific/Ponape	10:32:52 -	LMT	1901		# Kolonia
-			11:00	-	PONT			# Ponape Time
+Zone Pacific/Chuuk	10:07:08 -	LMT	1901
+			10:00	-	CHUT			# Chuuk Time
+Zone Pacific/Pohnpei	10:32:52 -	LMT	1901		# Kolonia
+			11:00	-	PONT			# Pohnpei Time
 Zone Pacific/Kosrae	10:51:56 -	LMT	1901
 			11:00	-	KOST	1969 Oct	# Kosrae Time
 			12:00	-	KOST	1999

Modified: stable/6/share/zoneinfo/backward
==============================================================================
--- stable/6/share/zoneinfo/backward	Sun Aug  1 09:11:56 2010	(r210721)
+++ stable/6/share/zoneinfo/backward	Sun Aug  1 09:17:05 2010	(r210722)
@@ -1,5 +1,5 @@
 # 
-# @(#)backward	8.8
+# @(#)backward	8.9
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -90,7 +90,9 @@ Link	Pacific/Chatham		NZ-CHAT
 Link	America/Denver		Navajo
 Link	Asia/Shanghai		PRC
 Link	Pacific/Pago_Pago	Pacific/Samoa
-Link	Pacific/Truk		Pacific/Yap
+Link	Pacific/Chuuk		Pacific/Yap
+Link	Pacific/Chuuk		Pacific/Truk
+Link	Pacific/Pohnpei		Pacific/Ponape
 Link	Europe/Warsaw		Poland
 Link	Europe/Lisbon		Portugal
 Link	Asia/Taipei		ROC

Modified: stable/6/share/zoneinfo/europe
==============================================================================
--- stable/6/share/zoneinfo/europe	Sun Aug  1 09:11:56 2010	(r210721)
+++ stable/6/share/zoneinfo/europe	Sun Aug  1 09:17:05 2010	(r210722)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.26
+# @(#)europe	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1013,22 +1013,47 @@ Zone	Europe/Tallinn	1:39:00	-	LMT	1880
 			2:00	EU	EE%sT
 
 # Finland
-#
+
 # From Hannu Strang (1994-09-25 06:03:37 UTC):
 # Well, here in Helsinki we're just changing from summer time to regular one,
 # and it's supposed to change at 4am...
+
+# From Janne Snabb (2010-0715):
 #
-# From Paul Eggert (2006-03-22):
-# Shanks & Pottenger say Finland has switched at 02:00 standard time
-# since 1981.  Go with Strang instead.
+# I noticed that the Finland data is not accurate for years 1981 and 1982.
+# During these two first trial years the DST adjustment was made one hour
+# earlier than in forthcoming years. Starting 1983 the adjustment was made
+# according to the central European standards.
+#
+# This is documented in Heikki Oja: Aikakirja 2007, published by The Almanac
+# Office of University of Helsinki, ISBN 952-10-3221-9, available online (in
+# Finnish) at
+#
+# 
+# http://almanakka.helsinki.fi/aikakirja/Aikakirja2007kokonaan.pdf
+# 
 #
+# Page 105 (56 in PDF version) has a handy table of all past daylight savings
+# transitions. It is easy enough to interpret without Finnish skills.
+#
+# This is also confirmed by Finnish Broadcasting Company's archive at:
+#
+# 
+# http://www.yle.fi/elavaarkisto/?s=s&g=1&ag=5&t=&a=3401
+# 
+#
+# The news clip from 1981 says that "the time between 2 and 3 o'clock does not
+# exist tonight."
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Finland	1942	only	-	Apr	3	0:00	1:00	S
 Rule	Finland	1942	only	-	Oct	3	0:00	0	-
+Rule	Finland	1981	1982	-	Mar	lastSun	2:00	1:00	S
+Rule	Finland	1981	1982	-	Sep	lastSun	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Helsinki	1:39:52 -	LMT	1878 May 31
 			1:39:52	-	HMT	1921 May    # Helsinki Mean Time
-			2:00	Finland	EE%sT	1981 Mar 29 2:00
+			2:00	Finland	EE%sT	1983
 			2:00	EU	EE%sT
 
 # Aaland Is

Modified: stable/6/share/zoneinfo/leapseconds
==============================================================================
--- stable/6/share/zoneinfo/leapseconds	Sun Aug  1 09:11:56 2010	(r210721)
+++ stable/6/share/zoneinfo/leapseconds	Sun Aug  1 09:17:05 2010	(r210722)
@@ -1,5 +1,5 @@
 # 
-# @(#)leapseconds	8.9
+# @(#)leapseconds	8.10
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -60,9 +60,9 @@ Leap	2008	Dec	31	23:59:60	+	S
 # FAX       : 33 (0) 1 40 51 22 91
 # Internet  : services.iers@obspm.fr
 #
-# Paris, 4 July 2009
+# Paris, 14 July 2010
 #
-# Bulletin C 38
+# Bulletin C 40
 #
 # To authorities responsible
 # for the measurement and
@@ -70,9 +70,9 @@ Leap	2008	Dec	31	23:59:60	+	S
 #
 # INFORMATION ON UTC - TAI
 #
-# NO positive leap second will be introduced at the end of December 2009.
+# NO positive leap second will be introduced at the end of December 2010.
 # The difference between Coordinated Universal Time UTC and the
-# International Atomic Time TAI is :		
+# International Atomic Time TAI is :
 #
 # from 2009 January 1, 0h UTC, until further notice : UTC-TAI = -34 s
 #
@@ -82,6 +82,6 @@ Leap	2008	Dec	31	23:59:60	+	S
 # will be no time step at the next possible date.
 #
 # Daniel GAMBIS
-# Director			
+# Director
 # Earth Orientation Center of IERS
 # Observatoire de Paris, France

Modified: stable/6/share/zoneinfo/northamerica
==============================================================================
--- stable/6/share/zoneinfo/northamerica	Sun Aug  1 09:11:56 2010	(r210721)
+++ stable/6/share/zoneinfo/northamerica	Sun Aug  1 09:17:05 2010	(r210722)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.31
+# @(#)northamerica	8.34
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1324,6 +1324,83 @@ Zone America/Montreal	-4:54:16 -	LMT	188
 # entry since our cutoff date of 1970, so we can move
 # America/Coral_Harbour to the 'backward' file.
 
+# From Mark Brader (2010-03-06):
+#
+# Currently the database has:
+#
+# # Ontario
+#
+# # From Paul Eggert (2006-07-09):
+# # Shanks & Pottenger write that since 1970 most of Ontario has been like
+# # Toronto.
+# # Thunder Bay skipped DST in 1973.
+# # Many smaller locales did not observe peacetime DST until 1974;
+# # Nipigon (EST) and Rainy River (CST) are the largest that we know of.
+#
+# In the (Toronto) Globe and Mail for Saturday, 1955-09-24, in the bottom
+# right corner of page 1, it says that Toronto will return to standard
+# time at 2 am Sunday morning (which agrees with the database), and that:
+#
+#     The one-hour setback will go into effect throughout most of Ontario,
+#     except in areas like Windsor which remains on standard time all year.
+#
+# Windsor is, of course, a lot larger than Nipigon.
+#
+# I only came across this incidentally.  I don't know if Windsor began
+# observing DST when Detroit did, or in 1974, or on some other date.
+#
+# By the way, the article continues by noting that:
+#
+#     Some cities in the United States have pushed the deadline back
+#     three weeks and will change over from daylight saving in October.
+
+# From Arthur David Olson (2010-07-17):
+#
+# "Standard Time and Time Zones in Canada" appeared in
+# The Journal of The Royal Astronomical Society of Canada,
+# volume 26, number 2 (February 1932) and, as of 2010-07-17,
+# was available at
+# 
+# http://adsabs.harvard.edu/full/1932JRASC..26...49S
+# 
+#
+# It includes the text below (starting on page 57):
+#
+#   A list of the places in Canada using daylight saving time would
+# require yearly revision. From information kindly furnished by
+# the provincial governments and by the postmasters in many cities
+# and towns, it is found that the following places used daylight sav-
+# ing in 1930. The information for the province of Quebec is definite,
+# for the other provinces only approximate:
+#
+# 	Province	Daylight saving time used
+# Prince Edward Island	Not used.
+# Nova Scotia		In Halifax only.
+# New Brunswick		In St. John only.
+# Quebec		In the following places:
+# 			Montreal	Lachine
+# 			Quebec		Mont-Royal
+# 			Levis		Iberville
+# 			St. Lambert	Cap de la Madeleine
+# 			Verdun		Loretteville
+# 			Westmount	Richmond
+# 			Outremont	St. Jerome
+# 			Longueuil	Greenfield Park
+# 			Arvida		Waterloo
+# 			Chambly-Canton	Beaulieu
+# 			Melbourne	La Tuque
+# 			St. Theophile	Buckingham
+# Ontario		Used generally in the cities and towns along
+# 			the southerly part of the province. Not
+# 			used in the northwesterlhy part.
+# Manitoba		Not used.
+# Saskatchewan		In Regina only.
+# Alberta		Not used.
+# British Columbia	Not used.
+#
+#   With some exceptions, the use of daylight saving may be said to be limited
+# to those cities and towns lying between Quebec city and Windsor, Ont.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Toronto	1919	only	-	Mar	30	23:30	1:00	D
 Rule	Toronto	1919	only	-	Oct	26	0:00	0	S
@@ -2147,7 +2224,7 @@ Zone America/Bahia_Banderas	-7:01:00 -	L
 			-6:00	-	CST	1942 Apr 24
 			-7:00	-	MST	1949 Jan 14
 			-8:00	-	PST	1970
-			-7:00	Mexico	M%sT	2010 Apr 4
+			-7:00	Mexico	M%sT	2010 Apr 4 2:00
 			-6:00	Mexico	C%sT
 
 # Baja California (near US border)

Modified: stable/6/share/zoneinfo/zone.tab
==============================================================================
--- stable/6/share/zoneinfo/zone.tab	Sun Aug  1 09:11:56 2010	(r210721)
+++ stable/6/share/zoneinfo/zone.tab	Sun Aug  1 09:17:05 2010	(r210722)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.36
+# @(#)zone.tab	8.37
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -177,8 +177,8 @@ ET	+0902+03842	Africa/Addis_Ababa
 FI	+6010+02458	Europe/Helsinki
 FJ	-1808+17825	Pacific/Fiji
 FK	-5142-05751	Atlantic/Stanley
-FM	+0725+15147	Pacific/Truk	Truk (Chuuk) and Yap
-FM	+0658+15813	Pacific/Ponape	Ponape (Pohnpei)
+FM	+0725+15147	Pacific/Chuuk	Chuuk (Truk) and Yap
+FM	+0658+15813	Pacific/Pohnpei	Pohnpei (Ponape)
 FM	+0519+16259	Pacific/Kosrae	Kosrae
 FO	+6201-00646	Atlantic/Faroe
 FR	+4852+00220	Europe/Paris

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 09:37:37 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 10B5A1065672;
	Sun,  1 Aug 2010 09:37:37 +0000 (UTC)
	(envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F33F88FC1D;
	Sun,  1 Aug 2010 09:37:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o719bavB060360;
	Sun, 1 Aug 2010 09:37:36 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o719ba4r060353;
	Sun, 1 Aug 2010 09:37:36 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201008010937.o719ba4r060353@svn.freebsd.org>
From: Joel Dahl 
Date: Sun, 1 Aug 2010 09:37:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210723 - in head/usr.sbin: fwcontrol jail mfiutil
	mptutil rpc.ypxfrd ypserv
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 09:37:37 -0000

Author: joel (doc committer)
Date: Sun Aug  1 09:37:36 2010
New Revision: 210723
URL: http://svn.freebsd.org/changeset/base/210723

Log:
  Spelling fixes.

Modified:
  head/usr.sbin/fwcontrol/fwcontrol.8
  head/usr.sbin/jail/jail.8
  head/usr.sbin/mfiutil/mfiutil.8
  head/usr.sbin/mptutil/mptutil.8
  head/usr.sbin/rpc.ypxfrd/rpc.ypxfrd.8
  head/usr.sbin/ypserv/ypinit.8

Modified: head/usr.sbin/fwcontrol/fwcontrol.8
==============================================================================
--- head/usr.sbin/fwcontrol/fwcontrol.8	Sun Aug  1 09:17:05 2010	(r210722)
+++ head/usr.sbin/fwcontrol/fwcontrol.8	Sun Aug  1 09:37:36 2010	(r210723)
@@ -178,7 +178,7 @@ This has been tested with SONY HDR-FX1E 
 stream at 25 Mbps bandwidth.
 .Pp
 To send the stream from the camera over the network using TCP (which
-supprisingly works better with vlc), you can use
+surprisingly works better with vlc), you can use
 .Dl "fwcontrol -R - | nc 192.168.10.11 9000
 with
 .Nm netcat

Modified: head/usr.sbin/jail/jail.8
==============================================================================
--- head/usr.sbin/jail/jail.8	Sun Aug  1 09:17:05 2010	(r210722)
+++ head/usr.sbin/jail/jail.8	Sun Aug  1 09:37:36 2010	(r210723)
@@ -256,7 +256,7 @@ Source address selection is enabled by d
 .Va ip4.nosaddrsel
 setting of a parent jail is not inherited for any child jails.
 .It Va ip4
-Control the availablity of IPv4 addresses.
+Control the availability of IPv4 addresses.
 Possible values are
 .Dq inherit
 to allow unrestricted access to all system addresses,
@@ -892,7 +892,7 @@ originally done by
 for IPv4.
 .Pp
 .An James Gritton
-added the extensible jail parameters and hierchical jails.
+added the extensible jail parameters and hierarchical jails.
 .Sh BUGS
 Jail currently lacks the ability to allow access to
 specific jail information via

Modified: head/usr.sbin/mfiutil/mfiutil.8
==============================================================================
--- head/usr.sbin/mfiutil/mfiutil.8	Sun Aug  1 09:17:05 2010	(r210722)
+++ head/usr.sbin/mfiutil/mfiutil.8	Sun Aug  1 09:37:36 2010	(r210723)
@@ -503,7 +503,7 @@ Enable periodic patrol reads initiated b
 The optional
 .Ar interval
 argument specifies the interval in seconds between patrol reads.
-If patrol reads should be run continously,
+If patrol reads should be run continuously,
 then
 .Ar interval
 should consist of the word

Modified: head/usr.sbin/mptutil/mptutil.8
==============================================================================
--- head/usr.sbin/mptutil/mptutil.8	Sun Aug  1 09:17:05 2010	(r210722)
+++ head/usr.sbin/mptutil/mptutil.8	Sun Aug  1 09:37:36 2010	(r210723)
@@ -123,7 +123,7 @@ where
 is the bus ID and
 .Ar yy
 is the target ID.
-If the bus ID is ommitted,
+If the bus ID is omitted,
 the volume is assumed to be on bus 0.
 Second,
 on the volume may be specified by the corresponding

Modified: head/usr.sbin/rpc.ypxfrd/rpc.ypxfrd.8
==============================================================================
--- head/usr.sbin/rpc.ypxfrd/rpc.ypxfrd.8	Sun Aug  1 09:17:05 2010	(r210722)
+++ head/usr.sbin/rpc.ypxfrd/rpc.ypxfrd.8	Sun Aug  1 09:37:36 2010	(r210723)
@@ -44,7 +44,7 @@ The
 .Nm
 utility is used to speed up the distribution of very large NIS maps
 from NIS master to NIS slave servers.
-The normal method for transfering
+The normal method for transferring
 maps involves several steps:
 .Bl -bullet -offset indent
 .It
@@ -93,7 +93,7 @@ own from scratch.
 Simply put,
 .Nm
 implements an RPC-based file transfer protocol.
-Transfering even
+Transferring even
 a multi-megabyte file in this fashion takes only a few seconds compared
 to the several minutes it would take even a reasonably fast slave server
 to build a new map from scratch.

Modified: head/usr.sbin/ypserv/ypinit.8
==============================================================================
--- head/usr.sbin/ypserv/ypinit.8	Sun Aug  1 09:17:05 2010	(r210722)
+++ head/usr.sbin/ypserv/ypinit.8	Sun Aug  1 09:37:36 2010	(r210723)
@@ -98,7 +98,7 @@ The system administrator can edit the
 script and
 modify the map list if necessary.
 Otherwise, individual maps can
-be transfered manually from the master using
+be transferred manually from the master using
 .Xr ypxfr 8 .
 .Sh OPTIONS
 The

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 11:06:14 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1CC82106564A;
	Sun,  1 Aug 2010 11:06:14 +0000 (UTC) (envelope-from bcr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0B13E8FC12;
	Sun,  1 Aug 2010 11:06:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71B6D1o082927;
	Sun, 1 Aug 2010 11:06:13 GMT (envelope-from bcr@svn.freebsd.org)
Received: (from bcr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71B6DFE082925;
	Sun, 1 Aug 2010 11:06:13 GMT (envelope-from bcr@svn.freebsd.org)
Message-Id: <201008011106.o71B6DFE082925@svn.freebsd.org>
From: Benedict Reuschling 
Date: Sun, 1 Aug 2010 11:06: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: r210726 - stable/8/sbin/geom/class/part
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 11:06:14 -0000

Author: bcr (doc committer)
Date: Sun Aug  1 11:06:13 2010
New Revision: 210726
URL: http://svn.freebsd.org/changeset/base/210726

Log:
  MFC r210544:
  
  Small typo fix: s/ommited/omitted
  
  PR:             docs/148977
  Submitted by:   Warren Block (wblock at wonkity dot com)

Modified:
  stable/8/sbin/geom/class/part/gpart.8
Directory Properties:
  stable/8/sbin/geom/class/part/   (props changed)

Modified: stable/8/sbin/geom/class/part/gpart.8
==============================================================================
--- stable/8/sbin/geom/class/part/gpart.8	Sun Aug  1 10:38:19 2010	(r210725)
+++ stable/8/sbin/geom/class/part/gpart.8	Sun Aug  1 11:06:13 2010	(r210726)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 23, 2010
+.Dd July 27, 2010
 .Dt GPART 8
 .Os
 .Sh NAME
@@ -363,7 +363,7 @@ numbers and can be given by the 
 option.
 If
 .Fl s
-option is ommited then new size is automatically calculated
+option is omitted then new size is automatically calculated
 to maximum available from given geom
 .Ar geom .
 .Pp

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 11:09:15 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4B3B4106566B;
	Sun,  1 Aug 2010 11:09:15 +0000 (UTC) (envelope-from bcr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3964B8FC08;
	Sun,  1 Aug 2010 11:09:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71B9F0R083621;
	Sun, 1 Aug 2010 11:09:15 GMT (envelope-from bcr@svn.freebsd.org)
Received: (from bcr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71B9FM8083619;
	Sun, 1 Aug 2010 11:09:15 GMT (envelope-from bcr@svn.freebsd.org)
Message-Id: <201008011109.o71B9FM8083619@svn.freebsd.org>
From: Benedict Reuschling 
Date: Sun, 1 Aug 2010 11:09: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: r210727 - stable/8/bin/setfacl
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 11:09:15 -0000

Author: bcr (doc committer)
Date: Sun Aug  1 11:09:14 2010
New Revision: 210727
URL: http://svn.freebsd.org/changeset/base/210727

Log:
  MFC r210546:
  
  Typo fix: s/ommited/omitted

Modified:
  stable/8/bin/setfacl/setfacl.1
Directory Properties:
  stable/8/bin/setfacl/   (props changed)

Modified: stable/8/bin/setfacl/setfacl.1
==============================================================================
--- stable/8/bin/setfacl/setfacl.1	Sun Aug  1 11:06:13 2010	(r210726)
+++ stable/8/bin/setfacl/setfacl.1	Sun Aug  1 11:09:14 2010	(r210727)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 13, 2010
+.Dd July 27, 2010
 .Dt SETFACL 1
 .Os
 .Sh NAME
@@ -299,7 +299,7 @@ one of 
 .Dq Li group@ ,
 or
 .Dq Li everyone@ ,
-this field is ommited altogether, including the trailing comma.
+this field is omitted altogether, including the trailing comma.
 .It Ar "access permissions"
 Access permissions may be specified in either short or long form.
 Short and long forms may not be mixed.

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 11:12:42 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E364D106566B;
	Sun,  1 Aug 2010 11:12:42 +0000 (UTC) (envelope-from bcr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D1B968FC17;
	Sun,  1 Aug 2010 11:12:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71BCgg6084476;
	Sun, 1 Aug 2010 11:12:42 GMT (envelope-from bcr@svn.freebsd.org)
Received: (from bcr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71BCgJH084474;
	Sun, 1 Aug 2010 11:12:42 GMT (envelope-from bcr@svn.freebsd.org)
Message-Id: <201008011112.o71BCgJH084474@svn.freebsd.org>
From: Benedict Reuschling 
Date: Sun, 1 Aug 2010 11:12:42 +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: r210728 - stable/8/share/examples/etc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 11:12:43 -0000

Author: bcr (doc committer)
Date: Sun Aug  1 11:12:42 2010
New Revision: 210728
URL: http://svn.freebsd.org/changeset/base/210728

Log:
  MFC r210482:
  
  Add an example to encourage people to have a look at either
  make(1) or /usr/ports/ports-mgmt/portconf for port-specific
  variables/options to compile a port.
  
  PR:                 docs/145655
  Submitted by:       Armin Pirkovitsch (armin at frozen dash zone dot org)
  Discussed with:     dougb

Modified:
  stable/8/share/examples/etc/make.conf
Directory Properties:
  stable/8/share/examples/etc/   (props changed)

Modified: stable/8/share/examples/etc/make.conf
==============================================================================
--- stable/8/share/examples/etc/make.conf	Sun Aug  1 11:09:14 2010	(r210727)
+++ stable/8/share/examples/etc/make.conf	Sun Aug  1 11:12:42 2010	(r210728)
@@ -270,3 +270,14 @@
 # /etc/mail/Makefile.  Defaults to 0640.
 #
 #SENDMAIL_MAP_PERMS=
+#
+#
+# It is also possible to set variables in make.conf which will only be
+# used when compiling a specific port.  For more details see make(1).
+#
+#.if ${.CURDIR:M*/irc/irssi-devel*}
+#WITH_DEBUG=YES
+#.endif
+#
+# Another approach is to use /usr/ports/ports-mgmt/portconf which has
+# its own config file for port specific options.

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 12:05:27 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E57831065680;
	Sun,  1 Aug 2010 12:05:27 +0000 (UTC)
	(envelope-from bschmidt@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D345D8FC18;
	Sun,  1 Aug 2010 12:05:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71C5Rkc096013;
	Sun, 1 Aug 2010 12:05:27 GMT (envelope-from bschmidt@svn.freebsd.org)
Received: (from bschmidt@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71C5RsW096011;
	Sun, 1 Aug 2010 12:05:27 GMT (envelope-from bschmidt@svn.freebsd.org)
Message-Id: <201008011205.o71C5RsW096011@svn.freebsd.org>
From: Bernhard Schmidt 
Date: Sun, 1 Aug 2010 12:05: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: r210729 - stable/8/sys/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 12:05:28 -0000

Author: bschmidt
Date: Sun Aug  1 12:05:27 2010
New Revision: 210729
URL: http://svn.freebsd.org/changeset/base/210729

Log:
  MFC r206426:
  Building wlan_amrr is now mandatory.

Modified:
  stable/8/sys/conf/files
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/conf/files
==============================================================================
--- stable/8/sys/conf/files	Sun Aug  1 11:12:42 2010	(r210728)
+++ stable/8/sys/conf/files	Sun Aug  1 12:05:27 2010	(r210729)
@@ -2367,7 +2367,7 @@ net80211/ieee80211_action.c	optional wla
 net80211/ieee80211_ageq.c	optional wlan
 net80211/ieee80211_adhoc.c	optional wlan
 net80211/ieee80211_ageq.c	optional wlan
-net80211/ieee80211_amrr.c	optional wlan wlan_amrr
+net80211/ieee80211_amrr.c	optional wlan | wlan_amrr
 net80211/ieee80211_crypto.c	optional wlan
 net80211/ieee80211_crypto_ccmp.c optional wlan wlan_ccmp
 net80211/ieee80211_crypto_none.c optional wlan

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 12:10:32 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E4914106566C;
	Sun,  1 Aug 2010 12:10:32 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D37BB8FC12;
	Sun,  1 Aug 2010 12:10:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71CAWnp097157;
	Sun, 1 Aug 2010 12:10:32 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71CAWvj097155;
	Sun, 1 Aug 2010 12:10:32 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201008011210.o71CAWvj097155@svn.freebsd.org>
From: Rui Paulo 
Date: Sun, 1 Aug 2010 12:10:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210730 - head/lib/libmagic
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 12:10:33 -0000

Author: rpaulo
Date: Sun Aug  1 12:10:32 2010
New Revision: 210730
URL: http://svn.freebsd.org/changeset/base/210730

Log:
  Use CFLAGS and LDFLAGS when compiling mkmagic. This ensures that all the
  correct flags are being used (esp. NO_WERROR wrt clang).
  
  Submitted by:	Dimitry Andric 
  Reviewed by:	ru

Modified:
  head/lib/libmagic/Makefile

Modified: head/lib/libmagic/Makefile
==============================================================================
--- head/lib/libmagic/Makefile	Sun Aug  1 12:05:27 2010	(r210729)
+++ head/lib/libmagic/Makefile	Sun Aug  1 12:10:32 2010	(r210730)
@@ -40,8 +40,7 @@ magic.mgc: mkmagic magic
 CLEANFILES+=	mkmagic
 build-tools: mkmagic
 mkmagic: apprentice.c funcs.c magic.c print.c
-	${CC} -DHAVE_CONFIG_H -DCOMPILE_ONLY \
-	    -I${.CURDIR} -I${CONTRDIR} -o ${.TARGET} ${.ALLSRC}
+	${CC} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
 
 FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \
 			${.CURDIR}/config.h

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 12:35:01 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 93A8C106564A;
	Sun,  1 Aug 2010 12:35:01 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8273E8FC0A;
	Sun,  1 Aug 2010 12:35:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71CZ1UO002684;
	Sun, 1 Aug 2010 12:35:01 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71CZ1tm002682;
	Sun, 1 Aug 2010 12:35:01 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201008011235.o71CZ1tm002682@svn.freebsd.org>
From: Rui Paulo 
Date: Sun, 1 Aug 2010 12:35:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210731 - head/lib/libc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 12:35:01 -0000

Author: rpaulo
Date: Sun Aug  1 12:35:01 2010
New Revision: 210731
URL: http://svn.freebsd.org/changeset/base/210731

Log:
  Disable all warnings when building gdtoa. This allows building libc with
  clang.
  The general idea is that the vendor will not accept our compilation
  patches and so disabling the warnings is the best way to go as it makes
  future imports bearable.
  
  Submitted by:	Dimitry Andric 
  Discussed with:	das

Modified:
  head/lib/libc/Makefile

Modified: head/lib/libc/Makefile
==============================================================================
--- head/lib/libc/Makefile	Sun Aug  1 12:10:32 2010	(r210730)
+++ head/lib/libc/Makefile	Sun Aug  1 12:35:01 2010	(r210731)
@@ -128,7 +128,7 @@ libkern.${MACHINE_ARCH}:: ${KMSRCS}
 .include 
 
 # Disable warnings in contributed sources.
-CWARNFLAGS:=	${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/}
+CWARNFLAGS:=	${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/:C/^$/-w/}
 # XXX For now, we don't allow libc to be compiled with
 # -fstack-protector-all because it breaks rtld.  We may want to make a librtld
 # in the future to circumvent this.

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 14:14:49 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0EEB81065678;
	Sun,  1 Aug 2010 14:14:49 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F04118FC13;
	Sun,  1 Aug 2010 14:14:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71EEmOb024429;
	Sun, 1 Aug 2010 14:14:48 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71EEmus024426;
	Sun, 1 Aug 2010 14:14:48 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201008011414.o71EEmus024426@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Sun, 1 Aug 2010 14:14: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: r210732 - in stable/8: bin/sh
	tools/regression/bin/sh/parser
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 14:14:49 -0000

Author: jilles
Date: Sun Aug  1 14:14:48 2010
New Revision: 210732
URL: http://svn.freebsd.org/changeset/base/210732

Log:
  MFC r210221: sh: Allow a bg command consisting solely of redirections.
  
  Example:
    
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D1BD2106566C;
	Sun,  1 Aug 2010 15:34:29 +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 BF7D18FC0A;
	Sun,  1 Aug 2010 15:34:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71FYTIL041945;
	Sun, 1 Aug 2010 15:34:29 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71FYTuT041943;
	Sun, 1 Aug 2010 15:34:29 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008011534.o71FYTuT041943@svn.freebsd.org>
From: Rick Macklem 
Date: Sun, 1 Aug 2010 15:34: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: r210733 - stable/8/sys/fs/nfsserver
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 15:34:29 -0000

Author: rmacklem
Date: Sun Aug  1 15:34:29 2010
New Revision: 210733
URL: http://svn.freebsd.org/changeset/base/210733

Log:
  MFC: r210102
  This patch fixes a bug in the experimental NFSv4 server where it
  released a reference count on nfsv4rootfs_lock erroneously when
  administrative revocation of state was done.

Modified:
  stable/8/sys/fs/nfsserver/nfs_nfsdstate.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c
==============================================================================
--- stable/8/sys/fs/nfsserver/nfs_nfsdstate.c	Sun Aug  1 14:14:48 2010	(r210732)
+++ stable/8/sys/fs/nfsserver/nfs_nfsdstate.c	Sun Aug  1 15:34:29 2010	(r210733)
@@ -542,7 +542,6 @@ nfsrv_adminrevoke(struct nfsd_clid *revo
 	 * file.
 	 */
 	NFSLOCKV4ROOTMUTEX();
-	nfsv4_relref(&nfsv4rootfs_lock);
 	do {
 		igotlock = nfsv4_lock(&nfsv4rootfs_lock, 1, NULL,
 		    NFSV4ROOTLOCKMUTEXPTR);

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 15:41:01 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3ADCE1065674;
	Sun,  1 Aug 2010 15:41:01 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 299AF8FC17;
	Sun,  1 Aug 2010 15:41:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71Ff1da043416;
	Sun, 1 Aug 2010 15:41:01 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71Ff1kQ043414;
	Sun, 1 Aug 2010 15:41:01 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201008011541.o71Ff1kQ043414@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Sun, 1 Aug 2010 15:41:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210734 - head/etc/rc.d
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 15:41:01 -0000

Author: jilles
Date: Sun Aug  1 15:41:00 2010
New Revision: 210734
URL: http://svn.freebsd.org/changeset/base/210734

Log:
  Allow starting /etc/rc.d/ipmon if ipnat is enabled but ipfilter is not
  (in /etc/rc.conf).
  
  This fixes an apparent confusion between test(1) and sh(1) syntax for
  AND/OR.
  
  PR:		conf/149036
  Submitted by:	pluknet
  MFC after:	1 week

Modified:
  head/etc/rc.d/ipmon

Modified: head/etc/rc.d/ipmon
==============================================================================
--- head/etc/rc.d/ipmon	Sun Aug  1 15:34:29 2010	(r210733)
+++ head/etc/rc.d/ipmon	Sun Aug  1 15:41:00 2010	(r210734)
@@ -20,7 +20,7 @@ ipmon_precmd()
 	# Continue only if ipfilter or ipnat is enabled and the
 	# ipfilter module is loaded.
 	#
-	if ! checkyesno ipfilter_enable -o ! checkyesno ipnat_enable ; then
+	if ! checkyesno ipfilter_enable && ! checkyesno ipnat_enable ; then
 		err 1  "${name} requires either ipfilter or ipnat enabled"
 	fi
 	if ! sysctl net.inet.ipf.fr_pass >/dev/null 2>&1; then

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 15:55:50 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 23C491065677;
	Sun,  1 Aug 2010 15:55: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 07ED28FC17;
	Sun,  1 Aug 2010 15:55:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71Ftnxd046658;
	Sun, 1 Aug 2010 15:55:49 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71FtnAQ046656;
	Sun, 1 Aug 2010 15:55:49 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008011555.o71FtnAQ046656@svn.freebsd.org>
From: Rick Macklem 
Date: Sun, 1 Aug 2010 15:55:49 +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: r210735 - stable/8/sys/fs/nfsserver
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 15:55:50 -0000

Author: rmacklem
Date: Sun Aug  1 15:55:49 2010
New Revision: 210735
URL: http://svn.freebsd.org/changeset/base/210735

Log:
  MFC: r210154
  Delete comments related to soft clock interrupts that don't apply
  to the FreeBSD port of the experimental NFSv4 server.

Modified:
  stable/8/sys/fs/nfsserver/nfs_nfsdstate.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c
==============================================================================
--- stable/8/sys/fs/nfsserver/nfs_nfsdstate.c	Sun Aug  1 15:41:00 2010	(r210734)
+++ stable/8/sys/fs/nfsserver/nfs_nfsdstate.c	Sun Aug  1 15:55:49 2010	(r210735)
@@ -1015,7 +1015,6 @@ nfsrv_freedeleg(struct nfsstate *stp)
 
 /*
  * This function frees an open owner and all associated opens.
- * Must be called with soft clock interrupts disabled.
  */
 static void
 nfsrv_freeopenowner(struct nfsstate *stp, int cansleep, NFSPROC_T *p)
@@ -1161,7 +1160,6 @@ nfsrv_freeallnfslocks(struct nfsstate *s
 
 /*
  * Free an nfslock structure.
- * Must be called with soft clock interrupts disabled.
  */
 static void
 nfsrv_freenfslock(struct nfslock *lop)
@@ -1178,7 +1176,6 @@ nfsrv_freenfslock(struct nfslock *lop)
 
 /*
  * This function frees an nfslockfile structure.
- * Must be called with soft clock interrupts disabled.
  */
 static void
 nfsrv_freenfslockfile(struct nfslockfile *lfp)
@@ -1358,11 +1355,6 @@ tryagain:
 		}
 	}
 
-	/*
-	 * Since the code is manipulating lists that are also
-	 * manipulated by nfsrv_servertimer(), soft clock interrupts
-	 * must be masked off.
-	 */
 	if (specialid == 0) {
 	    if (new_stp->ls_flags & NFSLCK_TEST) {
 		/*
@@ -1971,9 +1963,6 @@ tryagain:
 	NFSLOCKSTATE();
 	/*
 	 * Get the nfsclient structure.
-	 * Since the code is manipulating lists that are also
-	 * manipulated by nfsrv_servertimer(), soft clock interrupts
-	 * must be masked off.
 	 */
 	error = nfsrv_getclient(clientid, CLOPS_RENEW, &clp,
 	    (nfsquad_t)((u_quad_t)0), NULL, p);
@@ -3176,7 +3165,6 @@ nfsrv_getlockfile(u_short flags, struct 
  * This function adds a nfslock lock structure to the list for the associated
  * nfsstate and nfslockfile structures. It will be inserted after the
  * entry pointed at by insert_lop.
- * Must be called with soft clock interrupts disabled.
  */
 static void
 nfsrv_insertlock(struct nfslock *new_lop, struct nfslock *insert_lop,
@@ -3228,7 +3216,6 @@ nfsrv_insertlock(struct nfslock *new_lop
  * are NFSLCK_READ or NFSLCK_WRITE and non-overlapping (aka POSIX style).
  * It always adds new_lop to the list and sometimes uses the one pointed
  * at by other_lopp.
- * Must be called with soft clock interrupts disabled.
  */
 static void
 nfsrv_updatelock(struct nfsstate *stp, struct nfslock **new_lopp,

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 16:37:52 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 12E5A106566C;
	Sun,  1 Aug 2010 16:37:52 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 019FE8FC0A;
	Sun,  1 Aug 2010 16:37:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71GbpiX055850;
	Sun, 1 Aug 2010 16:37:51 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71GbpTY055848;
	Sun, 1 Aug 2010 16:37:51 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201008011637.o71GbpTY055848@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Sun, 1 Aug 2010 16:37:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210736 - head/bin/sh
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 16:37:52 -0000

Author: jilles
Date: Sun Aug  1 16:37:51 2010
New Revision: 210736
URL: http://svn.freebsd.org/changeset/base/210736

Log:
  sh: Do not enter consecutive duplicates into the history.
  
  This simply sets a flag in libedit. It has a shortcoming in that it does not
  apply to multi-line commands.
  
  Note that a configuration option for this is not going to happen, but always
  having this seems better than not having it. NetBSD has done the same.
  
  PR:		bin/54683
  Obtained from:	NetBSD
  MFC after:	1 month

Modified:
  head/bin/sh/histedit.c

Modified: head/bin/sh/histedit.c
==============================================================================
--- head/bin/sh/histedit.c	Sun Aug  1 15:55:49 2010	(r210735)
+++ head/bin/sh/histedit.c	Sun Aug  1 16:37:51 2010	(r210736)
@@ -168,6 +168,7 @@ sethistsize(hs)
 		   (histsize = atoi(hs)) < 0)
 			histsize = 100;
 		history(hist, &he, H_SETSIZE, histsize);
+		history(hist, &he, H_SETUNIQUE, 1);
 	}
 }
 

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 21:54:25 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 683BD1065674;
	Sun,  1 Aug 2010 21:54:25 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 57BE38FC1D;
	Sun,  1 Aug 2010 21:54:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71LsPF7025420;
	Sun, 1 Aug 2010 21:54:25 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71LsPW7025418;
	Sun, 1 Aug 2010 21:54:25 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008012154.o71LsPW7025418@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Sun, 1 Aug 2010 21:54:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210737 - head/share/man/man9
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 21:54:25 -0000

Author: pjd
Date: Sun Aug  1 21:54:25 2010
New Revision: 210737
URL: http://svn.freebsd.org/changeset/base/210737

Log:
  Correct function name.
  
  MFC after:	3 days

Modified:
  head/share/man/man9/make_dev.9

Modified: head/share/man/man9/make_dev.9
==============================================================================
--- head/share/man/man9/make_dev.9	Sun Aug  1 16:37:51 2010	(r210736)
+++ head/share/man/man9/make_dev.9	Sun Aug  1 21:54:25 2010	(r210737)
@@ -244,7 +244,7 @@ The
 .Fn destroy_dev_sched
 function is the same as
 .Bd -literal -offset indent
-destroy_dev_sched(cdev, NULL, NULL);
+destroy_dev_sched_cb(cdev, NULL, NULL);
 .Ed
 .Pp
 The

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 22:39:08 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 344BF106566C;
	Sun,  1 Aug 2010 22:39:08 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 23CD58FC21;
	Sun,  1 Aug 2010 22:39:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71Md8YU035167;
	Sun, 1 Aug 2010 22:39:08 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71Md8tT035165;
	Sun, 1 Aug 2010 22:39:08 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201008012239.o71Md8tT035165@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Sun, 1 Aug 2010 22:39:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210738 - head/tools/regression/bin/sh/builtins
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 22:39:08 -0000

Author: jilles
Date: Sun Aug  1 22:39:07 2010
New Revision: 210738
URL: http://svn.freebsd.org/changeset/base/210738

Log:
  sh: Add a test for a corner case in eval that already works correctly.

Added:
  head/tools/regression/bin/sh/builtins/eval4.0   (contents, props changed)

Added: head/tools/regression/bin/sh/builtins/eval4.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/builtins/eval4.0	Sun Aug  1 22:39:07 2010	(r210738)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+# eval should preserve $? from command substitutions when starting
+# the parsed command.
+[ $(eval 'echo $?' $(false)) = 1 ]

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 23:36:39 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 95FDE1065673;
	Sun,  1 Aug 2010 23:36:39 +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 6A51B8FC1C;
	Sun,  1 Aug 2010 23:36:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71Nadv2047726;
	Sun, 1 Aug 2010 23:36:39 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71NadvJ047724;
	Sun, 1 Aug 2010 23:36:39 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008012336.o71NadvJ047724@svn.freebsd.org>
From: Rick Macklem 
Date: Sun, 1 Aug 2010 23:36:39 +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: r210739 - stable/8/sys/fs/nfsserver
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 23:36:39 -0000

Author: rmacklem
Date: Sun Aug  1 23:36:39 2010
New Revision: 210739
URL: http://svn.freebsd.org/changeset/base/210739

Log:
  MFC: r210178
  Patch the experimental NFSv4 server so that it acquires a reference
  count on nfsv4rootfs_lock when dumping state, since these functions
  are not called by nfsd threads. Without this reference count, it
  is possible for an nfsd thread to acquire an exclusive lock on
  nfsv4rootfs_lock while the dump is in progress and then change the
  lists, potentially causing a crash.

Modified:
  stable/8/sys/fs/nfsserver/nfs_nfsdstate.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c
==============================================================================
--- stable/8/sys/fs/nfsserver/nfs_nfsdstate.c	Sun Aug  1 22:39:07 2010	(r210738)
+++ stable/8/sys/fs/nfsserver/nfs_nfsdstate.c	Sun Aug  1 23:36:39 2010	(r210739)
@@ -600,6 +600,13 @@ nfsrv_dumpclients(struct nfsd_dumpclient
 	struct nfsclient *clp;
 	int i = 0, cnt = 0;
 
+	/*
+	 * First, get a reference on the nfsv4rootfs_lock so that an
+	 * exclusive lock cannot be acquired while dumping the clients.
+	 */
+	NFSLOCKV4ROOTMUTEX();
+	nfsv4_getref(&nfsv4rootfs_lock, NULL, NFSV4ROOTLOCKMUTEXPTR);
+	NFSUNLOCKV4ROOTMUTEX();
 	NFSLOCKSTATE();
 	/*
 	 * Rattle through the client lists until done.
@@ -616,6 +623,9 @@ nfsrv_dumpclients(struct nfsd_dumpclient
 	if (cnt < maxcnt)
 	    dumpp[cnt].ndcl_clid.nclid_idlen = 0;
 	NFSUNLOCKSTATE();
+	NFSLOCKV4ROOTMUTEX();
+	nfsv4_relref(&nfsv4rootfs_lock);
+	NFSUNLOCKV4ROOTMUTEX();
 }
 
 /*
@@ -691,12 +701,22 @@ nfsrv_dumplocks(vnode_t vp, struct nfsd_
 	fhandle_t nfh;
 
 	ret = nfsrv_getlockfh(vp, 0, NULL, &nfh, p);
+	/*
+	 * First, get a reference on the nfsv4rootfs_lock so that an
+	 * exclusive lock on it cannot be acquired while dumping the locks.
+	 */
+	NFSLOCKV4ROOTMUTEX();
+	nfsv4_getref(&nfsv4rootfs_lock, NULL, NFSV4ROOTLOCKMUTEXPTR);
+	NFSUNLOCKV4ROOTMUTEX();
 	NFSLOCKSTATE();
 	if (!ret)
 		ret = nfsrv_getlockfile(0, NULL, &lfp, &nfh, 0);
 	if (ret) {
 		ldumpp[0].ndlck_clid.nclid_idlen = 0;
 		NFSUNLOCKSTATE();
+		NFSLOCKV4ROOTMUTEX();
+		nfsv4_relref(&nfsv4rootfs_lock);
+		NFSUNLOCKV4ROOTMUTEX();
 		return;
 	}
 
@@ -797,6 +817,9 @@ nfsrv_dumplocks(vnode_t vp, struct nfsd_
 	if (cnt < maxcnt)
 		ldumpp[cnt].ndlck_clid.nclid_idlen = 0;
 	NFSUNLOCKSTATE();
+	NFSLOCKV4ROOTMUTEX();
+	nfsv4_relref(&nfsv4rootfs_lock);
+	NFSUNLOCKV4ROOTMUTEX();
 }
 
 /*

From owner-svn-src-all@FreeBSD.ORG  Sun Aug  1 23:58:27 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 25284106566B;
	Sun,  1 Aug 2010 23:58:27 +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 13CD08FC12;
	Sun,  1 Aug 2010 23:58:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71NwQ2C052449;
	Sun, 1 Aug 2010 23:58:26 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71NwQFL052445;
	Sun, 1 Aug 2010 23:58:26 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008012358.o71NwQFL052445@svn.freebsd.org>
From: Rick Macklem 
Date: Sun, 1 Aug 2010 23:58:26 +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: r210740 - in stable/8/sys/fs: nfs nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 01 Aug 2010 23:58:27 -0000

Author: rmacklem
Date: Sun Aug  1 23:58:26 2010
New Revision: 210740
URL: http://svn.freebsd.org/changeset/base/210740

Log:
  MFC: r210201
  Change the nfscl_mustflush() function in the experimental NFSv4
  client to return a boolean_t in order to make it more compatible
  with style(9).

Modified:
  stable/8/sys/fs/nfs/nfs_var.h
  stable/8/sys/fs/nfsclient/nfs_clstate.c
  stable/8/sys/fs/nfsclient/nfs_clsubs.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/fs/nfs/nfs_var.h
==============================================================================
--- stable/8/sys/fs/nfs/nfs_var.h	Sun Aug  1 23:36:39 2010	(r210739)
+++ stable/8/sys/fs/nfs/nfs_var.h	Sun Aug  1 23:58:26 2010	(r210740)
@@ -469,7 +469,7 @@ void nfscl_docb(struct nfsrv_descript *,
 void nfscl_releasealllocks(struct nfsclclient *, vnode_t, NFSPROC_T *);
 int nfscl_lockt(vnode_t, struct nfsclclient *, u_int64_t,
     u_int64_t, struct flock *, NFSPROC_T *);
-int nfscl_mustflush(vnode_t);
+boolean_t nfscl_mustflush(vnode_t);
 int nfscl_nodeleg(vnode_t, int);
 int nfscl_removedeleg(vnode_t, NFSPROC_T *, nfsv4stateid_t *);
 int nfscl_getref(struct nfsmount *);

Modified: stable/8/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clstate.c	Sun Aug  1 23:36:39 2010	(r210739)
+++ stable/8/sys/fs/nfsclient/nfs_clstate.c	Sun Aug  1 23:58:26 2010	(r210740)
@@ -3735,7 +3735,7 @@ nfscl_tryclose(struct nfsclopen *op, str
  * to the server. This might be a big performance win in some environments.
  * (Not useful until the client does caching on local stable storage.)
  */
-APPLESTATIC int
+APPLESTATIC boolean_t
 nfscl_mustflush(vnode_t vp)
 {
 	struct nfsclclient *clp;
@@ -3746,12 +3746,12 @@ nfscl_mustflush(vnode_t vp)
 	np = VTONFS(vp);
 	nmp = VFSTONFS(vnode_mount(vp));
 	if (!NFSHASNFSV4(nmp))
-		return (1);
+		return (TRUE);
 	NFSLOCKCLSTATE();
 	clp = nfscl_findcl(nmp);
 	if (clp == NULL) {
 		NFSUNLOCKCLSTATE();
-		return (1);
+		return (TRUE);
 	}
 	dp = nfscl_finddeleg(clp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len);
 	if (dp != NULL && (dp->nfsdl_flags & (NFSCLDL_WRITE | NFSCLDL_RECALL))
@@ -3759,10 +3759,10 @@ nfscl_mustflush(vnode_t vp)
 	    (dp->nfsdl_sizelimit >= np->n_size ||
 	     !NFSHASSTRICT3530(nmp))) {
 		NFSUNLOCKCLSTATE();
-		return (0);
+		return (FALSE);
 	}
 	NFSUNLOCKCLSTATE();
-	return (1);
+	return (TRUE);
 }
 
 /*

Modified: stable/8/sys/fs/nfsclient/nfs_clsubs.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clsubs.c	Sun Aug  1 23:36:39 2010	(r210739)
+++ stable/8/sys/fs/nfsclient/nfs_clsubs.c	Sun Aug  1 23:58:26 2010	(r210740)
@@ -188,7 +188,8 @@ ncl_getattrcache(struct vnode *vp, struc
 	struct nfsnode *np;
 	struct vattr *vap;
 	struct nfsmount *nmp;
-	int timeo, mustflush;
+	int timeo;
+	boolean_t mustflush;
 	
 	np = VTONFS(vp);
 	vap = &np->n_vattr.na_vattr;
@@ -230,7 +231,7 @@ ncl_getattrcache(struct vnode *vp, struc
 #endif
 
 	if ((time_second - np->n_attrstamp) >= timeo &&
-	    (mustflush != 0 || np->n_attrstamp == 0)) {
+	    (mustflush || np->n_attrstamp == 0)) {
 		newnfsstats.attrcache_misses++;
 		mtx_unlock(&np->n_mtx);
 #ifdef NFS_ACDEBUG

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 00:37:34 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4B6AD1065676;
	Mon,  2 Aug 2010 00:37:34 +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 3A4D68FC14;
	Mon,  2 Aug 2010 00:37:34 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o720bYLY061843;
	Mon, 2 Aug 2010 00:37:34 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o720bYBb061840;
	Mon, 2 Aug 2010 00:37:34 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008020037.o720bYBb061840@svn.freebsd.org>
From: Rick Macklem 
Date: Mon, 2 Aug 2010 00:37: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: r210741 - stable/8/sys/fs/nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 00:37:34 -0000

Author: rmacklem
Date: Mon Aug  2 00:37:33 2010
New Revision: 210741
URL: http://svn.freebsd.org/changeset/base/210741

Log:
  MFC: r210227
  Add a call to nfscl_mustflush() in nfs_close() of the experimental
  NFSv4 client, so that attributes are not acquired from the server
  when a delegation for the file is held. This can reduce the number
  of Getattr Ops significantly.

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/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clvnops.c	Sun Aug  1 23:58:26 2010	(r210740)
+++ stable/8/sys/fs/nfsclient/nfs_clvnops.c	Mon Aug  2 00:37:33 2010	(r210741)
@@ -726,7 +726,7 @@ nfs_close(struct vop_close_args *ap)
 		/*
 		 * Get attributes so "change" is up to date.
 		 */
-		if (!error) {
+		if (error == 0 && nfscl_mustflush(vp)) {
 			ret = nfsrpc_getattr(vp, cred, ap->a_td, &nfsva,
 			    NULL);
 			if (!ret) {

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 07:17:00 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9D1F5106568A;
	Mon,  2 Aug 2010 07:17:00 +0000 (UTC)
	(envelope-from brde@optusnet.com.au)
Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au
	[211.29.132.187])
	by mx1.freebsd.org (Postfix) with ESMTP id 3420D8FC18;
	Mon,  2 Aug 2010 07:16:59 +0000 (UTC)
Received: from besplex.bde.org (c122-106-147-41.carlnfd1.nsw.optusnet.com.au
	[122.106.147.41])
	by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	o727Gsu4030897
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Mon, 2 Aug 2010 17:16:55 +1000
Date: Mon, 2 Aug 2010 17:16:54 +1000 (EST)
From: Bruce Evans 
X-X-Sender: bde@besplex.bde.org
To: Rick Macklem 
In-Reply-To: <201008012358.o71NwQFL052445@svn.freebsd.org>
Message-ID: <20100802163746.L800@besplex.bde.org>
References: <201008012358.o71NwQFL052445@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
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: r210740 - in stable/8/sys/fs: nfs nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 07:17:00 -0000

On Sun, 1 Aug 2010, Rick Macklem wrote:

> Log:
>  MFC: r210201
>  Change the nfscl_mustflush() function in the experimental NFSv4
>  client to return a boolean_t in order to make it more compatible
>  with style(9).

Er, this makes it less compatible.  style(9) doesn't mention any of
boolean_t, TRUE or FALSE, and it doesn't dream of the C99 
or its true, false, bool, _Bool or __bool_true_and_false_are_defined.
I believe the former are Mach style, which is foreign to BSD style
and was used mainly in the Mach-derived in BSD, especially before I
moved the typedef for boolean_t from a vm header to  in
1995.

In Lite2 kern/*.c, there is a whole 1 use of TRUE and that is for a
vm call; there are 3 uses of FALSE, all for vm calls; there are no
uses of boolean_t although this was wrong for non-prototyped functions
since some vm functions take or return a boolean_t.  E.g., kmem_malloc()
was passed an uncast plain int where a boolean_t is required, so the
behaviour was undefined unless boolean_t was int (which it was and still
is in the kernel) or there was a prototype in scope (which there should
have been by 1993, but the system pretended to support K&R compilers).

In Lite2 vm/*.c, there are 64 uses of TRUE, 80 of FALSE and 85 of
boolean_t (49 more boolean_t's in *.h).  Now the counts are 10%
smaller despite vm being 2.2 times larger.  I guess this is due to
stronger adherence to style rules in Mach.

In Lite2 nfs/*.c, there are 27 uses of TRUE, 41 of FALSE and none of
boolean_t.

So booleans in nfs are nfs(rmacklem) style except for the newfangled
boolean_t (which is now > 10 years out of date with standard type)
but not BSD style :-).

Bruce

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 08:31:32 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 54F3E106566C;
	Mon,  2 Aug 2010 08:31:32 +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 2896B8FC12;
	Mon,  2 Aug 2010 08:31:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o728VWkr066051;
	Mon, 2 Aug 2010 08:31:32 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o728VWeR066047;
	Mon, 2 Aug 2010 08:31:32 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201008020831.o728VWeR066047@svn.freebsd.org>
From: Xin LI 
Date: Mon, 2 Aug 2010 08:31:32 +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: r210742 - stable/7/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 08:31:32 -0000

Author: delphij
Date: Mon Aug  2 08:31:31 2010
New Revision: 210742
URL: http://svn.freebsd.org/changeset/base/210742

Log:
  MFC r210661:
  
  Change copyright holder to author.  We prefer using a real legal
  entity for copyright holders.
  
  Approved by:	sephe

Modified:
  stable/7/sys/dev/et/if_et.c
  stable/7/sys/dev/et/if_etreg.h
  stable/7/sys/dev/et/if_etvar.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/et/if_et.c
==============================================================================
--- stable/7/sys/dev/et/if_et.c	Mon Aug  2 00:37:33 2010	(r210741)
+++ stable/7/sys/dev/et/if_et.c	Mon Aug  2 08:31:31 2010	(r210742)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2007 The DragonFly Project.  All rights reserved.
+ * Copyright (c) 2007 Sepherosa Ziehau.  All rights reserved.
  *
  * This code is derived from software contributed to The DragonFly Project
  * by Sepherosa Ziehau 

Modified: stable/7/sys/dev/et/if_etreg.h
==============================================================================
--- stable/7/sys/dev/et/if_etreg.h	Mon Aug  2 00:37:33 2010	(r210741)
+++ stable/7/sys/dev/et/if_etreg.h	Mon Aug  2 08:31:31 2010	(r210742)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2007 The DragonFly Project.  All rights reserved.
+ * Copyright (c) 2007 Sepherosa Ziehau.  All rights reserved.
  *
  * This code is derived from software contributed to The DragonFly Project
  * by Sepherosa Ziehau 

Modified: stable/7/sys/dev/et/if_etvar.h
==============================================================================
--- stable/7/sys/dev/et/if_etvar.h	Mon Aug  2 00:37:33 2010	(r210741)
+++ stable/7/sys/dev/et/if_etvar.h	Mon Aug  2 08:31:31 2010	(r210742)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2007 The DragonFly Project.  All rights reserved.
+ * Copyright (c) 2007 Sepherosa Ziehau.  All rights reserved.
  *
  * This code is derived from software contributed to The DragonFly Project
  * by Sepherosa Ziehau 

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 08:35:18 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 24D52106564A;
	Mon,  2 Aug 2010 08:35:17 +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 EC7D28FC1B;
	Mon,  2 Aug 2010 08:35:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o728ZGb0066918;
	Mon, 2 Aug 2010 08:35:16 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o728ZGVl066914;
	Mon, 2 Aug 2010 08:35:16 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201008020835.o728ZGVl066914@svn.freebsd.org>
From: Xin LI 
Date: Mon, 2 Aug 2010 08:35: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: r210743 - stable/8/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 08:35:18 -0000

Author: delphij
Date: Mon Aug  2 08:35:16 2010
New Revision: 210743
URL: http://svn.freebsd.org/changeset/base/210743

Log:
  MFC r210661:
  
  Change copyright holder to author.  We prefer using a real legal
  entity for copyright holders.
  
  Approved by:	sephe

Modified:
  stable/8/sys/dev/et/if_et.c
  stable/8/sys/dev/et/if_etreg.h
  stable/8/sys/dev/et/if_etvar.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/et/if_et.c
==============================================================================
--- stable/8/sys/dev/et/if_et.c	Mon Aug  2 08:31:31 2010	(r210742)
+++ stable/8/sys/dev/et/if_et.c	Mon Aug  2 08:35:16 2010	(r210743)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2007 The DragonFly Project.  All rights reserved.
+ * Copyright (c) 2007 Sepherosa Ziehau.  All rights reserved.
  *
  * This code is derived from software contributed to The DragonFly Project
  * by Sepherosa Ziehau 

Modified: stable/8/sys/dev/et/if_etreg.h
==============================================================================
--- stable/8/sys/dev/et/if_etreg.h	Mon Aug  2 08:31:31 2010	(r210742)
+++ stable/8/sys/dev/et/if_etreg.h	Mon Aug  2 08:35:16 2010	(r210743)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2007 The DragonFly Project.  All rights reserved.
+ * Copyright (c) 2007 Sepherosa Ziehau.  All rights reserved.
  *
  * This code is derived from software contributed to The DragonFly Project
  * by Sepherosa Ziehau 

Modified: stable/8/sys/dev/et/if_etvar.h
==============================================================================
--- stable/8/sys/dev/et/if_etvar.h	Mon Aug  2 08:31:31 2010	(r210742)
+++ stable/8/sys/dev/et/if_etvar.h	Mon Aug  2 08:35:16 2010	(r210743)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2007 The DragonFly Project.  All rights reserved.
+ * Copyright (c) 2007 Sepherosa Ziehau.  All rights reserved.
  *
  * This code is derived from software contributed to The DragonFly Project
  * by Sepherosa Ziehau 

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 09:03:32 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 19293106566B;
	Mon,  2 Aug 2010 09:03:32 +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 E0E688FC1A;
	Mon,  2 Aug 2010 09:03:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7293VRN073069;
	Mon, 2 Aug 2010 09:03:31 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7293VQq073067;
	Mon, 2 Aug 2010 09:03:31 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201008020903.o7293VQq073067@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Mon, 2 Aug 2010 09:03: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: r210744 - stable/8/sbin/bsdlabel
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 09:03:32 -0000

Author: jh
Date: Mon Aug  2 09:03:31 2010
New Revision: 210744
URL: http://svn.freebsd.org/changeset/base/210744

Log:
  MFC r209614:
  
  - Don't assign the return value from read(2) to a variable of type
    int.
  - Use errx(3) instead of err(3) to print the error message on short
    reads in readlabel(). errno won't be set on short reads which can
    easily occur here due to the fixed size read request.
  
  PR:		144307

Modified:
  stable/8/sbin/bsdlabel/bsdlabel.c
Directory Properties:
  stable/8/sbin/bsdlabel/   (props changed)

Modified: stable/8/sbin/bsdlabel/bsdlabel.c
==============================================================================
--- stable/8/sbin/bsdlabel/bsdlabel.c	Mon Aug  2 08:35:16 2010	(r210743)
+++ stable/8/sbin/bsdlabel/bsdlabel.c	Mon Aug  2 09:03:31 2010	(r210744)
@@ -347,7 +347,7 @@ makelabel(const char *type, struct diskl
 static void
 readboot(void)
 {
-	int fd, i;
+	int fd;
 	struct stat st;
 	uint64_t *p;
 
@@ -358,8 +358,7 @@ readboot(void)
 		err(1, "cannot open %s", xxboot);
 	fstat(fd, &st);
 	if (alphacksum && st.st_size <= BBSIZE - 512) {
-		i = read(fd, bootarea + 512, st.st_size);
-		if (i != st.st_size)
+		if (read(fd, bootarea + 512, st.st_size) != st.st_size)
 			err(1, "read error %s", xxboot);
 
 		/*
@@ -372,8 +371,7 @@ readboot(void)
 		p[62] = 0;
 		return;
 	} else if ((!alphacksum) && st.st_size <= BBSIZE) {
-		i = read(fd, bootarea, st.st_size);
-		if (i != st.st_size)
+		if (read(fd, bootarea, st.st_size) != st.st_size)
 			err(1, "read error %s", xxboot);
 		return;
 	}
@@ -479,6 +477,7 @@ get_file_parms(int f)
 static int
 readlabel(int flag)
 {
+	ssize_t nbytes;
 	uint32_t lba;
 	int f, i;
 	int error;
@@ -498,8 +497,11 @@ readlabel(int flag)
 		errx(1,
 		    "disks with more than 2^32-1 sectors are not supported");
 	(void)lseek(f, (off_t)0, SEEK_SET);
-	if (read(f, bootarea, BBSIZE) != BBSIZE)
+	nbytes = read(f, bootarea, BBSIZE);
+	if (nbytes == -1)
 		err(4, "%s read", specname);
+	if (nbytes != BBSIZE)
+		errx(4, "couldn't read %d bytes from %s", BBSIZE, specname);
 	close (f);
 	error = bsd_disklabel_le_dec(
 	    bootarea + (labeloffset + labelsoffset * secsize),

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 09:13:10 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 13CF51065674;
	Mon,  2 Aug 2010 09:13:10 +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 01B108FC1B;
	Mon,  2 Aug 2010 09:13:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o729D9CC075210;
	Mon, 2 Aug 2010 09:13:09 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o729D9Ob075208;
	Mon, 2 Aug 2010 09:13:09 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201008020913.o729D9Ob075208@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Mon, 2 Aug 2010 09:13: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: r210745 - stable/8/lib/libc/stdlib
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 09:13:10 -0000

Author: jh
Date: Mon Aug  2 09:13:09 2010
New Revision: 210745
URL: http://svn.freebsd.org/changeset/base/210745

Log:
  MFC r204636:
  
  In reallocf(3), free the memory only when size != 0. Otherwise, when the
  System V compatibility option (malloc "V" flag) is in effect a zero sized
  reallocf() could cause a double free.
  
  PR:		bin/141753

Modified:
  stable/8/lib/libc/stdlib/reallocf.c
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/lib/libc/sys/   (props changed)

Modified: stable/8/lib/libc/stdlib/reallocf.c
==============================================================================
--- stable/8/lib/libc/stdlib/reallocf.c	Mon Aug  2 09:03:31 2010	(r210744)
+++ stable/8/lib/libc/stdlib/reallocf.c	Mon Aug  2 09:13:09 2010	(r210745)
@@ -35,7 +35,14 @@ reallocf(void *ptr, size_t size)
 	void *nptr;
 
 	nptr = realloc(ptr, size);
-	if (!nptr && ptr)
+
+	/*
+	 * When the System V compatibility option (malloc "V" flag) is
+	 * in effect, realloc(ptr, 0) frees the memory and returns NULL.
+	 * So, to avoid double free, call free() only when size != 0.
+	 * realloc(ptr, 0) can't fail when ptr != NULL.
+	 */
+	if (!nptr && ptr && size != 0)
 		free(ptr);
 	return (nptr);
 }

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 10:26:15 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 917191065670;
	Mon,  2 Aug 2010 10:26:15 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8008A8FC24;
	Mon,  2 Aug 2010 10:26:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72AQFva091189;
	Mon, 2 Aug 2010 10:26:15 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72AQFNx091187;
	Mon, 2 Aug 2010 10:26:15 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201008021026.o72AQFNx091187@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Mon, 2 Aug 2010 10:26:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210746 - head/sys/geom/part
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 10:26:15 -0000

Author: ae
Date: Mon Aug  2 10:26:15 2010
New Revision: 210746
URL: http://svn.freebsd.org/changeset/base/210746

Log:
  Release access for consumers that are opened, but will be destroyed
  indirectly by orphan method.
  
  PR:		148688
  Silence from:	marcel
  Approved by:	mav (mentor)
  MFC after: 	2 weeks

Modified:
  head/sys/geom/part/g_part.c

Modified: head/sys/geom/part/g_part.c
==============================================================================
--- head/sys/geom/part/g_part.c	Mon Aug  2 09:13:09 2010	(r210745)
+++ head/sys/geom/part/g_part.c	Mon Aug  2 10:26:15 2010	(r210746)
@@ -1739,6 +1739,7 @@ static void
 g_part_orphan(struct g_consumer *cp)
 {
 	struct g_provider *pp;
+	struct g_part_table *table;
 
 	pp = cp->provider;
 	KASSERT(pp != NULL, (__func__));
@@ -1746,6 +1747,9 @@ g_part_orphan(struct g_consumer *cp)
 	g_topology_assert();
 
 	KASSERT(pp->error != 0, (__func__));
+	table = cp->geom->softc;
+	if (table->gpt_opened)
+		g_access(cp, -1, -1, -1);
 	g_part_wither(cp->geom, pp->error);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 10:30:50 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2D9FF1065670;
	Mon,  2 Aug 2010 10:30:50 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1C3818FC08;
	Mon,  2 Aug 2010 10:30:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72AUoXi093889;
	Mon, 2 Aug 2010 10:30:50 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72AUoY5093887;
	Mon, 2 Aug 2010 10:30:50 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201008021030.o72AUoY5093887@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Mon, 2 Aug 2010 10:30:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210747 - head/sys/geom/sched
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 10:30:50 -0000

Author: ae
Date: Mon Aug  2 10:30:49 2010
New Revision: 210747
URL: http://svn.freebsd.org/changeset/base/210747

Log:
  Forward ioctl requests to original geom.
  
  PR:		148540
  Silence from:	luigi
  Reviewed by:	pjd
  Approved by:	mav (mentor)
  MFC after:	2 weeks

Modified:
  head/sys/geom/sched/g_sched.c

Modified: head/sys/geom/sched/g_sched.c
==============================================================================
--- head/sys/geom/sched/g_sched.c	Mon Aug  2 10:26:15 2010	(r210746)
+++ head/sys/geom/sched/g_sched.c	Mon Aug  2 10:30:49 2010	(r210747)
@@ -136,6 +136,8 @@ static void g_sched_dumpconf(struct sbuf
     struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp);
 static void g_sched_init(struct g_class *mp);
 static void g_sched_fini(struct g_class *mp);
+static int g_sched_ioctl(struct g_provider *pp, u_long cmd, void *data,
+    int fflag, struct thread *td);
 
 struct g_class g_sched_class = {
 	.name = G_SCHED_CLASS_NAME,
@@ -144,6 +146,7 @@ struct g_class g_sched_class = {
 	.taste = g_sched_taste,
 	.destroy_geom = g_sched_destroy_geom,
 	.init = g_sched_init,
+	.ioctl = g_sched_ioctl,
 	.fini = g_sched_fini
 };
 
@@ -1601,6 +1604,22 @@ g_sched_fini(struct g_class *mp)
 	mtx_destroy(&me.gs_mtx);
 }
 
+static int
+g_sched_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag,
+    struct thread *td)
+{
+	struct g_consumer *cp;
+	struct g_geom *gp;
+
+	cp = LIST_FIRST(&pp->geom->consumer);
+	if (cp == NULL)
+		return (ENOIOCTL);
+	gp = cp->provider->geom;
+	if (gp->ioctl == NULL)
+		return (ENOIOCTL);
+	return (gp->ioctl(cp->provider, cmd, data, fflag, td));
+}
+
 /*
  * Read the i-th argument for a request, skipping the /dev/
  * prefix if present.

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 10:31:39 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CC4D51065674;
	Mon,  2 Aug 2010 10:31:39 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B9FD88FC0C;
	Mon,  2 Aug 2010 10:31:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72AVdx8094114;
	Mon, 2 Aug 2010 10:31:39 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72AVdTI094112;
	Mon, 2 Aug 2010 10:31:39 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008021031.o72AVdTI094112@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Mon, 2 Aug 2010 10:31:39 +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: r210748 - stable/8/sbin/geom/class/sched
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 10:31:39 -0000

Author: uqs
Date: Mon Aug  2 10:31:39 2010
New Revision: 210748
URL: http://svn.freebsd.org/changeset/base/210748

Log:
  MFC r209350, r210645: mdoc fixes, HISTORY fixes
  
  - remove stray argument [1]
  - remove stray whitespace
  - use canonical wording for the HISTORY section
  - gsched(8) was first released with FreeBSD 8.1

Modified:
  stable/8/sbin/geom/class/sched/gsched.8   (contents, props changed)

Modified: stable/8/sbin/geom/class/sched/gsched.8
==============================================================================
--- stable/8/sbin/geom/class/sched/gsched.8	Mon Aug  2 10:30:49 2010	(r210747)
+++ stable/8/sbin/geom/class/sched/gsched.8	Mon Aug  2 10:31:39 2010	(r210748)
@@ -94,10 +94,9 @@ on an already existing provider.
 .Pp
 A subsequent 'destroy' will remove the newly created geom and
 hook the provider back to the original geom.
-.Ar algorithm
 .It Cm configure
 Configure existing scheduling provider.  It supports the same options
-as the 
+as the
 .Nm create
 command.
 .It Cm destroy
@@ -157,7 +156,8 @@ geom sched destroy -v ad0.sched.
 .Sh HISTORY
 The
 .Nm
-utility appeared in April 2010.
+utility first appeared in
+.Fx 8.1 .
 .Sh AUTHORS
 .An Fabio Checconi Aq fabio@FreeBSD.org
 .An Luigi Rizzo Aq luigi@FreeBSD.org

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 10:57:56 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AB8C9106566C;
	Mon,  2 Aug 2010 10:57:56 +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 8E7368FC1E;
	Mon,  2 Aug 2010 10:57:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72Avu5l099858;
	Mon, 2 Aug 2010 10:57:56 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72AvuTR099856;
	Mon, 2 Aug 2010 10:57:56 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201008021057.o72AvuTR099856@svn.freebsd.org>
From: Konstantin Belousov 
Date: Mon, 2 Aug 2010 10:57:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210749 - head/bin/sleep
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 10:57:56 -0000

Author: kib
Date: Mon Aug  2 10:57:56 2010
New Revision: 210749
URL: http://svn.freebsd.org/changeset/base/210749

Log:
  Simplify argument parser by using sscanf(); simplify usage() by not
  refusing to use stdio.
  Reduce nesting level in the sleep loop by returning earlier for negative
  timeouts.
  Limit the maximum timeout to INT_MAX seconds.
  
  Submitted by:	bde
  MFC after:	3 weeks

Modified:
  head/bin/sleep/sleep.c

Modified: head/bin/sleep/sleep.c
==============================================================================
--- head/bin/sleep/sleep.c	Mon Aug  2 10:31:39 2010	(r210748)
+++ head/bin/sleep/sleep.c	Mon Aug  2 10:57:56 2010	(r210749)
@@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 static void usage(void);
 
@@ -65,91 +64,39 @@ int
 main(int argc, char *argv[])
 {
 	struct timespec time_to_sleep;
-	long l, original;
-	int neg;
-	char *p;
+	double d;
+	time_t original;
+	char buf[2];
 
 	if (argc != 2)
 		usage();
 
-	p = argv[1];
-
-	/* Skip over leading whitespaces. */
-	while (isspace((unsigned char)*p))
-		++p;
-
-	/* Check for optional `+' or `-' sign. */
-	neg = 0;
-	if (*p == '-') {
-		neg = 1;
-		++p;
-		if (!isdigit((unsigned char)*p) && *p != '.')
-			usage();
-	}
-	else if (*p == '+')
-		++p;
-
-	/* Calculate seconds. */
-	if (isdigit((unsigned char)*p)) {
-		l = strtol(p, &p, 10);
-
-		/*
-		 * Avoid overflow when `seconds' is huge.  This assumes
-		 * that the maximum value for a time_t is <= INT_MAX.
-		 */
-		if (l > INT_MAX)
-			l = INT_MAX;
-	} else
-		l = 0;
-	time_to_sleep.tv_sec = (time_t)l;
-
-	/* Calculate nanoseconds. */
-	time_to_sleep.tv_nsec = 0;
-
-	if (*p == '.') {		/* Decimal point. */
-		l = 100000000L;
-		do {
-			if (isdigit((unsigned char)*++p))
-				time_to_sleep.tv_nsec += (*p - '0') * l;
-			else
-				break;
-			l /= 10;
-		} while (l);
-	}
-
-	/* Skip over the trailing whitespace. */
-	while (isspace((unsigned char)*p))
-		++p;
-	if (*p != '\0')
+	if (sscanf(argv[1], "%lf%1s", &d, buf) != 1)
+		usage();
+	if (d > INT_MAX)
 		usage();
+	if (d <= 0)
+		return (0);
+	original = time_to_sleep.tv_sec = (time_t)d;
+	time_to_sleep.tv_nsec = 1e9 * (d - time_to_sleep.tv_sec);
 
 	signal(SIGINFO, report_request);
-	if (!neg && (time_to_sleep.tv_sec > 0 || time_to_sleep.tv_nsec > 0)) {
-		original = time_to_sleep.tv_sec;
-		while (nanosleep(&time_to_sleep, &time_to_sleep) != 0) {
-			if (report_requested) {
-				/*
-				 * Reporting does not bother with
-				 * fractions of a second...
-				 */
-				warnx("about %jd second(s) left"
-				    " out of the original %jd",
-				    (intmax_t)time_to_sleep.tv_sec,
-				    (intmax_t)original);
-				report_requested = 0;
-			} else
-				break;
-		}
+	while (nanosleep(&time_to_sleep, &time_to_sleep) != 0) {
+		if (report_requested) {
+			/* Reporting does not bother with nanoseconds. */
+			warnx("about %d second(s) left out of the original %d",
+			    (int)time_to_sleep.tv_sec, (int)original);
+			report_requested = 0;
+		} else
+			break;
 	}
-
 	return (0);
 }
 
 static void
 usage(void)
 {
-	static const char msg[] = "usage: sleep seconds\n";
 
-	write(STDERR_FILENO, msg, sizeof(msg) - 1);
+	fprintf(stderr, "usage: sleep seconds\n");
 	exit(1);
 }

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 10:59:24 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4D82B1065673;
	Mon,  2 Aug 2010 10:59:24 +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 3C15D8FC08;
	Mon,  2 Aug 2010 10:59:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72AxOGl000324;
	Mon, 2 Aug 2010 10:59:24 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72AxO1I000322;
	Mon, 2 Aug 2010 10:59:24 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201008021059.o72AxO1I000322@svn.freebsd.org>
From: Konstantin Belousov 
Date: Mon, 2 Aug 2010 10:59:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210750 - head/bin/sleep
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 10:59:24 -0000

Author: kib
Date: Mon Aug  2 10:59:23 2010
New Revision: 210750
URL: http://svn.freebsd.org/changeset/base/210750

Log:
  Document the new argument parser for sleep(1) and SIGINFO behaviour.
  Remove higlight for the unportability notice.
  
  MFC after:	3 weeks

Modified:
  head/bin/sleep/sleep.1

Modified: head/bin/sleep/sleep.1
==============================================================================
--- head/bin/sleep/sleep.1	Mon Aug  2 10:57:56 2010	(r210749)
+++ head/bin/sleep/sleep.1	Mon Aug  2 10:59:23 2010	(r210750)
@@ -51,6 +51,10 @@ suspends execution for a minimum of
 If the
 .Nm
 command receives a signal, it takes the standard action.
+When the
+.Dv SIGINFO
+signal is received, the estimate of the amount of seconds left to
+sleep is printed on the standard output.
 .Sh IMPLEMENTATION NOTES
 The
 .Dv SIGALRM
@@ -58,14 +62,11 @@ signal is not handled specially by this 
 .Pp
 The
 .Nm
-command will accept and honor a non-integer number of specified seconds
-(with a
-.Ql .\&
-character as a decimal point).
-.Bf Sy
+command allows and honors a non-integer number of seconds to sleep
+in any form acceptable by
+.Xr strtod 3 .
 This is a non-portable extension, and its use will nearly guarantee that
 a shell script will not execute properly on another system.
-.Ef
 .Sh EXIT STATUS
 .Ex -std
 .Sh EXAMPLES

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 11:02:00 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7DB97106566C;
	Mon,  2 Aug 2010 11:02:00 +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 E8FFE8FC16;
	Mon,  2 Aug 2010 11:01:59 +0000 (UTC)
Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua
	[10.1.1.148])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o72B0dx8030927
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Mon, 2 Aug 2010 14:00:42 +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.4/8.14.4) with ESMTP id
	o72B0dvt097151; Mon, 2 Aug 2010 14:00:39 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o72B0d6b097150; 
	Mon, 2 Aug 2010 14:00:39 +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: Mon, 2 Aug 2010 14:00:39 +0300
From: Kostik Belousov 
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
Message-ID: <20100802110039.GD22295@deviant.kiev.zoral.com.ua>
References: <201008021059.o72AxO1I000322@svn.freebsd.org>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="XeYnZTu7hwE7l7sm"
Content-Disposition: inline
In-Reply-To: <201008021059.o72AxO1I000322@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=-3.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,
	DNS_FROM_OPENWHOIS autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: 
Subject: Re: svn commit: r210750 - head/bin/sleep
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 11:02:00 -0000


--XeYnZTu7hwE7l7sm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 02, 2010 at 10:59:24AM +0000, Konstantin Belousov wrote:
> Author: kib
> Date: Mon Aug  2 10:59:23 2010
> New Revision: 210750
> URL: http://svn.freebsd.org/changeset/base/210750
>=20
> Log:
>   Document the new argument parser for sleep(1) and SIGINFO behaviour.
>   Remove higlight for the unportability notice.
>  =20
>   MFC after:	3 weeks
Reviewed by:	bde

--XeYnZTu7hwE7l7sm
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkxWpVcACgkQC3+MBN1Mb4g1RQCgnjLdwT1Zdx3xlwMHSjbg/32q
qUkAn3G+3a5X/axz5cyak2LvzkpA88CU
=AzrO
-----END PGP SIGNATURE-----

--XeYnZTu7hwE7l7sm--

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 11:48:06 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F07FC1065678;
	Mon,  2 Aug 2010 11:48:06 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DDA3F8FC14;
	Mon,  2 Aug 2010 11:48:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72Bm6rG012628;
	Mon, 2 Aug 2010 11:48:06 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72Bm5Gh012596;
	Mon, 2 Aug 2010 11:48:05 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008021148.o72Bm5Gh012596@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Mon, 2 Aug 2010 11:48:05 +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: r210751 - in stable: 7/games/fortune/datfiles
	8/games/fortune/datfiles
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 11:48:07 -0000

Author: uqs
Date: Mon Aug  2 11:48:05 2010
New Revision: 210751
URL: http://svn.freebsd.org/changeset/base/210751

Log:
  MFC r210662: Fix indention of attribution line for some recent additions.

Modified:
  stable/8/games/fortune/datfiles/fortunes
Directory Properties:
  stable/8/games/fortune/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/7/games/fortune/datfiles/fortunes
Directory Properties:
  stable/7/games/fortune/   (props changed)

Modified: stable/8/games/fortune/datfiles/fortunes
==============================================================================
--- stable/8/games/fortune/datfiles/fortunes	Mon Aug  2 10:59:23 2010	(r210750)
+++ stable/8/games/fortune/datfiles/fortunes	Mon Aug  2 11:48:05 2010	(r210751)
@@ -2110,7 +2110,7 @@ self-propagating.
 	He who receives ideas from me, receives instruction himself without
 lessening mine; as he who lights his taper at mine receives light
 without darkening me.
-	-- Thomas Jefferson on patents on ideas
+		-- Thomas Jefferson on patents on ideas
 %
 	"Heard you were moving your piano, so I came over to help."
 	"Thanks.  Got it upstairs already."
@@ -57546,11 +57546,11 @@ LII:
 		-- Norman Augustine
 %
 XML is a giant step in no direction at all.
-	-- Erik Naggum
+		-- Erik Naggum
 %
 XML is like violence: if it doesn't solve your problem, you aren't using
 enough of it.
-	-- XML guru Chris Maden
+		-- XML guru Chris Maden
 %
 X-rated movies are all alike -- the only thing
 they leave to the imagination is the plot.

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 11:48:08 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A2121106567D;
	Mon,  2 Aug 2010 11:48:08 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8F5FC8FC17;
	Mon,  2 Aug 2010 11:48:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72Bm85M012634;
	Mon, 2 Aug 2010 11:48:08 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72Bm6gG012632;
	Mon, 2 Aug 2010 11:48:06 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008021148.o72Bm6gG012632@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Mon, 2 Aug 2010 11:48:06 +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: r210751 - in stable: 7/games/fortune/datfiles
	8/games/fortune/datfiles
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 11:48:08 -0000

Author: uqs
Date: Mon Aug  2 11:48:05 2010
New Revision: 210751
URL: http://svn.freebsd.org/changeset/base/210751

Log:
  MFC r210662: Fix indention of attribution line for some recent additions.

Modified:
  stable/7/games/fortune/datfiles/fortunes
Directory Properties:
  stable/7/games/fortune/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/8/games/fortune/datfiles/fortunes
Directory Properties:
  stable/8/games/fortune/   (props changed)

Modified: stable/7/games/fortune/datfiles/fortunes
==============================================================================
--- stable/7/games/fortune/datfiles/fortunes	Mon Aug  2 10:59:23 2010	(r210750)
+++ stable/7/games/fortune/datfiles/fortunes	Mon Aug  2 11:48:05 2010	(r210751)
@@ -2110,7 +2110,7 @@ self-propagating.
 	He who receives ideas from me, receives instruction himself without
 lessening mine; as he who lights his taper at mine receives light
 without darkening me.
-	-- Thomas Jefferson on patents on ideas
+		-- Thomas Jefferson on patents on ideas
 %
 	"Heard you were moving your piano, so I came over to help."
 	"Thanks.  Got it upstairs already."
@@ -57546,11 +57546,11 @@ LII:
 		-- Norman Augustine
 %
 XML is a giant step in no direction at all.
-	-- Erik Naggum
+		-- Erik Naggum
 %
 XML is like violence: if it doesn't solve your problem, you aren't using
 enough of it.
-	-- XML guru Chris Maden
+		-- XML guru Chris Maden
 %
 X-rated movies are all alike -- the only thing
 they leave to the imagination is the plot.

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 12:13:34 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0FF27106566C;
	Mon,  2 Aug 2010 12:13:34 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EEC458FC0A;
	Mon,  2 Aug 2010 12:13:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72CDXt7018331;
	Mon, 2 Aug 2010 12:13:33 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72CDXGK018304;
	Mon, 2 Aug 2010 12:13:33 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201008021213.o72CDXGK018304@svn.freebsd.org>
From: Rui Paulo 
Date: Mon, 2 Aug 2010 12:13:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210753 - in vendor/opensolaris/dist:
	cmd/dtrace/test/cmd/baddof cmd/dtrace/test/cmd/chkargs
	cmd/dtrace/test/cmd/jdtrace cmd/dtrace/test/cmd/scripts
	cmd/dtrace/test/tst/common/aggs cmd/...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 12:13:34 -0000

Author: rpaulo
Date: Mon Aug  2 12:13:33 2010
New Revision: 210753
URL: http://svn.freebsd.org/changeset/base/210753

Log:
  Update DTrace userland code to the latest available.
  
  Summary of changes:
  
  - libdtrace
  
  changeset:   12902:3bb859a7330c
  user:        Bryan Cantrill 
  date:        Fri Jul 23 17:34:02 2010 -0700
  summary:     6679140 asymmetric alloc/dealloc activity can induce dynamic variable drops
  
  changeset:   12692:4341b447c069
  user:        Ali Bahrami 
  date:        Thu Jun 24 18:16:42 2010 -0600
  summary:     6916796 OSnet mapfiles should use version 2 link-editor syntax
  
  changeset:   12507:501806a754d2
  user:        Alan Maguire 
  date:        Thu May 27 17:29:51 2010 -0400
  summary:     PSARC 2010/106 DTrace TCP and UDP providers
  
  changeset:   11798:1e7f1f154004
  user:        Roger A. Faulkner 
  date:        Sun Feb 28 18:42:20 2010 -0800
  summary:     PSARC 2009/657 delete obsolete system call traps
  
  changeset:   11466:d60272412fb0
  user:        Roger A. Faulkner 
  date:        Mon Jan 11 17:42:13 2010 -0800
  summary:     6915578 MUTEX_HELD() and RW_LOCK_HELD() macros should be available to Posix threads
  
  changeset:   11237:0d23e47ed228
  user:        Jonathan Haslam 
  date:        Thu Dec 03 13:39:19 2009 +0000
  summary:     6795386 macro arguments and globbing in DTrace probe descriptions don't mix
  
  changeset:   10791:944abfb5b345
  user:        Jonathan Haslam 
  date:        Wed Oct 14 11:25:23 2009 +0100
  summary:     6886953 large symbols lead to stack exhaustion
  
  changeset:   10326:8e3fbeec2d76
  user:        Siddheshwar Mahesh 
  date:        Mon Aug 17 13:26:49 2009 -0500
  summary:     6868411 NFS provider generates error on ci_remote on RDMA operations
  
  changeset:   10207:87c40ea3fc4b
  user:        jmcp 
  date:        Wed Jul 29 16:56:03 2009 -0700
  summary:     6864230 hiho, hiho, it'ch chtime for CH to go
  
  changeset:   10044:2643c1cd9e2a
  user:        Priya Krishnan 
  date:        Mon Jul 06 21:19:41 2009 -0400
  summary:     6855027 iscsit.d breaks dtrace in osol based on snv_117
  
  changeset:   9900:1b86d65a4f9e
  user:        Ali Bahrami 
  date:        Thu Jun 18 13:16:39 2009 -0600
  summary:     6851224 elf_getshnum() and elf_getshstrndx() incompatible with 2002 ELF gABI agreement
  
  changeset:   9885:a3d5e9d9e779
  user:        Robert Mastors 
  date:        Tue Jun 16 15:25:25 2009 -0500
  summary:     6711844 assert: vp->v_shrlocks == 0L, file: ../../common/fs/vnode.c, line: 2333
  
  changeset:   9881:741c9e4e094c
  user:        Charles Ting 
  date:        Tue Jun 16 14:51:40 2009 -0400
  summary:     6849606 SRP DTrace Probe for xfer-done misses completion of READ transfers
  
  changeset:   9829:e8059fcaee97
  user:        Charles Ting 
  date:        Tue Jun 09 10:11:35 2009 -0400
  summary:     6804431 Add Dtrace probes to SRPT
  
  changeset:   9812:a2990074321f
  user:        Priya Krishnan 
  date:        Mon Jun 08 09:49:48 2009 -0400
  summary:     6847237 The iscsit.d DTrace translator should include iscsi.d for the definition of iscsiinfo_t
  
  changeset:   9721:4f7e194c7c37
  user:        Priya Krishnan 
  date:        Tue May 26 10:40:43 2009 -0400
  summary:     6809997 COMSTAR iscsi target DTrace Provider needed
  
  changeset:   9625:8aa5731291b4
  user:        Sam Cramer 
  date:        Wed May 13 17:10:06 2009 -0700
  summary:     6840354 "/usr/lib/dtrace/fc.d", line 59: syntax error near "fct_local_port_t"
  
  changeset:   9609:8874cc8d5e3f
  user:        Sam Cramer 
  date:        Mon May 11 21:02:27 2009 -0700
  summary:     6809580 fct DTrace providers needed for qlt
  
  changeset:   9578:c4b38ec17f4e
  user:        Sam Cramer 
  date:        Fri May 08 12:12:40 2009 -0700
  summary:     6809580 fct DTrace providers needed for qlt
  
  changeset:   9531:dc8924ef7839
  user:        Rafael Vanoni 
  date:        Mon May 04 11:48:15 2009 -0700
  summary:     6730130 dtrace missing printf handler for stdev
  
  changeset:   9389:750ed3471e90
  user:        Vamsi Nagineni 
  date:        Fri Apr 17 06:26:47 2009 -0700
  summary:     6812050 dtrace should translate curpsinfo->pr_contract
  
  changeset:   9085:ff7eb0bace56
  user:        Ali Bahrami 
  date:        Wed Mar 18 13:28:28 2009 -0600
  summary:     6813909 generalize eh_frame support to non-amd64 platforms
  
  changeset:   8803:8c01b39012c9
  user:        Jonathan Haslam 
  date:        Fri Feb 13 07:13:13 2009 +0000
  summary:     PSARC 2008/480 DTrace CPC Provider
  
  changeset:   8744:03d5725cda56
  user:        Ali Bahrami 
  date:        Tue Feb 10 09:38:02 2009 -0700
  summary:     6798660 Cadmium .NOT file processing problem with CWD relative file paths
  
  changeset:   8337:079ecc003ca6
  user:        Jonathan Haslam 
  date:        Thu Dec 11 11:26:47 2008 +0000
  summary:     6750659 drti.o crashes app due to corrupt environment
  
  changeset:   7991:d3b751ef3d85
  user:        Jonathan Haslam 
  date:        Mon Nov 03 10:26:23 2008 +0000
  summary:     6738982 Representative thread after DTrace stop() action is incorrect
  
  changeset:   7208:568549b138d8
  user:        vv149972
  date:        Mon Jul 28 23:14:31 2008 -0700
  summary:     6696397 NFS v3 provider reports all UDP clients as 0.0.0.0
  
  changeset:   6878:360e73ea6b0c
  user:        brendan
  date:        Fri Jun 13 19:06:55 2008 -0700
  summary:     PSARC 2008/302 DTrace IP Provider
  
  changeset:   6554:b5817e112852
  user:        ahl
  date:        Mon May 05 14:38:24 2008 -0700
  summary:     6677812 race between dtrace activities in non-local zones
  
  ----
  
  - ctf tools:
  
  changeset:   12177:800b7f847f1e
  user:        Surya Prakki 
  date:        Sun Apr 18 23:59:57 2010 -0700
  summary:     6941452 ctfconvert fails on VLAs with code generated by SS12u1
  
  changeset:   11432:c1c450bf62f2
  user:        John Levon 
  date:        Tue Jan 05 06:57:53 2010 -0800
  summary:     6905711 anonymous and empty SOUs crash ctfconvert
  
  changeset:   11227:cd2ac59c39f2
  user:        Ali Bahrami 
  date:        Wed Dec 02 15:37:55 2009 -0700
  summary:     6900241 ld should track SHT_GROUP sections by symbol name, not section name
  
  changeset:   10380:5394a7172e1f
  user:        Ali Bahrami 
  date:        Tue Aug 25 13:51:43 2009 -0600
  summary:     6866605 SUNWonbld ELF analysis tools need overhaul (fix ctfmerge/libc dependency)
  
  changeset:   10207:87c40ea3fc4b
  user:        jmcp 
  date:        Wed Jul 29 16:56:03 2009 -0700
  summary:     6864230 hiho, hiho, it'ch chtime for CH to go
  
  changeset:   10206:51f52702df72
  user:        John Levon 
  date:        Wed Jul 29 14:36:30 2009 -0700
  summary:     6854065 CTF tools should error out given 1024+-member structures
  
  changeset:   7230:429b4f7acf1a
  user:        sn199410
  date:        Wed Jul 30 16:10:30 2008 -0700
  summary:     6575435 ctf tools cannot handle C99 VLAs ("variable length arrays")
  
  changeset:   6936:72189fcd99e4
  user:        sommerfe
  date:        Sun Jun 22 09:13:44 2008 -0700
  summary:     6716983 left-for-dead ctfmerge worker threads awake to take out maker
  
  ----
  
  - dtrace command utility:
  
  changeset:   12507:501806a754d2
  user:        Alan Maguire 
  date:        Thu May 27 17:29:51 2010 -0400
  summary:     PSARC 2010/106 DTrace TCP and UDP providers
  
  changeset:   11838:32bb5d254240
  user:        Liane Praza 
  date:        Tue Mar 02 19:29:26 2010 -0700
  summary:     PSARC 2010/067 Interim modernization updates
  
  changeset:   11270:47a962fe7b45
  user:        Frank Van Der Linden 
  date:        Mon Dec 07 13:47:36 2009 -0800
  summary:     6907170 fix for 6875656 left out updates to DTrace test suite
  
  changeset:   11237:0d23e47ed228
  user:        Jonathan Haslam 
  date:        Thu Dec 03 13:39:19 2009 +0000
  summary:     6795386 macro arguments and globbing in DTrace probe descriptions don't mix
  
  changeset:   11153:dec430d20576
  user:        Frank Van Der Linden 
  date:        Sun Nov 22 19:22:26 2009 -0800
  summary:     6875656 xdt needs to support more XenTrace probes
  
  changeset:   11102:b91faef0c984
  user:        Gavin Maltby 
  date:        Thu Nov 19 15:28:11 2009 +1100
  summary:     PSARC/2009/554 door_xcreate - extended door creation interface for private doors
  
  changeset:   11066:cebb50cbe4f9
  user:        Rafael Vanoni 
  date:        Fri Nov 13 01:32:32 2009 -0800
  summary:     PSARC/2009/396 Tickless Kernel Architecture / lbolt decoupling
  
  changeset:   10791:944abfb5b345
  user:        Jonathan Haslam 
  date:        Wed Oct 14 11:25:23 2009 +0100
  summary:     6886953 large symbols lead to stack exhaustion
  
  changeset:   10207:87c40ea3fc4b
  user:        jmcp 
  date:        Wed Jul 29 16:56:03 2009 -0700
  summary:     6864230 hiho, hiho, it'ch chtime for CH to go
  
  changeset:   9531:dc8924ef7839
  user:        Rafael Vanoni 
  date:        Mon May 04 11:48:15 2009 -0700
  summary:     6730130 dtrace missing printf handler for stdev
  
  changeset:   9397:e667d620a75c
  user:        Jonathan Haslam 
  date:        Mon Apr 20 07:58:44 2009 +0100
  summary:     6806023 cpc provider event name validation needs to be a bit tighter
  
  changeset:   8803:8c01b39012c9
  user:        Jonathan Haslam 
  date:        Fri Feb 13 07:13:13 2009 +0000
  summary:     PSARC 2008/480 DTrace CPC Provider
  
  changeset:   8605:0189cb9c5358
  user:        Jonathan Haslam 
  date:        Thu Jan 22 12:09:13 2009 +0000
  summary:     6749441 intrstat(1M) shows zeroed values after suspend/resume
  
  changeset:   8337:079ecc003ca6
  user:        Jonathan Haslam 
  date:        Thu Dec 11 11:26:47 2008 +0000
  summary:     6750659 drti.o crashes app due to corrupt environment
  
  changeset:   8287:771477e4b843
  user:        John Sonnenschein 
  date:        Fri Dec 05 19:08:38 2008 -0800
  summary:     PSARC 2005/462 Removal of Perl 5.6.1 from Solaris 11
  
  changeset:   7991:d3b751ef3d85
  user:        Jonathan Haslam 
  date:        Mon Nov 03 10:26:23 2008 +0000
  summary:     6738982 Representative thread after DTrace stop() action is incorrect
  
  changeset:   7502:da077e5d991e
  user:        Aruna Ramakrishna 
  date:        Sat Sep 06 05:36:02 2008 -0400
  summary:     6706947 tcp_trace should be replaced with dtrace probes.
  
  changeset:   7484:a48e950bad22
  user:        Tom Erickson 
  date:        Wed Sep 03 15:14:25 2008 -0700
  summary:     6737926 getAggregate() method fails to specify anonymous aggregation explicitly
  
  changeset:   7299:d9a056040774
  user:        John Beck 
  date:        Thu Aug 07 12:44:26 2008 -0700
  summary:     6734627 protocmp complains about opt/SUNWdtrt/README after TW -> Hg switch
  
  changeset:   6998:58787ea78303
  user:        brendan
  date:        Tue Jul 01 18:28:22 2008 -0700
  summary:     6721426 tst.sdtargs.d passes despite dtrace "invalid address" error
  
  changeset:   6878:360e73ea6b0c
  user:        brendan
  date:        Fri Jun 13 19:06:55 2008 -0700
  summary:     PSARC 2008/302 DTrace IP Provider
  
  changeset:   6670:1961a43f2335
  user:        tariq
  date:        Tue May 20 15:08:16 2008 -0700
  summary:     6685348 Hypervisor event provider for DTrace
  
  changeset:   6554:b5817e112852
  user:        ahl
  date:        Mon May 05 14:38:24 2008 -0700
  summary:     6677812 race between dtrace activities in non-local zones
  
  changeset:   6543:465433824d87
  user:        rie
  date:        Fri May 02 15:01:06 2008 -0700
  summary:     6683064 check_rtime could do with some spring cleaning

Added:
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.lowfrequency.d
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.malformedoverflow.d
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.nonexistentevent.d
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.cpcvscpustatpart1.ksh
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.cpcvscpustatpart2.ksh
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.cputrackfailtostart.ksh
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.cputrackterminates.ksh
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.toomanyenablings.d
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/tst.allcpus.ksh
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/tst.genericevent.d
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/tst.platformevent.ksh
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/get.ipv4remote.pl   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/get.ipv6remote.pl   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.ipv4remotetcp.ksh   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.ipv4remotetcp.ksh.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudp.ksh   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudp.ksh.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.ipv6remoteicmp.ksh   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.ipv6remoteicmp.ksh.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.remotetcpstate.ksh
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/tst.remotetcpstate.ksh.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/java_api/src/TestGetAggregate.java
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/java_api/tst.GetAggregate.ksh
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_CREATEFAIL.many.exe   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.coverage.exe   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.killonerror.ksh
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/plockstat/tst.available.exe   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/plockstat/tst.libmap.exe   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/printa/tst.largeusersym.ksh
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/sdt/
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/sdt/tst.sdtargs.c   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/sdt/tst.sdtargs.d
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/speculation/err.D_AGG_SPEC.SpeculateWithStddev.d
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/i86xpv/
  vendor/opensolaris/dist/cmd/dtrace/test/tst/i86xpv/xdt/
  vendor/opensolaris/dist/cmd/dtrace/test/tst/i86xpv/xdt/tst.basic.ksh   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/i86xpv/xdt/tst.hvmenable.ksh   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/i86xpv/xdt/tst.memenable.ksh   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/i86xpv/xdt/tst.schedargs.ksh   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/i86xpv/xdt/tst.schedenable.ksh   (contents, props changed)
  vendor/opensolaris/dist/cmd/dtrace/test/tst/sparc/pid/err.D_PROC_ALIGN.misaligned.exe   (contents, props changed)
  vendor/opensolaris/dist/lib/libdtrace/common/mkerrno.sh   (contents, props changed)
  vendor/opensolaris/dist/lib/libdtrace/common/mksignal.sh   (contents, props changed)
Modified:
  vendor/opensolaris/dist/cmd/dtrace/test/cmd/baddof/baddof.c
  vendor/opensolaris/dist/cmd/dtrace/test/cmd/chkargs/chkargs.c
  vendor/opensolaris/dist/cmd/dtrace/test/cmd/jdtrace/exception.lst
  vendor/opensolaris/dist/cmd/dtrace/test/cmd/scripts/dstyle.pl
  vendor/opensolaris/dist/cmd/dtrace/test/cmd/scripts/dtest.pl
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs1.d
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.stddev.d
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.stddev.d.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/java_api/src/TestFunctionLookup.java
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.ksh.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.probemod.ksh
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/printa/tst.basics.d
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/printa/tst.basics.d.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/printf/tst.str.d
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/printf/tst.str.d.out
  vendor/opensolaris/dist/cmd/dtrace/test/tst/common/sysevent/tst.post_chan.c
  vendor/opensolaris/dist/cmd/dtrace/test/tst/i386/funcs/tst.badcopyin.d
  vendor/opensolaris/dist/common/avl/avl.c
  vendor/opensolaris/dist/lib/libdtrace/common/drti.c
  vendor/opensolaris/dist/lib/libdtrace/common/dt_cc.c
  vendor/opensolaris/dist/lib/libdtrace/common/dt_consume.c
  vendor/opensolaris/dist/lib/libdtrace/common/dt_dof.c
  vendor/opensolaris/dist/lib/libdtrace/common/dt_error.c
  vendor/opensolaris/dist/lib/libdtrace/common/dt_impl.h
  vendor/opensolaris/dist/lib/libdtrace/common/dt_lex.l
  vendor/opensolaris/dist/lib/libdtrace/common/dt_link.c
  vendor/opensolaris/dist/lib/libdtrace/common/dt_module.c
  vendor/opensolaris/dist/lib/libdtrace/common/dt_open.c
  vendor/opensolaris/dist/lib/libdtrace/common/dt_pid.c
  vendor/opensolaris/dist/lib/libdtrace/common/dt_printf.c
  vendor/opensolaris/dist/lib/libdtrace/common/dt_proc.c
  vendor/opensolaris/dist/lib/libdtrace/common/dt_program.c
  vendor/opensolaris/dist/lib/libdtrace/common/dt_string.c
  vendor/opensolaris/dist/lib/libdtrace/common/dt_subr.c
  vendor/opensolaris/dist/lib/libgen/common/gmatch.c
  vendor/opensolaris/dist/tools/ctf/cvt/ctf.c
  vendor/opensolaris/dist/tools/ctf/cvt/ctfmerge.c
  vendor/opensolaris/dist/tools/ctf/cvt/ctfmerge.h
  vendor/opensolaris/dist/tools/ctf/cvt/st_parse.c
  vendor/opensolaris/dist/tools/ctf/cvt/tdata.c

Modified: vendor/opensolaris/dist/cmd/dtrace/test/cmd/baddof/baddof.c
==============================================================================
--- vendor/opensolaris/dist/cmd/dtrace/test/cmd/baddof/baddof.c	Mon Aug  2 12:13:02 2010	(r210752)
+++ vendor/opensolaris/dist/cmd/dtrace/test/cmd/baddof/baddof.c	Mon Aug  2 12:13:33 2010	(r210753)
@@ -20,12 +20,10 @@
  */
 
 /*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include 
 #include 
 #include 
@@ -162,7 +160,7 @@ main(int argc, char **argv)
 	FILE *fp;
 	unsigned char *dof, *copy;
 
-	if (argc < 1)
+	if (argc < 2)
 		fatal("expected D script as argument\n");
 
 	if ((fp = fopen(filename, "r")) == NULL)

Modified: vendor/opensolaris/dist/cmd/dtrace/test/cmd/chkargs/chkargs.c
==============================================================================
--- vendor/opensolaris/dist/cmd/dtrace/test/cmd/chkargs/chkargs.c	Mon Aug  2 12:13:02 2010	(r210752)
+++ vendor/opensolaris/dist/cmd/dtrace/test/cmd/chkargs/chkargs.c	Mon Aug  2 12:13:33 2010	(r210753)
@@ -20,12 +20,10 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include 
 #include 
 #include 
@@ -35,6 +33,7 @@ static int g_errs;
 static int g_fd;
 static int g_verbose;
 static int g_errexit;
+static char *g_progname;
 
 static int
 probe(dtrace_hdl_t *dtp, const dtrace_probedesc_t *pdp, void *data)
@@ -91,9 +90,11 @@ main(int argc, char *argv[])
 	int err, c;
 	char *p;
 
+	g_progname = argv[0];
+
 	if ((dtp = dtrace_open(DTRACE_VERSION, 0, &err)) == NULL) {
 		(void) fprintf(stderr, "%s: failed to open dtrace: %s\n",
-		    argv[0], dtrace_errmsg(dtp, err));
+		    g_progname, dtrace_errmsg(dtp, err));
 		return (1);
 	}
 
@@ -111,7 +112,7 @@ main(int argc, char *argv[])
 
 			if (dtrace_setopt(dtp, optarg, p) != 0) {
 				(void) fprintf(stderr, "%s: failed to set "
-				    "option -x %s: %s\n", argv[0], optarg,
+				    "option -x %s: %s\n", g_progname, optarg,
 				    dtrace_errmsg(dtp, dtrace_errno(dtp)));
 				return (2);
 			}
@@ -119,7 +120,7 @@ main(int argc, char *argv[])
 
 		default:
 			(void) fprintf(stderr, "Usage: %s [-ev] "
-			    "[-x opt[=arg]] [probedesc]\n", argv[0]);
+			    "[-x opt[=arg]] [probedesc]\n", g_progname);
 			return (2);
 		}
 	}
@@ -128,9 +129,9 @@ main(int argc, char *argv[])
 	argc -= optind;
 
 	if (argc > 0) {
-		if (dtrace_str2desc(dtp, DTRACE_PROBESPEC_NAME, argv[1], &pd)) {
+		if (dtrace_str2desc(dtp, DTRACE_PROBESPEC_NAME, argv[0], &pd)) {
 			(void) fprintf(stderr, "%s: invalid probe description "
-			    "%s: %s\n", argv[0], argv[1],
+			    "%s: %s\n", g_progname, argv[0],
 			    dtrace_errmsg(dtp, dtrace_errno(dtp)));
 			return (2);
 		}

Modified: vendor/opensolaris/dist/cmd/dtrace/test/cmd/jdtrace/exception.lst
==============================================================================
--- vendor/opensolaris/dist/cmd/dtrace/test/cmd/jdtrace/exception.lst	Mon Aug  2 12:13:02 2010	(r210752)
+++ vendor/opensolaris/dist/cmd/dtrace/test/cmd/jdtrace/exception.lst	Mon Aug  2 12:13:33 2010	(r210753)
@@ -23,7 +23,7 @@
 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
+# ident	"%Z%%M%	%I%	%E% SMI"
 
 # Exception list: names tests that are bypassed when running in Java
 # mode (relative to /opt/SUNWdtrt/tst)
@@ -49,6 +49,7 @@ common/usdt/tst.dlclose2.ksh
 common/usdt/tst.dlclose3.ksh
 common/usdt/tst.eliminate.ksh
 common/usdt/tst.enabled.ksh
+common/usdt/tst.enabled2.ksh
 common/usdt/tst.entryreturn.ksh
 common/usdt/tst.fork.ksh
 common/usdt/tst.header.ksh

Modified: vendor/opensolaris/dist/cmd/dtrace/test/cmd/scripts/dstyle.pl
==============================================================================
--- vendor/opensolaris/dist/cmd/dtrace/test/cmd/scripts/dstyle.pl	Mon Aug  2 12:13:02 2010	(r210752)
+++ vendor/opensolaris/dist/cmd/dtrace/test/cmd/scripts/dstyle.pl	Mon Aug  2 12:13:33 2010	(r210753)
@@ -21,12 +21,11 @@
 #
 
 #
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
 
-require 5.6.1;
+require 5.8.4;
 
 $PNAME = $0;
 $PNAME =~ s:.*/::;

Modified: vendor/opensolaris/dist/cmd/dtrace/test/cmd/scripts/dtest.pl
==============================================================================
--- vendor/opensolaris/dist/cmd/dtrace/test/cmd/scripts/dtest.pl	Mon Aug  2 12:13:02 2010	(r210752)
+++ vendor/opensolaris/dist/cmd/dtrace/test/cmd/scripts/dtest.pl	Mon Aug  2 12:13:33 2010	(r210753)
@@ -24,9 +24,8 @@
 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 
-require 5.6.1;
+require 5.8.4;
 
 use File::Find;
 use File::Basename;
@@ -40,6 +39,7 @@ $OPTSTR = 'abd:fghi:jlnqsx:';
 $USAGE = "Usage: $PNAME [-abfghjlnqs] [-d dir] [-i isa] "
     . "[-x opt[=arg]] [file | dir ...]\n";
 ($MACH = `uname -p`) =~ s/\W*\n//;
+($PLATFORM = `uname -i`) =~ s/\W*\n//;
 
 @dtrace_argv = ();
 
@@ -215,17 +215,17 @@ sub is_exception {
 }
 
 #
-# Iterate over the set of test files specified on the command-line or by
-# a find on "$defdir/common" and "$defdir/$MACH" and execute each one.
-# If the test file is executable, we fork and exec it. If the test is a
-# .ksh file, we run it with $ksh_path. Otherwise we run dtrace -s on it.
-# If the file is named tst.* we assume it should return exit status 0.
-# If the file is named err.* we assume it should return exit status 1.
-# If the file is named err.D_[A-Z0-9]+[.*].d we use dtrace -xerrtags and
-# examine stderr to ensure that a matching error tag was produced.
-# If the file is named drp.[A-Z0-9]+[.*].d we use dtrace -xdroptags and
-# examine stderr to ensure that a matching drop tag was produced.
-# If any *.out or *.err files are found we perform output comparisons.
+# Iterate over the set of test files specified on the command-line or by a find
+# on "$defdir/common", "$defdir/$MACH" and "$defdir/$PLATFORM" and execute each
+# one.  If the test file is executable, we fork and exec it. If the test is a
+# .ksh file, we run it with $ksh_path. Otherwise we run dtrace -s on it.  If
+# the file is named tst.* we assume it should return exit status 0.  If the
+# file is named err.* we assume it should return exit status 1.  If the file is
+# named err.D_[A-Z0-9]+[.*].d we use dtrace -xerrtags and examine stderr to
+# ensure that a matching error tag was produced.  If the file is named
+# drp.[A-Z0-9]+[.*].d we use dtrace -xdroptags and examine stderr to ensure
+# that a matching drop tag was produced.  If any *.out or *.err files are found
+# we perform output comparisons.
 #
 # run_tests takes two arguments: The first is the pathname of the dtrace
 # command to invoke when running the tests. The second is the pathname
@@ -548,6 +548,7 @@ $bindir = -d $dt_bin ? $dt_bin : '.';
 
 find(\&wanted, "$defdir/common") if (scalar(@ARGV) == 0);
 find(\&wanted, "$defdir/$MACH") if (scalar(@ARGV) == 0);
+find(\&wanted, "$defdir/$PLATFORM") if (scalar(@ARGV) == 0);
 die $USAGE if (scalar(@files) == 0);
 
 $dtrace_path = '/usr/sbin/dtrace';

Added: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d	Mon Aug  2 12:13:33 2010	(r210753)
@@ -0,0 +1,41 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * ASSERTION:
+ *     stddev() should not accept a non-scalar value
+ *
+ * SECTION: Aggregations/Aggregations
+ *
+ */
+
+#pragma D option quiet
+
+BEGIN
+{
+	@a[pid] = stddev(probefunc);
+}
+

Added: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d	Mon Aug  2 12:13:33 2010	(r210753)
@@ -0,0 +1,41 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * ASSERTION:
+ *     stddev() should not accept a call with no arguments
+ *
+ * SECTION: Aggregations/Aggregations
+ *
+ */
+
+#pragma D option quiet
+
+BEGIN
+{
+	@a[1] = stddev();
+}
+

Added: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d	Mon Aug  2 12:13:33 2010	(r210753)
@@ -0,0 +1,41 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * ASSERTION:
+ *     stddev() should not have more than one argument
+ *
+ * SECTION: Aggregations/Aggregations
+ *
+ */
+
+#pragma D option quiet
+
+BEGIN
+{
+	@a[1] = stddev(1, 2);
+}
+

Added: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d	Mon Aug  2 12:13:33 2010	(r210753)
@@ -0,0 +1,57 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * ASSERTION:
+ *     Positive stddev() test
+ *
+ * SECTION: Aggregations/Aggregations
+ *
+ * NOTES:
+ *     Verifies that printing a clear()'d aggregation with an stddev()
+ *     aggregation function doesn't cause problems.
+ *
+ */
+
+#pragma D option quiet
+
+tick-10ms
+/i++ < 5/
+{
+	@a = stddev(timestamp);
+}
+
+tick-10ms
+/i == 5/
+{
+	exit(2);
+}
+
+END
+{
+	clear(@a);
+	exit(0);
+}

Added: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out	Mon Aug  2 12:13:33 2010	(r210753)
@@ -0,0 +1,2 @@
+
+                0

Modified: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs1.d
==============================================================================
--- vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs1.d	Mon Aug  2 12:13:02 2010	(r210752)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs1.d	Mon Aug  2 12:13:33 2010	(r210753)
@@ -20,15 +20,13 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma	ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * ASSERTION:
- * 	Multiple aggregates can be used within the same D script.
+ *     Multiple aggregates can be used within the same D script.
  *
  * SECTION: Aggregations/Aggregations
  *
@@ -52,9 +50,11 @@ tick-10ms
 	@c[pid] = avg(new_time);
 	@d[pid] = sum(new_time);
 	@e[pid] = quantize(new_time);
-	@f[timestamp] = max(new_time);
-	@g[timestamp] = quantize(new_time);
-	@h[timestamp] = lquantize(new_time, 0, 10000, 1000);
+	@f[pid] = stddev(new_time);
+	@g[timestamp] = max(new_time);
+	@h[timestamp] = quantize(new_time);
+	@i[timestamp] = lquantize(new_time, 0, 10000, 1000);
+
 	time_1 = time_2;
 	i++;
 }

Modified: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d
==============================================================================
--- vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d	Mon Aug  2 12:13:02 2010	(r210752)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d	Mon Aug  2 12:13:33 2010	(r210753)
@@ -20,18 +20,16 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma	ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * ASSERTION:
- *   Test multiple aggregations and the default output order
+ *     Test multiple aggregations and the default output order
  *
  * SECTION: Aggregations/Aggregations;
- *	Aggregations/Output
+ *     Aggregations/Output
  *
  */
 
@@ -51,6 +49,7 @@ tick-10ms
 	@d = max(i);
 	@e = quantize(i);
 	@f = lquantize(i, 0, 1000, 100);
+	@g = stddev(i);
 
 	i += 100;
 }

Modified: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d.out
==============================================================================
--- vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d.out	Mon Aug  2 12:13:02 2010	(r210752)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d.out	Mon Aug  2 12:13:33 2010	(r210753)
@@ -34,3 +34,4 @@
              900 |@@@@                                     1        
          >= 1000 |                                         0        
 
+              287

Modified: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d
==============================================================================
--- vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d	Mon Aug  2 12:13:02 2010	(r210752)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d	Mon Aug  2 12:13:33 2010	(r210753)
@@ -20,19 +20,17 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma	ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * ASSERTION:
- *   Test multiple aggregations and overriding default order with
- *   printa() statements.
+ *     Test multiple aggregations and overriding default order with
+ *     printa() statements.
  *
  * SECTION: Aggregations/Aggregations;
- *	Aggregations/Output
+ *     Aggregations/Output
  *
  * NOTES: This is a simple verifiable test.
  *
@@ -55,6 +53,7 @@ tick-10ms
 	@e = max(i);
 	@f = quantize(i);
 	@g = lquantize(i, 0, 1000, 100);
+	@h = stddev(i);
 
 	i += 100;
 }
@@ -62,6 +61,7 @@ tick-10ms
 tick-10ms
 /i == 1000/
 {
+	printa("%@d\n", @h);
 	printa("%@d\n", @g);
 	printa("%@d\n", @f);
 	printa("%@d\n", @e);

Modified: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d.out
==============================================================================
--- vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d.out	Mon Aug  2 12:13:02 2010	(r210752)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d.out	Mon Aug  2 12:13:33 2010	(r210753)
@@ -1,3 +1,4 @@
+287
 
            value  ------------- Distribution ------------- count    
              < 0 |                                         0        

Modified: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.stddev.d
==============================================================================
--- vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.stddev.d	Mon Aug  2 12:13:02 2010	(r210752)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.stddev.d	Mon Aug  2 12:13:33 2010	(r210753)
@@ -20,20 +20,19 @@
  */
 
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-
 /*
  * ASSERTION:
- *      Positive stddev() test
+ *     Positive stddev() test
  *
  * SECTION: Aggregations/Aggregations
  *
  * NOTES: This is a simple verifiable positive test of the stddev() function.
+ *     printa() for one aggregation, default printing behavior for the other
+ *     so that we exercise both code paths.
  */
 
 #pragma D option quiet
@@ -60,5 +59,6 @@ BEGIN
 	@b = stddev(-5000000700);
 	@b = stddev(-5000000800);
 	@b = stddev(-5000000900);
+	printa("%@d\n", @a);
 	exit(0);
 }

Modified: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.stddev.d.out
==============================================================================
--- vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.stddev.d.out	Mon Aug  2 12:13:02 2010	(r210752)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.stddev.d.out	Mon Aug  2 12:13:33 2010	(r210753)
@@ -1,3 +1,3 @@
+287
 
               287
-              287

Added: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.lowfrequency.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.lowfrequency.d	Mon Aug  2 12:13:33 2010	(r210753)
@@ -0,0 +1,45 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * Test to check that attempting to enable a valid event with a frequency
+ * lower than the default platform limit will fail.
+ *
+ * This test will fail if:
+ *	1) The system under test does not define the 'PAPI_tot_ins' event.
+ *	2) The 'dcpc-min-overflow' variable in dcpc.conf has been modified.
+ */
+
+#pragma D option quiet
+
+BEGIN
+{
+	exit(0);
+}
+
+cpc:::PAPI_tot_ins-all-100
+{
+}

Added: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.malformedoverflow.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.malformedoverflow.d	Mon Aug  2 12:13:33 2010	(r210753)
@@ -0,0 +1,40 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * Tests that specifying an overflow value containing extraneous characters
+ * (only digits are allowed) will fail.
+ */
+
+BEGIN
+{
+	exit(0);
+}
+
+cpc:::PAPI_tot_ins-all-10000bonehead
+{
+	@[probename] = count();
+}

Added: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.nonexistentevent.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.nonexistentevent.d	Mon Aug  2 12:13:33 2010	(r210753)
@@ -0,0 +1,40 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * Tests that attempting to enable a probe containing a non existent event
+ * will fail.
+ */
+
+BEGIN
+{
+	exit(0);
+}
+
+cpc:::PAPI_cpc_bad-all-10000
+{
+	@[probename] = count();
+}

Added: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.cpcvscpustatpart1.ksh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.cpcvscpustatpart1.ksh	Mon Aug  2 12:13:33 2010	(r210753)
@@ -0,0 +1,78 @@
+#!/bin/ksh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+
+
+#
+# This tests that cpustat(1) should fail to start if the cpc provider
+# is already calling the shots.
+#
+# This script will fail if:
+#       1) The system under test does not define the 'PAPI_tot_ins'
+#       generic event.
+
+script()
+{
+	$dtrace -o $dtraceout -s /dev/stdin <'
+	exit 2
+fi
+
+dtrace=$1
+dtraceout=/tmp/dtrace.out.$$
+script 2>/dev/null &
+timeout=15
+
+#
+# Sleep while the above script fires into life. To guard against dtrace dying
+# and us sleeping forever we allow 15 secs for this to happen. This should be
+# enough for even the slowest systems.
+#
+while [ ! -f $dtraceout ]; do
+	sleep 1
+	timeout=$(($timeout-1))
+	if [ $timeout -eq 0 ]; then
+		echo "dtrace failed to start. Exiting."
+		exit 1
+	fi
+done
+
+cpustat -c PAPI_tot_ins 1 5
+status=$?
+
+rm $dtraceout
+
+exit $status

Added: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.cpcvscpustatpart2.ksh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.cpcvscpustatpart2.ksh	Mon Aug  2 12:13:33 2010	(r210753)
@@ -0,0 +1,70 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+
+
+#
+# This tests that enablings from the cpc provider will fail if cpustat(1) is
+# already master of the universe.
+#
+# This script will fail if:
+#       1) The system under test does not define the 'PAPI_tot_ins'
+#       generic event.
+
+script()
+{
+        $dtrace -s /dev/stdin <'
+        exit 2
+fi
+
+dtrace=$1
+dtraceout=/tmp/dtrace.out.$$
+
+cpustat -c PAPI_tot_ins 1 20 &
+pid=$!
+sleep 5
+script 2>/dev/null
+
+status=$?
+
+kill $pid
+exit $status

Added: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.cputrackfailtostart.ksh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.cputrackfailtostart.ksh	Mon Aug  2 12:13:33 2010	(r210753)
@@ -0,0 +1,77 @@
+#!/bin/ksh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+
+#
+# This script ensures that cputrack(1M) will fail to start when the cpc
+# provider has active enablings.
+#
+# The script will fail if:
+#	1) The system under test does not define the 'PAPI_tot_ins' event.
+#
+
+script()
+{
+        $dtrace -o $dtraceout -s /dev/stdin <'
+        exit 2
+fi
+
+dtrace=$1
+dtraceout=/tmp/dtrace.out.$$
+script 2>/dev/null &
+timeout=15
+
+#
+# Sleep while the above script fires into life. To guard against dtrace dying
+# and us sleeping forever we allow 15 secs for this to happen. This should be
+# enough for even the slowest systems.
+#
+while [ ! -f $dtraceout ]; do
+        sleep 1
+        timeout=$(($timeout-1))
+        if [ $timeout -eq 0 ]; then
+                echo "dtrace failed to start. Exiting."
+                exit 1
+        fi
+done
+
+cputrack -c PAPI_tot_ins sleep 10
+status=$?
+
+rm $dtraceout
+
+exit $status

Added: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.cputrackterminates.ksh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.cputrackterminates.ksh	Mon Aug  2 12:13:33 2010	(r210753)
@@ -0,0 +1,70 @@
+#!/bin/ksh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+
+#
+# This script ensures that cputrack(1) will terminate when the cpc provider
+# kicks into life.
+#
+# The script will fail if:
+#	1) The system under test does not define the 'PAPI_tot_ins' event.
+#
+
+script()
+{
+	$dtrace -s /dev/stdin < 10/
+	{
+		exit(0);
+	}
+EOF
+}
+
+if [ $# != 1 ]; then
+        echo expected one argument: '<'dtrace-path'>'
+        exit 2
+fi
+
+dtrace=$1
+
+cputrack -c PAPI_tot_ins sleep 20 &
+cputrack_pid=$!
+sleep 5
+script 2>/dev/null &
+
+wait $cputrack_pid
+status=$?
+
+rm $dtraceout
+
+exit $status

Added: vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.toomanyenablings.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/err.toomanyenablings.d	Mon Aug  2 12:13:33 2010	(r210753)
@@ -0,0 +1,55 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 12:15:22 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A23261065670;
	Mon,  2 Aug 2010 12:15:22 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 764518FC15;
	Mon,  2 Aug 2010 12:15:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72CFMnM018805;
	Mon, 2 Aug 2010 12:15:22 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72CFMjN018803;
	Mon, 2 Aug 2010 12:15:22 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008021215.o72CFMjN018803@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Mon, 2 Aug 2010 12:15:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210755 - head/games/grdc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 12:15:22 -0000

Author: uqs
Date: Mon Aug  2 12:15:22 2010
New Revision: 210755
URL: http://svn.freebsd.org/changeset/base/210755

Log:
  grdc(6): fix timekeeping for user-supplied value n
  
  - Keep timespec 'now' and 'delay' separate to avoid confusion
  - Increase user-supplied n to run _at least_ n seconds, not max n
  
  PR:            bin/149130 (based on)
  Submitted by:  Andy Farkas
  MFC after:     2 weeks

Modified:
  head/games/grdc/grdc.c

Modified: head/games/grdc/grdc.c
==============================================================================
--- head/games/grdc/grdc.c	Mon Aug  2 12:14:17 2010	(r210754)
+++ head/games/grdc/grdc.c	Mon Aug  2 12:15:22 2010	(r210755)
@@ -29,7 +29,7 @@
 #define YDEPTH  7
 
 /* it won't be */
-time_t now; /* yeah! */
+struct timespec now; /* yeah! */
 struct tm *tm;
 
 short disp[11] = {
@@ -57,7 +57,7 @@ sighndl(int signo)
 int
 main(int argc, char *argv[])
 {
-	struct timespec ts;
+	struct timespec delay;
 	long t, a;
 	int i, j, s, k;
 	int n;
@@ -89,7 +89,7 @@ main(int argc, char *argv[])
 	}
 
 	if (argc > 0)
-		n = atoi(*argv);
+		n = atoi(*argv) + 1;
 	else
 		n = 0;
 
@@ -135,10 +135,10 @@ main(int argc, char *argv[])
 
 		attrset(COLOR_PAIR(2));
 	}
-	time(&now);
+	clock_gettime(CLOCK_REALTIME_FAST, &now);
 	do {
 		mask = 0;
-		tm = localtime(&now);
+		tm = localtime(&now.tv_sec);
 		set(tm->tm_sec%10, 0);
 		set(tm->tm_sec/10, 4);
 		set(tm->tm_min%10, 10);
@@ -192,19 +192,16 @@ main(int argc, char *argv[])
 		}
 		movto(6, 0);
 		refresh();
-		clock_gettime(CLOCK_REALTIME_FAST, &ts);
-		if (ts.tv_sec == now) {
-			if (ts.tv_nsec > 0) {
-				ts.tv_sec = 0;
-				ts.tv_nsec = 1000000000 - ts.tv_nsec;
-			} else {
-				ts.tv_sec = 1;
-				ts.tv_nsec = 0;
-			}
-			nanosleep(&ts, NULL);
-			now = ts.tv_sec + 1;
-		} else
-			now = ts.tv_sec;
+		clock_gettime(CLOCK_REALTIME_FAST, &now);
+		if (delay.tv_nsec > 0) {
+		    delay.tv_sec = 0;
+		    delay.tv_nsec = 1000000000 - now.tv_nsec;
+		} else {
+		    delay.tv_sec = 1;
+		    delay.tv_nsec = 0;
+		}
+		nanosleep(&delay, NULL);
+		now.tv_sec++;
 		if (sigtermed) {
 			standend();
 			clear();

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 12:16:30 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D6997106564A;
	Mon,  2 Aug 2010 12:16:30 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AAE0A8FC1B;
	Mon,  2 Aug 2010 12:16:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72CGUfW019117;
	Mon, 2 Aug 2010 12:16:30 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72CGUV0019116;
	Mon, 2 Aug 2010 12:16:30 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201008021216.o72CGUV0019116@svn.freebsd.org>
From: Rui Paulo 
Date: Mon, 2 Aug 2010 12:16:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210757 - vendor/opensolaris/20100802
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 12:16:30 -0000

Author: rpaulo
Date: Mon Aug  2 12:16:30 2010
New Revision: 210757
URL: http://svn.freebsd.org/changeset/base/210757

Log:
  Tag OpenSolaris latest import. This is not very accurate as the ZFS bits
  were not updated.

Added:
  vendor/opensolaris/20100802/
     - copied from r210755, vendor/opensolaris/dist/

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 13:05:13 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 27D11106564A;
	Mon,  2 Aug 2010 13:05:13 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 15F1F8FC15;
	Mon,  2 Aug 2010 13:05:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72D5DjE029897;
	Mon, 2 Aug 2010 13:05:13 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72D5CIB029894;
	Mon, 2 Aug 2010 13:05:12 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201008021305.o72D5CIB029894@svn.freebsd.org>
From: Rui Paulo 
Date: Mon, 2 Aug 2010 13:05:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210761 - head/contrib/file
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 13:05:13 -0000

Author: rpaulo
Date: Mon Aug  2 13:05:12 2010
New Revision: 210761
URL: http://svn.freebsd.org/changeset/base/210761

Log:
  Properly warp around more code under COMPILE_ONLY to recover from build
  errors.

Modified:
  head/contrib/file/apprentice.c
  head/contrib/file/magic.c

Modified: head/contrib/file/apprentice.c
==============================================================================
--- head/contrib/file/apprentice.c	Mon Aug  2 13:00:43 2010	(r210760)
+++ head/contrib/file/apprentice.c	Mon Aug  2 13:05:12 2010	(r210761)
@@ -99,14 +99,18 @@ private size_t apprentice_magic_strength
 private int apprentice_sort(const void *, const void *);
 private int apprentice_load(struct magic_set *, struct magic **, uint32_t *,
     const char *, int);
+#ifndef COMPILE_ONLY
 private void byteswap(struct magic *, uint32_t);
 private void bs1(struct magic *);
 private uint16_t swap2(uint16_t);
 private uint32_t swap4(uint32_t);
 private uint64_t swap8(uint64_t);
+#endif
 private char *mkdbname(struct magic_set *, const char *, int);
+#ifndef COMPILE_ONLY
 private int apprentice_map(struct magic_set *, struct magic **, uint32_t *,
     const char *);
+#endif
 private int apprentice_compile(struct magic_set *, struct magic **, uint32_t *,
     const char *);
 private int check_format_type(const char *, int);
@@ -263,9 +267,13 @@ apprentice_1(struct magic_set *ms, const
 {
 	struct magic *magic = NULL;
 	uint32_t nmagic = 0;
+#ifndef COMPILE_ONLY
 	struct mlist *ml;
+#endif
 	int rv = -1;
+#ifndef COMPILE_ONLY
 	int mapped;
+#endif
 
 	if (magicsize != FILE_MAGICSIZE) {
 		file_error(ms, 0, "magic element size %lu != %lu",
@@ -314,8 +322,8 @@ apprentice_1(struct magic_set *ms, const
 	ml->next = mlist;
 	mlist->prev = ml;
 
-	return 0;
 #endif /* COMPILE_ONLY */
+	return 0;
 }
 
 protected void
@@ -2053,6 +2061,7 @@ eatsize(const char **p)
 	*p = l;
 }
 
+#ifndef COMPILE_ONLY
 /*
  * handle a compiled file.
  */
@@ -2150,6 +2159,7 @@ error2:
 	free(dbname);
 	return -1;
 }
+#endif /* COMPILE_ONLY */
 
 private const uint32_t ar[] = {
     MAGICNO, VERSIONNO
@@ -2244,6 +2254,7 @@ mkdbname(struct magic_set *ms, const cha
 	return buf;
 }
 
+#ifndef COMPILE_ONLY
 /*
  * Byteswap an mmap'ed file if needed
  */
@@ -2335,3 +2346,4 @@ bs1(struct magic *m)
 		m->num_mask = swap8(m->num_mask);
 	}
 }
+#endif /* COMPILE_ONLY */

Modified: head/contrib/file/magic.c
==============================================================================
--- head/contrib/file/magic.c	Mon Aug  2 13:00:43 2010	(r210760)
+++ head/contrib/file/magic.c	Mon Aug  2 13:05:12 2010	(r210761)
@@ -71,10 +71,10 @@ FILE_RCSID("@(#)$File: magic.c,v 1.62 20
 #endif
 
 private void free_mlist(struct mlist *);
+#ifndef COMPILE_ONLY
 private void close_and_restore(const struct magic_set *, const char *, int,
     const struct stat *);
 private int unreadable_info(struct magic_set *, mode_t, const char *);
-#ifndef COMPILE_ONLY
 private const char *file_or_fd(struct magic_set *, const char *, int);
 #endif
 
@@ -132,6 +132,7 @@ free_mlist(struct mlist *mlist)
 	free(ml);
 }
 
+#ifndef COMPILE_ONLY
 private int
 unreadable_info(struct magic_set *ms, mode_t md, const char *file)
 {
@@ -149,6 +150,7 @@ unreadable_info(struct magic_set *ms, mo
 		return -1;
 	return 0;
 }
+#endif
 
 public void
 magic_close(struct magic_set *ms)
@@ -191,6 +193,7 @@ magic_check(struct magic_set *ms, const 
 	return ml ? 0 : -1;
 }
 
+#ifndef COMPILE_ONLY
 private void
 close_and_restore(const struct magic_set *ms, const char *name, int fd,
     const struct stat *sb)
@@ -224,7 +227,6 @@ close_and_restore(const struct magic_set
 	}
 }
 
-#ifndef COMPILE_ONLY
 
 /*
  * find type of descriptor
@@ -352,7 +354,7 @@ magic_buffer(struct magic_set *ms, const
 	}
 	return file_getbuffer(ms);
 }
-#endif
+#endif /* COMPILE_ONLY */
 
 public const char *
 magic_error(struct magic_set *ms)

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 13:11:27 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 819F6106564A;
	Mon,  2 Aug 2010 13:11:27 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6F88B8FC13;
	Mon,  2 Aug 2010 13:11:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72DBRUI031331;
	Mon, 2 Aug 2010 13:11:27 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72DBR8G031327;
	Mon, 2 Aug 2010 13:11:27 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008021311.o72DBR8G031327@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Mon, 2 Aug 2010 13:11:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210763 - in head: share/man/man3 share/man/man5
	usr.sbin/wpa/wpa_cli
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 13:11:27 -0000

Author: uqs
Date: Mon Aug  2 13:11:27 2010
New Revision: 210763
URL: http://svn.freebsd.org/changeset/base/210763

Log:
  mdoc: remove unused/empty macros

Modified:
  head/share/man/man3/siginfo.3
  head/share/man/man5/device.hints.5
  head/usr.sbin/wpa/wpa_cli/wpa_cli.8

Modified: head/share/man/man3/siginfo.3
==============================================================================
--- head/share/man/man3/siginfo.3	Mon Aug  2 13:10:27 2010	(r210762)
+++ head/share/man/man3/siginfo.3	Mon Aug  2 13:11:27 2010	(r210763)
@@ -216,7 +216,7 @@ machine dependent of trap code
 address of faulting instruction
 .It Ta Va si_trapno Ta
 machine dependent of trap code
-.It Dv SIGCHLD Ta Vt Va si_pid Ta
+.It Dv SIGCHLD Ta Va si_pid Ta
 child process ID
 .It Ta Va si_status Ta
 exit value or signal; if

Modified: head/share/man/man5/device.hints.5
==============================================================================
--- head/share/man/man5/device.hints.5	Mon Aug  2 13:10:27 2010	(r210762)
+++ head/share/man/man5/device.hints.5	Mon Aug  2 13:11:27 2010	(r210763)
@@ -76,7 +76,7 @@ resources it will attempt to use.
 A device hint line looks like:
 .Pp
 .Sm off
-.D1 Li hint. Ar driver Li . Ar unit Li . Ar keyword Li = Qq Ar value
+.D1 Li hint. Ar driver . Ar unit . Ar keyword Li = Qq Ar value
 .Sm on
 .Pp
 where

Modified: head/usr.sbin/wpa/wpa_cli/wpa_cli.8
==============================================================================
--- head/usr.sbin/wpa/wpa_cli/wpa_cli.8	Mon Aug  2 13:10:27 2010	(r210762)
+++ head/usr.sbin/wpa/wpa_cli/wpa_cli.8	Mon Aug  2 13:11:27 2010	(r210763)
@@ -113,7 +113,7 @@ The
 .Nm
 utility
 shows these requests with a
-.Dq Li CTRL-REQ- Ns Ao Ar type Ac Ns Li - Ns Ao Ar id Ac Ns Li : Ns Aq Ar text
+.Dq Li CTRL-REQ- Ns Ao Ar type Ac Ns Li - Ns Ao Ar id Ac Ns : Ns Aq Ar text
 prefix, where
 .Aq Ar type
 is

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 13:11:36 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1497F1065777;
	Mon,  2 Aug 2010 13:11:36 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C7ABB8FC08;
	Mon,  2 Aug 2010 13:11:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72DBZkD031406;
	Mon, 2 Aug 2010 13:11:35 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72DBZtJ031397;
	Mon, 2 Aug 2010 13:11:35 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008021311.o72DBZtJ031397@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Mon, 2 Aug 2010 13:11:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210764 - in head: lib/libc/locale lib/libc/rpc
	lib/libkvm sys/boot/common usr.bin/c89 usr.bin/c99
	usr.bin/tar usr.sbin/ancontrol
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 13:11:36 -0000

Author: uqs
Date: Mon Aug  2 13:11:35 2010
New Revision: 210764
URL: http://svn.freebsd.org/changeset/base/210764

Log:
  mdoc: make sure to pass at least one argument to quotation macros

Modified:
  head/lib/libc/locale/isgraph.3
  head/lib/libc/locale/mbrtowc.3
  head/lib/libc/rpc/publickey.3
  head/lib/libkvm/kvm_getloadavg.3
  head/sys/boot/common/loader.8
  head/usr.bin/c89/c89.1
  head/usr.bin/c99/c99.1
  head/usr.bin/tar/bsdtar.1
  head/usr.sbin/ancontrol/ancontrol.8

Modified: head/lib/libc/locale/isgraph.3
==============================================================================
--- head/lib/libc/locale/isgraph.3	Mon Aug  2 13:11:27 2010	(r210763)
+++ head/lib/libc/locale/isgraph.3	Mon Aug  2 13:11:35 2010	(r210764)
@@ -48,7 +48,7 @@
 The
 .Fn isgraph
 function tests for any printing character except space
-.Pq Ql "\ "
+.Pq Ql "\~"
 and other
 locale-specific space-like characters.
 The value of the argument must be representable as an

Modified: head/lib/libc/locale/mbrtowc.3
==============================================================================
--- head/lib/libc/locale/mbrtowc.3	Mon Aug  2 13:11:27 2010	(r210763)
+++ head/lib/libc/locale/mbrtowc.3	Mon Aug  2 13:11:35 2010	(r210764)
@@ -69,7 +69,7 @@ was
 .Dv NULL ,
 .Fa s
 was an empty string
-.Pq Qq
+.Pq Qq \&
 and
 .Fa n
 was 1.

Modified: head/lib/libc/rpc/publickey.3
==============================================================================
--- head/lib/libc/rpc/publickey.3	Mon Aug  2 13:11:27 2010	(r210763)
+++ head/lib/libc/rpc/publickey.3	Mon Aug  2 13:11:35 2010	(r210764)
@@ -44,7 +44,7 @@ fails to decrypt the secret key, the rou
 argument will be a
 .Dv NULL
 string
-.Pq Dq .
+.Pq Dq \& .
 .Sh SEE ALSO
 .Xr publickey 5
 .Pp

Modified: head/lib/libkvm/kvm_getloadavg.3
==============================================================================
--- head/lib/libkvm/kvm_getloadavg.3	Mon Aug  2 13:11:27 2010	(r210763)
+++ head/lib/libkvm/kvm_getloadavg.3	Mon Aug  2 13:11:35 2010	(r210764)
@@ -50,7 +50,7 @@ averaged over various periods of time.
 Up to
 .Fa nelem
 samples are retrieved and assigned to successive elements of
-.Fa loadavg Ns Bq .
+.Fa loadavg Ns Bq \& .
 The system imposes a maximum of 3 samples, representing averages
 over the last 1, 5, and 15 minutes, respectively.
 .Sh DIAGNOSTICS

Modified: head/sys/boot/common/loader.8
==============================================================================
--- head/sys/boot/common/loader.8	Mon Aug  2 13:11:27 2010	(r210763)
+++ head/sys/boot/common/loader.8	Mon Aug  2 13:11:35 2010	(r210764)
@@ -806,7 +806,7 @@ Evaluates the remainder of the input buf
 exception guard.
 .It Ic .#
 Works like
-.Ic .
+.Ic "."
 but without outputting a trailing space.
 .It Ic fclose Pq Ar fd --
 Closes a file.

Modified: head/usr.bin/c89/c89.1
==============================================================================
--- head/usr.bin/c89/c89.1	Mon Aug  2 13:11:27 2010	(r210763)
+++ head/usr.bin/c89/c89.1	Mon Aug  2 13:11:35 2010	(r210764)
@@ -94,7 +94,7 @@ absolute pathnames to look in the direct
 pathname before looking in the usual places.
 Thus, headers whose
 names are enclosed in double-quotes
-.Pq Qq
+.Pq Qq \&
 will be searched for first
 in the directory of the file with the
 .Ic #include
@@ -103,7 +103,7 @@ directories named in
 .Fl I
 options, and last in the usual places.
 For headers whose names are enclosed in angle brackets
-.Pq Aq ,
+.Pq Aq \& ,
 the header
 will be searched for only in directories named in
 .Fl I

Modified: head/usr.bin/c99/c99.1
==============================================================================
--- head/usr.bin/c99/c99.1	Mon Aug  2 13:11:27 2010	(r210763)
+++ head/usr.bin/c99/c99.1	Mon Aug  2 13:11:35 2010	(r210764)
@@ -96,7 +96,7 @@ absolute pathnames to look in the direct
 pathname before looking in the usual places.
 Thus, headers whose
 names are enclosed in double-quotes
-.Pq Qq
+.Pq Qq \&
 will be searched for first
 in the directory of the file with the
 .Ic #include
@@ -105,7 +105,7 @@ directories named in
 .Fl I
 options, and last in the usual places.
 For headers whose names are enclosed in angle brackets
-.Pq Aq ,
+.Pq Aq \& ,
 the header
 will be searched for only in directories named in
 .Fl I

Modified: head/usr.bin/tar/bsdtar.1
==============================================================================
--- head/usr.bin/tar/bsdtar.1	Mon Aug  2 13:11:27 2010	(r210763)
+++ head/usr.bin/tar/bsdtar.1	Mon Aug  2 13:11:35 2010	(r210764)
@@ -354,9 +354,9 @@ is run as non-root.
 .It Fl Fl numeric-owner
 This is equivalent to
 .Fl Fl uname
-.Qq
+.Qq \&
 .Fl Fl gname
-.Qq .
+.Qq \& .
 On extract, it causes user and group names in the archive
 to be ignored in favor of the numeric user and group ids.
 On create, it causes user and group names to not be stored

Modified: head/usr.sbin/ancontrol/ancontrol.8
==============================================================================
--- head/usr.sbin/ancontrol/ancontrol.8	Mon Aug  2 13:11:27 2010	(r210763)
+++ head/usr.sbin/ancontrol/ancontrol.8	Mon Aug  2 13:11:35 2010	(r210764)
@@ -308,7 +308,7 @@ Set a WEP key.
 For 40 bit prefix 10 hex character with 0x.
 For 128 bit prefix 26 hex character with 0x.
 Use
-.Qq
+.Qq \&
 as the key to erase the key.
 Supports 4 keys; even numbers are for permanent keys
 and odd number are for temporary keys.

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 13:11:42 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C3DF61065798;
	Mon,  2 Aug 2010 13:11:41 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D98E68FC26;
	Mon,  2 Aug 2010 13:11:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72DBfw7031472;
	Mon, 2 Aug 2010 13:11:41 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72DBfpI031469;
	Mon, 2 Aug 2010 13:11:41 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008021311.o72DBfpI031469@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Mon, 2 Aug 2010 13:11:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210765 - in head/lib/libc: locale stdlib
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 13:11:43 -0000

Author: uqs
Date: Mon Aug  2 13:11:41 2010
New Revision: 210765
URL: http://svn.freebsd.org/changeset/base/210765

Log:
  mdoc: remove unbalanced quotes

Modified:
  head/lib/libc/locale/setlocale.3
  head/lib/libc/stdlib/getopt.3

Modified: head/lib/libc/locale/setlocale.3
==============================================================================
--- head/lib/libc/locale/setlocale.3	Mon Aug  2 13:11:35 2010	(r210764)
+++ head/lib/libc/locale/setlocale.3	Mon Aug  2 13:11:41 2010	(r210765)
@@ -103,11 +103,11 @@ function.
 .Pp
 Only three locales are defined by default,
 the empty string
-.Li "\&""\|""
+.Li \&"\|"
 which denotes the native environment, and the
-.Li "\&""C""
+.Li \&"C"
 and
-.Li "\&""POSIX""
+.Li \&"POSIX"
 locales, which denote the C language environment.
 A
 .Fa locale
@@ -117,7 +117,7 @@ causes
 .Fn setlocale
 to return the current locale.
 By default, C programs start in the
-.Li "\&""C""
+.Li \&"C"
 locale.
 The only function in the library that sets the locale is
 .Fn setlocale ;

Modified: head/lib/libc/stdlib/getopt.3
==============================================================================
--- head/lib/libc/stdlib/getopt.3	Mon Aug  2 13:11:35 2010	(r210764)
+++ head/lib/libc/stdlib/getopt.3	Mon Aug  2 13:11:41 2010	(r210765)
@@ -66,11 +66,11 @@ may contain the following elements: indi
 characters followed by a colon to indicate an option argument
 is to follow.
 For example, an option string
-.Li "\&""x""
+.Li \&"x"
 recognizes an option
 .Dq Fl x ,
 and an option string
-.Li "\&""x:""
+.Li \&"x:"
 recognizes an option and argument
 .Dq Fl x Ar argument .
 It does not matter to

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 13:40:19 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 52C401065674;
	Mon,  2 Aug 2010 13:40:19 +0000 (UTC)
	(envelope-from fabient@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 412168FC20;
	Mon,  2 Aug 2010 13:40:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72DeJRK037858;
	Mon, 2 Aug 2010 13:40:19 GMT (envelope-from fabient@svn.freebsd.org)
Received: (from fabient@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72DeJvj037856;
	Mon, 2 Aug 2010 13:40:19 GMT (envelope-from fabient@svn.freebsd.org)
Message-Id: <201008021340.o72DeJvj037856@svn.freebsd.org>
From: Fabien Thomas 
Date: Mon, 2 Aug 2010 13:40:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210766 - head/usr.sbin/pmcstat
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 13:40:19 -0000

Author: fabient
Date: Mon Aug  2 13:40:19 2010
New Revision: 210766
URL: http://svn.freebsd.org/changeset/base/210766

Log:
  Fix the calltree top view that incorrectly filter out some nodes.
  
  MFC after:	1 week

Modified:
  head/usr.sbin/pmcstat/pmcpl_calltree.c

Modified: head/usr.sbin/pmcstat/pmcpl_calltree.c
==============================================================================
--- head/usr.sbin/pmcstat/pmcpl_calltree.c	Mon Aug  2 13:11:41 2010	(r210765)
+++ head/usr.sbin/pmcstat/pmcpl_calltree.c	Mon Aug  2 13:40:19 2010	(r210766)
@@ -354,6 +354,7 @@ pmcpl_ct_node_dumptop(int pmcin, struct 
     struct pmcpl_ct_sample *rsamples, int x, int *y)
 {
 	int i, terminal;
+	struct pmcpl_ct_arc *arc;
 
 	if (ct->pct_flags & PMCPL_PCT_TAG)
 		return 0;
@@ -372,12 +373,17 @@ pmcpl_ct_node_dumptop(int pmcin, struct 
 	 * for at least one arc for that PMC.
 	 */
 	terminal = 1;
-	for (i = 0; i < ct->pct_narc; i++)
+	for (i = 0; i < ct->pct_narc; i++) {
+		arc = &ct->pct_arc[i];
 		if (PMCPL_CT_SAMPLE(pmcin,
-		    &ct->pct_arc[i].pcta_samples) != 0) {
+		    &arc->pcta_samples) != 0 &&
+		    PMCPL_CT_SAMPLEP(pmcin,
+		    &arc->pcta_samples) > pmcstat_threshold &&
+		    (arc->pcta_child->pct_flags & PMCPL_PCT_TAG) == 0) {
 			terminal = 0;
 			break;
 		}
+	}
 
 	if (ct->pct_narc == 0 || terminal) {
 		pmcpl_ct_topscreen[x+1][*y] = NULL;

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 13:40:53 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D63101065676;
	Mon,  2 Aug 2010 13:40:53 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BF9328FC27;
	Mon,  2 Aug 2010 13:40:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72DermP038047;
	Mon, 2 Aug 2010 13:40:53 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72Derrx038020;
	Mon, 2 Aug 2010 13:40:53 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201008021340.o72Derrx038020@svn.freebsd.org>
From: Rui Paulo 
Date: Mon, 2 Aug 2010 13:40:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210767 - in head/cddl/contrib/opensolaris:
	cmd/dtrace/test/cmd/baddof cmd/dtrace/test/cmd/chkargs
	cmd/dtrace/test/cmd/scripts cmd/dtrace/test/tst/common/aggs
	cmd/dtrace/test/tst/common...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 13:40:53 -0000

Author: rpaulo
Date: Mon Aug  2 13:40:53 2010
New Revision: 210767
URL: http://svn.freebsd.org/changeset/base/210767

Log:
  MFV OpenSolaris DTrace userland bits.

Added:
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/cpc/
     - copied from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/
     - copied from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/src/TestGetAggregate.java
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/java_api/src/TestGetAggregate.java
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.GetAggregate.ksh
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/java_api/tst.GetAggregate.ksh
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_CREATEFAIL.many.exe
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_CREATEFAIL.many.exe
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.coverage.exe
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.killonerror.ksh
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.killonerror.ksh
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/plockstat/tst.available.exe
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/plockstat/tst.available.exe
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/plockstat/tst.libmap.exe
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/plockstat/tst.libmap.exe
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printa/tst.largeusersym.ksh
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/printa/tst.largeusersym.ksh
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sdt/
     - copied from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/sdt/
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.D_AGG_SPEC.SpeculateWithStddev.d
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/speculation/err.D_AGG_SPEC.SpeculateWithStddev.d
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh.out
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh.out
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/i86xpv/
     - copied from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/i86xpv/
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/err.D_PROC_ALIGN.misaligned.exe
     - copied unchanged from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/sparc/pid/err.D_PROC_ALIGN.misaligned.exe
  head/cddl/contrib/opensolaris/lib/libdtrace/common/mkerrno.sh
     - copied unchanged from r210759, vendor/opensolaris/dist/lib/libdtrace/common/mkerrno.sh
  head/cddl/contrib/opensolaris/lib/libdtrace/common/mksignal.sh
     - copied unchanged from r210759, vendor/opensolaris/dist/lib/libdtrace/common/mksignal.sh
Modified:
  head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/baddof/baddof.c
  head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/chkargs/chkargs.c
  head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dstyle.pl
  head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs1.d
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d.out
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d.out
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.d
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.d.out
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/src/TestFunctionLookup.java
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.ksh.out
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.probemod.ksh
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printa/tst.basics.d
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printa/tst.basics.d.out
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.str.d
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.str.d.out
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sysevent/tst.post_chan.c
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/i386/funcs/tst.badcopyin.d
  head/cddl/contrib/opensolaris/common/avl/avl.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c
  head/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c
  head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c
  head/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c
  head/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.h
  head/cddl/contrib/opensolaris/tools/ctf/cvt/st_parse.c
  head/cddl/contrib/opensolaris/tools/ctf/cvt/tdata.c
Directory Properties:
  head/cddl/contrib/opensolaris/   (props changed)

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/baddof/baddof.c
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/baddof/baddof.c	Mon Aug  2 13:40:19 2010	(r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/baddof/baddof.c	Mon Aug  2 13:40:53 2010	(r210767)
@@ -20,12 +20,10 @@
  */
 
 /*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include 
 #include 
 #include 
@@ -162,7 +160,7 @@ main(int argc, char **argv)
 	FILE *fp;
 	unsigned char *dof, *copy;
 
-	if (argc < 1)
+	if (argc < 2)
 		fatal("expected D script as argument\n");
 
 	if ((fp = fopen(filename, "r")) == NULL)

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/chkargs/chkargs.c
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/chkargs/chkargs.c	Mon Aug  2 13:40:19 2010	(r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/chkargs/chkargs.c	Mon Aug  2 13:40:53 2010	(r210767)
@@ -20,12 +20,10 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include 
 #include 
 #include 
@@ -35,6 +33,7 @@ static int g_errs;
 static int g_fd;
 static int g_verbose;
 static int g_errexit;
+static char *g_progname;
 
 static int
 probe(dtrace_hdl_t *dtp, const dtrace_probedesc_t *pdp, void *data)
@@ -91,9 +90,11 @@ main(int argc, char *argv[])
 	int err, c;
 	char *p;
 
+	g_progname = argv[0];
+
 	if ((dtp = dtrace_open(DTRACE_VERSION, 0, &err)) == NULL) {
 		(void) fprintf(stderr, "%s: failed to open dtrace: %s\n",
-		    argv[0], dtrace_errmsg(dtp, err));
+		    g_progname, dtrace_errmsg(dtp, err));
 		return (1);
 	}
 
@@ -111,7 +112,7 @@ main(int argc, char *argv[])
 
 			if (dtrace_setopt(dtp, optarg, p) != 0) {
 				(void) fprintf(stderr, "%s: failed to set "
-				    "option -x %s: %s\n", argv[0], optarg,
+				    "option -x %s: %s\n", g_progname, optarg,
 				    dtrace_errmsg(dtp, dtrace_errno(dtp)));
 				return (2);
 			}
@@ -119,7 +120,7 @@ main(int argc, char *argv[])
 
 		default:
 			(void) fprintf(stderr, "Usage: %s [-ev] "
-			    "[-x opt[=arg]] [probedesc]\n", argv[0]);
+			    "[-x opt[=arg]] [probedesc]\n", g_progname);
 			return (2);
 		}
 	}
@@ -128,9 +129,9 @@ main(int argc, char *argv[])
 	argc -= optind;
 
 	if (argc > 0) {
-		if (dtrace_str2desc(dtp, DTRACE_PROBESPEC_NAME, argv[1], &pd)) {
+		if (dtrace_str2desc(dtp, DTRACE_PROBESPEC_NAME, argv[0], &pd)) {
 			(void) fprintf(stderr, "%s: invalid probe description "
-			    "%s: %s\n", argv[0], argv[1],
+			    "%s: %s\n", g_progname, argv[0],
 			    dtrace_errmsg(dtp, dtrace_errno(dtp)));
 			return (2);
 		}

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dstyle.pl
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dstyle.pl	Mon Aug  2 13:40:19 2010	(r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dstyle.pl	Mon Aug  2 13:40:53 2010	(r210767)
@@ -21,12 +21,11 @@
 #
 
 #
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
 
-require 5.6.1;
+require 5.8.4;
 
 $PNAME = $0;
 $PNAME =~ s:.*/::;

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl	Mon Aug  2 13:40:19 2010	(r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl	Mon Aug  2 13:40:53 2010	(r210767)
@@ -24,9 +24,8 @@
 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 
-require 5.6.1;
+require 5.8.4;
 
 use File::Find;
 use File::Basename;
@@ -40,6 +39,7 @@ $OPTSTR = 'abd:fghi:jlnqsx:';
 $USAGE = "Usage: $PNAME [-abfghjlnqs] [-d dir] [-i isa] "
     . "[-x opt[=arg]] [file | dir ...]\n";
 ($MACH = `uname -p`) =~ s/\W*\n//;
+($PLATFORM = `uname -i`) =~ s/\W*\n//;
 
 @dtrace_argv = ();
 
@@ -215,17 +215,17 @@ sub is_exception {
 }
 
 #
-# Iterate over the set of test files specified on the command-line or by
-# a find on "$defdir/common" and "$defdir/$MACH" and execute each one.
-# If the test file is executable, we fork and exec it. If the test is a
-# .ksh file, we run it with $ksh_path. Otherwise we run dtrace -s on it.
-# If the file is named tst.* we assume it should return exit status 0.
-# If the file is named err.* we assume it should return exit status 1.
-# If the file is named err.D_[A-Z0-9]+[.*].d we use dtrace -xerrtags and
-# examine stderr to ensure that a matching error tag was produced.
-# If the file is named drp.[A-Z0-9]+[.*].d we use dtrace -xdroptags and
-# examine stderr to ensure that a matching drop tag was produced.
-# If any *.out or *.err files are found we perform output comparisons.
+# Iterate over the set of test files specified on the command-line or by a find
+# on "$defdir/common", "$defdir/$MACH" and "$defdir/$PLATFORM" and execute each
+# one.  If the test file is executable, we fork and exec it. If the test is a
+# .ksh file, we run it with $ksh_path. Otherwise we run dtrace -s on it.  If
+# the file is named tst.* we assume it should return exit status 0.  If the
+# file is named err.* we assume it should return exit status 1.  If the file is
+# named err.D_[A-Z0-9]+[.*].d we use dtrace -xerrtags and examine stderr to
+# ensure that a matching error tag was produced.  If the file is named
+# drp.[A-Z0-9]+[.*].d we use dtrace -xdroptags and examine stderr to ensure
+# that a matching drop tag was produced.  If any *.out or *.err files are found
+# we perform output comparisons.
 #
 # run_tests takes two arguments: The first is the pathname of the dtrace
 # command to invoke when running the tests. The second is the pathname
@@ -548,6 +548,7 @@ $bindir = -d $dt_bin ? $dt_bin : '.';
 
 find(\&wanted, "$defdir/common") if (scalar(@ARGV) == 0);
 find(\&wanted, "$defdir/$MACH") if (scalar(@ARGV) == 0);
+find(\&wanted, "$defdir/$PLATFORM") if (scalar(@ARGV) == 0);
 die $USAGE if (scalar(@files) == 0);
 
 $dtrace_path = '/usr/sbin/dtrace';

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d	Mon Aug  2 13:40:53 2010	(r210767, copy of r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d)
@@ -0,0 +1,41 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * ASSERTION:
+ *     stddev() should not accept a non-scalar value
+ *
+ * SECTION: Aggregations/Aggregations
+ *
+ */
+
+#pragma D option quiet
+
+BEGIN
+{
+	@a[pid] = stddev(probefunc);
+}
+

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d	Mon Aug  2 13:40:53 2010	(r210767, copy of r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d)
@@ -0,0 +1,41 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * ASSERTION:
+ *     stddev() should not accept a call with no arguments
+ *
+ * SECTION: Aggregations/Aggregations
+ *
+ */
+
+#pragma D option quiet
+
+BEGIN
+{
+	@a[1] = stddev();
+}
+

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d	Mon Aug  2 13:40:53 2010	(r210767, copy of r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d)
@@ -0,0 +1,41 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * ASSERTION:
+ *     stddev() should not have more than one argument
+ *
+ * SECTION: Aggregations/Aggregations
+ *
+ */
+
+#pragma D option quiet
+
+BEGIN
+{
+	@a[1] = stddev(1, 2);
+}
+

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d	Mon Aug  2 13:40:53 2010	(r210767, copy of r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d)
@@ -0,0 +1,57 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * ASSERTION:
+ *     Positive stddev() test
+ *
+ * SECTION: Aggregations/Aggregations
+ *
+ * NOTES:
+ *     Verifies that printing a clear()'d aggregation with an stddev()
+ *     aggregation function doesn't cause problems.
+ *
+ */
+
+#pragma D option quiet
+
+tick-10ms
+/i++ < 5/
+{
+	@a = stddev(timestamp);
+}
+
+tick-10ms
+/i == 5/
+{
+	exit(2);
+}
+
+END
+{
+	clear(@a);
+	exit(0);
+}

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out	Mon Aug  2 13:40:53 2010	(r210767, copy of r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out)
@@ -0,0 +1,2 @@
+
+                0

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs1.d
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs1.d	Mon Aug  2 13:40:19 2010	(r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs1.d	Mon Aug  2 13:40:53 2010	(r210767)
@@ -20,15 +20,13 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma	ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * ASSERTION:
- * 	Multiple aggregates can be used within the same D script.
+ *     Multiple aggregates can be used within the same D script.
  *
  * SECTION: Aggregations/Aggregations
  *
@@ -52,9 +50,11 @@ tick-10ms
 	@c[pid] = avg(new_time);
 	@d[pid] = sum(new_time);
 	@e[pid] = quantize(new_time);
-	@f[timestamp] = max(new_time);
-	@g[timestamp] = quantize(new_time);
-	@h[timestamp] = lquantize(new_time, 0, 10000, 1000);
+	@f[pid] = stddev(new_time);
+	@g[timestamp] = max(new_time);
+	@h[timestamp] = quantize(new_time);
+	@i[timestamp] = lquantize(new_time, 0, 10000, 1000);
+
 	time_1 = time_2;
 	i++;
 }

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d	Mon Aug  2 13:40:19 2010	(r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d	Mon Aug  2 13:40:53 2010	(r210767)
@@ -20,18 +20,16 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma	ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * ASSERTION:
- *   Test multiple aggregations and the default output order
+ *     Test multiple aggregations and the default output order
  *
  * SECTION: Aggregations/Aggregations;
- *	Aggregations/Output
+ *     Aggregations/Output
  *
  */
 
@@ -51,6 +49,7 @@ tick-10ms
 	@d = max(i);
 	@e = quantize(i);
 	@f = lquantize(i, 0, 1000, 100);
+	@g = stddev(i);
 
 	i += 100;
 }

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d.out
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d.out	Mon Aug  2 13:40:19 2010	(r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d.out	Mon Aug  2 13:40:53 2010	(r210767)
@@ -34,3 +34,4 @@
              900 |@@@@                                     1        
          >= 1000 |                                         0        
 
+              287

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d	Mon Aug  2 13:40:19 2010	(r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d	Mon Aug  2 13:40:53 2010	(r210767)
@@ -20,19 +20,17 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma	ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * ASSERTION:
- *   Test multiple aggregations and overriding default order with
- *   printa() statements.
+ *     Test multiple aggregations and overriding default order with
+ *     printa() statements.
  *
  * SECTION: Aggregations/Aggregations;
- *	Aggregations/Output
+ *     Aggregations/Output
  *
  * NOTES: This is a simple verifiable test.
  *
@@ -55,6 +53,7 @@ tick-10ms
 	@e = max(i);
 	@f = quantize(i);
 	@g = lquantize(i, 0, 1000, 100);
+	@h = stddev(i);
 
 	i += 100;
 }
@@ -62,6 +61,7 @@ tick-10ms
 tick-10ms
 /i == 1000/
 {
+	printa("%@d\n", @h);
 	printa("%@d\n", @g);
 	printa("%@d\n", @f);
 	printa("%@d\n", @e);

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d.out
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d.out	Mon Aug  2 13:40:19 2010	(r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d.out	Mon Aug  2 13:40:53 2010	(r210767)
@@ -1,3 +1,4 @@
+287
 
            value  ------------- Distribution ------------- count    
              < 0 |                                         0        

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.d
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.d	Mon Aug  2 13:40:19 2010	(r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.d	Mon Aug  2 13:40:53 2010	(r210767)
@@ -20,20 +20,19 @@
  */
 
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-
 /*
  * ASSERTION:
- *      Positive stddev() test
+ *     Positive stddev() test
  *
  * SECTION: Aggregations/Aggregations
  *
  * NOTES: This is a simple verifiable positive test of the stddev() function.
+ *     printa() for one aggregation, default printing behavior for the other
+ *     so that we exercise both code paths.
  */
 
 #pragma D option quiet
@@ -60,5 +59,6 @@ BEGIN
 	@b = stddev(-5000000700);
 	@b = stddev(-5000000800);
 	@b = stddev(-5000000900);
+	printa("%@d\n", @a);
 	exit(0);
 }

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.d.out
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.d.out	Mon Aug  2 13:40:19 2010	(r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.d.out	Mon Aug  2 13:40:53 2010	(r210767)
@@ -1,3 +1,3 @@
+287
 
               287
-              287

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/src/TestFunctionLookup.java
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/src/TestFunctionLookup.java	Mon Aug  2 13:40:19 2010	(r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/src/TestFunctionLookup.java	Mon Aug  2 13:40:53 2010	(r210767)
@@ -20,10 +20,8 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
- *
- * ident	"%Z%%M%	%I%	%E% SMI"
  */
 
 import org.opensolaris.os.dtrace.*;
@@ -70,7 +68,7 @@ public class TestFunctionLookup {
 			    long addr = (Long)address;
 			    f = consumer.lookupKernelFunction(addr);
 			}
-			if (f.equals("genunix`setrun")) {
+			if (f.equals("genunix`cv_wakeup")) {
 			    System.out.println(f);
 			    done = true;
 			}

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/src/TestGetAggregate.java (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/java_api/src/TestGetAggregate.java)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/src/TestGetAggregate.java	Mon Aug  2 13:40:53 2010	(r210767, copy of r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/java_api/src/TestGetAggregate.java)
@@ -0,0 +1,252 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+import org.opensolaris.os.dtrace.*;
+import java.util.*;
+
+/**
+ * Assert getAggregate() can explicitly specify the anonymous aggregation.
+ */
+public class TestGetAggregate {
+    static final String programString =
+	    "profile:::tick-50ms" +
+	    "{" +
+	    "        @ = count();" +
+	    "        @a = count();" +
+	    "}";
+
+    static final String ANONYMOUS_AGGREGATION = "";
+    static final int TICK = 50;
+    static final int EXPECTED_TICKS = 3;
+    static final int INTERVALS = 4;
+
+    static void
+    testIncluded(Consumer consumer, String ... aggregationNames)
+	    throws DTraceException, InterruptedException
+    {
+	Aggregate aggregate;
+	Set  included = new HashSet  ();
+	int n = 1;
+
+	for (String name : aggregationNames) {
+	    included.add(name);
+	}
+
+	// Wait up to a full second to obtain aggregate data. Without a
+	// time limit, we'll loop forever if no aggregation was
+	// successfully included.
+	do {
+	    Thread.sleep(TICK);
+	    aggregate = consumer.getAggregate(included, null);
+	} while (aggregate.asMap().isEmpty() && n++ < (1000 / TICK));
+
+	for (String name : included) {
+	    if (aggregate.getAggregation(name) == null) {
+		throw new IllegalStateException("@" + name +
+			" was explicitly included but did not appear " +
+			"in the aggregate");
+	    }
+	}
+	for (Aggregation a : aggregate.getAggregations()) {
+	    if (!included.contains(a.getName())) {
+		throw new IllegalStateException("@" + a.getName() +
+			" was not explicitly included but appeared " +
+			"in the aggregate anyway");
+	    }
+	}
+
+	if (!consumer.isRunning()) {
+	    throw new IllegalStateException("consumer exited");
+	}
+    }
+
+    static void
+    testCleared(Consumer consumer, String ... aggregationNames)
+	    throws DTraceException, InterruptedException
+    {
+	Aggregate aggregate;
+	AggregationRecord rec;
+	long value;
+	Long firstValue;
+	int n = 1;
+	Map  firstValues = new HashMap  ();
+	Set  cleared = new HashSet  ();
+
+	for (String name : aggregationNames) {
+	    cleared.add(name);
+	}
+
+	do {
+	    Thread.sleep(TICK);
+	    aggregate = consumer.getAggregate(null, cleared);
+	} while (aggregate.asMap().isEmpty() && n++ < (1000 / TICK));
+	n = 1;
+
+	do {
+	    Thread.sleep(TICK * EXPECTED_TICKS);
+	    aggregate = consumer.getAggregate(null, cleared);
+
+	    for (Aggregation a : aggregate.getAggregations()) {
+		if (!firstValues.containsKey(a.getName())) {
+		    rec = a.getRecord(Tuple.EMPTY);
+		    value = rec.getValue().getValue().longValue();
+		    firstValues.put(a.getName(), value);
+		}
+	    }
+	} while (consumer.isRunning() && n++ < INTERVALS);
+
+	for (Aggregation a : aggregate.getAggregations()) {
+	    rec = a.getRecord(Tuple.EMPTY);
+	    value = rec.getValue().getValue().longValue();
+	    firstValue = firstValues.get(a.getName());
+
+	    if (cleared.contains(a.getName())) {
+		// last value should be about the same as first value
+		if (value > (firstValue * 2)) {
+		    throw new IllegalStateException(
+			    "@" + a.getName() + " should have " +
+			    "been cleared but instead grew from " +
+			    firstValue + " to " + value);
+		}
+	    } else {
+		// last value should be about (INTERVALS * firstValue)
+		if (value < (firstValue * 2)) {
+		    throw new IllegalStateException(
+			    "@" + a.getName() + " should have " +
+			    "accumulated a running total but " +
+			    "instead went from " +
+			    firstValue + " to " + value);
+		}
+	    }
+	}
+
+	if (!consumer.isRunning()) {
+	    throw new IllegalStateException("consumer exited");
+	}
+    }
+
+    static Integer includedStatus;
+    static Integer clearedStatus;
+
+    static void
+    startIncludedTest()
+    {
+	final Consumer consumer = new LocalConsumer();
+	consumer.addConsumerListener(new ConsumerAdapter() {
+	    public void consumerStarted(ConsumerEvent e) {
+		new Thread(new Runnable() {
+		    public void run() {
+			try {
+			    testIncluded(consumer, ANONYMOUS_AGGREGATION);
+			    includedStatus = 0;
+			} catch (Exception e) {
+			    includedStatus = 1;
+			    e.printStackTrace();
+			} finally {
+			    consumer.abort();
+			}
+		    }
+		}).start();
+	    }
+	});
+
+	try {
+	    consumer.open();
+	    consumer.setOption(Option.aggrate, Option.millis(TICK));
+	    consumer.compile(programString);
+	    consumer.enable();
+	    consumer.go();
+	} catch (Exception e) {
+	    includedStatus = 1;
+	    e.printStackTrace();
+	}
+    }
+
+    static void
+    startClearedTest()
+    {
+	final Consumer consumer = new LocalConsumer();
+	consumer.addConsumerListener(new ConsumerAdapter() {
+	    public void consumerStarted(ConsumerEvent e) {
+		new Thread(new Runnable() {
+		    public void run() {
+			try {
+			    testCleared(consumer, ANONYMOUS_AGGREGATION);
+			    clearedStatus = 0;
+			} catch (Exception e) {
+			    clearedStatus = 1;
+			    e.printStackTrace();
+			} finally {
+			    consumer.abort();
+			}
+		    }
+		}).start();
+	    }
+	});
+
+	try {
+	    consumer.open();
+	    consumer.setOption(Option.aggrate, Option.millis(TICK));
+	    consumer.compile(programString);
+	    consumer.enable();
+	    consumer.go();
+	} catch (Exception e) {
+	    clearedStatus = 1;
+	    e.printStackTrace();
+	}
+    }
+
+    public static void
+    main(String[] args)
+    {
+	startIncludedTest();
+
+	do {
+	    try {
+		Thread.sleep(TICK);
+	    } catch (InterruptedException e) {
+		e.printStackTrace();
+	    }
+	} while (includedStatus == null);
+
+	startClearedTest();
+
+	do {
+	    try {
+		Thread.sleep(TICK);
+	    } catch (InterruptedException e) {
+		e.printStackTrace();
+	    }
+	} while (clearedStatus == null);
+
+	if (includedStatus != 0 || clearedStatus != 0) {
+	    System.out.println("Failure");
+	    System.exit(1);
+	}
+
+	System.out.println("Success");
+    }
+}

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.ksh.out
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.ksh.out	Mon Aug  2 13:40:19 2010	(r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.ksh.out	Mon Aug  2 13:40:53 2010	(r210767)
@@ -1,3 +1,3 @@
-genunix`setrun
+genunix`cv_wakeup
 3
 tst.FunctionLookup.exe`f1

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.GetAggregate.ksh (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/java_api/tst.GetAggregate.ksh)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.GetAggregate.ksh	Mon Aug  2 13:40:53 2010	(r210767, copy of r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/java_api/tst.GetAggregate.ksh)
@@ -0,0 +1,36 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+
+############################################################################
+# ASSERTION:
+#	getAggregate() can explicitly specify the anonymous aggregation
+#
+# SECTION: Java API
+#
+############################################################################
+
+java -cp test.jar TestGetAggregate

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh	Mon Aug  2 13:40:53 2010	(r210767, copy of r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh)
@@ -0,0 +1,41 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+
+if [ $# != 1 ]; then
+	echo expected one argument: '<'dtrace-path'>'
+	exit 2
+fi
+
+dtrace=$1
+
+$dtrace -ln 'syscall::*$1:entry' read | awk '{print $(NF-1),$NF}' | sort
+$dtrace -ln 'syscall::$1*:entry' read | awk '{print $(NF-1),$NF}' | sort
+$dtrace -ln 'syscall::re$1*:entry' ad | awk '{print $(NF-1),$NF}' | sort
+$dtrace -ln 'syscall::$1l*:entry' read | awk '{print $(NF-1),$NF}' | sort
+$dtrace -ln 'syscall::p$1[0-9][0-9]:entry' read | awk '{print $(NF-1),$NF}' | \
+ sort
+
+exit $status

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out	Mon Aug  2 13:40:53 2010	(r210767, copy of r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out)
@@ -0,0 +1,15 @@
+FUNCTION NAME
+pread entry
+read entry
+FUNCTION NAME
+read entry
+readlink entry
+readv entry
+FUNCTION NAME
+read entry
+readlink entry
+readv entry
+FUNCTION NAME
+readlink entry
+FUNCTION NAME
+pread64 entry

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_CREATEFAIL.many.exe (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_CREATEFAIL.many.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.coverage.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.killonerror.ksh (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.killonerror.ksh)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.killonerror.ksh	Mon Aug  2 13:40:53 2010	(r210767, copy of r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.killonerror.ksh)
@@ -0,0 +1,41 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+
+if [ $# != 1 ]; then
+	echo expected one argument: '<'dtrace-path'>'
+	exit 2
+fi
+
+dtrace=$1
+
+#
+# Make sure we kill a process if the dtrace(1M) command fails.
+#
+
+rc=`$dtrace -c date -n jarod 2>/dev/null | /usr/bin/wc -l`
+
+exit $rc

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.probemod.ksh
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.probemod.ksh	Mon Aug  2 13:40:19 2010	(r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.probemod.ksh	Mon Aug  2 13:40:53 2010	(r210767)
@@ -21,11 +21,9 @@
 #
 
 #
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
 
 if [ $# != 1 ]; then
 	echo expected one argument: '<'dtrace-path'>'
@@ -40,7 +38,7 @@ dtrace=$1
 # (and therefore 'libc' and 'libc.so') as it's definitely there.
 #
 
-for lib in libc libc.so libc.so.1; do
+for lib in libc libc.so libc.so.1 'lib[c]*'; do
 	sleep 60 &
 	pid=$!
 	dtrace -n "pid$pid:$lib::entry" -n 'tick-2s{exit(0);}'

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/plockstat/tst.available.exe (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/plockstat/tst.available.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/plockstat/tst.libmap.exe (from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/common/plockstat/tst.libmap.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printa/tst.basics.d
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printa/tst.basics.d	Mon Aug  2 13:40:19 2010	(r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printa/tst.basics.d	Mon Aug  2 13:40:53 2010	(r210767)
@@ -20,15 +20,13 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * ASSERTION:
- *  Test the basic formatting of all the supported kinds of aggregations.
+ *     Test the basic formatting of all the supported kinds of aggregations.
  *

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 15:15:24 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 94464106566C;
	Mon,  2 Aug 2010 15:15:24 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 685E38FC21;
	Mon,  2 Aug 2010 15:15:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72FFO93058849;
	Mon, 2 Aug 2010 15:15:24 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72FFO4o058847;
	Mon, 2 Aug 2010 15:15:24 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008021515.o72FFO4o058847@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Mon, 2 Aug 2010 15:15:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210769 - head/lib/librtld_db
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 15:15:24 -0000

Author: uqs
Date: Mon Aug  2 15:15:24 2010
New Revision: 210769
URL: http://svn.freebsd.org/changeset/base/210769

Log:
  mdoc policing: use consistent section ordering, fix quotes and trailing
  whitespace
  
  Approved by:	rpaulo

Modified:
  head/lib/librtld_db/librtld_db.3

Modified: head/lib/librtld_db/librtld_db.3
==============================================================================
--- head/lib/librtld_db/librtld_db.3	Mon Aug  2 14:29:19 2010	(r210768)
+++ head/lib/librtld_db/librtld_db.3	Mon Aug  2 15:15:24 2010	(r210769)
@@ -44,7 +44,7 @@
 .Fc
 .Ft char *
 .Fo rd_errstr
-.Fa "rd_err_e rderr" 
+.Fa "rd_err_e rderr"
 .Fc
 .Ft rd_err_e
 .Fo rd_event_addr
@@ -84,8 +84,8 @@
 .Fc
 .Ft rd_err_e
 .Fo rd_plt_resolution
-.Fa "rd_agent_t *rdap, uintptr_t pc, struct proc *proc
-.Fa  "uintptr_t plt_base, rd_plt_info_t *rpi"
+.Fa "rd_agent_t *rdap, uintptr_t pc, struct proc *proc"
+.Fa "uintptr_t plt_base, rd_plt_info_t *rpi"
 .Fc
 .Ft rd_err_e
 .Fo rd_reset
@@ -101,7 +101,7 @@ This library must be used along with
 Most library functions take a
 .Ft rd_agent_t
 argument.
-This argument is an opaque structure containing information associated with 
+This argument is an opaque structure containing information associated with
 the current status of the agent.
 .Pp
 Before you start using
@@ -163,14 +163,6 @@ type error.
 The error codes are described in the header file for this library.
 You can get the error string using
 .Fn rd_errstr .
-.Sh CAVEATS
-The functions
-.Fn rd_event_enable ,
-.Fn rd_log ,
-.Fn rd_objpad_enable
-and
-.Fn rd_plt_resolution
-are not yet implemented.
 .Sh SEE ALSO
 .Xr ld 1 ,
 .Xr ld-elf.so.1 1 ,
@@ -179,13 +171,21 @@ are not yet implemented.
 .Xr rtld 1
 .Sh HISTORY
 The
-.Nm librtld_db 
+.Nm librtld_db
 library first appeared in
-.Fx 9.0 
+.Fx 9.0
 and was modeled after the same library present in the Solaris operating system.
 .Sh AUTHORS
 The
 .Nm librtld_db
 library and this manual page were written by
-.An Rui Paulo Aq rpaulo@FreeBSD.org 
+.An Rui Paulo Aq rpaulo@FreeBSD.org
 under sponsorship from the FreeBSD Foundation.
+.Sh CAVEATS
+The functions
+.Fn rd_event_enable ,
+.Fn rd_log ,
+.Fn rd_objpad_enable
+and
+.Fn rd_plt_resolution
+are not yet implemented.

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 15:33:16 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B62F7106564A;
	Mon,  2 Aug 2010 15:33:16 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A46D08FC16;
	Mon,  2 Aug 2010 15:33:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72FXGM9062760;
	Mon, 2 Aug 2010 15:33:16 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72FXGnM062758;
	Mon, 2 Aug 2010 15:33:16 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008021533.o72FXGnM062758@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Mon, 2 Aug 2010 15:33:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210770 - head/gnu/usr.bin/groff/tmac
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 15:33:16 -0000

Author: uqs
Date: Mon Aug  2 15:33:16 2010
New Revision: 210770
URL: http://svn.freebsd.org/changeset/base/210770

Log:
  Fix case for library macros

Modified:
  head/gnu/usr.bin/groff/tmac/mdoc.local

Modified: head/gnu/usr.bin/groff/tmac/mdoc.local
==============================================================================
--- head/gnu/usr.bin/groff/tmac/mdoc.local	Mon Aug  2 15:15:24 2010	(r210769)
+++ head/gnu/usr.bin/groff/tmac/mdoc.local	Mon Aug  2 15:33:16 2010	(r210770)
@@ -59,7 +59,7 @@
 .ds doc-str-Lb-libproc     Processor Monitoring and Analysis Library (libproc, \-lproc)
 .ds doc-str-Lb-librpcsec_gss RPC GSS-API Authentication Library (librpcsec_gss, \-lrpcsec_gss)
 .ds doc-str-Lb-librpcsvc   RPC Service Library (librpcsvc, \-lrpcsvc)
-.ds doc-str-lb-librtld_db  Run-time Linker Debugging Library (librtld_db, \-lrtld_db)
+.ds doc-str-Lb-librtld_db  Run-time Linker Debugging Library (librtld_db, \-lrtld_db)
 .ds doc-str-Lb-libsdp      Bluetooth Service Discovery Protocol User Library (libsdp, \-lsdp)
 .ds doc-str-Lb-libthr      1:1 Threading Library (libthr, \-lthr)
 .ds doc-str-Lb-libufs      UFS File System Access Library (libufs, \-lufs)

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 15:55:00 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 336501065672;
	Mon,  2 Aug 2010 15:55:00 +0000 (UTC) (envelope-from bcr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 207898FC14;
	Mon,  2 Aug 2010 15:55:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72Ft0qQ067509;
	Mon, 2 Aug 2010 15:55:00 GMT (envelope-from bcr@svn.freebsd.org)
Received: (from bcr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72Ft0mU067507;
	Mon, 2 Aug 2010 15:55:00 GMT (envelope-from bcr@svn.freebsd.org)
Message-Id: <201008021555.o72Ft0mU067507@svn.freebsd.org>
From: Benedict Reuschling 
Date: Mon, 2 Aug 2010 15:55: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: r210771 - stable/8/contrib/netcat
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 15:55:00 -0000

Author: bcr (doc committer)
Date: Mon Aug  2 15:54:59 2010
New Revision: 210771
URL: http://svn.freebsd.org/changeset/base/210771

Log:
  MFC r210511:
  
  Use "printf" instead of "echo -n" in an example because it
  should be more compatible for most shells that are out there.
  
  I contacted Philip Guenther at OpenBSD about this PR and he
  corrected the issue in their tree pretty fast.
  
  PR:                 docs/142243
  Submitted by:       Yasir (yasir27 at mail dot ru)
  Obtained from:      OpenBSD
  Discussed with:     delphij

Modified:
  stable/8/contrib/netcat/nc.1
Directory Properties:
  stable/8/contrib/netcat/   (props changed)

Modified: stable/8/contrib/netcat/nc.1
==============================================================================
--- stable/8/contrib/netcat/nc.1	Mon Aug  2 15:33:16 2010	(r210770)
+++ stable/8/contrib/netcat/nc.1	Mon Aug  2 15:54:59 2010	(r210771)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 15, 2010
+.Dd July 3, 2010
 .Dt NC 1
 .Os
 .Sh NAME
@@ -340,7 +340,7 @@ when it might be necessary to verify wha
 in response to commands issued by the client.
 For example, to retrieve the home page of a web site:
 .Bd -literal -offset indent
-$ echo -n "GET / HTTP/1.0\er\en\er\en" | nc host.example.com 80
+$ printf "GET / HTTP/1.0\er\en\er\en" | nc host.example.com 80
 .Ed
 .Pp
 Note that this also displays the headers sent by the web server.

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 16:01:46 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 280F61065679;
	Mon,  2 Aug 2010 16:01:46 +0000 (UTC)
	(envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 15FFD8FC26;
	Mon,  2 Aug 2010 16:01:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72G1jVt069073;
	Mon, 2 Aug 2010 16:01:45 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72G1j3B069065;
	Mon, 2 Aug 2010 16:01:45 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201008021601.o72G1j3B069065@svn.freebsd.org>
From: Joel Dahl 
Date: Mon, 2 Aug 2010 16:01:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210772 - in head/lib/libc: gen net posix1e sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 16:01:46 -0000

Author: joel (doc committer)
Date: Mon Aug  2 16:01:45 2010
New Revision: 210772
URL: http://svn.freebsd.org/changeset/base/210772

Log:
  Spelling fixes.

Modified:
  head/lib/libc/gen/getutxent.3
  head/lib/libc/net/sctp_getaddrlen.3
  head/lib/libc/net/sctp_send.3
  head/lib/libc/net/sctp_sendmsg.3
  head/lib/libc/posix1e/acl_strip_np.3
  head/lib/libc/posix1e/mac.3
  head/lib/libc/sys/jail.2

Modified: head/lib/libc/gen/getutxent.3
==============================================================================
--- head/lib/libc/gen/getutxent.3	Mon Aug  2 15:54:59 2010	(r210771)
+++ head/lib/libc/gen/getutxent.3	Mon Aug  2 16:01:45 2010	(r210772)
@@ -137,7 +137,7 @@ are not processed by this implementation
 Other fields inside the structure are:
 .Bl -tag -width ut_user
 .It Fa ut_tv
-The time the event occured.
+The time the event occurred.
 This field is used for all types of entries, except
 .Dv EMPTY .
 .It Fa ut_id

Modified: head/lib/libc/net/sctp_getaddrlen.3
==============================================================================
--- head/lib/libc/net/sctp_getaddrlen.3	Mon Aug  2 15:54:59 2010	(r210771)
+++ head/lib/libc/net/sctp_getaddrlen.3	Mon Aug  2 16:01:45 2010	(r210772)
@@ -51,7 +51,7 @@ The
 .Fn sctp_getaddrlen
 function returns the size of a specific address family.
 This function
-is provided for application binary compatability since it
+is provided for application binary compatibility since it
 provides the application with the size the operating system
 thinks the specific address family is.
 Note that the function

Modified: head/lib/libc/net/sctp_send.3
==============================================================================
--- head/lib/libc/net/sctp_send.3	Mon Aug  2 15:54:59 2010	(r210771)
+++ head/lib/libc/net/sctp_send.3	Mon Aug  2 16:01:45 2010	(r210772)
@@ -170,7 +170,7 @@ For a one-to-many type (SOCK_SEQPACKET) 
 .Dv SCTP_SENDALL
 can be used as a convenient way to make one send call and have
 all associations that are under the socket get a copy of the message.
-Note that this mechanism is quite efficent and makes only one actual
+Note that this mechanism is quite efficient and makes only one actual
 copy of the data which is shared by all the associations for sending.
 .Pp
 The remaining flags are used for the partial reliability extension (RFC3758)

Modified: head/lib/libc/net/sctp_sendmsg.3
==============================================================================
--- head/lib/libc/net/sctp_sendmsg.3	Mon Aug  2 15:54:59 2010	(r210771)
+++ head/lib/libc/net/sctp_sendmsg.3	Mon Aug  2 16:01:45 2010	(r210772)
@@ -182,7 +182,7 @@ For a one-to-many type (SOCK_SEQPACKET) 
 .Dv SCTP_SENDALL
 can be used as a convient way to make one send call and have
 all associations that are under the socket get a copy of the message.
-Note that this mechanism is quite efficent and makes only one actual
+Note that this mechanism is quite efficient and makes only one actual
 copy of the data which is shared by all the associations for sending.
 .Pp
 The remaining flags are used for the partial reliability extension (RFC3758)

Modified: head/lib/libc/posix1e/acl_strip_np.3
==============================================================================
--- head/lib/libc/posix1e/acl_strip_np.3	Mon Aug  2 15:54:59 2010	(r210771)
+++ head/lib/libc/posix1e/acl_strip_np.3	Mon Aug  2 16:01:45 2010	(r210772)
@@ -32,7 +32,7 @@
 .Os
 .Sh NAME
 .Nm acl_strip_np
-.Nd strip exteneded entries from an ACL
+.Nd strip extended entries from an ACL
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS

Modified: head/lib/libc/posix1e/mac.3
==============================================================================
--- head/lib/libc/posix1e/mac.3	Mon Aug  2 15:54:59 2010	(r210771)
+++ head/lib/libc/posix1e/mac.3	Mon Aug  2 16:01:45 2010	(r210772)
@@ -74,7 +74,7 @@ When querying a label on an object, a
 .Vt mac_t
 must first be prepared using the interfaces described in
 .Xr mac_prepare 3 ,
-allowing the application to declare which policies it wishes to interogate.
+allowing the application to declare which policies it wishes to interrogate.
 The application writer can also rely on default label names declared in
 .Xr mac.conf 5 .
 .Pp
@@ -109,7 +109,7 @@ This function, described in
 .Xr mac_set 3 ,
 sets the MAC label associated with the current process.
 .It Fn mac_free
-This function, desribed in
+This function, described in
 .Xr mac_free 3 ,
 frees working MAC label storage.
 .It Fn mac_from_text
@@ -154,7 +154,7 @@ system objects, but without policy-speci
 .Sh STANDARDS
 These APIs are loosely based on the APIs described in POSIX.1e, as described
 in IEEE POSIX.1e draft 17.
-However, the resemblence of these APIs to the POSIX APIs is loose, as the
+However, the resemblance of these APIs to the POSIX APIs is loose, as the
 POSIX APIs were unable to express some notions required for flexible and
 extensible access control.
 .Sh HISTORY

Modified: head/lib/libc/sys/jail.2
==============================================================================
--- head/lib/libc/sys/jail.2	Mon Aug  2 15:54:59 2010	(r210771)
+++ head/lib/libc/sys/jail.2	Mon Aug  2 16:01:45 2010	(r210772)
@@ -89,7 +89,7 @@ from the inside of the prison.
 The
 .Dq Li jailname
 pointer is an optional name that can be assigned to the jail
-for example for managment purposes.
+for example for management purposes.
 .Pp
 The
 .Dq Li ip4s

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 16:18:41 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D0CF71065675;
	Mon,  2 Aug 2010 16:18:41 +0000 (UTC)
	(envelope-from glarkin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BFA788FC26;
	Mon,  2 Aug 2010 16:18:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72GIfnW072900;
	Mon, 2 Aug 2010 16:18:41 GMT (envelope-from glarkin@svn.freebsd.org)
Received: (from glarkin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72GIfFC072898;
	Mon, 2 Aug 2010 16:18:41 GMT (envelope-from glarkin@svn.freebsd.org)
Message-Id: <201008021618.o72GIfFC072898@svn.freebsd.org>
From: Greg Larkin 
Date: Mon, 2 Aug 2010 16:18:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210773 - head/share/misc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 16:18:41 -0000

Author: glarkin (ports committer)
Date: Mon Aug  2 16:18:41 2010
New Revision: 210773
URL: http://svn.freebsd.org/changeset/base/210773

Log:
  Added myself (must have forgot a couple of years ago?) and fixed the
  newline character in gerald's entry.

Modified:
  head/share/misc/committers-ports.dot

Modified: head/share/misc/committers-ports.dot
==============================================================================
--- head/share/misc/committers-ports.dot	Mon Aug  2 16:01:45 2010	(r210772)
+++ head/share/misc/committers-ports.dot	Mon Aug  2 16:18:41 2010	(r210773)
@@ -84,7 +84,8 @@ flz [label="Florent Thoumie\nflz@FreeBSD
 gabor [label="Gabor Kovesdan\ngabor@FreeBSD.org\n2006/12/05"]
 gahr [label="Pietro Cerutti\ngahr@FreeBSD.org\n2008/02/20"]
 garga [label="Renato Botelho\ngarga@FreeBSD.org\n2005/07/11"]
-gerald [label="Gerald Pfeifer\gerald@FreeBSD.org\n2002/04/03"]
+gerald [label="Gerald Pfeifer\ngerald@FreeBSD.org\n2002/04/03"]
+glarkin [label="Greg Larkin\nglarkin@FreeBSD.org\n2008/07/17"]
 glewis [label="Greg Lewis\nglewis@FreeBSD.org\n2002/04/08"]
 hq [label="Herve Quiroz\nhq@FreeBSD.org\n2004/08/05"]
 ijliao [label="Ying-Chieh Liao\nijliao@FreeBSD.org\n2001/01/20"]

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 17:01:24 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3FD1B106566B;
	Mon,  2 Aug 2010 17:01: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 141418FC26;
	Mon,  2 Aug 2010 17:01:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72H1NoV082321;
	Mon, 2 Aug 2010 17:01:23 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72H1Nve082318;
	Mon, 2 Aug 2010 17:01:23 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008021701.o72H1Nve082318@svn.freebsd.org>
From: John Baldwin 
Date: Mon, 2 Aug 2010 17:01:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210774 - in head/sys: amd64/amd64 i386/i386
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 17:01:24 -0000

Author: jhb
Date: Mon Aug  2 17:01:23 2010
New Revision: 210774
URL: http://svn.freebsd.org/changeset/base/210774

Log:
  Tweak the logic to disable CLFLUSH in virtual environments to work around
  problems with flushing the local APIC register range so that it checks
  vm_guest directly.
  
  Reviewed by:	kib, alc
  MFC after:	2 weeks

Modified:
  head/sys/amd64/amd64/initcpu.c
  head/sys/i386/i386/initcpu.c

Modified: head/sys/amd64/amd64/initcpu.c
==============================================================================
--- head/sys/amd64/amd64/initcpu.c	Mon Aug  2 16:18:41 2010	(r210773)
+++ head/sys/amd64/amd64/initcpu.c	Mon Aug  2 17:01:23 2010	(r210774)
@@ -177,17 +177,17 @@ initializecpucache()
 	if ((cpu_feature & CPUID_CLFSH) != 0)
 		cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8;
 	/*
-	 * XXXKIB: (temporary) hack to work around traps generated when
-	 * CLFLUSHing APIC registers window.
+	 * XXXKIB: (temporary) hack to work around traps generated
+	 * when CLFLUSHing APIC register window under virtualization
+	 * environments.  These environments tend to disable the
+	 * CPUID_SS feature even though the native CPU supports it.
 	 */
 	TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable);
-	if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS) &&
-	    hw_clflush_disable == -1)
+	if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1)
 		cpu_feature &= ~CPUID_CLFSH;
 	/*
 	 * Allow to disable CLFLUSH feature manually by
-	 * hw.clflush_disable tunable.  This may help Xen guest on some AMD
-	 * CPUs.
+	 * hw.clflush_disable tunable.
 	 */
 	if (hw_clflush_disable == 1)
 		cpu_feature &= ~CPUID_CLFSH;

Modified: head/sys/i386/i386/initcpu.c
==============================================================================
--- head/sys/i386/i386/initcpu.c	Mon Aug  2 16:18:41 2010	(r210773)
+++ head/sys/i386/i386/initcpu.c	Mon Aug  2 17:01:23 2010	(r210774)
@@ -724,17 +724,17 @@ initializecpu(void)
 	if ((cpu_feature & CPUID_CLFSH) != 0)
 		cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8;
 	/*
-	 * XXXKIB: (temporary) hack to work around traps generated when
-	 * CLFLUSHing APIC registers window.
+	 * XXXKIB: (temporary) hack to work around traps generated
+	 * when CLFLUSHing APIC register window under virtualization
+	 * environments.  These environments tend to disable the
+	 * CPUID_SS feature even though the native CPU supports it.
 	 */
 	TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable);
-	if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS) &&
-	    hw_clflush_disable == -1)
+	if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1)
 		cpu_feature &= ~CPUID_CLFSH;
 	/*
 	 * Allow to disable CLFLUSH feature manually by
-	 * hw.clflush_disable tunable.  This may help Xen guest on some AMD
-	 * CPUs.
+	 * hw.clflush_disable tunable.
 	 */
 	if (hw_clflush_disable == 1)
 		cpu_feature &= ~CPUID_CLFSH;

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 17:20:59 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C981C1065674;
	Mon,  2 Aug 2010 17:20:59 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B7AA68FC08;
	Mon,  2 Aug 2010 17:20:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72HKxFN086685;
	Mon, 2 Aug 2010 17:20:59 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72HKxUV086682;
	Mon, 2 Aug 2010 17:20:59 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201008021720.o72HKxUV086682@svn.freebsd.org>
From: Rui Paulo 
Date: Mon, 2 Aug 2010 17:20:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210775 -
	head/cddl/contrib/opensolaris/lib/libdtrace/common
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 17:21:00 -0000

Author: rpaulo
Date: Mon Aug  2 17:20:59 2010
New Revision: 210775
URL: http://svn.freebsd.org/changeset/base/210775

Log:
  Fix the result of a mismerge. MUTEX_HELD should be DT_MUTEX_HELD() and
  Plmid() is not supposed to be called.

Modified:
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c

Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c	Mon Aug  2 17:01:23 2010	(r210774)
+++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c	Mon Aug  2 17:20:59 2010	(r210775)
@@ -444,7 +444,9 @@ dt_pid_mod_filt(void *arg, const prmap_t
 	if (gmatch(pp->dpp_obj, pp->dpp_mod))
 		return (dt_pid_per_mod(pp, pmp, obj));
 
+#if defined(sun)
 	(void) Plmid(pp->dpp_pr, pmp->pr_vaddr, &pp->dpp_lmid);
+#endif
 
 	dt_pid_objname(name, sizeof (name), pp->dpp_lmid, pp->dpp_obj);
 
@@ -676,7 +678,7 @@ dt_pid_create_usdt_probes(dtrace_probede
 	struct ps_prochandle *P = dpr->dpr_proc;
 	int ret = 0;
 
-	assert(MUTEX_HELD(&dpr->dpr_lock));
+	assert(DT_MUTEX_HELD(&dpr->dpr_lock));
 
 #ifdef DOODAD
 	(void) Pupdate_maps(P);

Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c	Mon Aug  2 17:01:23 2010	(r210774)
+++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c	Mon Aug  2 17:20:59 2010	(r210775)
@@ -99,7 +99,7 @@ dt_proc_bpcreate(dt_proc_t *dpr, uintptr
 	struct ps_prochandle *P = dpr->dpr_proc;
 	dt_bkpt_t *dbp;
 
-	assert(MUTEX_HELD(&dpr->dpr_lock));
+	assert(DT_MUTEX_HELD(&dpr->dpr_lock));
 
 	if ((dbp = dt_zalloc(dpr->dpr_hdl, sizeof (dt_bkpt_t))) != NULL) {
 		dbp->dbp_func = func;
@@ -126,7 +126,7 @@ dt_proc_bpdestroy(dt_proc_t *dpr, int de
 #endif
 	dt_bkpt_t *dbp, *nbp;
 
-	assert(MUTEX_HELD(&dpr->dpr_lock));
+	assert(DT_MUTEX_HELD(&dpr->dpr_lock));
 
 	for (dbp = dt_list_next(&dpr->dpr_bps); dbp != NULL; dbp = nbp) {
 printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__);
@@ -150,7 +150,7 @@ dt_proc_bpmatch(dtrace_hdl_t *dtp, dt_pr
 	const lwpstatus_t *psp = &Pstatus(dpr->dpr_proc)->pr_lwp;
 	dt_bkpt_t *dbp;
 
-	assert(MUTEX_HELD(&dpr->dpr_lock));
+	assert(DT_MUTEX_HELD(&dpr->dpr_lock));
 
 	for (dbp = dt_list_next(&dpr->dpr_bps);
 	    dbp != NULL; dbp = dt_list_next(dbp)) {
@@ -177,7 +177,7 @@ dt_proc_bpenable(dt_proc_t *dpr)
 {
 	dt_bkpt_t *dbp;
 
-	assert(MUTEX_HELD(&dpr->dpr_lock));
+	assert(DT_MUTEX_HELD(&dpr->dpr_lock));
 
 	for (dbp = dt_list_next(&dpr->dpr_bps);
 	    dbp != NULL; dbp = dt_list_next(dbp)) {
@@ -197,7 +197,7 @@ dt_proc_bpdisable(dt_proc_t *dpr)
 {
 	dt_bkpt_t *dbp;
 
-	assert(MUTEX_HELD(&dpr->dpr_lock));
+	assert(DT_MUTEX_HELD(&dpr->dpr_lock));
 
 	for (dbp = dt_list_next(&dpr->dpr_bps);
 	    dbp != NULL; dbp = dt_list_next(dbp)) {
@@ -248,7 +248,7 @@ dt_proc_notify(dtrace_hdl_t *dtp, dt_pro
 static void
 dt_proc_stop(dt_proc_t *dpr, uint8_t why)
 {
-	assert(MUTEX_HELD(&dpr->dpr_lock));
+	assert(DT_MUTEX_HELD(&dpr->dpr_lock));
 	assert(why != DT_PROC_STOP_IDLE);
 
 	if (dpr->dpr_stop & why) {
@@ -350,7 +350,7 @@ dt_proc_attach(dt_proc_t *dpr, int exec)
 	rd_err_e err;
 	GElf_Sym sym;
 
-	assert(MUTEX_HELD(&dpr->dpr_lock));
+	assert(DT_MUTEX_HELD(&dpr->dpr_lock));
 
 	if (exec) {
 		if (psp->pr_lwp.pr_errno != 0)
@@ -416,7 +416,7 @@ dt_proc_waitrun(dt_proc_t *dpr)
 	const long wstop = PCWSTOP;
 	int pfd = Pctlfd(P);
 
-	assert(MUTEX_HELD(&dpr->dpr_lock));
+	assert(DT_MUTEX_HELD(&dpr->dpr_lock));
 	assert(psp->pr_flags & PR_STOPPED);
 	assert(Pstate(P) == PS_STOP);
 

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 17:31:49 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2F7981065675;
	Mon,  2 Aug 2010 17:31:49 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1DDB58FC1E;
	Mon,  2 Aug 2010 17:31:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72HVnps089110;
	Mon, 2 Aug 2010 17:31:49 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72HVnBV089091;
	Mon, 2 Aug 2010 17:31:49 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201008021731.o72HVnBV089091@svn.freebsd.org>
From: Rui Paulo 
Date: Mon, 2 Aug 2010 17:31:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210776 -
	head/cddl/contrib/opensolaris/lib/libdtrace/common
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 17:31:49 -0000

Author: rpaulo
Date: Mon Aug  2 17:31:48 2010
New Revision: 210776
URL: http://svn.freebsd.org/changeset/base/210776

Log:
  Fix another mismerge: bring back the definition of DT_MUTEX_HELD().

Modified:
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h

Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h	Mon Aug  2 17:20:59 2010	(r210775)
+++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h	Mon Aug  2 17:31:48 2010	(r210776)
@@ -603,8 +603,16 @@ extern void dt_buffered_destroy(dtrace_h
 
 extern uint64_t dt_stddev(uint64_t *, uint64_t);
 
+extern int dt_rw_read_held(pthread_rwlock_t *);
+extern int dt_rw_write_held(pthread_rwlock_t *);
+extern int dt_mutex_held(pthread_mutex_t *);
 extern int dt_options_load(dtrace_hdl_t *);
 
+#define DT_RW_READ_HELD(x)	dt_rw_read_held(x)	 
+#define DT_RW_WRITE_HELD(x)	dt_rw_write_held(x)	 
+#define DT_RW_LOCK_HELD(x)	(DT_RW_READ_HELD(x) || DT_RW_WRITE_HELD(x))
+#define DT_MUTEX_HELD(x)	dt_mutex_held(x)
+
 extern void dt_dprintf(const char *, ...);
 
 extern void dt_setcontext(dtrace_hdl_t *, dtrace_probedesc_t *);

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 17:35:01 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 551541065675;
	Mon,  2 Aug 2010 17:35:01 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3E4D28FC1D;
	Mon,  2 Aug 2010 17:35:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72HZ1OF089924;
	Mon, 2 Aug 2010 17:35:01 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72HZ1ri089916;
	Mon, 2 Aug 2010 17:35:01 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008021735.o72HZ1ri089916@svn.freebsd.org>
From: Jung-uk Kim 
Date: Mon, 2 Aug 2010 17:35:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210777 - in head/sys/amd64: acpica amd64 include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 17:35:01 -0000

Author: jkim
Date: Mon Aug  2 17:35:00 2010
New Revision: 210777
URL: http://svn.freebsd.org/changeset/base/210777

Log:
  - Merge savectx2() with savectx() and struct xpcb with struct pcb. [1]
  savectx() is only used for panic dump (dumppcb) and kdb (stoppcbs).  Thus,
  saving additional information does not hurt and it may be even beneficial.
  Unfortunately, struct pcb has grown larger to accommodate more data.
  Move 512-byte long pcb_user_save to the end of struct pcb while I am here.
  - savectx() now saves FPU state unconditionally and copy it to the PCB of
  FPU thread if necessary.  This gives panic dump and kdb a chance to take
  a look at the current FPU state even if the FPU is "supposedly" not used.
  - Resuming CPU now unconditionally reinitializes FPU.  If the saved FPU
  state was irrelevant, it could be in an unknown state.
  
  Suggested by:	bde [1]

Modified:
  head/sys/amd64/acpica/acpi_switch.S
  head/sys/amd64/acpica/acpi_wakecode.S
  head/sys/amd64/acpica/acpi_wakeup.c
  head/sys/amd64/amd64/cpu_switch.S
  head/sys/amd64/amd64/genassym.c
  head/sys/amd64/amd64/mp_machdep.c
  head/sys/amd64/include/pcb.h

Modified: head/sys/amd64/acpica/acpi_switch.S
==============================================================================
--- head/sys/amd64/acpica/acpi_switch.S	Mon Aug  2 17:31:48 2010	(r210776)
+++ head/sys/amd64/acpica/acpi_switch.S	Mon Aug  2 17:35:00 2010	(r210777)
@@ -1,7 +1,7 @@
 /*-
  * Copyright (c) 2001 Takanori Watanabe 
  * Copyright (c) 2001 Mitsuru IWASAKI 
- * Copyright (c) 2008-2009 Jung-uk Kim 
+ * Copyright (c) 2008-2010 Jung-uk Kim 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -35,8 +35,6 @@
 #include "assym.s"
 
 #define	WAKEUP_CTX(member)	wakeup_ ## member - wakeup_ctx(%rdi)
-#define	WAKEUP_PCB(member)	PCB_ ## member(%r11)
-#define	WAKEUP_XPCB(member)	XPCB_ ## member(%r11)
 
 ENTRY(acpi_restorecpu)
 	/* Switch to KPML4phys. */
@@ -49,7 +47,7 @@ ENTRY(acpi_restorecpu)
 1:
 
 	/* Fetch PCB. */
-	movq	WAKEUP_CTX(xpcb), %r11
+	movq	WAKEUP_CTX(pcb), %rsi
 
 	/* Force kernel segment registers. */
 	movl	$KDSEL, %eax
@@ -62,16 +60,16 @@ ENTRY(acpi_restorecpu)
 	movw	%ax, %gs
 
 	movl	$MSR_FSBASE, %ecx
-	movl	WAKEUP_PCB(FSBASE), %eax
-	movl	4 + WAKEUP_PCB(FSBASE), %edx
+	movl	PCB_FSBASE(%rsi), %eax
+	movl	4 + PCB_FSBASE(%rsi), %edx
 	wrmsr
 	movl	$MSR_GSBASE, %ecx
-	movl	WAKEUP_PCB(GSBASE), %eax
-	movl	4 + WAKEUP_PCB(GSBASE), %edx
+	movl	PCB_GSBASE(%rsi), %eax
+	movl	4 + PCB_GSBASE(%rsi), %edx
 	wrmsr
 	movl	$MSR_KGSBASE, %ecx
-	movl	WAKEUP_XPCB(KGSBASE), %eax
-	movl	4 + WAKEUP_XPCB(KGSBASE), %edx
+	movl	PCB_KGSBASE(%rsi), %eax
+	movl	4 + PCB_KGSBASE(%rsi), %edx
 	wrmsr
 
 	/* Restore EFER. */
@@ -103,19 +101,20 @@ ENTRY(acpi_restorecpu)
 	wrmsr
 
 	/* Restore CR0 except for FPU mode. */
-	movq	WAKEUP_XPCB(CR0), %rax
+	movq	PCB_CR0(%rsi), %rax
+	movq	%rax, %rcx
 	andq	$~(CR0_EM | CR0_TS), %rax
 	movq	%rax, %cr0
 
 	/* Restore CR2 and CR4. */
-	movq	WAKEUP_XPCB(CR2), %rax
+	movq	PCB_CR2(%rsi), %rax
 	movq	%rax, %cr2
-	movq	WAKEUP_XPCB(CR4), %rax
+	movq	PCB_CR4(%rsi), %rax
 	movq	%rax, %cr4
 
 	/* Restore descriptor tables. */
-	lidt	WAKEUP_XPCB(IDT)
-	lldt	WAKEUP_XPCB(LDT)
+	lidt	PCB_IDT(%rsi)
+	lldt	PCB_LDT(%rsi)
 
 #define	SDT_SYSTSS	9
 #define	SDT_SYSBSY	11
@@ -123,48 +122,58 @@ ENTRY(acpi_restorecpu)
 	/* Clear "task busy" bit and reload TR. */
 	movq	PCPU(TSS), %rax
 	andb	$(~SDT_SYSBSY | SDT_SYSTSS), 5(%rax)
-	movw	WAKEUP_XPCB(TR), %ax
+	movw	PCB_TR(%rsi), %ax
 	ltr	%ax
 
 #undef	SDT_SYSTSS
 #undef	SDT_SYSBSY
 
 	/* Restore other callee saved registers. */
-	movq	WAKEUP_PCB(R15), %r15
-	movq	WAKEUP_PCB(R14), %r14
-	movq	WAKEUP_PCB(R13), %r13
-	movq	WAKEUP_PCB(R12), %r12
-	movq	WAKEUP_PCB(RBP), %rbp
-	movq	WAKEUP_PCB(RSP), %rsp
-	movq	WAKEUP_PCB(RBX), %rbx
+	movq	PCB_R15(%rsi), %r15
+	movq	PCB_R14(%rsi), %r14
+	movq	PCB_R13(%rsi), %r13
+	movq	PCB_R12(%rsi), %r12
+	movq	PCB_RBP(%rsi), %rbp
+	movq	PCB_RSP(%rsi), %rsp
+	movq	PCB_RBX(%rsi), %rbx
 
 	/* Restore debug registers. */
-	movq	WAKEUP_PCB(DR0), %rax
+	movq	PCB_DR0(%rsi), %rax
 	movq	%rax, %dr0
-	movq	WAKEUP_PCB(DR1), %rax
+	movq	PCB_DR1(%rsi), %rax
 	movq	%rax, %dr1
-	movq	WAKEUP_PCB(DR2), %rax
+	movq	PCB_DR2(%rsi), %rax
 	movq	%rax, %dr2
-	movq	WAKEUP_PCB(DR3), %rax
+	movq	PCB_DR3(%rsi), %rax
 	movq	%rax, %dr3
-	movq	WAKEUP_PCB(DR6), %rax
+	movq	PCB_DR6(%rsi), %rax
 	movq	%rax, %dr6
-	movq	WAKEUP_PCB(DR7), %rax
+	movq	PCB_DR7(%rsi), %rax
 	movq	%rax, %dr7
 
-	/* Restore FPU state. */
+#define	__INITIAL_FPUCW__	0x037f
+#define	__INITIAL_MXCSR__	0x1f80
+
+	/* Initialize FPU and restore state if necessary. */
+	fninit
+	movw	$__INITIAL_FPUCW__, -2(%rsp)
+	fldcw	-2(%rsp)
+	movl	$__INITIAL_MXCSR__, -4(%rsp)
+	ldmxcsr	-4(%rsp)
 	movq	PCPU(FPCURTHREAD), %rax
 	testq	%rax, %rax
 	je	1f
-	fxrstor	WAKEUP_PCB(USERFPU)
+	fxrstor	PCB_USERFPU(%rsi)
 1:
 
-	/* Restore CR0 with FPU mode. */
-	movq	WAKEUP_XPCB(CR0), %rax
-	movq	%rax, %cr0
+#undef	__INITIAL_FPUCW__
+#undef	__INITIAL_MXCSR__
+
+	/* Reload CR0. */
+	movq	%rcx, %cr0
 
 	/* Restore return address. */
-	movq	WAKEUP_PCB(RIP), %rax
+	movq	PCB_RIP(%rsi), %rax
 	movq	%rax, (%rsp)
 
 	/* Indicate the CPU is resumed. */
@@ -173,19 +182,3 @@ ENTRY(acpi_restorecpu)
 
 	ret
 END(acpi_restorecpu)
-
-ENTRY(acpi_savecpu)
-	/* Fetch XPCB and save CPU context. */
-	movq	%rdi, %r10
-	call	savectx2
-	movq	%r10, %r11
-
-	/* Patch caller's return address and stack pointer. */
-	movq	(%rsp), %rax
-	movq	%rax, WAKEUP_PCB(RIP)
-	movq	%rsp, %rax
-	movq	%rax, WAKEUP_PCB(RSP)
-
-	movl	$1, %eax
-	ret
-END(acpi_savecpu)

Modified: head/sys/amd64/acpica/acpi_wakecode.S
==============================================================================
--- head/sys/amd64/acpica/acpi_wakecode.S	Mon Aug  2 17:31:48 2010	(r210776)
+++ head/sys/amd64/acpica/acpi_wakecode.S	Mon Aug  2 17:35:00 2010	(r210777)
@@ -2,7 +2,7 @@
  * Copyright (c) 2001 Takanori Watanabe 
  * Copyright (c) 2001 Mitsuru IWASAKI 
  * Copyright (c) 2003 Peter Wemm
- * Copyright (c) 2008-2009 Jung-uk Kim 
+ * Copyright (c) 2008-2010 Jung-uk Kim 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -265,7 +265,7 @@ wakeup_kpml4:
 
 wakeup_ctx:
 	.quad	0
-wakeup_xpcb:
+wakeup_pcb:
 	.quad	0
 wakeup_gdt:
 	.word	0

Modified: head/sys/amd64/acpica/acpi_wakeup.c
==============================================================================
--- head/sys/amd64/acpica/acpi_wakeup.c	Mon Aug  2 17:31:48 2010	(r210776)
+++ head/sys/amd64/acpica/acpi_wakeup.c	Mon Aug  2 17:35:00 2010	(r210777)
@@ -2,7 +2,7 @@
  * Copyright (c) 2001 Takanori Watanabe 
  * Copyright (c) 2001 Mitsuru IWASAKI 
  * Copyright (c) 2003 Peter Wemm
- * Copyright (c) 2008-2009 Jung-uk Kim 
+ * Copyright (c) 2008-2010 Jung-uk Kim 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -66,13 +66,12 @@ extern int		acpi_resume_beep;
 extern int		acpi_reset_video;
 
 #ifdef SMP
-extern struct xpcb	**stopxpcbs;
+extern struct pcb	**susppcbs;
 #else
-static struct xpcb	**stopxpcbs;
+static struct pcb	**susppcbs;
 #endif
 
-int			acpi_restorecpu(struct xpcb *, vm_offset_t);
-int			acpi_savecpu(struct xpcb *);
+int			acpi_restorecpu(struct pcb *, vm_offset_t);
 
 static void		*acpi_alloc_wakeup_handler(void);
 static void		acpi_stop_beep(void *);
@@ -105,10 +104,10 @@ acpi_wakeup_ap(struct acpi_softc *sc, in
 	int		apic_id = cpu_apic_ids[cpu];
 	int		ms;
 
-	WAKECODE_FIXUP(wakeup_xpcb, struct xpcb *, stopxpcbs[cpu]);
-	WAKECODE_FIXUP(wakeup_gdt, uint16_t, stopxpcbs[cpu]->xpcb_gdt.rd_limit);
+	WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[cpu]);
+	WAKECODE_FIXUP(wakeup_gdt, uint16_t, susppcbs[cpu]->pcb_gdt.rd_limit);
 	WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t,
-	    stopxpcbs[cpu]->xpcb_gdt.rd_base);
+	    susppcbs[cpu]->pcb_gdt.rd_base);
 	WAKECODE_FIXUP(wakeup_cpu, int, cpu);
 
 	/* do an INIT IPI: assert RESET */
@@ -245,7 +244,7 @@ acpi_sleep_machdep(struct acpi_softc *sc
 	cr3 = rcr3();
 	load_cr3(KPML4phys);
 
-	if (acpi_savecpu(stopxpcbs[0])) {
+	if (savectx(susppcbs[0])) {
 #ifdef SMP
 		if (wakeup_cpus != 0 && suspend_cpus(wakeup_cpus) == 0) {
 			device_printf(sc->acpi_dev,
@@ -258,11 +257,11 @@ acpi_sleep_machdep(struct acpi_softc *sc
 		WAKECODE_FIXUP(resume_beep, uint8_t, (acpi_resume_beep != 0));
 		WAKECODE_FIXUP(reset_video, uint8_t, (acpi_reset_video != 0));
 
-		WAKECODE_FIXUP(wakeup_xpcb, struct xpcb *, stopxpcbs[0]);
+		WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[0]);
 		WAKECODE_FIXUP(wakeup_gdt, uint16_t,
-		    stopxpcbs[0]->xpcb_gdt.rd_limit);
+		    susppcbs[0]->pcb_gdt.rd_limit);
 		WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t,
-		    stopxpcbs[0]->xpcb_gdt.rd_base);
+		    susppcbs[0]->pcb_gdt.rd_base);
 		WAKECODE_FIXUP(wakeup_cpu, int, 0);
 
 		/* Call ACPICA to enter the desired sleep state */
@@ -332,9 +331,9 @@ acpi_alloc_wakeup_handler(void)
 		printf("%s: can't alloc wake memory\n", __func__);
 		return (NULL);
 	}
-	stopxpcbs = malloc(mp_ncpus * sizeof(*stopxpcbs), M_DEVBUF, M_WAITOK);
+	susppcbs = malloc(mp_ncpus * sizeof(*susppcbs), M_DEVBUF, M_WAITOK);
 	for (i = 0; i < mp_ncpus; i++)
-		stopxpcbs[i] = malloc(sizeof(**stopxpcbs), M_DEVBUF, M_WAITOK);
+		susppcbs[i] = malloc(sizeof(**susppcbs), M_DEVBUF, M_WAITOK);
 
 	return (wakeaddr);
 }

Modified: head/sys/amd64/amd64/cpu_switch.S
==============================================================================
--- head/sys/amd64/amd64/cpu_switch.S	Mon Aug  2 17:31:48 2010	(r210776)
+++ head/sys/amd64/amd64/cpu_switch.S	Mon Aug  2 17:35:00 2010	(r210777)
@@ -303,127 +303,92 @@ END(cpu_switch)
  */
 ENTRY(savectx)
 	/* Fetch PCB. */
-	movq	%rdi,%rcx
+	movq	%rdi,%rsi
 
 	/* Save caller's return address. */
 	movq	(%rsp),%rax
-	movq	%rax,PCB_RIP(%rcx)
+	movq	%rax,PCB_RIP(%rsi)
 
-	movq	%cr3,%rax
-	movq	%rax,PCB_CR3(%rcx)
-
-	movq	%rbx,PCB_RBX(%rcx)
-	movq	%rsp,PCB_RSP(%rcx)
-	movq	%rbp,PCB_RBP(%rcx)
-	movq	%r12,PCB_R12(%rcx)
-	movq	%r13,PCB_R13(%rcx)
-	movq	%r14,PCB_R14(%rcx)
-	movq	%r15,PCB_R15(%rcx)
-
-	/*
-	 * If fpcurthread == NULL, then the fpu h/w state is irrelevant and the
-	 * state had better already be in the pcb.  This is true for forks
-	 * but not for dumps (the old book-keeping with FP flags in the pcb
-	 * always lost for dumps because the dump pcb has 0 flags).
-	 *
-	 * If fpcurthread != NULL, then we have to save the fpu h/w state to
-	 * fpcurthread's pcb and copy it to the requested pcb, or save to the
-	 * requested pcb and reload.  Copying is easier because we would
-	 * have to handle h/w bugs for reloading.  We used to lose the
-	 * parent's fpu state for forks by forgetting to reload.
-	 */
-	pushfq
-	cli
-	movq	PCPU(FPCURTHREAD),%rax
-	testq	%rax,%rax
-	je	1f
-
-	movq	TD_PCB(%rax),%rdi
-	movq	PCB_SAVEFPU(%rdi),%rdi
-	clts
-	fxsave	(%rdi)
-	smsw	%ax
-	orb	$CR0_TS,%al
-	lmsw	%ax
-
-	movq	$PCB_SAVEFPU_SIZE,%rdx	/* arg 3 */
-	leaq	PCB_USERFPU(%rcx),%rsi	/* arg 2 */
-	/* arg 1 (%rdi) already loaded */
-	call	bcopy
-1:
-	popfq
-
-	ret
-END(savectx)
-
-/*
- * savectx2(xpcb)
- * Update xpcb, saving current processor state.
- */
-ENTRY(savectx2)
-	/* Fetch XPCB. */
-	movq	%rdi,%r8
+	movq	%rbx,PCB_RBX(%rsi)
+	movq	%rsp,PCB_RSP(%rsi)
+	movq	%rbp,PCB_RBP(%rsi)
+	movq	%r12,PCB_R12(%rsi)
+	movq	%r13,PCB_R13(%rsi)
+	movq	%r14,PCB_R14(%rsi)
+	movq	%r15,PCB_R15(%rsi)
 
-	/* Save caller's return address. */
-	movq	(%rsp),%rax
-	movq	%rax,PCB_RIP(%r8)
-
-	movq	%rbx,PCB_RBX(%r8)
-	movq	%rsp,PCB_RSP(%r8)
-	movq	%rbp,PCB_RBP(%r8)
-	movq	%r12,PCB_R12(%r8)
-	movq	%r13,PCB_R13(%r8)
-	movq	%r14,PCB_R14(%r8)
-	movq	%r15,PCB_R15(%r8)
-
-	movq	%cr0,%rax
-	movq	%rax,XPCB_CR0(%r8)
 	movq	%cr2,%rax
-	movq	%rax,XPCB_CR2(%r8)
+	movq	%rax,PCB_CR2(%rsi)
+	movq	%cr3,%rax
+	movq	%rax,PCB_CR3(%rsi)
 	movq	%cr4,%rax
-	movq	%rax,XPCB_CR4(%r8)
+	movq	%rax,PCB_CR4(%rsi)
 
 	movq	%dr0,%rax
-	movq	%rax,PCB_DR0(%r8)
+	movq	%rax,PCB_DR0(%rsi)
 	movq	%dr1,%rax
-	movq	%rax,PCB_DR1(%r8)
+	movq	%rax,PCB_DR1(%rsi)
 	movq	%dr2,%rax
-	movq	%rax,PCB_DR2(%r8)
+	movq	%rax,PCB_DR2(%rsi)
 	movq	%dr3,%rax
-	movq	%rax,PCB_DR3(%r8)
+	movq	%rax,PCB_DR3(%rsi)
 	movq	%dr6,%rax
-	movq	%rax,PCB_DR6(%r8)
+	movq	%rax,PCB_DR6(%rsi)
 	movq	%dr7,%rax
-	movq	%rax,PCB_DR7(%r8)
-
-	sgdt	XPCB_GDT(%r8)
-	sidt	XPCB_IDT(%r8)
-	sldt	XPCB_LDT(%r8)
-	str	XPCB_TR(%r8)
+	movq	%rax,PCB_DR7(%rsi)
 
 	movl	$MSR_FSBASE,%ecx
 	rdmsr
 	shlq	$32,%rdx
 	leaq	(%rax,%rdx),%rax
-	movq	%rax,PCB_FSBASE(%r8)
+	movq	%rax,PCB_FSBASE(%rsi)
 	movl	$MSR_GSBASE,%ecx
 	rdmsr
 	shlq	$32,%rdx
 	leaq	(%rax,%rdx),%rax
-	movq	%rax,PCB_GSBASE(%r8)
+	movq	%rax,PCB_GSBASE(%rsi)
 	movl	$MSR_KGSBASE,%ecx
 	rdmsr
 	shlq	$32,%rdx
 	leaq	(%rax,%rdx),%rax
-	movq	%rax,XPCB_KGSBASE(%r8)
+	movq	%rax,PCB_KGSBASE(%rsi)
+
+	sgdt	PCB_GDT(%rsi)
+	sidt	PCB_IDT(%rsi)
+	sldt	PCB_LDT(%rsi)
+	str	PCB_TR(%rsi)
+
+	movq	%cr0,%rax
+	movq	%rax,PCB_CR0(%rsi)
+	leaq	PCB_USERFPU(%rsi),%rdi
+	pushfq
+	cli
+	clts
+	fxsave	(%rdi)
+	movq	%rax,%cr0
 
+	/*
+	 * If fpcurthread == NULL, then the fpu h/w state is irrelevant and the
+	 * state had better already be in the pcb.  This is true for forks
+	 * but not for dumps (the old book-keeping with FP flags in the pcb
+	 * always lost for dumps because the dump pcb has 0 flags).
+	 *
+	 * If fpcurthread != NULL, then we have to copy the fpu h/w state to
+	 * fpcurthread's pcb, or reload from the requested pcb.  Copying is
+	 * easier because we would have to handle h/w bugs for reloading.
+	 */
 	movq	PCPU(FPCURTHREAD),%rax
 	testq	%rax,%rax
 	je	1f
-	clts
-	fxsave	PCB_USERFPU(%r8)
+
+	/* arg 1 (%rdi) already loaded */
+	movq	TD_PCB(%rax),%rax
+	movq	PCB_SAVEFPU(%rax),%rsi	/* arg 2 */
+	movq	$PCB_SAVEFPU_SIZE,%rdx	/* arg 3 */
+	call	bcopy
 1:
+	popfq
+	movl	$1,%eax
 
-	movl	$1, %eax
 	ret
-END(savectx2)
+END(savectx)

Modified: head/sys/amd64/amd64/genassym.c
==============================================================================
--- head/sys/amd64/amd64/genassym.c	Mon Aug  2 17:31:48 2010	(r210776)
+++ head/sys/amd64/amd64/genassym.c	Mon Aug  2 17:35:00 2010	(r210777)
@@ -123,7 +123,7 @@ ASSYM(KERNBASE, KERNBASE);
 ASSYM(DMAP_MIN_ADDRESS, DMAP_MIN_ADDRESS);
 ASSYM(DMAP_MAX_ADDRESS, DMAP_MAX_ADDRESS);
 ASSYM(MCLBYTES, MCLBYTES);
-ASSYM(PCB_CR3, offsetof(struct pcb, pcb_cr3));
+
 ASSYM(PCB_R15, offsetof(struct pcb, pcb_r15));
 ASSYM(PCB_R14, offsetof(struct pcb, pcb_r14));
 ASSYM(PCB_R13, offsetof(struct pcb, pcb_r13));
@@ -134,40 +134,35 @@ ASSYM(PCB_RBX, offsetof(struct pcb, pcb_
 ASSYM(PCB_RIP, offsetof(struct pcb, pcb_rip));
 ASSYM(PCB_FSBASE, offsetof(struct pcb, pcb_fsbase));
 ASSYM(PCB_GSBASE, offsetof(struct pcb, pcb_gsbase));
+ASSYM(PCB_KGSBASE, offsetof(struct pcb, pcb_kgsbase));
+ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
+ASSYM(PCB_CR0, offsetof(struct pcb, pcb_cr0));
+ASSYM(PCB_CR2, offsetof(struct pcb, pcb_cr2));
+ASSYM(PCB_CR3, offsetof(struct pcb, pcb_cr3));
+ASSYM(PCB_CR4, offsetof(struct pcb, pcb_cr4));
 ASSYM(PCB_DR0, offsetof(struct pcb, pcb_dr0));
 ASSYM(PCB_DR1, offsetof(struct pcb, pcb_dr1));
 ASSYM(PCB_DR2, offsetof(struct pcb, pcb_dr2));
 ASSYM(PCB_DR3, offsetof(struct pcb, pcb_dr3));
 ASSYM(PCB_DR6, offsetof(struct pcb, pcb_dr6));
 ASSYM(PCB_DR7, offsetof(struct pcb, pcb_dr7));
-ASSYM(PCB_USERFPU, offsetof(struct pcb, pcb_user_save));
+ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
+ASSYM(PCB_GS32SD, offsetof(struct pcb, pcb_gs32sd));
 ASSYM(PCB_TSSP, offsetof(struct pcb, pcb_tssp));
+ASSYM(PCB_SAVEFPU, offsetof(struct pcb, pcb_save));
+ASSYM(PCB_SAVEFPU_SIZE, sizeof(struct savefpu));
 ASSYM(PCB_FULL_IRET, offsetof(struct pcb, pcb_full_iret));
+ASSYM(PCB_GDT, offsetof(struct pcb, pcb_gdt));
+ASSYM(PCB_IDT, offsetof(struct pcb, pcb_idt));
+ASSYM(PCB_LDT, offsetof(struct pcb, pcb_ldt));
+ASSYM(PCB_TR, offsetof(struct pcb, pcb_tr));
+ASSYM(PCB_USERFPU, offsetof(struct pcb, pcb_user_save));
+ASSYM(PCB_SIZE, sizeof(struct pcb));
 ASSYM(PCB_DBREGS, PCB_DBREGS);
 ASSYM(PCB_32BIT, PCB_32BIT);
 ASSYM(PCB_GS32BIT, PCB_GS32BIT);
 ASSYM(PCB_FULLCTX, PCB_FULLCTX);
 
-ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
-ASSYM(PCB_SAVEFPU, offsetof(struct pcb, pcb_save));
-ASSYM(PCB_SAVEFPU_SIZE, sizeof(struct savefpu));
-ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
-ASSYM(PCB_GS32SD, offsetof(struct pcb, pcb_gs32sd));
-
-ASSYM(PCB_SIZE, sizeof(struct pcb));
-
-ASSYM(XPCB_PCB, offsetof(struct xpcb, xpcb_pcb));
-ASSYM(XPCB_CR0, offsetof(struct xpcb, xpcb_cr0));
-ASSYM(XPCB_CR2, offsetof(struct xpcb, xpcb_cr2));
-ASSYM(XPCB_CR4, offsetof(struct xpcb, xpcb_cr4));
-ASSYM(XPCB_KGSBASE, offsetof(struct xpcb, xpcb_kgsbase));
-ASSYM(XPCB_GDT, offsetof(struct xpcb, xpcb_gdt));
-ASSYM(XPCB_IDT, offsetof(struct xpcb, xpcb_idt));
-ASSYM(XPCB_LDT, offsetof(struct xpcb, xpcb_ldt));
-ASSYM(XPCB_TR, offsetof(struct xpcb, xpcb_tr));
-
-ASSYM(XPCB_SIZE, sizeof(struct xpcb));
-
 ASSYM(COMMON_TSS_RSP0, offsetof(struct amd64tss, tss_rsp0));
 
 ASSYM(TF_R15, offsetof(struct trapframe, tf_r15));

Modified: head/sys/amd64/amd64/mp_machdep.c
==============================================================================
--- head/sys/amd64/amd64/mp_machdep.c	Mon Aug  2 17:31:48 2010	(r210776)
+++ head/sys/amd64/amd64/mp_machdep.c	Mon Aug  2 17:35:00 2010	(r210777)
@@ -100,7 +100,7 @@ char *nmi_stack;
 void *dpcpu;
 
 struct pcb stoppcbs[MAXCPU];
-struct xpcb **stopxpcbs = NULL;
+struct pcb **susppcbs = NULL;
 
 /* Variables needed for SMP tlb shootdown. */
 vm_offset_t smp_tlb_addr1;
@@ -1336,7 +1336,7 @@ cpususpend_handler(void)
 	rf = intr_disable();
 	cr3 = rcr3();
 
-	if (savectx2(stopxpcbs[cpu])) {
+	if (savectx(susppcbs[cpu])) {
 		wbinvd();
 		atomic_set_int(&stopped_cpus, cpumask);
 	}

Modified: head/sys/amd64/include/pcb.h
==============================================================================
--- head/sys/amd64/include/pcb.h	Mon Aug  2 17:31:48 2010	(r210776)
+++ head/sys/amd64/include/pcb.h	Mon Aug  2 17:35:00 2010	(r210777)
@@ -44,7 +44,6 @@
 #include 
 
 struct pcb {
-	register_t	pcb_cr3;
 	register_t	pcb_r15;
 	register_t	pcb_r14;
 	register_t	pcb_r13;
@@ -55,6 +54,7 @@ struct pcb {
 	register_t	pcb_rip;
 	register_t	pcb_fsbase;
 	register_t	pcb_gsbase;
+	register_t	pcb_kgsbase;
 	u_long		pcb_flags;
 #define	PCB_DBREGS	0x02	/* process using debug registers */
 #define	PCB_KERNFPU	0x04	/* kernel uses fpu */
@@ -64,44 +64,41 @@ struct pcb {
 #define	PCB_32BIT	0x40	/* process has 32 bit context (segs etc) */
 #define	PCB_FULLCTX	0x80	/* full context restore on sysret */
 
-	u_int64_t	pcb_dr0;
-	u_int64_t	pcb_dr1;
-	u_int64_t	pcb_dr2;
-	u_int64_t	pcb_dr3;
-	u_int64_t	pcb_dr6;
-	u_int64_t	pcb_dr7;
+	register_t	pcb_cr0;
+	register_t	pcb_cr2;
+	register_t	pcb_cr3;
+	register_t	pcb_cr4;
+	register_t	pcb_dr0;
+	register_t	pcb_dr1;
+	register_t	pcb_dr2;
+	register_t	pcb_dr3;
+	register_t	pcb_dr6;
+	register_t	pcb_dr7;
 
-	struct	savefpu pcb_user_save;
 	uint16_t	pcb_initial_fpucw;
 
 	caddr_t		pcb_onfault; /* copyin/out fault recovery */
 
 	/* 32-bit segment descriptor */
-	struct user_segment_descriptor	pcb_gs32sd;
+	struct user_segment_descriptor pcb_gs32sd;
 	/* local tss, with i/o bitmap; NULL for common */
 	struct amd64tss *pcb_tssp;
 	struct	savefpu	*pcb_save;
 	char		pcb_full_iret;
-};
 
-struct xpcb {
-	struct pcb	xpcb_pcb;
-	register_t	xpcb_cr0;
-	register_t	xpcb_cr2;
-	register_t	xpcb_cr4;
-	register_t	xpcb_kgsbase;
-	struct region_descriptor xpcb_gdt;
-	struct region_descriptor xpcb_idt;
-	struct region_descriptor xpcb_ldt;
-	uint16_t	xpcb_tr;
+	struct region_descriptor pcb_gdt;
+	struct region_descriptor pcb_idt;
+	struct region_descriptor pcb_ldt;
+	uint16_t	pcb_tr;
+
+	struct	savefpu pcb_user_save;
 };
 
 #ifdef _KERNEL
 struct trapframe;
 
 void	makectx(struct trapframe *, struct pcb *);
-void	savectx(struct pcb *);
-int	savectx2(struct xpcb *);
+int	savectx(struct pcb *);
 #endif
 
 #endif /* _AMD64_PCB_H_ */

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 17:40:25 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DE9F81065675;
	Mon,  2 Aug 2010 17:40:25 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CD44A8FC12;
	Mon,  2 Aug 2010 17:40:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72HeP0N091151;
	Mon, 2 Aug 2010 17:40:25 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72HePPf091149;
	Mon, 2 Aug 2010 17:40:25 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008021740.o72HePPf091149@svn.freebsd.org>
From: Jung-uk Kim 
Date: Mon, 2 Aug 2010 17:40:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210778 - head/gnu/usr.bin/gdb/kgdb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 17:40:26 -0000

Author: jkim
Date: Mon Aug  2 17:40:25 2010
New Revision: 210778
URL: http://svn.freebsd.org/changeset/base/210778

Log:
  Give kgdb(1) a chance to take a look at FPU state.

Modified:
  head/gnu/usr.bin/gdb/kgdb/trgt_amd64.c

Modified: head/gnu/usr.bin/gdb/kgdb/trgt_amd64.c
==============================================================================
--- head/gnu/usr.bin/gdb/kgdb/trgt_amd64.c	Mon Aug  2 17:35:00 2010	(r210777)
+++ head/gnu/usr.bin/gdb/kgdb/trgt_amd64.c	Mon Aug  2 17:40:25 2010	(r210778)
@@ -66,6 +66,7 @@ kgdb_trgt_fetch_registers(int regno __un
 	supply_register(AMD64_R8_REGNUM + 6, (char *)&pcb.pcb_r14);
 	supply_register(AMD64_R15_REGNUM, (char *)&pcb.pcb_r15);
 	supply_register(AMD64_RIP_REGNUM, (char *)&pcb.pcb_rip);
+	amd64_supply_fxsave(current_regcache, -1, &pcb.pcb_user_save);
 }
 
 void

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 18:06:49 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 71ABE106566B;
	Mon,  2 Aug 2010 18:06:49 +0000 (UTC) (envelope-from bcr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 609AB8FC21;
	Mon,  2 Aug 2010 18:06:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72I6nvg097074;
	Mon, 2 Aug 2010 18:06:49 GMT (envelope-from bcr@svn.freebsd.org)
Received: (from bcr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72I6np5097071;
	Mon, 2 Aug 2010 18:06:49 GMT (envelope-from bcr@svn.freebsd.org)
Message-Id: <201008021806.o72I6np5097071@svn.freebsd.org>
From: Benedict Reuschling 
Date: Mon, 2 Aug 2010 18:06:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210779 - in head/sys/cam: . scsi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 18:06:49 -0000

Author: bcr (doc committer)
Date: Mon Aug  2 18:06:49 2010
New Revision: 210779
URL: http://svn.freebsd.org/changeset/base/210779

Log:
  Fix two (very common) occurrences of s/sytem/system in comments.
  
  Approved by:    mav
  MFC after:      3 days

Modified:
  head/sys/cam/cam.c
  head/sys/cam/scsi/scsi_target.c

Modified: head/sys/cam/cam.c
==============================================================================
--- head/sys/cam/cam.c	Mon Aug  2 17:40:25 2010	(r210778)
+++ head/sys/cam/cam.c	Mon Aug  2 18:06:49 2010	(r210779)
@@ -59,7 +59,7 @@ const struct cam_status_entry cam_status
 	{ CAM_REQ_ABORTED,	 "CCB request aborted by the host"	     },
 	{ CAM_UA_ABORT,		 "Unable to abort CCB request"		     },
 	{ CAM_REQ_CMP_ERR,	 "CCB request completed with an error"	     },
-	{ CAM_BUSY,		 "CAM subsytem is busy"			     },
+	{ CAM_BUSY,		 "CAM subsystem is busy"		     },
 	{ CAM_REQ_INVALID,	 "CCB request was invalid"		     },
 	{ CAM_PATH_INVALID,	 "Supplied Path ID is invalid"		     },
 	{ CAM_DEV_NOT_THERE,	 "Device Not Present"			     },

Modified: head/sys/cam/scsi/scsi_target.c
==============================================================================
--- head/sys/cam/scsi/scsi_target.c	Mon Aug  2 17:40:25 2010	(r210778)
+++ head/sys/cam/scsi/scsi_target.c	Mon Aug  2 18:06:49 2010	(r210779)
@@ -1174,7 +1174,7 @@ targcamstatus(cam_status status)
 		return (EINVAL);
 	case CAM_RESRC_UNAVAIL:	/* Resource Unavailable */
 		return (ENOMEM);
-	case CAM_BUSY:		/* CAM subsytem is busy */
+	case CAM_BUSY:		/* CAM subsystem is busy */
 	case CAM_UA_ABORT:	/* Unable to abort CCB request */
 		return (EBUSY);
 	default:

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 18:12:30 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EBBDD106566B;
	Mon,  2 Aug 2010 18:12:30 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BFCF88FC0C;
	Mon,  2 Aug 2010 18:12:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72ICUf2098367;
	Mon, 2 Aug 2010 18:12:30 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72ICUjP098364;
	Mon, 2 Aug 2010 18:12:30 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008021812.o72ICUjP098364@svn.freebsd.org>
From: Jung-uk Kim 
Date: Mon, 2 Aug 2010 18:12:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210780 - in head/sys/amd64: amd64 include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 18:12:31 -0000

Author: jkim
Date: Mon Aug  2 18:12:30 2010
New Revision: 210780
URL: http://svn.freebsd.org/changeset/base/210780

Log:
  Rearrange struct pcb.  r177532 (CVS r1.64 of pcb.h) moved pcb_flags to make
  better use of cache lines by placing it before pcb_save (now pcb_user_save),
  which is moved to the end of pcb since r210777.

Modified:
  head/sys/amd64/amd64/genassym.c
  head/sys/amd64/include/pcb.h

Modified: head/sys/amd64/amd64/genassym.c
==============================================================================
--- head/sys/amd64/amd64/genassym.c	Mon Aug  2 18:06:49 2010	(r210779)
+++ head/sys/amd64/amd64/genassym.c	Mon Aug  2 18:12:30 2010	(r210780)
@@ -135,7 +135,6 @@ ASSYM(PCB_RIP, offsetof(struct pcb, pcb_
 ASSYM(PCB_FSBASE, offsetof(struct pcb, pcb_fsbase));
 ASSYM(PCB_GSBASE, offsetof(struct pcb, pcb_gsbase));
 ASSYM(PCB_KGSBASE, offsetof(struct pcb, pcb_kgsbase));
-ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
 ASSYM(PCB_CR0, offsetof(struct pcb, pcb_cr0));
 ASSYM(PCB_CR2, offsetof(struct pcb, pcb_cr2));
 ASSYM(PCB_CR3, offsetof(struct pcb, pcb_cr3));
@@ -146,6 +145,7 @@ ASSYM(PCB_DR2, offsetof(struct pcb, pcb_
 ASSYM(PCB_DR3, offsetof(struct pcb, pcb_dr3));
 ASSYM(PCB_DR6, offsetof(struct pcb, pcb_dr6));
 ASSYM(PCB_DR7, offsetof(struct pcb, pcb_dr7));
+ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
 ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
 ASSYM(PCB_GS32SD, offsetof(struct pcb, pcb_gs32sd));
 ASSYM(PCB_TSSP, offsetof(struct pcb, pcb_tssp));

Modified: head/sys/amd64/include/pcb.h
==============================================================================
--- head/sys/amd64/include/pcb.h	Mon Aug  2 18:06:49 2010	(r210779)
+++ head/sys/amd64/include/pcb.h	Mon Aug  2 18:12:30 2010	(r210780)
@@ -55,15 +55,6 @@ struct pcb {
 	register_t	pcb_fsbase;
 	register_t	pcb_gsbase;
 	register_t	pcb_kgsbase;
-	u_long		pcb_flags;
-#define	PCB_DBREGS	0x02	/* process using debug registers */
-#define	PCB_KERNFPU	0x04	/* kernel uses fpu */
-#define	PCB_FPUINITDONE	0x08	/* fpu state is initialized */
-#define	PCB_USERFPUINITDONE 0x10 /* fpu user state is initialized */
-#define	PCB_GS32BIT	0x20	/* linux gs switch */
-#define	PCB_32BIT	0x40	/* process has 32 bit context (segs etc) */
-#define	PCB_FULLCTX	0x80	/* full context restore on sysret */
-
 	register_t	pcb_cr0;
 	register_t	pcb_cr2;
 	register_t	pcb_cr3;
@@ -75,6 +66,15 @@ struct pcb {
 	register_t	pcb_dr6;
 	register_t	pcb_dr7;
 
+	u_long		pcb_flags;
+#define	PCB_DBREGS	0x02	/* process using debug registers */
+#define	PCB_KERNFPU	0x04	/* kernel uses fpu */
+#define	PCB_FPUINITDONE	0x08	/* fpu state is initialized */
+#define	PCB_USERFPUINITDONE 0x10 /* fpu user state is initialized */
+#define	PCB_GS32BIT	0x20	/* linux gs switch */
+#define	PCB_32BIT	0x40	/* process has 32 bit context (segs etc) */
+#define	PCB_FULLCTX	0x80	/* full context restore on sysret */
+
 	uint16_t	pcb_initial_fpucw;
 
 	caddr_t		pcb_onfault; /* copyin/out fault recovery */

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 19:56:07 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 566BF1065679;
	Mon,  2 Aug 2010 19:56:07 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 44F1F8FC22;
	Mon,  2 Aug 2010 19:56:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72Ju7re021473;
	Mon, 2 Aug 2010 19:56:07 GMT (envelope-from gnn@svn.freebsd.org)
Received: (from gnn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72Ju7SK021471;
	Mon, 2 Aug 2010 19:56:07 GMT (envelope-from gnn@svn.freebsd.org)
Message-Id: <201008021956.o72Ju7SK021471@svn.freebsd.org>
From: "George V. Neville-Neil" 
Date: Mon, 2 Aug 2010 19:56:07 +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: r210781 - stable/8/sys/dev/e1000
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 19:56:07 -0000

Author: gnn
Date: Mon Aug  2 19:56:07 2010
New Revision: 210781
URL: http://svn.freebsd.org/changeset/base/210781

Log:
  MFC: 210428
  
  Fix a bug in the statistics code for tracking the head and
  tail pointers of the tx and rx queues.   We needed a SYSCTL_PROC
  to correctly get the values at run time.
  
  Submitted by: Andrew Boyer aboyer at averesystems.com

Modified:
  stable/8/sys/dev/e1000/if_igb.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/e1000/if_igb.c
==============================================================================
--- stable/8/sys/dev/e1000/if_igb.c	Mon Aug  2 18:12:30 2010	(r210780)
+++ stable/8/sys/dev/e1000/if_igb.c	Mon Aug  2 19:56:07 2010	(r210781)
@@ -4817,6 +4817,78 @@ igb_update_stats_counters(struct adapter
 }
 
 
+/** igb_sysctl_tdh_handler - Handler function
+ *  Retrieves the TDH value from the hardware
+ */
+static int 
+igb_sysctl_tdh_handler(SYSCTL_HANDLER_ARGS)
+{
+	int error;
+
+	struct tx_ring *txr = ((struct tx_ring *)oidp->oid_arg1);
+	if (!txr) return 0;
+
+	unsigned val = E1000_READ_REG(&txr->adapter->hw, E1000_TDH(txr->me));
+	error = sysctl_handle_int(oidp, &val, 0, req);
+	if (error || !req->newptr)
+		return error;
+	return 0;
+}
+
+/** igb_sysctl_tdt_handler - Handler function
+ *  Retrieves the TDT value from the hardware
+ */
+static int 
+igb_sysctl_tdt_handler(SYSCTL_HANDLER_ARGS)
+{
+	int error;
+
+	struct tx_ring *txr = ((struct tx_ring *)oidp->oid_arg1);
+	if (!txr) return 0;
+
+	unsigned val = E1000_READ_REG(&txr->adapter->hw, E1000_TDT(txr->me));
+	error = sysctl_handle_int(oidp, &val, 0, req);
+	if (error || !req->newptr)
+		return error;
+	return 0;
+}
+
+/** igb_sysctl_rdh_handler - Handler function
+ *  Retrieves the RDH value from the hardware
+ */
+static int 
+igb_sysctl_rdh_handler(SYSCTL_HANDLER_ARGS)
+{
+	int error;
+
+	struct rx_ring *rxr = ((struct rx_ring *)oidp->oid_arg1);
+	if (!rxr) return 0;
+
+	unsigned val = E1000_READ_REG(&rxr->adapter->hw, E1000_RDH(rxr->me));
+	error = sysctl_handle_int(oidp, &val, 0, req);
+	if (error || !req->newptr)
+		return error;
+	return 0;
+}
+
+/** igb_sysctl_rdt_handler - Handler function
+ *  Retrieves the RDT value from the hardware
+ */
+static int 
+igb_sysctl_rdt_handler(SYSCTL_HANDLER_ARGS)
+{
+	int error;
+
+	struct rx_ring *rxr = ((struct rx_ring *)oidp->oid_arg1);
+	if (!rxr) return 0;
+
+	unsigned val = E1000_READ_REG(&rxr->adapter->hw, E1000_RDT(rxr->me));
+	error = sysctl_handle_int(oidp, &val, 0, req);
+	if (error || !req->newptr)
+		return error;
+	return 0;
+}
+
 /*
  * Add sysctl variables, one per statistic, to the system.
  */
@@ -4882,12 +4954,14 @@ igb_add_hw_stats(struct adapter *adapter
 					    CTLFLAG_RD, NULL, "Queue Name");
 		queue_list = SYSCTL_CHILDREN(queue_node);
 
-		SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "txd_head",
-				CTLFLAG_RD, &txr->tdh, 0,
-				"Transmit Descriptor Head");
-		SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "txd_tail",
-				CTLFLAG_RD, &txr->tdt, 0,
-				"Transmit Descriptor Tail");
+		SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", 
+				CTLFLAG_RD, txr, sizeof(txr),
+				igb_sysctl_tdh_handler, "IU",
+ 				"Transmit Descriptor Head");
+		SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_tail", 
+				CTLFLAG_RD, txr, sizeof(txr),
+				igb_sysctl_tdt_handler, "IU",
+ 				"Transmit Descriptor Tail");
 		SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "no_desc_avail", 
 				CTLFLAG_RD, &txr->no_desc_avail,
 				"Queue No Descriptor Available");
@@ -4904,11 +4978,13 @@ igb_add_hw_stats(struct adapter *adapter
 					    CTLFLAG_RD, NULL, "Queue Name");
 		queue_list = SYSCTL_CHILDREN(queue_node);
 
-		SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "rxd_head",
-				CTLFLAG_RD, &rxr->rdh, 0,
+		SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", 
+				CTLFLAG_RD, rxr, sizeof(rxr),
+				igb_sysctl_rdh_handler, "IU",
 				"Receive Descriptor Head");
-		SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "rxd_tail",
-				CTLFLAG_RD, &rxr->rdt, 0,
+		SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_tail", 
+				CTLFLAG_RD, rxr, sizeof(rxr),
+				igb_sysctl_rdt_handler, "IU",
 				"Receive Descriptor Tail");
 		SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "rx_packets",
 				CTLFLAG_RD, &rxr->rx_packets,

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 21:33:39 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1115F106566C;
	Mon,  2 Aug 2010 21:33:39 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DB0458FC0A;
	Mon,  2 Aug 2010 21:33:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72LXcmu043283;
	Mon, 2 Aug 2010 21:33:38 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72LXcvH043281;
	Mon, 2 Aug 2010 21:33:38 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201008022133.o72LXcvH043281@svn.freebsd.org>
From: Alan Cox 
Date: Mon, 2 Aug 2010 21:33:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210782 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 21:33:39 -0000

Author: alc
Date: Mon Aug  2 21:33:36 2010
New Revision: 210782
URL: http://svn.freebsd.org/changeset/base/210782

Log:
  Update the "desiredvnodes" calculation.  In particular, make the part of
  the calculation that is based on the kernel's heap size more conservative.
  Hopefully, this will eliminate the need for MAXVNODES_MAX, but for the
  time being set MAXVNODES_MAX to a large value.
  
  Reviewed by:	jhb@
  MFC after:	6 weeks

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Mon Aug  2 19:56:07 2010	(r210781)
+++ head/sys/kern/vfs_subr.c	Mon Aug  2 21:33:36 2010	(r210782)
@@ -282,23 +282,34 @@ SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhe
 
 /*
  * Initialize the vnode management data structures.
+ *
+ * Reevaluate the following cap on the number of vnodes after the physical
+ * memory size exceeds 512GB.  In the limit, as the physical memory size
+ * grows, the ratio of physical pages to vnodes approaches sixteen to one.
  */
 #ifndef	MAXVNODES_MAX
-#define	MAXVNODES_MAX	100000
+#define	MAXVNODES_MAX	(512 * (1024 * 1024 * 1024 / PAGE_SIZE / 16))
 #endif
 static void
 vntblinit(void *dummy __unused)
 {
+	int physvnodes, virtvnodes;
 
 	/*
-	 * Desiredvnodes is a function of the physical memory size and
-	 * the kernel's heap size.  Specifically, desiredvnodes scales
-	 * in proportion to the physical memory size until two fifths
-	 * of the kernel's heap size is consumed by vnodes and vm
-	 * objects.
-	 */
-	desiredvnodes = min(maxproc + cnt.v_page_count / 4, 2 * vm_kmem_size /
-	    (5 * (sizeof(struct vm_object) + sizeof(struct vnode))));
+	 * Desiredvnodes is a function of the physical memory size and the
+	 * kernel's heap size.  Generally speaking, it scales with the
+	 * physical memory size.  The ratio of desiredvnodes to physical pages
+	 * is one to four until desiredvnodes exceeds 98,304.  Thereafter, the
+	 * marginal ratio of desiredvnodes to physical pages is one to
+	 * sixteen.  However, desiredvnodes is limited by the kernel's heap
+	 * size.  The memory required by desiredvnodes vnodes and vm objects
+	 * may not exceed one seventh of the kernel's heap size.
+	 */
+	physvnodes = maxproc + cnt.v_page_count / 16 + 3 * min(98304 * 4,
+	    cnt.v_page_count) / 16;
+	virtvnodes = vm_kmem_size / (7 * (sizeof(struct vm_object) +
+	    sizeof(struct vnode)));
+	desiredvnodes = min(physvnodes, virtvnodes);
 	if (desiredvnodes > MAXVNODES_MAX) {
 		if (bootverbose)
 			printf("Reducing kern.maxvnodes %d -> %d\n",

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 22:26:08 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CD2CC106566B;
	Mon,  2 Aug 2010 22:26:08 +0000 (UTC)
	(envelope-from emax@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BD5BD8FC08;
	Mon,  2 Aug 2010 22:26:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72MQ8YA054925;
	Mon, 2 Aug 2010 22:26:08 GMT (envelope-from emax@svn.freebsd.org)
Received: (from emax@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72MQ8Qg054923;
	Mon, 2 Aug 2010 22:26:08 GMT (envelope-from emax@svn.freebsd.org)
Message-Id: <201008022226.o72MQ8Qg054923@svn.freebsd.org>
From: Maksim Yevmenkin 
Date: Mon, 2 Aug 2010 22:26:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210783 - head/sys/netgraph/bluetooth/l2cap
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 22:26:08 -0000

Author: emax
Date: Mon Aug  2 22:26:08 2010
New Revision: 210783
URL: http://svn.freebsd.org/changeset/base/210783

Log:
  Fix typo
  
  PR:	kern/140590
  MFC after:	3 days

Modified:
  head/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h

Modified: head/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h
==============================================================================
--- head/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h	Mon Aug  2 21:33:36 2010	(r210782)
+++ head/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h	Mon Aug  2 22:26:08 2010	(r210783)
@@ -379,7 +379,7 @@ do {									\
 		break;							\
 									\
 	c = mtod((_m), struct _info_rsp *);				\
-	c->hdr.code = NG_L2CAP_INFO_REQ;				\
+	c->hdr.code = NG_L2CAP_INFO_RSP;				\
 	c->hdr.ident = (_ident);					\
 	c->hdr.length = sizeof(c->param);				\
 									\

From owner-svn-src-all@FreeBSD.ORG  Mon Aug  2 23:57:50 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D19C91065672;
	Mon,  2 Aug 2010 23:57: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 C07558FC12;
	Mon,  2 Aug 2010 23:57:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72NvoYd075017;
	Mon, 2 Aug 2010 23:57:50 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72NvogG075015;
	Mon, 2 Aug 2010 23:57:50 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008022357.o72NvogG075015@svn.freebsd.org>
From: Rick Macklem 
Date: Mon, 2 Aug 2010 23:57:50 +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: r210784 - stable/8/sys/fs/nfs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 02 Aug 2010 23:57:50 -0000

Author: rmacklem
Date: Mon Aug  2 23:57:50 2010
New Revision: 210784
URL: http://svn.freebsd.org/changeset/base/210784

Log:
  MFC: r210268
  For the experimental NFSv4 server's dumplocks operation, add the
  MPSAFE flag to cn_flags so that it doesn't panic. The panics weren't
  seen since nfsdumpstate(8) is broken for the "-l" case, so this
  was never done. I'll do a separate commit to fix nfsdumpstate(8).

Modified:
  stable/8/sys/fs/nfs/nfs_commonport.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/fs/nfs/nfs_commonport.c
==============================================================================
--- stable/8/sys/fs/nfs/nfs_commonport.c	Mon Aug  2 22:26:08 2010	(r210783)
+++ stable/8/sys/fs/nfs/nfs_commonport.c	Mon Aug  2 23:57:50 2010	(r210784)
@@ -210,7 +210,8 @@ nfsrv_lookupfilename(struct nameidata *n
 {
 	int error;
 
-	NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, fname, p);
+	NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF | MPSAFE, UIO_USERSPACE, fname,
+	    p);
 	error = namei(ndp);
 	if (!error) {
 		NDFREE(ndp, NDF_ONLY_PNBUF);

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 01:49:28 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 91484106566B;
	Tue,  3 Aug 2010 01:49:28 +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 7FBAA8FC0C;
	Tue,  3 Aug 2010 01:49:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o731nSNW099745;
	Tue, 3 Aug 2010 01:49:28 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o731nSMJ099741;
	Tue, 3 Aug 2010 01:49:28 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008030149.o731nSMJ099741@svn.freebsd.org>
From: Rick Macklem 
Date: Tue, 3 Aug 2010 01:49:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210786 - in head/sys/fs: nfs nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 01:49:28 -0000

Author: rmacklem
Date: Tue Aug  3 01:49:28 2010
New Revision: 210786
URL: http://svn.freebsd.org/changeset/base/210786

Log:
  Modify the return value for nfscl_mustflush() from boolean_t,
  which I mistakenly thought was correct w.r.t. style(9), back
  to int and add the checks for != 0. This is just a stylistic
  modification.
  
  MFC after:	1 week

Modified:
  head/sys/fs/nfs/nfs_var.h
  head/sys/fs/nfsclient/nfs_clstate.c
  head/sys/fs/nfsclient/nfs_clsubs.c
  head/sys/fs/nfsclient/nfs_clvnops.c

Modified: head/sys/fs/nfs/nfs_var.h
==============================================================================
--- head/sys/fs/nfs/nfs_var.h	Tue Aug  3 00:26:17 2010	(r210785)
+++ head/sys/fs/nfs/nfs_var.h	Tue Aug  3 01:49:28 2010	(r210786)
@@ -467,7 +467,7 @@ void nfscl_docb(struct nfsrv_descript *,
 void nfscl_releasealllocks(struct nfsclclient *, vnode_t, NFSPROC_T *);
 int nfscl_lockt(vnode_t, struct nfsclclient *, u_int64_t,
     u_int64_t, struct flock *, NFSPROC_T *);
-boolean_t nfscl_mustflush(vnode_t);
+int nfscl_mustflush(vnode_t);
 int nfscl_nodeleg(vnode_t, int);
 int nfscl_removedeleg(vnode_t, NFSPROC_T *, nfsv4stateid_t *);
 int nfscl_getref(struct nfsmount *);

Modified: head/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clstate.c	Tue Aug  3 00:26:17 2010	(r210785)
+++ head/sys/fs/nfsclient/nfs_clstate.c	Tue Aug  3 01:49:28 2010	(r210786)
@@ -3735,7 +3735,7 @@ nfscl_tryclose(struct nfsclopen *op, str
  * to the server. This might be a big performance win in some environments.
  * (Not useful until the client does caching on local stable storage.)
  */
-APPLESTATIC boolean_t
+APPLESTATIC int
 nfscl_mustflush(vnode_t vp)
 {
 	struct nfsclclient *clp;
@@ -3746,12 +3746,12 @@ nfscl_mustflush(vnode_t vp)
 	np = VTONFS(vp);
 	nmp = VFSTONFS(vnode_mount(vp));
 	if (!NFSHASNFSV4(nmp))
-		return (TRUE);
+		return (1);
 	NFSLOCKCLSTATE();
 	clp = nfscl_findcl(nmp);
 	if (clp == NULL) {
 		NFSUNLOCKCLSTATE();
-		return (TRUE);
+		return (1);
 	}
 	dp = nfscl_finddeleg(clp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len);
 	if (dp != NULL && (dp->nfsdl_flags & (NFSCLDL_WRITE | NFSCLDL_RECALL))
@@ -3759,10 +3759,10 @@ nfscl_mustflush(vnode_t vp)
 	    (dp->nfsdl_sizelimit >= np->n_size ||
 	     !NFSHASSTRICT3530(nmp))) {
 		NFSUNLOCKCLSTATE();
-		return (FALSE);
+		return (0);
 	}
 	NFSUNLOCKCLSTATE();
-	return (TRUE);
+	return (1);
 }
 
 /*

Modified: head/sys/fs/nfsclient/nfs_clsubs.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clsubs.c	Tue Aug  3 00:26:17 2010	(r210785)
+++ head/sys/fs/nfsclient/nfs_clsubs.c	Tue Aug  3 01:49:28 2010	(r210786)
@@ -187,8 +187,7 @@ ncl_getattrcache(struct vnode *vp, struc
 	struct nfsnode *np;
 	struct vattr *vap;
 	struct nfsmount *nmp;
-	int timeo;
-	boolean_t mustflush;
+	int timeo, mustflush;
 	
 	np = VTONFS(vp);
 	vap = &np->n_vattr.na_vattr;
@@ -230,7 +229,7 @@ ncl_getattrcache(struct vnode *vp, struc
 #endif
 
 	if ((time_second - np->n_attrstamp) >= timeo &&
-	    (mustflush || np->n_attrstamp == 0)) {
+	    (mustflush != 0 || np->n_attrstamp == 0)) {
 		newnfsstats.attrcache_misses++;
 		mtx_unlock(&np->n_mtx);
 #ifdef NFS_ACDEBUG

Modified: head/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clvnops.c	Tue Aug  3 00:26:17 2010	(r210785)
+++ head/sys/fs/nfsclient/nfs_clvnops.c	Tue Aug  3 01:49:28 2010	(r210786)
@@ -495,7 +495,8 @@ nfs_open(struct vop_open_args *ap)
 	 * Now, if this Open will be doing reading, re-validate/flush the
 	 * cache, so that Close/Open coherency is maintained.
 	 */
-	if ((fmode & FREAD) && (!NFS_ISV4(vp) || nfscl_mustflush(vp))) {
+	if ((fmode & FREAD) != 0 &&
+	    (!NFS_ISV4(vp) || nfscl_mustflush(vp) != 0)) {
 		mtx_lock(&np->n_mtx);
 		if (np->n_flag & NMODIFIED) {
 			mtx_unlock(&np->n_mtx);			
@@ -667,7 +668,7 @@ nfs_close(struct vop_close_args *ap)
 		    error = ncl_flush(vp, MNT_WAIT, cred, ap->a_td, cm, 0);
 		    /* np->n_flag &= ~NMODIFIED; */
 		} else if (NFS_ISV4(vp)) { 
-			if (nfscl_mustflush(vp)) {
+			if (nfscl_mustflush(vp) != 0) {
 				int cm = newnfs_commit_on_close ? 1 : 0;
 				error = ncl_flush(vp, MNT_WAIT, cred, ap->a_td,
 				    cm, 0);
@@ -709,7 +710,7 @@ nfs_close(struct vop_close_args *ap)
 		/*
 		 * Get attributes so "change" is up to date.
 		 */
-		if (error == 0 && nfscl_mustflush(vp)) {
+		if (error == 0 && nfscl_mustflush(vp) != 0) {
 			ret = nfsrpc_getattr(vp, cred, ap->a_td, &nfsva,
 			    NULL);
 			if (!ret) {

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 03:19:57 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AFB2D106566B;
	Tue,  3 Aug 2010 03:19:57 +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 9D5168FC17;
	Tue,  3 Aug 2010 03:19:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o733JvTA020156;
	Tue, 3 Aug 2010 03:19:57 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o733JvsJ020155;
	Tue, 3 Aug 2010 03:19:57 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008030319.o733JvsJ020155@svn.freebsd.org>
From: Rick Macklem 
Date: Tue, 3 Aug 2010 03:19:57 +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: r210787 - stable/8/usr.sbin/nfsdumpstate
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 03:19:57 -0000

Author: rmacklem
Date: Tue Aug  3 03:19:57 2010
New Revision: 210787
URL: http://svn.freebsd.org/changeset/base/210787

Log:
  MFC: r210272
  Fix handling of the "-l" argument for nfsdumpstate(8).

Modified:
  stable/8/usr.sbin/nfsdumpstate/nfsdumpstate.c
Directory Properties:
  stable/8/usr.sbin/nfsdumpstate/   (props changed)

Modified: stable/8/usr.sbin/nfsdumpstate/nfsdumpstate.c
==============================================================================
--- stable/8/usr.sbin/nfsdumpstate/nfsdumpstate.c	Tue Aug  3 01:49:28 2010	(r210786)
+++ stable/8/usr.sbin/nfsdumpstate/nfsdumpstate.c	Tue Aug  3 03:19:57 2010	(r210787)
@@ -76,7 +76,7 @@ main(int argc, char **argv)
 		errx(1, "nfsd not loaded - self terminating");
 	openstate = 0;
 	lockfile = NULL;
-	while ((ch = getopt(argc, argv, "ol")) != -1)
+	while ((ch = getopt(argc, argv, "ol:")) != -1)
 		switch (ch) {
 		case 'o':
 			openstate = 1;

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 09:10:49 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 17D1C1065674;
	Tue,  3 Aug 2010 09:10:49 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0732C8FC13;
	Tue,  3 Aug 2010 09:10:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o739AmO5097739;
	Tue, 3 Aug 2010 09:10:48 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o739AmGB097737;
	Tue, 3 Aug 2010 09:10:48 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201008030910.o739AmGB097737@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Tue, 3 Aug 2010 09:10:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210792 - head/sys/geom/part
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 09:10:49 -0000

Author: ae
Date: Tue Aug  3 09:10:48 2010
New Revision: 210792
URL: http://svn.freebsd.org/changeset/base/210792

Log:
  Check that table is not NULL before access, it can be NULL
  for some cases.
  
  Approved by:	mav (mentor)
  MFC after:	2 weeks

Modified:
  head/sys/geom/part/g_part.c

Modified: head/sys/geom/part/g_part.c
==============================================================================
--- head/sys/geom/part/g_part.c	Tue Aug  3 09:05:03 2010	(r210791)
+++ head/sys/geom/part/g_part.c	Tue Aug  3 09:10:48 2010	(r210792)
@@ -1748,7 +1748,7 @@ g_part_orphan(struct g_consumer *cp)
 
 	KASSERT(pp->error != 0, (__func__));
 	table = cp->geom->softc;
-	if (table->gpt_opened)
+	if (table != NULL && table->gpt_opened)
 		g_access(cp, -1, -1, -1);
 	g_part_wither(cp->geom, pp->error);
 }

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 09:21:13 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7C4A11065686;
	Tue,  3 Aug 2010 09:21:13 +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 6BCA78FC14;
	Tue,  3 Aug 2010 09:21:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o739LDWM000193;
	Tue, 3 Aug 2010 09:21:13 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o739LDgV000191;
	Tue, 3 Aug 2010 09:21:13 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201008030921.o739LDgV000191@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 3 Aug 2010 09:21:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210793 - head/sbin/fsck_ffs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 09:21:13 -0000

Author: bz
Date: Tue Aug  3 09:21:13 2010
New Revision: 210793
URL: http://svn.freebsd.org/changeset/base/210793

Log:
  One question mark per question; everything else is just exaggerating.
  reply() will output a '?', when printing the question along with [yn],
  so no need to have another here.

Modified:
  head/sbin/fsck_ffs/main.c

Modified: head/sbin/fsck_ffs/main.c
==============================================================================
--- head/sbin/fsck_ffs/main.c	Tue Aug  3 09:10:48 2010	(r210792)
+++ head/sbin/fsck_ffs/main.c	Tue Aug  3 09:21:13 2010	(r210793)
@@ -390,7 +390,7 @@ checkfilesys(char *filesys)
 	 */
 	if ((sblock.fs_flags & FS_SUJ) == FS_SUJ) {
 		if ((sblock.fs_flags & FS_NEEDSFSCK) != FS_NEEDSFSCK && skipclean) {
-			if (preen || reply("USE JOURNAL?")) {
+			if (preen || reply("USE JOURNAL")) {
 				if (suj_check(filesys) == 0) {
 					printf("\n***** FILE SYSTEM MARKED CLEAN *****\n");
 					if (chkdoreload(mntp) == 0)

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 09:23:53 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 791EB1065677;
	Tue,  3 Aug 2010 09:23:53 +0000 (UTC)
	(envelope-from fabient@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 671418FC0A;
	Tue,  3 Aug 2010 09:23:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o739Nrm0000848;
	Tue, 3 Aug 2010 09:23:53 GMT (envelope-from fabient@svn.freebsd.org)
Received: (from fabient@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o739Nrm6000845;
	Tue, 3 Aug 2010 09:23:53 GMT (envelope-from fabient@svn.freebsd.org)
Message-Id: <201008030923.o739Nrm6000845@svn.freebsd.org>
From: Fabien Thomas 
Date: Tue, 3 Aug 2010 09:23:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210794 - head/usr.sbin/pmcstat
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 09:23:53 -0000

Author: fabient
Date: Tue Aug  3 09:23:53 2010
New Revision: 210794
URL: http://svn.freebsd.org/changeset/base/210794

Log:
  Allow file as a top source, it works with socket now.
  This will allow top monitoring using socket/ssh tunnelling
  of system without local symbols.
  
  client:
  pmcstat -R : -T -r 
  monitored device:
  pmcstat -Sinstructions -O :
  
  - Move the file read in the event loop
  - Initialize and clean log in all cases
  - Preserve global stats value during top refresh
  - Fix the rtld/line resolver that ignore '-r' prefix
  - Support socket for '-R' (server mode)
  - Display the statistics when exiting top mode

Modified:
  head/usr.sbin/pmcstat/pmcstat.c
  head/usr.sbin/pmcstat/pmcstat_log.c

Modified: head/usr.sbin/pmcstat/pmcstat.c
==============================================================================
--- head/usr.sbin/pmcstat/pmcstat.c	Tue Aug  3 09:21:13 2010	(r210793)
+++ head/usr.sbin/pmcstat/pmcstat.c	Tue Aug  3 09:23:53 2010	(r210794)
@@ -169,8 +169,7 @@ pmcstat_cleanup(void)
 		args.pa_logparser = NULL;
 	}
 
-	if (args.pa_flags & (FLAG_HAS_PIPE | FLAG_HAS_OUTPUT_LOGFILE))
-		pmcstat_shutdown_logging();
+	pmcstat_shutdown_logging();
 }
 
 void
@@ -559,7 +558,7 @@ main(int argc, char **argv)
 	int do_print;
 	size_t dummy;
 	int graphdepth;
-	int pipefd[2];
+	int pipefd[2], rfd;
 	int use_cumulative_counts;
 	short cf, cb;
 	uint32_t cpumask;
@@ -1001,11 +1000,6 @@ main(int argc, char **argv)
 	    (args.pa_flags & FLAG_READ_LOGFILE) == 0)
 	    errx(EX_USAGE, "ERROR: option -M is only used with -g/-R.");
 
-	/* -T is incompatible with -R (replay logfile is a TODO) */
-	if ((args.pa_flags & FLAG_DO_TOP) &&
-	    (args.pa_flags & FLAG_READ_LOGFILE))
-		errx(EX_USAGE, "ERROR: option -T is incompatible with -R.");
-
 	/*
 	 * Disallow textual output of sampling PMCs if counting PMCs
 	 * have also been asked for, mostly because the combined output
@@ -1066,7 +1060,22 @@ main(int argc, char **argv)
 			    graphfilename);
 	}
 
-	/* if we've been asked to process a log file, do that and exit */
+	/* if we've been asked to process a log file, skip init */
+	if ((args.pa_flags & FLAG_READ_LOGFILE) == 0) {
+		if (pmc_init() < 0)
+			err(EX_UNAVAILABLE,
+			    "ERROR: Initialization of the pmc(3) library failed");
+
+		if ((npmc = pmc_npmc(0)) < 0) /* assume all CPUs are identical */
+			err(EX_OSERR, "ERROR: Cannot determine the number of PMCs "
+			    "on CPU %d", 0);
+	}
+
+	/* Allocate a kqueue */
+	if ((pmcstat_kq = kqueue()) < 0)
+		err(EX_OSERR, "ERROR: Cannot allocate kqueue");
+
+	/* Setup the logfile as the source. */
 	if (args.pa_flags & FLAG_READ_LOGFILE) {
 		/*
 		 * Print the log in textual form if we haven't been
@@ -1076,28 +1085,17 @@ main(int argc, char **argv)
 			args.pa_flags |= FLAG_DO_PRINT;
 
 		pmcstat_initialize_logging();
-		args.pa_logfd = pmcstat_open_log(args.pa_inputpath,
+		rfd = pmcstat_open_log(args.pa_inputpath,
 		    PMCSTAT_OPEN_FOR_READ);
-		if ((args.pa_logparser = pmclog_open(args.pa_logfd)) == NULL)
+		if ((args.pa_logparser = pmclog_open(rfd)) == NULL)
 			err(EX_OSERR, "ERROR: Cannot create parser");
-		pmcstat_process_log();
-		pmcstat_shutdown_logging();
-		exit(EX_OK);
+		if (fcntl(rfd, F_SETFL, O_NONBLOCK) < 0)
+			err(EX_OSERR, "ERROR: fcntl(2) failed");
+		EV_SET(&kev, rfd, EVFILT_READ, EV_ADD,
+		    0, 0, NULL);
+		if (kevent(pmcstat_kq, &kev, 1, NULL, 0, NULL) < 0)
+			err(EX_OSERR, "ERROR: Cannot register kevent");
 	}
-
-	/* otherwise, we've been asked to collect data */
-	if (pmc_init() < 0)
-		err(EX_UNAVAILABLE,
-		    "ERROR: Initialization of the pmc(3) library failed");
-
-	if ((npmc = pmc_npmc(0)) < 0) /* assume all CPUs are identical */
-		err(EX_OSERR, "ERROR: Cannot determine the number of PMCs "
-		    "on CPU %d", 0);
-
-	/* Allocate a kqueue */
-	if ((pmcstat_kq = kqueue()) < 0)
-		err(EX_OSERR, "ERROR: Cannot allocate kqueue");
-
 	/*
 	 * Configure the specified log file or setup a default log
 	 * consumer via a pipe.
@@ -1140,6 +1138,7 @@ main(int argc, char **argv)
 	    (args.pa_flags & FLAG_HAS_OUTPUT_LOGFILE);
 
 	/*
+	if (args.pa_flags & FLAG_READ_LOGFILE) {
 	 * Allocate PMCs.
 	 */
 
@@ -1272,10 +1271,8 @@ main(int argc, char **argv)
 	if (args.pa_flags & FLAG_HAS_COMMANDLINE)
 		pmcstat_start_process();
 
-	/* initialize logging if printing the configured log */
-	if ((args.pa_flags & (FLAG_DO_PRINT | FLAG_DO_TOP)) &&
-	    (args.pa_flags & (FLAG_HAS_PIPE | FLAG_HAS_OUTPUT_LOGFILE)))
-		pmcstat_initialize_logging();
+	/* initialize logging */
+	pmcstat_initialize_logging();
 
 	/* Handle SIGINT using the kqueue loop */
 	sa.sa_handler = SIG_IGN;
@@ -1338,16 +1335,13 @@ main(int argc, char **argv)
 
 		switch (kev.filter) {
 		case EVFILT_PROC:  /* target has exited */
-			if (args.pa_flags & (FLAG_HAS_OUTPUT_LOGFILE |
-				FLAG_HAS_PIPE))
-				runstate = pmcstat_close_log();
-			else
-				runstate = PMCSTAT_FINISHED;
+			runstate = pmcstat_close_log();
 			do_print = 1;
 			break;
 
 		case EVFILT_READ:  /* log file data is present */
-			if (kev.ident == (unsigned)fileno(stdin)) {
+			if (kev.ident == (unsigned)fileno(stdin) &&
+			    (args.pa_flags & FLAG_DO_TOP)) {
 				if (pmcstat_keypress_log())
 					runstate = pmcstat_close_log();
 			} else
@@ -1370,15 +1364,8 @@ main(int argc, char **argv)
 				 * of its targets, or if logfile
 				 * writes encounter an error.
 				 */
-				if (args.pa_flags & (FLAG_HAS_OUTPUT_LOGFILE |
-				    FLAG_HAS_PIPE)) {
-					runstate = pmcstat_close_log();
-					if (args.pa_flags &
-					    (FLAG_DO_PRINT|FLAG_DO_ANALYSIS))
-						pmcstat_process_log();
-				}
+				runstate = pmcstat_close_log();
 				do_print = 1; /* print PMCs at exit */
-				runstate = PMCSTAT_FINISHED;
 			} else if (kev.ident == SIGINT) {
 				/* Kill the child process if we started it */
 				if (args.pa_flags & FLAG_HAS_COMMANDLINE)
@@ -1386,7 +1373,7 @@ main(int argc, char **argv)
 				/* Close the pipe to self, if present. */
 				if (args.pa_flags & FLAG_HAS_PIPE)
 					(void) close(pipefd[READPIPEFD]);
-				runstate = PMCSTAT_FINISHED;
+				runstate = pmcstat_close_log();
 			} else if (kev.ident == SIGWINCH) {
 				if (ioctl(fileno(args.pa_printfile),
 					TIOCGWINSZ, &ws) < 0)

Modified: head/usr.sbin/pmcstat/pmcstat_log.c
==============================================================================
--- head/usr.sbin/pmcstat/pmcstat_log.c	Tue Aug  3 09:21:13 2010	(r210793)
+++ head/usr.sbin/pmcstat/pmcstat_log.c	Tue Aug  3 09:23:53 2010	(r210794)
@@ -141,6 +141,7 @@ struct pmcstat_image_hash_list pmcstat_i
 struct pmcstat_process_hash_list pmcstat_process_hash[PMCSTAT_NHASH];
 
 struct pmcstat_stats pmcstat_stats; /* statistics */
+int ps_samples_period; /* samples count between top refresh. */
 
 struct pmcstat_process *pmcstat_kernproc; /* kernel 'process' */
 
@@ -247,7 +248,7 @@ static int	pmcstat_string_compute_hash(c
 static void pmcstat_string_initialize(void);
 static int	pmcstat_string_lookup_hash(pmcstat_interned_string _is);
 static void pmcstat_string_shutdown(void);
-static void pmcstat_stats_reset(void);
+static void pmcstat_stats_reset(int _reset_global);
 
 /*
  * A simple implementation of interned strings.  Each interned string
@@ -276,7 +277,7 @@ int pmcstat_npmcs;
 int pmcstat_pause;
 
 static void
-pmcstat_stats_reset(void)
+pmcstat_stats_reset(int reset_global)
 {
 	struct pmcstat_pmcrecord *pr;
 
@@ -285,9 +286,11 @@ pmcstat_stats_reset(void)
 		pr->pr_samples = 0;
 		pr->pr_dubious_frames = 0;
 	}
+	ps_samples_period = 0;
 
 	/* Flush global stats. */
-	bzero(&pmcstat_stats, sizeof(struct pmcstat_stats));
+	if (reset_global)
+		bzero(&pmcstat_stats, sizeof(struct pmcstat_stats));
 }
 
 /*
@@ -606,7 +609,7 @@ pmcstat_image_get_elf_params(struct pmcs
 	GElf_Phdr ph;
 	GElf_Shdr sh;
 	enum pmcstat_image_type image_type;
-	char buffer[PATH_MAX];
+	char buffer[PATH_MAX], rtldpath[PATH_MAX];
 
 	assert(image->pi_type == PMCSTAT_IMAGE_UNKNOWN);
 
@@ -686,9 +689,10 @@ pmcstat_image_get_elf_params(struct pmcs
 					    buffer, elf_errmsg(-1));
 					goto done;
 				}
+				snprintf(rtldpath, sizeof(rtldpath), "%s%s",
+				    args.pa_fsroot, elfbase + ph.p_offset);
 				image->pi_dynlinkerpath =
-				    pmcstat_string_intern(elfbase +
-					ph.p_offset);
+				    pmcstat_string_intern(rtldpath);
 				break;
 			case PT_LOAD:
 				if (ph.p_offset == 0)
@@ -944,11 +948,13 @@ pmcstat_image_addr2line(struct pmcstat_i
 	int fd;
 
 	if (image->pi_addr2line == NULL) {
-		snprintf(imagepath, sizeof(imagepath), "%s.symbols",
+		snprintf(imagepath, sizeof(imagepath), "%s%s.symbols",
+		    args.pa_fsroot,
 		    pmcstat_string_unintern(image->pi_fullpath));
 		fd = open(imagepath, O_RDONLY);
 		if (fd < 0) {
-			snprintf(imagepath, sizeof(imagepath), "%s",
+			snprintf(imagepath, sizeof(imagepath), "%s%s",
+			    args.pa_fsroot,
 			    pmcstat_string_unintern(image->pi_fullpath));
 		} else
 			close(fd);
@@ -1397,6 +1403,7 @@ pmcstat_analyze_log(void)
 			 * bin inside this.
 			 */
 			pmcstat_stats.ps_samples_total++;
+			ps_samples_period++;
 
 			pc = ev.pl_u.pl_s.pl_pc;
 			pp = pmcstat_process_lookup(ev.pl_u.pl_s.pl_pid,
@@ -1423,6 +1430,7 @@ pmcstat_analyze_log(void)
 
 		case PMCLOG_TYPE_CALLCHAIN:
 			pmcstat_stats.ps_samples_total++;
+			ps_samples_period++;
 
 			cpuflags = ev.pl_u.pl_cc.pl_cpuflags;
 			cpu = PMC_CALLCHAIN_CPUFLAGS_TO_CPU(cpuflags);
@@ -1689,8 +1697,15 @@ pmcstat_print_log(void)
 int
 pmcstat_close_log(void)
 {
-	if (pmc_flush_logfile() < 0)
-		err(EX_OSERR, "ERROR: logging failed");
+	/* If a local logfile is configured ask the kernel to stop
+	 * and flush data. Kernel will close the file when data is flushed
+	 * so keep the status to EXITING.
+	 */
+	if (args.pa_logfd != -1) {
+		if (pmc_flush_logfile() < 0)
+			err(EX_OSERR, "ERROR: logging failed");
+	}
+
 	return (args.pa_flags & FLAG_HAS_PIPE ? PMCSTAT_EXITING :
 	    PMCSTAT_FINISHED);
 }
@@ -1707,7 +1722,7 @@ pmcstat_close_log(void)
 int
 pmcstat_open_log(const char *path, int mode)
 {
-	int error, fd;
+	int error, fd, cfd;
 	size_t hlen;
 	const char *p, *errstr;
 	struct addrinfo hints, *res, *res0;
@@ -1728,7 +1743,7 @@ pmcstat_open_log(const char *path, int m
 	 */
 	if (path[0] == '-' && path[1] == '\0')
 		fd = (mode == PMCSTAT_OPEN_FOR_READ) ? 0 : 1;
-	else if (mode == PMCSTAT_OPEN_FOR_WRITE && path[0] != '/' &&
+	else if (path[0] != '/' &&
 	    path[0] != '.' && strchr(path, ':') != NULL) {
 
 		p = strrchr(path, ':');
@@ -1757,11 +1772,29 @@ pmcstat_open_log(const char *path, int m
 				errstr = strerror(errno);
 				continue;
 			}
-			if (connect(fd, res->ai_addr, res->ai_addrlen) < 0) {
-				errstr = strerror(errno);
+			if (mode == PMCSTAT_OPEN_FOR_READ) {
+				if (bind(fd, res->ai_addr, res->ai_addrlen) < 0) {
+					errstr = strerror(errno);
+					(void) close(fd);
+					fd = -1;
+					continue;
+				}
+				listen(fd, 1);
+				cfd = accept(fd, NULL, NULL);
 				(void) close(fd);
-				fd = -1;
-				continue;
+				if (cfd < 0) {
+					errstr = strerror(errno);
+					fd = -1;
+					break;
+				}
+				fd = cfd;
+			} else {
+				if (connect(fd, res->ai_addr, res->ai_addrlen) < 0) {
+					errstr = strerror(errno);
+					(void) close(fd);
+					fd = -1;
+					continue;
+				}
 			}
 			errstr = NULL;
 			break;
@@ -1831,9 +1864,8 @@ pmcstat_refresh_top(void)
 		    pmcstat_pmcinfilter);
 
 	/* Format samples count. */
-	if (pmcstat_stats.ps_samples_total > 0)
-		v = (pmcpr->pr_samples * 100.0) /
-		    pmcstat_stats.ps_samples_total;
+	if (ps_samples_period > 0)
+		v = (pmcpr->pr_samples * 100.0) / ps_samples_period;
 	else
 		v = 0.;
 	v_attrs = PMCSTAT_ATTRPERCENT(v);
@@ -1870,7 +1902,7 @@ pmcstat_changefilter(void)
 
 		do {
 			pmcr = pmcstat_pmcindex_to_pmcr(pmcstat_pmcinfilter);
-			if (pmcr == pmcr->pr_merge)
+			if (pmcr == NULL || pmcr == pmcr->pr_merge)
 				break;
 
 			pmcstat_pmcinfilter++;
@@ -1913,7 +1945,7 @@ pmcstat_keypress_log(void)
 		 */
 		if (plugins[args.pa_plugin].pl_shutdown != NULL)
 			plugins[args.pa_plugin].pl_shutdown(NULL);
-		pmcstat_stats_reset();
+		pmcstat_stats_reset(0);
 		if (plugins[args.pa_plugin].pl_init != NULL)
 			plugins[args.pa_plugin].pl_init();
 
@@ -1934,7 +1966,7 @@ pmcstat_keypress_log(void)
 		} while (plugins[args.pa_plugin].pl_topdisplay == NULL);
 
 		/* Open new plugin. */
-		pmcstat_stats_reset();
+		pmcstat_stats_reset(0);
 		if (plugins[args.pa_plugin].pl_init != NULL)
 			plugins[args.pa_plugin].pl_init();
 		wprintw(w, "switching to plugin %s",
@@ -1984,7 +2016,7 @@ pmcstat_display_log(void)
 	if (args.pa_topmode == PMCSTAT_TOP_DELTA) {
 		if (plugins[args.pa_plugin].pl_shutdown != NULL)
 			plugins[args.pa_plugin].pl_shutdown(NULL);
-		pmcstat_stats_reset();
+		pmcstat_stats_reset(0);
 		if (plugins[args.pa_plugin].pl_init != NULL)
 			plugins[args.pa_plugin].pl_init();
 	}
@@ -2128,8 +2160,7 @@ pmcstat_shutdown_logging(void)
 			    N, pmcstat_stats.ps_##V);			\
 	} while (0)
 
-	if (args.pa_verbosity >= 1 && (args.pa_flags & FLAG_DO_ANALYSIS) &&
-	    (args.pa_flags & FLAG_DO_TOP) == 0) {
+	if (args.pa_verbosity >= 1 && (args.pa_flags & FLAG_DO_ANALYSIS)) {
 		(void) fprintf(args.pa_printfile, "CONVERSION STATISTICS:\n");
 		PRINT("#exec/a.out", exec_aout);
 		PRINT("#exec/elf", exec_elf);

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 11:21:18 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4990C106566B;
	Tue,  3 Aug 2010 11:21:18 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 38F4E8FC0C;
	Tue,  3 Aug 2010 11:21:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73BLIKl028585;
	Tue, 3 Aug 2010 11:21:18 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73BLIEL028583;
	Tue, 3 Aug 2010 11:21:18 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201008031121.o73BLIEL028583@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Tue, 3 Aug 2010 11:21:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210795 - head/sys/geom/sched
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 11:21:18 -0000

Author: ae
Date: Tue Aug  3 11:21:17 2010
New Revision: 210795
URL: http://svn.freebsd.org/changeset/base/210795

Log:
  Check that gsp is not NULL before access. It can be NULL
  for some cases.
  
  Approved by:	kib (mentor)
  MFC after:	1 week

Modified:
  head/sys/geom/sched/g_sched.c

Modified: head/sys/geom/sched/g_sched.c
==============================================================================
--- head/sys/geom/sched/g_sched.c	Tue Aug  3 09:23:53 2010	(r210794)
+++ head/sys/geom/sched/g_sched.c	Tue Aug  3 11:21:17 2010	(r210795)
@@ -1906,7 +1906,7 @@ g_sched_dumpconf(struct sbuf *sb, const 
 	if (indent == NULL) {	/* plaintext */
 		sbuf_printf(sb, " algo %s", gsp ? gsp->gs_name : "--");
 	}
-	if (gsp->gs_dumpconf)
+	if (gsp != NULL && gsp->gs_dumpconf)
 		gsp->gs_dumpconf(sb, indent, gp, cp, pp);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 11:23:45 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 57424106567A;
	Tue,  3 Aug 2010 11:23:45 +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 18E168FC17;
	Tue,  3 Aug 2010 11:23:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73BNirX029169;
	Tue, 3 Aug 2010 11:23:44 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73BNiPr029167;
	Tue, 3 Aug 2010 11:23:44 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201008031123.o73BNiPr029167@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 3 Aug 2010 11:23:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210796 - head/sys/compat/freebsd32
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 11:23:45 -0000

Author: kib
Date: Tue Aug  3 11:23:44 2010
New Revision: 210796
URL: http://svn.freebsd.org/changeset/base/210796

Log:
  When compat32 recvmsg(2) does not need to copy out control messages, set
  msg_controllen to 0.
  
  PR:	kern/149227
  Submitted by:	Stef Walter 
  MFC after:	1 weeks

Modified:
  head/sys/compat/freebsd32/freebsd32_misc.c

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_misc.c	Tue Aug  3 11:21:17 2010	(r210795)
+++ head/sys/compat/freebsd32/freebsd32_misc.c	Tue Aug  3 11:23:44 2010	(r210796)
@@ -1059,6 +1059,8 @@ freebsd32_recvmsg(td, uap)
 		
 		if (control != NULL)
 			error = freebsd32_copy_msg_out(&msg, control);
+		else
+			msg.msg_controllen = 0;
 		
 		if (error == 0)
 			error = freebsd32_copyoutmsghdr(&msg, uap->msg);

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 13:46:26 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 263141065677;
	Tue,  3 Aug 2010 13:46:26 +0000 (UTC)
	(envelope-from fabient@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EEAE98FC1B;
	Tue,  3 Aug 2010 13:46:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73DkPkL060903;
	Tue, 3 Aug 2010 13:46:25 GMT (envelope-from fabient@svn.freebsd.org)
Received: (from fabient@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73DkPKK060899;
	Tue, 3 Aug 2010 13:46:25 GMT (envelope-from fabient@svn.freebsd.org)
Message-Id: <201008031346.o73DkPKK060899@svn.freebsd.org>
From: Fabien Thomas 
Date: Tue, 3 Aug 2010 13:46:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210797 - head/usr.sbin/pmcstat
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 13:46:26 -0000

Author: fabient
Date: Tue Aug  3 13:46:25 2010
New Revision: 210797
URL: http://svn.freebsd.org/changeset/base/210797

Log:
  - Do not use the runtime mask when logfile is specified.
  - Revert the fix on rtld path that is not necessary.
  
  MFC after:	1 week

Modified:
  head/usr.sbin/pmcstat/pmcstat.c
  head/usr.sbin/pmcstat/pmcstat.h
  head/usr.sbin/pmcstat/pmcstat_log.c

Modified: head/usr.sbin/pmcstat/pmcstat.c
==============================================================================
--- head/usr.sbin/pmcstat/pmcstat.c	Tue Aug  3 11:23:44 2010	(r210796)
+++ head/usr.sbin/pmcstat/pmcstat.c	Tue Aug  3 13:46:25 2010	(r210797)
@@ -641,6 +641,7 @@ main(int argc, char **argv)
 			else
 				cpumask = pmcstat_get_cpumask(optarg);
 
+			args.pa_flags	 |= FLAGS_HAS_CPUMASK;
 			args.pa_required |= FLAG_HAS_SYSTEM_PMCS;
 			break;
 
@@ -884,6 +885,13 @@ main(int argc, char **argv)
 	args.pa_argc = (argc -= optind);
 	args.pa_argv = (argv += optind);
 
+	/* If we read from logfile and no specified CPU mask use
+	 * the maximum CPU count.
+	 */
+	if ((args.pa_flags & FLAG_READ_LOGFILE) &&
+	    (args.pa_flags & FLAGS_HAS_CPUMASK) == 0)
+		cpumask = 0xffffffff;
+
 	args.pa_cpumask = cpumask; /* For selecting CPUs using -R. */
 
 	if (argc)	/* command line present */

Modified: head/usr.sbin/pmcstat/pmcstat.h
==============================================================================
--- head/usr.sbin/pmcstat/pmcstat.h	Tue Aug  3 11:23:44 2010	(r210796)
+++ head/usr.sbin/pmcstat/pmcstat.h	Tue Aug  3 13:46:25 2010	(r210797)
@@ -51,6 +51,7 @@
 #define	FLAG_DO_ANNOTATE		0x00008000	/* -m */
 #define	FLAG_DO_TOP			0x00010000	/* -T */
 #define	FLAG_DO_ANALYSIS		0x00020000	/* -g or -G or -m or -T */
+#define	FLAGS_HAS_CPUMASK		0x00040000	/* -c */
 
 #define	DEFAULT_SAMPLE_COUNT		65536
 #define	DEFAULT_WAIT_INTERVAL		5.0

Modified: head/usr.sbin/pmcstat/pmcstat_log.c
==============================================================================
--- head/usr.sbin/pmcstat/pmcstat_log.c	Tue Aug  3 11:23:44 2010	(r210796)
+++ head/usr.sbin/pmcstat/pmcstat_log.c	Tue Aug  3 13:46:25 2010	(r210797)
@@ -609,7 +609,7 @@ pmcstat_image_get_elf_params(struct pmcs
 	GElf_Phdr ph;
 	GElf_Shdr sh;
 	enum pmcstat_image_type image_type;
-	char buffer[PATH_MAX], rtldpath[PATH_MAX];
+	char buffer[PATH_MAX];
 
 	assert(image->pi_type == PMCSTAT_IMAGE_UNKNOWN);
 
@@ -689,10 +689,9 @@ pmcstat_image_get_elf_params(struct pmcs
 					    buffer, elf_errmsg(-1));
 					goto done;
 				}
-				snprintf(rtldpath, sizeof(rtldpath), "%s%s",
-				    args.pa_fsroot, elfbase + ph.p_offset);
 				image->pi_dynlinkerpath =
-				    pmcstat_string_intern(rtldpath);
+				    pmcstat_string_intern(elfbase +
+				        ph.p_offset);
 				break;
 			case PT_LOAD:
 				if (ph.p_offset == 0)

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 15:06:31 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8E8B31065672;
	Tue,  3 Aug 2010 15:06:31 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7C6748FC21;
	Tue,  3 Aug 2010 15:06:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73F6VMN079103;
	Tue, 3 Aug 2010 15:06:31 GMT (envelope-from gnn@svn.freebsd.org)
Received: (from gnn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73F6VCa079101;
	Tue, 3 Aug 2010 15:06:31 GMT (envelope-from gnn@svn.freebsd.org)
Message-Id: <201008031506.o73F6VCa079101@svn.freebsd.org>
From: "George V. Neville-Neil" 
Date: Tue, 3 Aug 2010 15:06: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: r210802 - stable/8/sys/dev/e1000
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 15:06:31 -0000

Author: gnn
Date: Tue Aug  3 15:06:31 2010
New Revision: 210802
URL: http://svn.freebsd.org/changeset/base/210802

Log:
  MFC: 209512
  
  Make sure that all the exposed counters and variables are actually
  being updated.
  
  Pointed out by:	jfv

Modified:
  stable/8/sys/dev/e1000/if_igb.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/e1000/if_igb.c
==============================================================================
--- stable/8/sys/dev/e1000/if_igb.c	Tue Aug  3 15:02:41 2010	(r210801)
+++ stable/8/sys/dev/e1000/if_igb.c	Tue Aug  3 15:06:31 2010	(r210802)
@@ -4814,6 +4814,18 @@ igb_update_stats_counters(struct adapter
 	/* Tx Errors */
 	ifp->if_oerrors = adapter->stats.ecol +
 	    adapter->stats.latecol + adapter->watchdog_events;
+
+	/* Driver specific counters */
+	adapter->device_control = E1000_READ_REG(&adapter->hw, E1000_CTRL);
+	adapter->rx_control = E1000_READ_REG(&adapter->hw, E1000_RCTL);
+	adapter->int_mask = E1000_READ_REG(&adapter->hw, E1000_IMS);
+	adapter->eint_mask = E1000_READ_REG(&adapter->hw, E1000_EIMS);
+	adapter->packet_buf_alloc_tx = ((E1000_READ_REG(&adapter->hw, E1000_PBA)
+					& 0xffff0000) >> 16);
+
+	adapter->packet_buf_alloc_rx = (E1000_READ_REG(&adapter->hw, E1000_PBA) 
+					& 0xffff);
+
 }
 
 
@@ -4971,6 +4983,11 @@ igb_add_hw_stats(struct adapter *adapter
 	}
 
 	for (int i = 0; i < adapter->num_queues; i++, rxr++) {
+		snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i);
+		queue_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, namebuf, 
+					    CTLFLAG_RD, NULL, "Queue Name");
+		queue_list = SYSCTL_CHILDREN(queue_node);
+
 		struct lro_ctrl *lro = &rxr->lro;
 
 		snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i);

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 15:07:38 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D01EE1065677;
	Tue,  3 Aug 2010 15:07:38 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BC8AF8FC16;
	Tue,  3 Aug 2010 15:07:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73F7cXe079376;
	Tue, 3 Aug 2010 15:07:38 GMT (envelope-from gnn@svn.freebsd.org)
Received: (from gnn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73F7cVp079373;
	Tue, 3 Aug 2010 15:07:38 GMT (envelope-from gnn@svn.freebsd.org)
Message-Id: <201008031507.o73F7cVp079373@svn.freebsd.org>
From: "George V. Neville-Neil" 
Date: Tue, 3 Aug 2010 15:07:38 +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: r210803 - stable/7/sys/dev/e1000
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 15:07:38 -0000

Author: gnn
Date: Tue Aug  3 15:07:38 2010
New Revision: 210803
URL: http://svn.freebsd.org/changeset/base/210803

Log:
  MFC: 209241, 209512, 210428, 210452
  
  Move statistics into the sysctl tree making it easier to find
  and use them.
  Add previously hidden statistics, some of which include interrupt
  and host/card communication counters.
  
  Include all fixups pointed out by others in testing.

Modified:
  stable/7/sys/dev/e1000/if_igb.c
  stable/7/sys/dev/e1000/if_igb.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/e1000/if_igb.c
==============================================================================
--- stable/7/sys/dev/e1000/if_igb.c	Tue Aug  3 15:06:31 2010	(r210802)
+++ stable/7/sys/dev/e1000/if_igb.c	Tue Aug  3 15:07:38 2010	(r210803)
@@ -212,7 +212,6 @@ static bool	igb_tso_setup(struct tx_ring
 static void	igb_set_promisc(struct adapter *);
 static void	igb_disable_promisc(struct adapter *);
 static void	igb_set_multi(struct adapter *);
-static void	igb_print_hw_stats(struct adapter *);
 static void	igb_update_link_status(struct adapter *);
 static void	igb_refresh_mbufs(struct rx_ring *, int);
 
@@ -224,11 +223,10 @@ static int	igb_xmit(struct tx_ring *, st
 static int	igb_dma_malloc(struct adapter *, bus_size_t,
 		    struct igb_dma_alloc *, int);
 static void	igb_dma_free(struct adapter *, struct igb_dma_alloc *);
-static void	igb_print_debug_info(struct adapter *);
+static int	igb_sysctl_nvm_info(SYSCTL_HANDLER_ARGS);
 static void	igb_print_nvm_info(struct adapter *);
 static int 	igb_is_valid_ether_addr(u8 *);
-static int	igb_sysctl_stats(SYSCTL_HANDLER_ARGS);
-static int	igb_sysctl_debug_info(SYSCTL_HANDLER_ARGS);
+static void     igb_add_hw_stats(struct adapter *adapter);
 /* Management and WOL Support */
 static void	igb_init_manageability(struct adapter *);
 static void	igb_release_manageability(struct adapter *);
@@ -412,13 +410,8 @@ igb_attach(device_t dev)
 	/* SYSCTL stuff */
 	SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
 	    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
-	    OID_AUTO, "debug", CTLTYPE_INT|CTLFLAG_RW, adapter, 0,
-	    igb_sysctl_debug_info, "I", "Debug Information");
-
-	SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
-	    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
-	    OID_AUTO, "stats", CTLTYPE_INT|CTLFLAG_RW, adapter, 0,
-	    igb_sysctl_stats, "I", "Statistics");
+	    OID_AUTO, "nvm", CTLTYPE_INT|CTLFLAG_RW, adapter, 0,
+	    igb_sysctl_nvm_info, "I", "NVM Information");
 
 	SYSCTL_ADD_INT(device_get_sysctl_ctx(adapter->dev),
 	    SYSCTL_CHILDREN(device_get_sysctl_tree(adapter->dev)),
@@ -584,6 +577,8 @@ igb_attach(device_t dev)
 	adapter->vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig,
 	     igb_unregister_vlan, adapter, EVENTHANDLER_PRI_FIRST);
 
+	igb_add_hw_stats(adapter);
+
 	/* Tell the stack that the interface is not active */
 	adapter->ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
 
@@ -1900,7 +1895,6 @@ static void
 igb_local_timer(void *arg)
 {
 	struct adapter		*adapter = arg;
-	struct ifnet		*ifp = adapter->ifp;
 	device_t		dev = adapter->dev;
 	struct tx_ring		*txr = adapter->tx_rings;
 
@@ -1910,9 +1904,6 @@ igb_local_timer(void *arg)
 	igb_update_link_status(adapter);
 	igb_update_stats_counters(adapter);
 
-	if (igb_display_debug_stats && ifp->if_drv_flags & IFF_DRV_RUNNING)
-		igb_print_hw_stats(adapter);
-
         /*
         ** Watchdog: check for time since any descriptor was cleaned
         */
@@ -4751,8 +4742,10 @@ igb_update_stats_counters(struct adapter
 	/* For the 64-bit byte counters the low dword must be read first. */
 	/* Both registers clear on the read of the high dword */
 
-	adapter->stats.gorc += E1000_READ_REG(&adapter->hw, E1000_GORCH);
-	adapter->stats.gotc += E1000_READ_REG(&adapter->hw, E1000_GOTCH);
+	adapter->stats.gorc += E1000_READ_REG(&adapter->hw, E1000_GORCL) +
+	  ((u64)E1000_READ_REG(&adapter->hw, E1000_GORCH) << 32);
+	adapter->stats.gotc += E1000_READ_REG(&adapter->hw, E1000_GOTCL) +
+	  ((u64)E1000_READ_REG(&adapter->hw, E1000_GOTCH) << 32) ;
 
 	adapter->stats.rnbc += E1000_READ_REG(&adapter->hw, E1000_RNBC);
 	adapter->stats.ruc += E1000_READ_REG(&adapter->hw, E1000_RUC);
@@ -4774,6 +4767,38 @@ igb_update_stats_counters(struct adapter
 	adapter->stats.mptc += E1000_READ_REG(&adapter->hw, E1000_MPTC);
 	adapter->stats.bptc += E1000_READ_REG(&adapter->hw, E1000_BPTC);
 
+	/* Interrupt Counts */
+
+	adapter->stats.iac += E1000_READ_REG(&adapter->hw, E1000_IAC);
+	adapter->stats.icrxptc += E1000_READ_REG(&adapter->hw, E1000_ICRXPTC);
+	adapter->stats.icrxatc += E1000_READ_REG(&adapter->hw, E1000_ICRXATC);
+	adapter->stats.ictxptc += E1000_READ_REG(&adapter->hw, E1000_ICTXPTC);
+	adapter->stats.ictxatc += E1000_READ_REG(&adapter->hw, E1000_ICTXATC);
+	adapter->stats.ictxqec += E1000_READ_REG(&adapter->hw, E1000_ICTXQEC);
+	adapter->stats.ictxqmtc += E1000_READ_REG(&adapter->hw, E1000_ICTXQMTC);
+	adapter->stats.icrxdmtc += E1000_READ_REG(&adapter->hw, E1000_ICRXDMTC);
+	adapter->stats.icrxoc += E1000_READ_REG(&adapter->hw, E1000_ICRXOC);
+
+	/* Host to Card Statistics */
+
+	adapter->stats.cbtmpc += E1000_READ_REG(&adapter->hw, E1000_CBTMPC);
+	adapter->stats.htdpmc += E1000_READ_REG(&adapter->hw, E1000_HTDPMC);
+	adapter->stats.cbrdpc += E1000_READ_REG(&adapter->hw, E1000_CBRDPC);
+	adapter->stats.cbrmpc += E1000_READ_REG(&adapter->hw, E1000_CBRMPC);
+	adapter->stats.rpthc += E1000_READ_REG(&adapter->hw, E1000_RPTHC);
+	adapter->stats.hgptc += E1000_READ_REG(&adapter->hw, E1000_HGPTC);
+	adapter->stats.htcbdpc += E1000_READ_REG(&adapter->hw, E1000_HTCBDPC);
+	adapter->stats.hgorc += (E1000_READ_REG(&adapter->hw, E1000_HGORCL) +
+				 ((u64)E1000_READ_REG(&adapter->hw, 
+						      E1000_HGORCH) << 32));
+
+	adapter->stats.hgotc += (E1000_READ_REG(&adapter->hw, E1000_HGOTCL) +
+				 ((u64)E1000_READ_REG(&adapter->hw, 
+						      E1000_HGOTCH) << 32));
+	adapter->stats.lenerrs += E1000_READ_REG(&adapter->hw, E1000_LENERRS);
+	adapter->stats.scvpc += E1000_READ_REG(&adapter->hw, E1000_SCVPC);
+	adapter->stats.hrmpc += E1000_READ_REG(&adapter->hw, E1000_HRMPC);
+
 	adapter->stats.algnerrc += 
 		E1000_READ_REG(&adapter->hw, E1000_ALGNERRC);
 	adapter->stats.rxerrc += 
@@ -4799,143 +4824,471 @@ igb_update_stats_counters(struct adapter
 	/* Tx Errors */
 	ifp->if_oerrors = adapter->stats.ecol +
 	    adapter->stats.latecol + adapter->watchdog_events;
+
+	/* Driver specific counters */
+	adapter->device_control = E1000_READ_REG(&adapter->hw, E1000_CTRL);
+	adapter->rx_control = E1000_READ_REG(&adapter->hw, E1000_RCTL);
+	adapter->int_mask = E1000_READ_REG(&adapter->hw, E1000_IMS);
+	adapter->eint_mask = E1000_READ_REG(&adapter->hw, E1000_EIMS);
+	adapter->packet_buf_alloc_tx = ((E1000_READ_REG(&adapter->hw, E1000_PBA)
+					& 0xffff0000) >> 16);
+
+	adapter->packet_buf_alloc_rx = (E1000_READ_REG(&adapter->hw, E1000_PBA) 
+					& 0xffff);
+
 }
 
 
-/**********************************************************************
- *
- *  This routine is called only when igb_display_debug_stats is enabled.
- *  This routine provides a way to take a look at important statistics
- *  maintained by the driver and hardware.
- *
- **********************************************************************/
+/** igb_sysctl_tdh_handler - Handler function
+ *  Retrieves the TDH value from the hardware
+ */
+static int 
+igb_sysctl_tdh_handler(SYSCTL_HANDLER_ARGS)
+{
+	int error;
+
+	struct tx_ring *txr = ((struct tx_ring *)oidp->oid_arg1);
+	if (!txr) return 0;
+
+	unsigned val = E1000_READ_REG(&txr->adapter->hw, E1000_TDH(txr->me));
+	error = sysctl_handle_int(oidp, &val, 0, req);
+	if (error || !req->newptr)
+		return error;
+	return 0;
+}
+
+/** igb_sysctl_tdt_handler - Handler function
+ *  Retrieves the TDT value from the hardware
+ */
+static int 
+igb_sysctl_tdt_handler(SYSCTL_HANDLER_ARGS)
+{
+	int error;
+
+	struct tx_ring *txr = ((struct tx_ring *)oidp->oid_arg1);
+	if (!txr) return 0;
+
+	unsigned val = E1000_READ_REG(&txr->adapter->hw, E1000_TDT(txr->me));
+	error = sysctl_handle_int(oidp, &val, 0, req);
+	if (error || !req->newptr)
+		return error;
+	return 0;
+}
+
+/** igb_sysctl_rdh_handler - Handler function
+ *  Retrieves the RDH value from the hardware
+ */
+static int 
+igb_sysctl_rdh_handler(SYSCTL_HANDLER_ARGS)
+{
+	int error;
+
+	struct rx_ring *rxr = ((struct rx_ring *)oidp->oid_arg1);
+	if (!rxr) return 0;
+
+	unsigned val = E1000_READ_REG(&rxr->adapter->hw, E1000_RDH(rxr->me));
+	error = sysctl_handle_int(oidp, &val, 0, req);
+	if (error || !req->newptr)
+		return error;
+	return 0;
+}
+
+/** igb_sysctl_rdt_handler - Handler function
+ *  Retrieves the RDT value from the hardware
+ */
+static int 
+igb_sysctl_rdt_handler(SYSCTL_HANDLER_ARGS)
+{
+	int error;
+
+	struct rx_ring *rxr = ((struct rx_ring *)oidp->oid_arg1);
+	if (!rxr) return 0;
+
+	unsigned val = E1000_READ_REG(&rxr->adapter->hw, E1000_RDT(rxr->me));
+	error = sysctl_handle_int(oidp, &val, 0, req);
+	if (error || !req->newptr)
+		return error;
+	return 0;
+}
+
+/*
+ * Add sysctl variables, one per statistic, to the system.
+ */
 static void
-igb_print_debug_info(struct adapter *adapter)
+igb_add_hw_stats(struct adapter *adapter)
 {
+
 	device_t dev = adapter->dev;
-	struct igb_queue *que = adapter->queues;
-	struct rx_ring *rxr = adapter->rx_rings;
+
 	struct tx_ring *txr = adapter->tx_rings;
-	uint8_t *hw_addr = adapter->hw.hw_addr;
+	struct rx_ring *rxr = adapter->rx_rings;
 
-	device_printf(dev, "Adapter hardware address = %p \n", hw_addr);
-	device_printf(dev, "CTRL = 0x%x RCTL = 0x%x \n",
-	    E1000_READ_REG(&adapter->hw, E1000_CTRL),
-	    E1000_READ_REG(&adapter->hw, E1000_RCTL));
-
-#if	(DEBUG_HW > 0)  /* Dont output these errors normally */
-	device_printf(dev, "IMS = 0x%x EIMS = 0x%x \n",
-	    E1000_READ_REG(&adapter->hw, E1000_IMS),
-	    E1000_READ_REG(&adapter->hw, E1000_EIMS));
-#endif
+	struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev);
+	struct sysctl_oid *tree = device_get_sysctl_tree(dev);
+	struct sysctl_oid_list *child = SYSCTL_CHILDREN(tree);
+	struct e1000_hw_stats *stats = &adapter->stats;
+
+	struct sysctl_oid *stat_node, *queue_node, *int_node, *host_node;
+	struct sysctl_oid_list *stat_list, *queue_list, *int_list, *host_list;
+
+#define QUEUE_NAME_LEN 32
+	char namebuf[QUEUE_NAME_LEN];
+
+	/* Driver Statistics */
+	SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "link_irq", 
+			CTLFLAG_RD, &adapter->link_irq, 0,
+			"Link MSIX IRQ Handled");
+	SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "dropped", 
+			CTLFLAG_RD, &adapter->dropped_pkts,
+			"Driver dropped packets");
+	SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "tx_dma_fail", 
+			CTLFLAG_RD, &adapter->no_tx_dma_setup,
+			"Driver tx dma failure in xmit");
+
+	SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "device_control", 
+			CTLFLAG_RD, &adapter->device_control,
+			"Device Control Register");
+	SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "rx_control", 
+			CTLFLAG_RD, &adapter->rx_control,
+			"Receiver Control Register");
+	SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "interrupt_mask", 
+			CTLFLAG_RD, &adapter->int_mask,
+			"Interrupt Mask");
+	SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "extended_int_mask", 
+			CTLFLAG_RD, &adapter->eint_mask,
+			"Extended Interrupt Mask");
+	SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "tx_buf_alloc", 
+			CTLFLAG_RD, &adapter->packet_buf_alloc_tx,
+			"Transmit Buffer Packet Allocation");
+	SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "rx_buf_alloc", 
+			CTLFLAG_RD, &adapter->packet_buf_alloc_rx,
+			"Receive Buffer Packet Allocation");
+	SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "fc_high_water",
+			CTLFLAG_RD, &adapter->hw.fc.high_water, 0,
+			"Flow Control High Watermark");
+	SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "fc_low_water", 
+			CTLFLAG_RD, &adapter->hw.fc.low_water, 0,
+			"Flow Control Low Watermark");
 
-	device_printf(dev, "Packet buffer = Tx=%dk Rx=%dk \n",
-	    ((E1000_READ_REG(&adapter->hw, E1000_PBA) & 0xffff0000) >> 16),\
-	    (E1000_READ_REG(&adapter->hw, E1000_PBA) & 0xffff) );
-	device_printf(dev, "Flow control watermarks high = %d low = %d\n",
-	    adapter->hw.fc.high_water,
-	    adapter->hw.fc.low_water);
-
-	for (int i = 0; i < adapter->num_queues; i++, rxr++, txr++) {
-		device_printf(dev, "Queue(%d) tdh = %d, tdt = %d  ", i,
-		    E1000_READ_REG(&adapter->hw, E1000_TDH(i)),
-		    E1000_READ_REG(&adapter->hw, E1000_TDT(i)));
-		device_printf(dev, "rdh = %d, rdt = %d\n",
-		    E1000_READ_REG(&adapter->hw, E1000_RDH(i)),
-		    E1000_READ_REG(&adapter->hw, E1000_RDT(i)));
-		device_printf(dev, "TX(%d) no descriptors avail event = %lld\n",
-		    txr->me, (long long)txr->no_desc_avail);
-		device_printf(dev, "TX(%d) Packets sent = %lld\n",
-		    txr->me, (long long)txr->tx_packets);
-		device_printf(dev, "RX(%d) Packets received = %lld  ",
-		    rxr->me, (long long)rxr->rx_packets);
+	for (int i = 0; i < adapter->num_queues; i++, txr++) {
+		snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i);
+		queue_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, namebuf,
+					    CTLFLAG_RD, NULL, "Queue Name");
+		queue_list = SYSCTL_CHILDREN(queue_node);
+
+		SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", 
+				CTLFLAG_RD, txr, sizeof(txr),
+				igb_sysctl_tdh_handler, "IU",
+ 				"Transmit Descriptor Head");
+		SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_tail", 
+				CTLFLAG_RD, txr, sizeof(txr),
+				igb_sysctl_tdt_handler, "IU",
+ 				"Transmit Descriptor Tail");
+		SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "no_desc_avail", 
+				CTLFLAG_RD, &txr->no_desc_avail,
+				"Queue No Descriptor Available");
+		SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "tx_packets",
+				CTLFLAG_RD, &txr->tx_packets,
+				"Queue Packets Transmitted");
 	}
 
 	for (int i = 0; i < adapter->num_queues; i++, rxr++) {
+		snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i);
+		queue_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, namebuf, 
+					    CTLFLAG_RD, NULL, "Queue Name");
+		queue_list = SYSCTL_CHILDREN(queue_node);
+
 		struct lro_ctrl *lro = &rxr->lro;
-		device_printf(dev, "Queue(%d) rdh = %d, rdt = %d\n", i,
-		    E1000_READ_REG(&adapter->hw, E1000_RDH(i)),
-		    E1000_READ_REG(&adapter->hw, E1000_RDT(i)));
-		device_printf(dev, "RX(%d) Packets received = %lld\n", rxr->me,
-		    (long long)rxr->rx_packets);
-		device_printf(dev, " Split Packets = %lld ",
-		    (long long)rxr->rx_split_packets);
-		device_printf(dev, " Byte count = %lld\n",
-		    (long long)rxr->rx_bytes);
-		device_printf(dev,"RX(%d) LRO Queued= %d  ",
-		    i, lro->lro_queued);
-		device_printf(dev,"LRO Flushed= %d\n",lro->lro_flushed);
-	}
-
-	for (int i = 0; i < adapter->num_queues; i++, que++)
-		device_printf(dev,"QUE(%d) IRQs = %llx\n",
-		    i, (long long)que->irqs);
-
-	device_printf(dev, "LINK MSIX IRQ Handled = %u\n", adapter->link_irq);
-	device_printf(dev, "Mbuf defrag failed = %ld\n",
-	    adapter->mbuf_defrag_failed);
-	device_printf(dev, "Std mbuf header failed = %ld\n",
-	    adapter->mbuf_header_failed);
-	device_printf(dev, "Std mbuf packet failed = %ld\n",
-	    adapter->mbuf_packet_failed);
-	device_printf(dev, "Driver dropped packets = %ld\n",
-	    adapter->dropped_pkts);
-	device_printf(dev, "Driver tx dma failure in xmit = %ld\n",
-		adapter->no_tx_dma_setup);
-}
 
-static void
-igb_print_hw_stats(struct adapter *adapter)
-{
-	device_t dev = adapter->dev;
+		snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i);
+		queue_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, namebuf, 
+					    CTLFLAG_RD, NULL, "Queue Name");
+		queue_list = SYSCTL_CHILDREN(queue_node);
+
+		SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", 
+				CTLFLAG_RD, rxr, sizeof(rxr),
+				igb_sysctl_rdh_handler, "IU",
+				"Receive Descriptor Head");
+		SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_tail", 
+				CTLFLAG_RD, rxr, sizeof(rxr),
+				igb_sysctl_rdt_handler, "IU",
+				"Receive Descriptor Tail");
+		SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "rx_packets",
+				CTLFLAG_RD, &rxr->rx_packets,
+				"Queue Packets Received");
+		SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "rx_bytes",
+				CTLFLAG_RD, &rxr->rx_bytes,
+				"Queue Bytes Received");
+		SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "lro_queued",
+				CTLFLAG_RD, &lro->lro_queued, 0,
+				"LRO Queued");
+		SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "lro_flushed",
+				CTLFLAG_RD, &lro->lro_flushed, 0,
+				"LRO Flushed");
+	}
+
+	/* MAC stats get the own sub node */
+
+	stat_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "mac_stats", 
+				    CTLFLAG_RD, NULL, "MAC Statistics");
+	stat_list = SYSCTL_CHILDREN(stat_node);
+
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "excess_coll", 
+			CTLFLAG_RD, &stats->ecol,
+			"Excessive collisions");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "single_coll", 
+			CTLFLAG_RD, &stats->scc,
+			"Single collisions");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "multiple_coll", 
+			CTLFLAG_RD, &stats->mcc,
+			"Multiple collisions");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "late_coll", 
+			CTLFLAG_RD, &stats->latecol,
+			"Late collisions");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "collision_count", 
+			CTLFLAG_RD, &stats->colc,
+			"Collision Count");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "symbol_errors",
+			CTLFLAG_RD, &adapter->stats.symerrs,
+			"Symbol Errors");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "sequence_errors",
+			CTLFLAG_RD, &adapter->stats.sec,
+			"Sequence Errors");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "defer_count",
+			CTLFLAG_RD, &adapter->stats.dc,
+			"Defer Count");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "missed_packets",
+			CTLFLAG_RD, &adapter->stats.mpc,
+			"Missed Packets");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_no_buff",
+			CTLFLAG_RD, &adapter->stats.rnbc,
+			"Receive No Buffers");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_undersize",
+			CTLFLAG_RD, &adapter->stats.ruc,
+			"Receive Undersize");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_fragmented",
+			CTLFLAG_RD, &adapter->stats.rfc,
+			"Fragmented Packets Received ");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_oversize",
+			CTLFLAG_RD, &adapter->stats.roc,
+			"Oversized Packets Received");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_jabber",
+			CTLFLAG_RD, &adapter->stats.rjc,
+			"Recevied Jabber");
 
-	device_printf(dev, "Excessive collisions = %lld\n",
-	    (long long)adapter->stats.ecol);
-#if	(DEBUG_HW > 0)  /* Dont output these errors normally */
-	device_printf(dev, "Symbol errors = %lld\n",
-	    (long long)adapter->stats.symerrs);
-#endif
-	device_printf(dev, "Sequence errors = %lld\n",
-	    (long long)adapter->stats.sec);
-	device_printf(dev, "Defer count = %lld\n",
-	    (long long)adapter->stats.dc);
-	device_printf(dev, "Missed Packets = %lld\n",
-	    (long long)adapter->stats.mpc);
-	device_printf(dev, "Receive No Buffers = %lld\n",
-	    (long long)adapter->stats.rnbc);
 	/* RLEC is inaccurate on some hardware, calculate our own. */
-	device_printf(dev, "Receive Length Errors = %lld\n",
-	    ((long long)adapter->stats.roc + (long long)adapter->stats.ruc));
-	device_printf(dev, "Receive errors = %lld\n",
-	    (long long)adapter->stats.rxerrc);
-	device_printf(dev, "Crc errors = %lld\n",
-	    (long long)adapter->stats.crcerrs);
-	device_printf(dev, "Alignment errors = %lld\n",
-	    (long long)adapter->stats.algnerrc);
+/* 	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_len_errs", */
+/* 			CTLFLAG_RD, adapter->stats.roc + adapter->stats.ruc, */
+/* 			"Receive Length Errors"); */
+
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_errs",
+			CTLFLAG_RD, &adapter->stats.rxerrc,
+			"Receive Errors");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "crc_errs",
+			CTLFLAG_RD, &adapter->stats.crcerrs,
+			"CRC errors");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "alignment_errs",
+			CTLFLAG_RD, &adapter->stats.algnerrc,
+			"Alignment Errors");
 	/* On 82575 these are collision counts */
-	device_printf(dev, "Collision/Carrier extension errors = %lld\n",
-	    (long long)adapter->stats.cexterr);
-	device_printf(dev, "RX overruns = %ld\n", adapter->rx_overruns);
-	device_printf(dev, "watchdog timeouts = %ld\n",
-	    adapter->watchdog_events);
-	device_printf(dev, "XON Rcvd = %lld\n",
-	    (long long)adapter->stats.xonrxc);
-	device_printf(dev, "XON Xmtd = %lld\n",
-	    (long long)adapter->stats.xontxc);
-	device_printf(dev, "XOFF Rcvd = %lld\n",
-	    (long long)adapter->stats.xoffrxc);
-	device_printf(dev, "XOFF Xmtd = %lld\n",
-	    (long long)adapter->stats.xofftxc);
-	device_printf(dev, "Good Packets Rcvd = %lld\n",
-	    (long long)adapter->stats.gprc);
-	device_printf(dev, "Good Packets Xmtd = %lld\n",
-	    (long long)adapter->stats.gptc);
-	device_printf(dev, "TSO Contexts Xmtd = %lld\n",
-	    (long long)adapter->stats.tsctc);
-	device_printf(dev, "TSO Contexts Failed = %lld\n",
-	    (long long)adapter->stats.tsctfc);
-}
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "coll_ext_errs",
+			CTLFLAG_RD, &adapter->stats.cexterr,
+			"Collision/Carrier extension errors");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_overruns",
+			CTLFLAG_RD, &adapter->rx_overruns,
+			"RX overruns");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "watchdog_timeouts",
+			CTLFLAG_RD, &adapter->watchdog_events,
+			"Watchdog timeouts");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "xon_recvd",
+			CTLFLAG_RD, &adapter->stats.xonrxc,
+			"XON Received");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "xon_txd",
+			CTLFLAG_RD, &adapter->stats.xontxc,
+			"XON Transmitted");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "xoff_recvd",
+			CTLFLAG_RD, &adapter->stats.xoffrxc,
+			"XOFF Received");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "xoff_txd",
+			CTLFLAG_RD, &adapter->stats.xofftxc,
+			"XOFF Transmitted");
+	/* Packet Reception Stats */
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "total_pkts_recvd",
+			CTLFLAG_RD, &adapter->stats.tpr,
+			"Total Packets Received ");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_recvd",
+			CTLFLAG_RD, &adapter->stats.gprc,
+			"Good Packets Received");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_recvd",
+			CTLFLAG_RD, &adapter->stats.bprc,
+			"Broadcast Packets Received");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_recvd",
+			CTLFLAG_RD, &adapter->stats.mprc,
+			"Multicast Packets Received");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_64",
+			CTLFLAG_RD, &adapter->stats.prc64,
+			"64 byte frames received ");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_65_127",
+			CTLFLAG_RD, &adapter->stats.prc127,
+			"65-127 byte frames received");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_128_255",
+			CTLFLAG_RD, &adapter->stats.prc255,
+			"128-255 byte frames received");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_256_511",
+			CTLFLAG_RD, &adapter->stats.prc511,
+			"256-511 byte frames received");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_512_1023",
+			CTLFLAG_RD, &adapter->stats.prc1023,
+			"512-1023 byte frames received");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_1024_1522",
+			CTLFLAG_RD, &adapter->stats.prc1522,
+			"1023-1522 byte frames received");
+ 	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octets_recvd", 
+ 			CTLFLAG_RD, &adapter->stats.gorc, 
+ 			"Good Octets Received"); 
+
+	/* Packet Transmission Stats */
+ 	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octest_txd", 
+ 			CTLFLAG_RD, &adapter->stats.gotc, 
+ 			"Good Octest Transmitted"); 
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "total_pkts_txd",
+			CTLFLAG_RD, &adapter->stats.tpt,
+			"Total Packets Transmitted");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd",
+			CTLFLAG_RD, &adapter->stats.gptc,
+			"Good Packets Transmitted");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_txd",
+			CTLFLAG_RD, &adapter->stats.bptc,
+			"Broadcast Packets Transmitted");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_txd",
+			CTLFLAG_RD, &adapter->stats.mptc,
+			"Multicast Packets Transmitted");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_64",
+			CTLFLAG_RD, &adapter->stats.ptc64,
+			"64 byte frames transmitted ");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_65_127",
+			CTLFLAG_RD, &adapter->stats.ptc127,
+			"65-127 byte frames transmitted");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_128_255",
+			CTLFLAG_RD, &adapter->stats.ptc255,
+			"128-255 byte frames transmitted");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_256_511",
+			CTLFLAG_RD, &adapter->stats.ptc511,
+			"256-511 byte frames transmitted");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_512_1023",
+			CTLFLAG_RD, &adapter->stats.ptc1023,
+			"512-1023 byte frames transmitted");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_1024_1522",
+			CTLFLAG_RD, &adapter->stats.ptc1522,
+			"1024-1522 byte frames transmitted");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tso_txd",
+			CTLFLAG_RD, &adapter->stats.tsctc,
+			"TSO Contexts Transmitted");
+	SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tso_ctx_fail",
+			CTLFLAG_RD, &adapter->stats.tsctfc,
+			"TSO Contexts Failed");
+
+
+	/* Interrupt Stats */
+
+	int_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "interrupts", 
+				    CTLFLAG_RD, NULL, "Interrupt Statistics");
+	int_list = SYSCTL_CHILDREN(int_node);
+
+	SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "asserts",
+			CTLFLAG_RD, &adapter->stats.iac,
+			"Interrupt Assertion Count");
+
+	SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "rx_pkt_timer",
+			CTLFLAG_RD, &adapter->stats.icrxptc,
+			"Interrupt Cause Rx Pkt Timer Expire Count");
+
+	SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "rx_abs_timer",
+			CTLFLAG_RD, &adapter->stats.icrxatc,
+			"Interrupt Cause Rx Abs Timer Expire Count");
+
+	SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "tx_pkt_timer",
+			CTLFLAG_RD, &adapter->stats.ictxptc,
+			"Interrupt Cause Tx Pkt Timer Expire Count");
+
+	SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "tx_abs_timer",
+			CTLFLAG_RD, &adapter->stats.ictxatc,
+			"Interrupt Cause Tx Abs Timer Expire Count");
+
+	SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "tx_queue_empty",
+			CTLFLAG_RD, &adapter->stats.ictxqec,
+			"Interrupt Cause Tx Queue Empty Count");
+
+	SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "tx_queue_min_thresh",
+			CTLFLAG_RD, &adapter->stats.ictxqmtc,
+			"Interrupt Cause Tx Queue Min Thresh Count");
+
+	SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "rx_desc_min_thresh",
+			CTLFLAG_RD, &adapter->stats.icrxdmtc,
+			"Interrupt Cause Rx Desc Min Thresh Count");
+
+	SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "rx_overrun",
+			CTLFLAG_RD, &adapter->stats.icrxoc,
+			"Interrupt Cause Receiver Overrun Count");
+
+	/* Host to Card Stats */
+
+	host_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "host", 
+				    CTLFLAG_RD, NULL, 
+				    "Host to Card Statistics");
+
+	host_list = SYSCTL_CHILDREN(host_node);
+
+	SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "breaker_tx_pkt",
+			CTLFLAG_RD, &adapter->stats.cbtmpc,
+			"Circuit Breaker Tx Packet Count");
+
+	SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "host_tx_pkt_discard",
+			CTLFLAG_RD, &adapter->stats.htdpmc,
+			"Host Transmit Discarded Packets");
+
+	SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "rx_pkt",
+			CTLFLAG_RD, &adapter->stats.rpthc,
+			"Rx Packets To Host");
+
+	SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "breaker_rx_pkts",
+			CTLFLAG_RD, &adapter->stats.cbrmpc,
+			"Circuit Breaker Rx Packet Count");
+
+	SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "breaker_rx_pkt_drop",
+			CTLFLAG_RD, &adapter->stats.cbrdpc,
+			"Circuit Breaker Rx Dropped Count");
+
+	SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "tx_good_pkt",
+			CTLFLAG_RD, &adapter->stats.hgptc,
+			"Host Good Packets Tx Count");
+
+	SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "breaker_tx_pkt_drop",
+			CTLFLAG_RD, &adapter->stats.htcbdpc,
+			"Host Tx Circuit Breaker Dropped Count");
+
+	SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "rx_good_bytes",
+			CTLFLAG_RD, &adapter->stats.hgorc,
+			"Host Good Octets Received Count");
+
+	SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "tx_good_bytes",
+			CTLFLAG_RD, &adapter->stats.hgotc,
+			"Host Good Octets Transmit Count");
+
+	SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "length_errors",
+			CTLFLAG_RD, &adapter->stats.lenerrs,
+			"Length Errors");
+
+	SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "serdes_violation_pkt",
+			CTLFLAG_RD, &adapter->stats.scvpc,
+			"SerDes/SGMII Code Violation Pkt Count");
+
+	SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "header_redir_missed",
+			CTLFLAG_RD, &adapter->stats.hrmpc,
+			"Header Redirection Missed Packet Count");
+
 
+}
 /**********************************************************************
  *
  *  This routine provides a way to dump out the adapter eeprom,
@@ -4943,28 +5296,8 @@ igb_print_hw_stats(struct adapter *adapt
  *  32 words, stuff that matters is in that extent.
  *
  **********************************************************************/
-static void
-igb_print_nvm_info(struct adapter *adapter)
-{
-	u16	eeprom_data;
-	int	i, j, row = 0;
-
-	/* Its a bit crude, but it gets the job done */
-	printf("\nInterface EEPROM Dump:\n");
-	printf("Offset\n0x0000  ");
-	for (i = 0, j = 0; i < 32; i++, j++) {
-		if (j == 8) { /* Make the offset block */
-			j = 0; ++row;
-			printf("\n0x00%x0  ",row);
-		}
-		e1000_read_nvm(&adapter->hw, i, 1, &eeprom_data);
-		printf("%04x ", eeprom_data);
-	}
-	printf("\n");
-}
-
 static int
-igb_sysctl_debug_info(SYSCTL_HANDLER_ARGS)
+igb_sysctl_nvm_info(SYSCTL_HANDLER_ARGS)
 {
 	struct adapter *adapter;
 	int error;
@@ -4976,16 +5309,12 @@ igb_sysctl_debug_info(SYSCTL_HANDLER_ARG
 	if (error || !req->newptr)
 		return (error);
 
-	if (result == 1) {
-		adapter = (struct adapter *)arg1;
-		igb_print_debug_info(adapter);
-	}
 	/*
 	 * This value will cause a hex dump of the
 	 * first 32 16-bit words of the EEPROM to
 	 * the screen.
 	 */
-	if (result == 2) {
+	if (result == 1) {
 		adapter = (struct adapter *)arg1;
 		igb_print_nvm_info(adapter);
         }
@@ -4993,26 +5322,24 @@ igb_sysctl_debug_info(SYSCTL_HANDLER_ARG
 	return (error);
 }
 
-
-static int
-igb_sysctl_stats(SYSCTL_HANDLER_ARGS)
+static void
+igb_print_nvm_info(struct adapter *adapter)
 {
-	struct adapter *adapter;
-	int error;
-	int result;
-
-	result = -1;
-	error = sysctl_handle_int(oidp, &result, 0, req);
-
-	if (error || !req->newptr)
-		return (error);
+	u16	eeprom_data;
+	int	i, j, row = 0;
 
-	if (result == 1) {
-		adapter = (struct adapter *)arg1;
-		igb_print_hw_stats(adapter);
+	/* Its a bit crude, but it gets the job done */
+	printf("\nInterface EEPROM Dump:\n");
+	printf("Offset\n0x0000  ");
+	for (i = 0, j = 0; i < 32; i++, j++) {
+		if (j == 8) { /* Make the offset block */
+			j = 0; ++row;
+			printf("\n0x00%x0  ",row);
+		}
+		e1000_read_nvm(&adapter->hw, i, 1, &eeprom_data);
+		printf("%04x ", eeprom_data);
 	}
-
-	return (error);
+	printf("\n");
 }
 
 static void

Modified: stable/7/sys/dev/e1000/if_igb.h
==============================================================================
--- stable/7/sys/dev/e1000/if_igb.h	Tue Aug  3 15:06:31 2010	(r210802)
+++ stable/7/sys/dev/e1000/if_igb.h	Tue Aug  3 15:07:38 2010	(r210803)
@@ -317,6 +317,9 @@ struct tx_ring {
 	int			watchdog_time;
 	u64			no_desc_avail;
 	u64			tx_packets;
+	/* Statistics for reporting, ONLY. */
+	u32			tdh; /* Transmit Descriptor Head */
+	u32			tdt; /* Transmit Descriptor Tail */
 };
 
 /*
@@ -353,6 +356,9 @@ struct rx_ring {
 	u64			rx_discarded;
 	u64			rx_packets;
 	u64			rx_bytes;
+	/* Statistics for reporting, ONLY. */
+	u32			rdh; /* Transmit Descriptor Head */
+	u32			rdt; /* Transmit Descriptor Tail */
 };
 
 struct adapter {
@@ -428,6 +434,12 @@ struct adapter {
         unsigned long	no_tx_dma_setup;
 	unsigned long	watchdog_events;
 	unsigned long	rx_overruns;
+	unsigned long	device_control;
+	unsigned long	rx_control;
+	unsigned long	int_mask;
+	unsigned long	eint_mask;
+	unsigned long	packet_buf_alloc_rx;
+	unsigned long	packet_buf_alloc_tx;
 
 	boolean_t       in_detach;
 

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 15:32:09 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3D8971065687;
	Tue,  3 Aug 2010 15:32:09 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2089B8FC17;
	Tue,  3 Aug 2010 15:32:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73FW9AF084977;
	Tue, 3 Aug 2010 15:32:09 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73FW8rZ084973;
	Tue, 3 Aug 2010 15:32:09 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008031532.o73FW8rZ084973@svn.freebsd.org>
From: Jung-uk Kim 
Date: Tue, 3 Aug 2010 15:32:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210804 - in head/sys/amd64: acpica amd64
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 15:32:09 -0000

Author: jkim
Date: Tue Aug  3 15:32:08 2010
New Revision: 210804
URL: http://svn.freebsd.org/changeset/base/210804

Log:
  savectx() has not been used for fork(2) for about 15 years. [1]
  Do not clobber FPU thread's PCB as it is more harmful.  When we resume CPU,
  unconditionally reload FPU state.
  
  Pointed out by:	bde [1]

Modified:
  head/sys/amd64/acpica/acpi_switch.S
  head/sys/amd64/acpica/acpi_wakecode.S
  head/sys/amd64/amd64/cpu_switch.S

Modified: head/sys/amd64/acpica/acpi_switch.S
==============================================================================
--- head/sys/amd64/acpica/acpi_switch.S	Tue Aug  3 15:07:38 2010	(r210803)
+++ head/sys/amd64/acpica/acpi_switch.S	Tue Aug  3 15:32:08 2010	(r210804)
@@ -34,11 +34,11 @@
 #include "acpi_wakedata.h"
 #include "assym.s"
 
-#define	WAKEUP_CTX(member)	wakeup_ ## member - wakeup_ctx(%rdi)
+#define	WAKEUP_CTX(member)	wakeup_ ## member - wakeup_ctx(%rsi)
 
 ENTRY(acpi_restorecpu)
 	/* Switch to KPML4phys. */
-	movq	%rsi, %rax
+	movq	%rdi, %rax
 	movq	%rax, %cr3
 
 	/* Restore GDT. */
@@ -47,7 +47,7 @@ ENTRY(acpi_restorecpu)
 1:
 
 	/* Fetch PCB. */
-	movq	WAKEUP_CTX(pcb), %rsi
+	movq	WAKEUP_CTX(pcb), %rdi
 
 	/* Force kernel segment registers. */
 	movl	$KDSEL, %eax
@@ -60,16 +60,16 @@ ENTRY(acpi_restorecpu)
 	movw	%ax, %gs
 
 	movl	$MSR_FSBASE, %ecx
-	movl	PCB_FSBASE(%rsi), %eax
-	movl	4 + PCB_FSBASE(%rsi), %edx
+	movl	PCB_FSBASE(%rdi), %eax
+	movl	4 + PCB_FSBASE(%rdi), %edx
 	wrmsr
 	movl	$MSR_GSBASE, %ecx
-	movl	PCB_GSBASE(%rsi), %eax
-	movl	4 + PCB_GSBASE(%rsi), %edx
+	movl	PCB_GSBASE(%rdi), %eax
+	movl	4 + PCB_GSBASE(%rdi), %edx
 	wrmsr
 	movl	$MSR_KGSBASE, %ecx
-	movl	PCB_KGSBASE(%rsi), %eax
-	movl	4 + PCB_KGSBASE(%rsi), %edx
+	movl	PCB_KGSBASE(%rdi), %eax
+	movl	4 + PCB_KGSBASE(%rdi), %edx
 	wrmsr
 
 	/* Restore EFER. */
@@ -101,20 +101,20 @@ ENTRY(acpi_restorecpu)
 	wrmsr
 
 	/* Restore CR0 except for FPU mode. */
-	movq	PCB_CR0(%rsi), %rax
+	movq	PCB_CR0(%rdi), %rax
 	movq	%rax, %rcx
 	andq	$~(CR0_EM | CR0_TS), %rax
 	movq	%rax, %cr0
 
 	/* Restore CR2 and CR4. */
-	movq	PCB_CR2(%rsi), %rax
+	movq	PCB_CR2(%rdi), %rax
 	movq	%rax, %cr2
-	movq	PCB_CR4(%rsi), %rax
+	movq	PCB_CR4(%rdi), %rax
 	movq	%rax, %cr4
 
 	/* Restore descriptor tables. */
-	lidt	PCB_IDT(%rsi)
-	lldt	PCB_LDT(%rsi)
+	lidt	PCB_IDT(%rdi)
+	lldt	PCB_LDT(%rdi)
 
 #define	SDT_SYSTSS	9
 #define	SDT_SYSBSY	11
@@ -122,58 +122,44 @@ ENTRY(acpi_restorecpu)
 	/* Clear "task busy" bit and reload TR. */
 	movq	PCPU(TSS), %rax
 	andb	$(~SDT_SYSBSY | SDT_SYSTSS), 5(%rax)
-	movw	PCB_TR(%rsi), %ax
+	movw	PCB_TR(%rdi), %ax
 	ltr	%ax
 
 #undef	SDT_SYSTSS
 #undef	SDT_SYSBSY
 
 	/* Restore other callee saved registers. */
-	movq	PCB_R15(%rsi), %r15
-	movq	PCB_R14(%rsi), %r14
-	movq	PCB_R13(%rsi), %r13
-	movq	PCB_R12(%rsi), %r12
-	movq	PCB_RBP(%rsi), %rbp
-	movq	PCB_RSP(%rsi), %rsp
-	movq	PCB_RBX(%rsi), %rbx
+	movq	PCB_R15(%rdi), %r15
+	movq	PCB_R14(%rdi), %r14
+	movq	PCB_R13(%rdi), %r13
+	movq	PCB_R12(%rdi), %r12
+	movq	PCB_RBP(%rdi), %rbp
+	movq	PCB_RSP(%rdi), %rsp
+	movq	PCB_RBX(%rdi), %rbx
 
 	/* Restore debug registers. */
-	movq	PCB_DR0(%rsi), %rax
+	movq	PCB_DR0(%rdi), %rax
 	movq	%rax, %dr0
-	movq	PCB_DR1(%rsi), %rax
+	movq	PCB_DR1(%rdi), %rax
 	movq	%rax, %dr1
-	movq	PCB_DR2(%rsi), %rax
+	movq	PCB_DR2(%rdi), %rax
 	movq	%rax, %dr2
-	movq	PCB_DR3(%rsi), %rax
+	movq	PCB_DR3(%rdi), %rax
 	movq	%rax, %dr3
-	movq	PCB_DR6(%rsi), %rax
+	movq	PCB_DR6(%rdi), %rax
 	movq	%rax, %dr6
-	movq	PCB_DR7(%rsi), %rax
+	movq	PCB_DR7(%rdi), %rax
 	movq	%rax, %dr7
 
-#define	__INITIAL_FPUCW__	0x037f
-#define	__INITIAL_MXCSR__	0x1f80
-
-	/* Initialize FPU and restore state if necessary. */
+	/* Restore FPU state. */
 	fninit
-	movw	$__INITIAL_FPUCW__, -2(%rsp)
-	fldcw	-2(%rsp)
-	movl	$__INITIAL_MXCSR__, -4(%rsp)
-	ldmxcsr	-4(%rsp)
-	movq	PCPU(FPCURTHREAD), %rax
-	testq	%rax, %rax
-	je	1f
-	fxrstor	PCB_USERFPU(%rsi)
-1:
-
-#undef	__INITIAL_FPUCW__
-#undef	__INITIAL_MXCSR__
+	fxrstor	PCB_USERFPU(%rdi)
 
 	/* Reload CR0. */
 	movq	%rcx, %cr0
 
 	/* Restore return address. */
-	movq	PCB_RIP(%rsi), %rax
+	movq	PCB_RIP(%rdi), %rax
 	movq	%rax, (%rsp)
 
 	/* Indicate the CPU is resumed. */

Modified: head/sys/amd64/acpica/acpi_wakecode.S
==============================================================================
--- head/sys/amd64/acpica/acpi_wakecode.S	Tue Aug  3 15:07:38 2010	(r210803)
+++ head/sys/amd64/acpica/acpi_wakecode.S	Tue Aug  3 15:32:08 2010	(r210804)
@@ -210,8 +210,8 @@ wakeup_64:
 	mov	%ax, %ds
 
 	/* Restore arguments and return. */
-	movq	wakeup_ctx - wakeup_start(%rbx), %rdi
-	movq	wakeup_kpml4 - wakeup_start(%rbx), %rsi
+	movq	wakeup_kpml4 - wakeup_start(%rbx), %rdi
+	movq	wakeup_ctx - wakeup_start(%rbx), %rsi
 	movq	wakeup_retaddr - wakeup_start(%rbx), %rax
 	jmp	*%rax
 

Modified: head/sys/amd64/amd64/cpu_switch.S
==============================================================================
--- head/sys/amd64/amd64/cpu_switch.S	Tue Aug  3 15:07:38 2010	(r210803)
+++ head/sys/amd64/amd64/cpu_switch.S	Tue Aug  3 15:32:08 2010	(r210804)
@@ -302,93 +302,65 @@ END(cpu_switch)
  * Update pcb, saving current processor state.
  */
 ENTRY(savectx)
-	/* Fetch PCB. */
-	movq	%rdi,%rsi
-
 	/* Save caller's return address. */
 	movq	(%rsp),%rax
-	movq	%rax,PCB_RIP(%rsi)
+	movq	%rax,PCB_RIP(%rdi)
 
-	movq	%rbx,PCB_RBX(%rsi)
-	movq	%rsp,PCB_RSP(%rsi)
-	movq	%rbp,PCB_RBP(%rsi)
-	movq	%r12,PCB_R12(%rsi)
-	movq	%r13,PCB_R13(%rsi)
-	movq	%r14,PCB_R14(%rsi)
-	movq	%r15,PCB_R15(%rsi)
+	movq	%rbx,PCB_RBX(%rdi)
+	movq	%rsp,PCB_RSP(%rdi)
+	movq	%rbp,PCB_RBP(%rdi)
+	movq	%r12,PCB_R12(%rdi)
+	movq	%r13,PCB_R13(%rdi)
+	movq	%r14,PCB_R14(%rdi)
+	movq	%r15,PCB_R15(%rdi)
 
+	movq	%cr0,%rsi
+	movq	%rsi,PCB_CR0(%rdi)
 	movq	%cr2,%rax
-	movq	%rax,PCB_CR2(%rsi)
+	movq	%rax,PCB_CR2(%rdi)
 	movq	%cr3,%rax
-	movq	%rax,PCB_CR3(%rsi)
+	movq	%rax,PCB_CR3(%rdi)
 	movq	%cr4,%rax
-	movq	%rax,PCB_CR4(%rsi)
+	movq	%rax,PCB_CR4(%rdi)
 
 	movq	%dr0,%rax
-	movq	%rax,PCB_DR0(%rsi)
+	movq	%rax,PCB_DR0(%rdi)
 	movq	%dr1,%rax
-	movq	%rax,PCB_DR1(%rsi)
+	movq	%rax,PCB_DR1(%rdi)
 	movq	%dr2,%rax
-	movq	%rax,PCB_DR2(%rsi)
+	movq	%rax,PCB_DR2(%rdi)
 	movq	%dr3,%rax
-	movq	%rax,PCB_DR3(%rsi)
+	movq	%rax,PCB_DR3(%rdi)
 	movq	%dr6,%rax
-	movq	%rax,PCB_DR6(%rsi)
+	movq	%rax,PCB_DR6(%rdi)
 	movq	%dr7,%rax
-	movq	%rax,PCB_DR7(%rsi)
+	movq	%rax,PCB_DR7(%rdi)
 
 	movl	$MSR_FSBASE,%ecx
 	rdmsr
 	shlq	$32,%rdx
 	leaq	(%rax,%rdx),%rax
-	movq	%rax,PCB_FSBASE(%rsi)
+	movq	%rax,PCB_FSBASE(%rdi)
 	movl	$MSR_GSBASE,%ecx
 	rdmsr
 	shlq	$32,%rdx
 	leaq	(%rax,%rdx),%rax
-	movq	%rax,PCB_GSBASE(%rsi)
+	movq	%rax,PCB_GSBASE(%rdi)
 	movl	$MSR_KGSBASE,%ecx
 	rdmsr
 	shlq	$32,%rdx
 	leaq	(%rax,%rdx),%rax
-	movq	%rax,PCB_KGSBASE(%rsi)
+	movq	%rax,PCB_KGSBASE(%rdi)
+
+	sgdt	PCB_GDT(%rdi)
+	sidt	PCB_IDT(%rdi)
+	sldt	PCB_LDT(%rdi)
+	str	PCB_TR(%rdi)
 
-	sgdt	PCB_GDT(%rsi)
-	sidt	PCB_IDT(%rsi)
-	sldt	PCB_LDT(%rsi)
-	str	PCB_TR(%rsi)
-
-	movq	%cr0,%rax
-	movq	%rax,PCB_CR0(%rsi)
-	leaq	PCB_USERFPU(%rsi),%rdi
-	pushfq
-	cli
 	clts
-	fxsave	(%rdi)
-	movq	%rax,%cr0
+	fxsave	PCB_USERFPU(%rdi)
+	movq	%rsi,%cr0	/* The previous %cr0 is saved in %rsi. */
 
-	/*
-	 * If fpcurthread == NULL, then the fpu h/w state is irrelevant and the
-	 * state had better already be in the pcb.  This is true for forks
-	 * but not for dumps (the old book-keeping with FP flags in the pcb
-	 * always lost for dumps because the dump pcb has 0 flags).
-	 *
-	 * If fpcurthread != NULL, then we have to copy the fpu h/w state to
-	 * fpcurthread's pcb, or reload from the requested pcb.  Copying is
-	 * easier because we would have to handle h/w bugs for reloading.
-	 */
-	movq	PCPU(FPCURTHREAD),%rax
-	testq	%rax,%rax
-	je	1f
-
-	/* arg 1 (%rdi) already loaded */
-	movq	TD_PCB(%rax),%rax
-	movq	PCB_SAVEFPU(%rax),%rsi	/* arg 2 */
-	movq	$PCB_SAVEFPU_SIZE,%rdx	/* arg 3 */
-	call	bcopy
-1:
-	popfq
 	movl	$1,%eax
-
 	ret
 END(savectx)

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 15:40:42 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C2A7D1065674;
	Tue,  3 Aug 2010 15:40:42 +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 B19CB8FC15;
	Tue,  3 Aug 2010 15:40:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73FegWU086934;
	Tue, 3 Aug 2010 15:40:42 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73Fegrx086932;
	Tue, 3 Aug 2010 15:40:42 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201008031540.o73Fegrx086932@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 3 Aug 2010 15:40:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210805 - head/sys/net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 15:40:42 -0000

Author: kib
Date: Tue Aug  3 15:40:42 2010
New Revision: 210805
URL: http://svn.freebsd.org/changeset/base/210805

Log:
  Properly set ifi_datalen for compat32 struct if_data32.
  
  PR:	kern/149240
  Submitted by:	Stef Walter 
  MFC after:	1 weeks

Modified:
  head/sys/net/rtsock.c

Modified: head/sys/net/rtsock.c
==============================================================================
--- head/sys/net/rtsock.c	Tue Aug  3 15:32:08 2010	(r210804)
+++ head/sys/net/rtsock.c	Tue Aug  3 15:40:42 2010	(r210805)
@@ -1439,7 +1439,7 @@ copy_ifdata32(struct if_data *src, struc
 	CP(*src, *dst, ifi_addrlen);
 	CP(*src, *dst, ifi_hdrlen);
 	CP(*src, *dst, ifi_link_state);
-	CP(*src, *dst, ifi_datalen);
+	dst->ifi_datalen = sizeof(struct if_data32);
 	CP(*src, *dst, ifi_mtu);
 	CP(*src, *dst, ifi_metric);
 	CP(*src, *dst, ifi_baudrate);

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 16:02:58 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5DFEE1065687;
	Tue,  3 Aug 2010 16:02:58 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 320FB8FC1C;
	Tue,  3 Aug 2010 16:02:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73G2wRi092068;
	Tue, 3 Aug 2010 16:02:58 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73G2w1w092066;
	Tue, 3 Aug 2010 16:02:58 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008031602.o73G2w1w092066@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Tue, 3 Aug 2010 16:02:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210809 - head/games/grdc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 16:02:58 -0000

Author: uqs
Date: Tue Aug  3 16:02:57 2010
New Revision: 210809
URL: http://svn.freebsd.org/changeset/base/210809

Log:
  grdc(6): Partial backout of r210755
  
  The previous revision was flawed in numerous ways:
  - the if condition would depend on garbage stack values
  - grdc(6) would loop n times, not n seconds. This only makes
    a difference if it takes more than 1 second to recalculate/redraw
    the display.
  - style(9) violations
  
  The following change adds argument checking and tracks the elapsed time
  between loops explicitly and will exit after roughly n seconds.
  
  While here sort headers and remove bogus #ifndef
  
  Submitted by:	bde
  MFC after:	2 weeks

Modified:
  head/games/grdc/grdc.c

Modified: head/games/grdc/grdc.c
==============================================================================
--- head/games/grdc/grdc.c	Tue Aug  3 16:02:10 2010	(r210808)
+++ head/games/grdc/grdc.c	Tue Aug  3 16:02:57 2010	(r210809)
@@ -15,21 +15,18 @@
  */
 
 #include 
-#include 
-#include 
 #include 
+#include 
 #include 
-#ifndef NONPOSIX
+#include 
 #include 
-#endif
 
 #define YBASE	10
 #define XBASE	10
 #define XLENGTH 58
 #define YDEPTH  7
 
-/* it won't be */
-struct timespec now; /* yeah! */
+struct timespec now;
 struct tm *tm;
 
 short disp[11] = {
@@ -88,9 +85,14 @@ main(int argc, char *argv[])
 		/* NOTREACHED */
 	}
 
-	if (argc > 0)
+	if (argc > 0) {
 		n = atoi(*argv) + 1;
-	else
+		if (n < 1) {
+			warnx("number of seconds is out of range");
+			usage();
+			/* NOTREACHED */
+		}
+	} else
 		n = 0;
 
 	initscr();
@@ -192,16 +194,20 @@ main(int argc, char *argv[])
 		}
 		movto(6, 0);
 		refresh();
-		clock_gettime(CLOCK_REALTIME_FAST, &now);
-		if (delay.tv_nsec > 0) {
-		    delay.tv_sec = 0;
-		    delay.tv_nsec = 1000000000 - now.tv_nsec;
-		} else {
-		    delay.tv_sec = 1;
-		    delay.tv_nsec = 0;
+		clock_gettime(CLOCK_REALTIME_FAST, &delay);
+		if (delay.tv_sec == now.tv_sec) {
+			if (delay.tv_nsec > 0) {
+				delay.tv_sec = 0;
+				delay.tv_nsec = 1000000000 - delay.tv_nsec;
+			} else {
+				delay.tv_sec = 1;
+				delay.tv_nsec = 0;
+			}
+			nanosleep(&delay, NULL);
+			clock_gettime(CLOCK_REALTIME_FAST, &delay);
 		}
-		nanosleep(&delay, NULL);
-		now.tv_sec++;
+		n -= delay.tv_sec - now.tv_sec;
+		now.tv_sec = delay.tv_sec;
 		if (sigtermed) {
 			standend();
 			clear();
@@ -209,7 +215,7 @@ main(int argc, char *argv[])
 			endwin();
 			errx(1, "terminated by signal %d", (int)sigtermed);
 		}
-	} while(--n);
+	} while (n);
 	standend();
 	clear();
 	refresh();

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 16:09:00 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0FD9E1065673;
	Tue,  3 Aug 2010 16:08:59 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F2CE98FC21;
	Tue,  3 Aug 2010 16:08:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73G8wgj093428;
	Tue, 3 Aug 2010 16:08:58 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73G8wEl093426;
	Tue, 3 Aug 2010 16:08:58 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008031608.o73G8wEl093426@svn.freebsd.org>
From: Jung-uk Kim 
Date: Tue, 3 Aug 2010 16:08:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210810 - head/sys/amd64/acpica
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 16:09:00 -0000

Author: jkim
Date: Tue Aug  3 16:08:58 2010
New Revision: 210810
URL: http://svn.freebsd.org/changeset/base/210810

Log:
  Remove an unnecessary register load.

Modified:
  head/sys/amd64/acpica/acpi_switch.S

Modified: head/sys/amd64/acpica/acpi_switch.S
==============================================================================
--- head/sys/amd64/acpica/acpi_switch.S	Tue Aug  3 16:02:57 2010	(r210809)
+++ head/sys/amd64/acpica/acpi_switch.S	Tue Aug  3 16:08:58 2010	(r210810)
@@ -38,8 +38,7 @@
 
 ENTRY(acpi_restorecpu)
 	/* Switch to KPML4phys. */
-	movq	%rdi, %rax
-	movq	%rax, %cr3
+	movq	%rdi, %cr3
 
 	/* Restore GDT. */
 	lgdt	WAKEUP_CTX(gdt)

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 16:21:48 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EAA6D1065673;
	Tue,  3 Aug 2010 16:21:48 +0000 (UTC) (envelope-from bcr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D97BB8FC0A;
	Tue,  3 Aug 2010 16:21:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73GLmmF096460;
	Tue, 3 Aug 2010 16:21:48 GMT (envelope-from bcr@svn.freebsd.org)
Received: (from bcr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73GLms7096458;
	Tue, 3 Aug 2010 16:21:48 GMT (envelope-from bcr@svn.freebsd.org)
Message-Id: <201008031621.o73GLms7096458@svn.freebsd.org>
From: Benedict Reuschling 
Date: Tue, 3 Aug 2010 16:21:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210812 - head/share/man/man5
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 16:21:49 -0000

Author: bcr (doc committer)
Date: Tue Aug  3 16:21:48 2010
New Revision: 210812
URL: http://svn.freebsd.org/changeset/base/210812

Log:
  Update references from nonexistent usbconfig(1) to usbconfig(8).
  
  PR:             docs/149221
  Submitted by:   Lars Hartmann (lars at chaotika dot org)
  MFC after:      3 days

Modified:
  head/share/man/man5/rc.conf.5

Modified: head/share/man/man5/rc.conf.5
==============================================================================
--- head/share/man/man5/rc.conf.5	Tue Aug  3 16:12:23 2010	(r210811)
+++ head/share/man/man5/rc.conf.5	Tue Aug  3 16:21:48 2010	(r210812)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 13, 2010
+.Dd August 3, 2010
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -4257,12 +4257,12 @@ variables.
 .It Va ubthidhci_busnum
 Bus number where the USB Bluetooth controller is located.
 Check the output of
-.Xr usbconfig 1
+.Xr usbconfig 8
 on your system to find this information.
 .It Va ubthidhci_addr
 Bus address of the USB Bluetooth controller.
 Check the output of
-.Xr usbconfig 1
+.Xr usbconfig 8
 on your system to find this information.
 .El
 .Sh FILES
@@ -4279,7 +4279,7 @@ on your system to find this information.
 .Xr kbdcontrol 1 ,
 .Xr makewhatis 1 ,
 .Xr sh 1 ,
-.Xr usbconfig 1 ,
+.Xr usbconfig 8 ,
 .Xr vi 1 ,
 .Xr vidcontrol 1 ,
 .Xr bridge 4 ,

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 16:21:50 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 542F7106566B;
	Tue,  3 Aug 2010 16:21:50 +0000 (UTC)
	(envelope-from fabient@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 272978FC13;
	Tue,  3 Aug 2010 16:21:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73GLo9E096495;
	Tue, 3 Aug 2010 16:21:50 GMT (envelope-from fabient@svn.freebsd.org)
Received: (from fabient@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73GLouZ096491;
	Tue, 3 Aug 2010 16:21:50 GMT (envelope-from fabient@svn.freebsd.org)
Message-Id: <201008031621.o73GLouZ096491@svn.freebsd.org>
From: Fabien Thomas 
Date: Tue, 3 Aug 2010 16:21:50 +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: r210813 - stable/8/usr.sbin/pmcstat
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 16:21:50 -0000

Author: fabient
Date: Tue Aug  3 16:21:49 2010
New Revision: 210813
URL: http://svn.freebsd.org/changeset/base/210813

Log:
  MFC r208858:
  
  Fix warnings found by Coverity.
  
  Found with:   Coverity Prevent(tm)

Modified:
  stable/8/usr.sbin/pmcstat/pmcpl_calltree.c
  stable/8/usr.sbin/pmcstat/pmcstat.c
  stable/8/usr.sbin/pmcstat/pmcstat_log.c
Directory Properties:
  stable/8/usr.sbin/pmcstat/   (props changed)

Modified: stable/8/usr.sbin/pmcstat/pmcpl_calltree.c
==============================================================================
--- stable/8/usr.sbin/pmcstat/pmcpl_calltree.c	Tue Aug  3 16:21:48 2010	(r210812)
+++ stable/8/usr.sbin/pmcstat/pmcpl_calltree.c	Tue Aug  3 16:21:49 2010	(r210813)
@@ -896,10 +896,12 @@ pmcpl_ct_node_printchild(struct pmcpl_ct
 			/* Call address, line, sample. */
 			addr = ct->pct_image->pi_vaddr + ct->pct_func;
 			line = 0;
-			pmcstat_image_addr2line(ct->pct_image, addr, sourcefile,
+			if (pmcstat_image_addr2line(ct->pct_image, addr, sourcefile,
 			    sizeof(sourcefile), &line,
-			    funcname, sizeof(funcname));
-			fprintf(args.pa_graphfile, "%p %u", (void *)addr, line);
+			    funcname, sizeof(funcname)))
+				fprintf(args.pa_graphfile, "%p %u", (void *)addr, line);
+			else
+				fprintf(args.pa_graphfile, "* *");
 		}
 		else
 			fprintf(args.pa_graphfile, "* *");

Modified: stable/8/usr.sbin/pmcstat/pmcstat.c
==============================================================================
--- stable/8/usr.sbin/pmcstat/pmcstat.c	Tue Aug  3 16:21:48 2010	(r210812)
+++ stable/8/usr.sbin/pmcstat/pmcstat.c	Tue Aug  3 16:21:49 2010	(r210813)
@@ -292,7 +292,8 @@ pmcstat_find_targets(const char *spec)
 		    0, &nproc)) == NULL)
 			err(EX_OSERR, "ERROR: Cannot get process list: %s",
 			    kvm_geterr(pmcstat_kvm));
-	}
+	} else
+		nproc = 0;
 
 	if ((rv = regcomp(®, spec, REG_EXTENDED|REG_NOSUB)) != 0) {
 		regerror(rv, ®, errbuf, sizeof(errbuf));

Modified: stable/8/usr.sbin/pmcstat/pmcstat_log.c
==============================================================================
--- stable/8/usr.sbin/pmcstat/pmcstat_log.c	Tue Aug  3 16:21:48 2010	(r210812)
+++ stable/8/usr.sbin/pmcstat/pmcstat_log.c	Tue Aug  3 16:21:49 2010	(r210813)
@@ -1959,6 +1959,7 @@ pmcstat_keypress_log(void)
 	case 'q':
 		wprintw(w, "exiting...");
 		ret = 1;
+		break;
 	default:
 		if (plugins[args.pa_plugin].pl_topkeypress != NULL)
 			if (plugins[args.pa_plugin].pl_topkeypress(c, w))

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 16:23:47 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5B175106566C;
	Tue,  3 Aug 2010 16:23:47 +0000 (UTC)
	(envelope-from fabient@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2E3A18FC08;
	Tue,  3 Aug 2010 16:23:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73GNlv7097011;
	Tue, 3 Aug 2010 16:23:47 GMT (envelope-from fabient@svn.freebsd.org)
Received: (from fabient@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73GNlPd097007;
	Tue, 3 Aug 2010 16:23:47 GMT (envelope-from fabient@svn.freebsd.org)
Message-Id: <201008031623.o73GNlPd097007@svn.freebsd.org>
From: Fabien Thomas 
Date: Tue, 3 Aug 2010 16:23:47 +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: r210814 - stable/7/usr.sbin/pmcstat
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 16:23:47 -0000

Author: fabient
Date: Tue Aug  3 16:23:46 2010
New Revision: 210814
URL: http://svn.freebsd.org/changeset/base/210814

Log:
  MFC r208858:
  
  Fix warnings found by Coverity.
  
  Found with:   Coverity Prevent(tm)

Modified:
  stable/7/usr.sbin/pmcstat/pmcpl_calltree.c
  stable/7/usr.sbin/pmcstat/pmcstat.c
  stable/7/usr.sbin/pmcstat/pmcstat_log.c
Directory Properties:
  stable/7/usr.sbin/pmcstat/   (props changed)

Modified: stable/7/usr.sbin/pmcstat/pmcpl_calltree.c
==============================================================================
--- stable/7/usr.sbin/pmcstat/pmcpl_calltree.c	Tue Aug  3 16:21:49 2010	(r210813)
+++ stable/7/usr.sbin/pmcstat/pmcpl_calltree.c	Tue Aug  3 16:23:46 2010	(r210814)
@@ -896,10 +896,12 @@ pmcpl_ct_node_printchild(struct pmcpl_ct
 			/* Call address, line, sample. */
 			addr = ct->pct_image->pi_vaddr + ct->pct_func;
 			line = 0;
-			pmcstat_image_addr2line(ct->pct_image, addr, sourcefile,
+			if (pmcstat_image_addr2line(ct->pct_image, addr, sourcefile,
 			    sizeof(sourcefile), &line,
-			    funcname, sizeof(funcname));
-			fprintf(args.pa_graphfile, "%p %u", (void *)addr, line);
+			    funcname, sizeof(funcname)))
+				fprintf(args.pa_graphfile, "%p %u", (void *)addr, line);
+			else
+				fprintf(args.pa_graphfile, "* *");
 		}
 		else
 			fprintf(args.pa_graphfile, "* *");

Modified: stable/7/usr.sbin/pmcstat/pmcstat.c
==============================================================================
--- stable/7/usr.sbin/pmcstat/pmcstat.c	Tue Aug  3 16:21:49 2010	(r210813)
+++ stable/7/usr.sbin/pmcstat/pmcstat.c	Tue Aug  3 16:23:46 2010	(r210814)
@@ -292,7 +292,8 @@ pmcstat_find_targets(const char *spec)
 		    0, &nproc)) == NULL)
 			err(EX_OSERR, "ERROR: Cannot get process list: %s",
 			    kvm_geterr(pmcstat_kvm));
-	}
+	} else
+		nproc = 0;
 
 	if ((rv = regcomp(®, spec, REG_EXTENDED|REG_NOSUB)) != 0) {
 		regerror(rv, ®, errbuf, sizeof(errbuf));

Modified: stable/7/usr.sbin/pmcstat/pmcstat_log.c
==============================================================================
--- stable/7/usr.sbin/pmcstat/pmcstat_log.c	Tue Aug  3 16:21:49 2010	(r210813)
+++ stable/7/usr.sbin/pmcstat/pmcstat_log.c	Tue Aug  3 16:23:46 2010	(r210814)
@@ -1959,6 +1959,7 @@ pmcstat_keypress_log(void)
 	case 'q':
 		wprintw(w, "exiting...");
 		ret = 1;
+		break;
 	default:
 		if (plugins[args.pa_plugin].pl_topkeypress != NULL)
 			if (plugins[args.pa_plugin].pl_topkeypress(c, w))

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 16:26:09 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E88A6106564A;
	Tue,  3 Aug 2010 16:26:09 +0000 (UTC)
	(envelope-from fabient@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D6AD68FC2B;
	Tue,  3 Aug 2010 16:26:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73GQ9HF097643;
	Tue, 3 Aug 2010 16:26:09 GMT (envelope-from fabient@svn.freebsd.org)
Received: (from fabient@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73GQ99B097641;
	Tue, 3 Aug 2010 16:26:09 GMT (envelope-from fabient@svn.freebsd.org)
Message-Id: <201008031626.o73GQ99B097641@svn.freebsd.org>
From: Fabien Thomas 
Date: Tue, 3 Aug 2010 16:26: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: r210816 - stable/8/lib/libpmc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 16:26:10 -0000

Author: fabient
Date: Tue Aug  3 16:26:09 2010
New Revision: 210816
URL: http://svn.freebsd.org/changeset/base/210816

Log:
  MFC r208860:
  
  Fix memory leak on error.
  
  Found with:	Coverity Prevent(tm)

Modified:
  stable/8/lib/libpmc/pmclog.c
Directory Properties:
  stable/8/lib/libpmc/   (props changed)

Modified: stable/8/lib/libpmc/pmclog.c
==============================================================================
--- stable/8/lib/libpmc/pmclog.c	Tue Aug  3 16:24:52 2010	(r210815)
+++ stable/8/lib/libpmc/pmclog.c	Tue Aug  3 16:26:09 2010	(r210816)
@@ -549,8 +549,10 @@ pmclog_open(int fd)
 
 	/* allocate space for a work area */
 	if (ps->ps_fd != PMCLOG_FD_NONE) {
-		if ((ps->ps_buffer = malloc(PMCLOG_BUFFER_SIZE)) == NULL)
+		if ((ps->ps_buffer = malloc(PMCLOG_BUFFER_SIZE)) == NULL) {
+			free(ps);
 			return NULL;
+		}
 	}
 
 	return ps;

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 16:27:13 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7E8E81065680;
	Tue,  3 Aug 2010 16:27:13 +0000 (UTC)
	(envelope-from fabient@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6CC068FC26;
	Tue,  3 Aug 2010 16:27:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73GRDCA097928;
	Tue, 3 Aug 2010 16:27:13 GMT (envelope-from fabient@svn.freebsd.org)
Received: (from fabient@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73GRDtx097926;
	Tue, 3 Aug 2010 16:27:13 GMT (envelope-from fabient@svn.freebsd.org)
Message-Id: <201008031627.o73GRDtx097926@svn.freebsd.org>
From: Fabien Thomas 
Date: Tue, 3 Aug 2010 16:27:13 +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: r210817 - stable/7/lib/libpmc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 16:27:13 -0000

Author: fabient
Date: Tue Aug  3 16:27:13 2010
New Revision: 210817
URL: http://svn.freebsd.org/changeset/base/210817

Log:
  MFC r208860:
  
  Fix memory leak on error.
  
  Found with:	Coverity Prevent(tm)

Modified:
  stable/7/lib/libpmc/pmclog.c
Directory Properties:
  stable/7/lib/libpmc/   (props changed)

Modified: stable/7/lib/libpmc/pmclog.c
==============================================================================
--- stable/7/lib/libpmc/pmclog.c	Tue Aug  3 16:26:09 2010	(r210816)
+++ stable/7/lib/libpmc/pmclog.c	Tue Aug  3 16:27:13 2010	(r210817)
@@ -549,8 +549,10 @@ pmclog_open(int fd)
 
 	/* allocate space for a work area */
 	if (ps->ps_fd != PMCLOG_FD_NONE) {
-		if ((ps->ps_buffer = malloc(PMCLOG_BUFFER_SIZE)) == NULL)
+		if ((ps->ps_buffer = malloc(PMCLOG_BUFFER_SIZE)) == NULL) {
+			free(ps);
 			return NULL;
+		}
 	}
 
 	return ps;

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 16:29:55 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4EF9E1065679;
	Tue,  3 Aug 2010 16:29:55 +0000 (UTC)
	(envelope-from fabient@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 330458FC12;
	Tue,  3 Aug 2010 16:29:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73GTtGk098617;
	Tue, 3 Aug 2010 16:29:55 GMT (envelope-from fabient@svn.freebsd.org)
Received: (from fabient@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73GTthW098614;
	Tue, 3 Aug 2010 16:29:55 GMT (envelope-from fabient@svn.freebsd.org)
Message-Id: <201008031629.o73GTthW098614@svn.freebsd.org>
From: Fabien Thomas 
Date: Tue, 3 Aug 2010 16: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: r210818 - in stable/8/sys: dev/hwpmc sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 16:29:55 -0000

Author: fabient
Date: Tue Aug  3 16:29:54 2010
New Revision: 210818
URL: http://svn.freebsd.org/changeset/base/210818

Log:
  MFC r208861:
  
  Convert pm_runcount to int to correctly check for negative value.
  Remove uncessary check for error.
  
  Found with:	Coverity Prevent(tm)

Modified:
  stable/8/sys/dev/hwpmc/hwpmc_mod.c
  stable/8/sys/sys/pmc.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/hwpmc/hwpmc_mod.c
==============================================================================
--- stable/8/sys/dev/hwpmc/hwpmc_mod.c	Tue Aug  3 16:27:13 2010	(r210817)
+++ stable/8/sys/dev/hwpmc/hwpmc_mod.c	Tue Aug  3 16:29:54 2010	(r210818)
@@ -1248,7 +1248,7 @@ pmc_process_csw_in(struct thread *td)
 			continue;
 
 		/* increment PMC runcount */
-		atomic_add_rel_32(&pm->pm_runcount, 1);
+		atomic_add_rel_int(&pm->pm_runcount, 1);
 
 		/* configure the HWPMC we are going to use. */
 		pcd = pmc_ri_to_classdep(md, ri, &adjri);
@@ -1387,7 +1387,7 @@ pmc_process_csw_out(struct thread *td)
 			pcd->pcd_stop_pmc(cpu, adjri);
 
 		/* reduce this PMC's runcount */
-		atomic_subtract_rel_32(&pm->pm_runcount, 1);
+		atomic_subtract_rel_int(&pm->pm_runcount, 1);
 
 		/*
 		 * If this PMC is associated with this process,
@@ -3252,9 +3252,6 @@ pmc_syscall_handler(struct thread *td, v
 			}
 		}
 
-		if (error)
-			break;
-
 		/*
 		 * Look for valid values for 'pm_flags'
 		 */
@@ -4045,7 +4042,7 @@ pmc_process_interrupt(int cpu, struct pm
 	    ("[pmc,%d] pm=%p runcount %d", __LINE__, (void *) pm,
 		pm->pm_runcount));
 
-	atomic_add_rel_32(&pm->pm_runcount, 1);	/* hold onto PMC */
+	atomic_add_rel_int(&pm->pm_runcount, 1);	/* hold onto PMC */
 	ps->ps_pmc = pm;
 	if ((td = curthread) && td->td_proc)
 		ps->ps_pid = td->td_proc->p_pid;
@@ -4246,7 +4243,7 @@ pmc_process_samples(int cpu)
 
 	entrydone:
 		ps->ps_nsamples = 0;	/* mark entry as free */
-		atomic_subtract_rel_32(&pm->pm_runcount, 1);
+		atomic_subtract_rel_int(&pm->pm_runcount, 1);
 
 		/* increment read pointer, modulo sample size */
 		if (++ps == psb->ps_fence)
@@ -4418,7 +4415,7 @@ pmc_process_exit(void *arg __unused, str
 				mtx_pool_unlock_spin(pmc_mtxpool, pm);
 			}
 
-			atomic_subtract_rel_32(&pm->pm_runcount,1);
+			atomic_subtract_rel_int(&pm->pm_runcount,1);
 
 			KASSERT((int) pm->pm_runcount >= 0,
 			    ("[pmc,%d] runcount is %d", __LINE__, ri));

Modified: stable/8/sys/sys/pmc.h
==============================================================================
--- stable/8/sys/sys/pmc.h	Tue Aug  3 16:27:13 2010	(r210817)
+++ stable/8/sys/sys/pmc.h	Tue Aug  3 16:29:54 2010	(r210818)
@@ -676,7 +676,7 @@ struct pmc {
 	enum pmc_event	pm_event;	/* event being measured */
 	uint32_t	pm_flags;	/* additional flags PMC_F_... */
 	struct pmc_owner *pm_owner;	/* owner thread state */
-	uint32_t	pm_runcount;	/* #cpus currently on */
+	int		pm_runcount;	/* #cpus currently on */
 	enum pmc_state	pm_state;	/* current PMC state */
 
 	/*

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 16:30:57 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4860B106567A;
	Tue,  3 Aug 2010 16:30:57 +0000 (UTC)
	(envelope-from olli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1DFFF8FC1F;
	Tue,  3 Aug 2010 16:30:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73GUvB2098910;
	Tue, 3 Aug 2010 16:30:57 GMT (envelope-from olli@svn.freebsd.org)
Received: (from olli@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73GUv2d098908;
	Tue, 3 Aug 2010 16:30:57 GMT (envelope-from olli@svn.freebsd.org)
Message-Id: <201008031630.o73GUv2d098908@svn.freebsd.org>
From: Oliver Fromme 
Date: Tue, 3 Aug 2010 16:30:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210819 - head/sys/dev/drm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 16:30:57 -0000

Author: olli
Date: Tue Aug  3 16:30:56 2010
New Revision: 210819
URL: http://svn.freebsd.org/changeset/base/210819

Log:
  Add support for ATI Radeon HD 4250.
  
  PR:		kern/149041
  Submitted by:	olli
  Reviewed by:	rnoland
  Approved by:	des (mentor)
  MFC after:	1 week

Modified:
  head/sys/dev/drm/drm_pciids.h

Modified: head/sys/dev/drm/drm_pciids.h
==============================================================================
--- head/sys/dev/drm/drm_pciids.h	Tue Aug  3 16:29:54 2010	(r210818)
+++ head/sys/dev/drm/drm_pciids.h	Tue Aug  3 16:30:56 2010	(r210819)
@@ -335,6 +335,7 @@
 	{0x1002, 0x9712, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon HD 4200"}, \
 	{0x1002, 0x9713, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon 4100"}, \
 	{0x1002, 0x9714, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI RS880"}, \
+	{0x1002, 0x9715, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4250"}, \
 	{0x1002, 0x9440, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \
 	{0x1002, 0x9441, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4870 X2"}, \
 	{0x1002, 0x9442, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 16:31:19 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DCF921065679;
	Tue,  3 Aug 2010 16:31:18 +0000 (UTC)
	(envelope-from fabient@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C06AE8FC1F;
	Tue,  3 Aug 2010 16:31:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73GVICQ099033;
	Tue, 3 Aug 2010 16:31:18 GMT (envelope-from fabient@svn.freebsd.org)
Received: (from fabient@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73GVIFB099030;
	Tue, 3 Aug 2010 16:31:18 GMT (envelope-from fabient@svn.freebsd.org)
Message-Id: <201008031631.o73GVIFB099030@svn.freebsd.org>
From: Fabien Thomas 
Date: Tue, 3 Aug 2010 16:31: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: r210820 - in stable/7/sys: dev/hwpmc sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 16:31:19 -0000

Author: fabient
Date: Tue Aug  3 16:31:18 2010
New Revision: 210820
URL: http://svn.freebsd.org/changeset/base/210820

Log:
  MFC r208861:
  
  Convert pm_runcount to int to correctly check for negative value.
  Remove uncessary check for error.
  
  Found with:	Coverity Prevent(tm)

Modified:
  stable/7/sys/dev/hwpmc/hwpmc_mod.c
  stable/7/sys/sys/pmc.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/hwpmc/hwpmc_mod.c
==============================================================================
--- stable/7/sys/dev/hwpmc/hwpmc_mod.c	Tue Aug  3 16:30:56 2010	(r210819)
+++ stable/7/sys/dev/hwpmc/hwpmc_mod.c	Tue Aug  3 16:31:18 2010	(r210820)
@@ -1251,7 +1251,7 @@ pmc_process_csw_in(struct thread *td)
 			continue;
 
 		/* increment PMC runcount */
-		atomic_add_rel_32(&pm->pm_runcount, 1);
+		atomic_add_rel_int(&pm->pm_runcount, 1);
 
 		/* configure the HWPMC we are going to use. */
 		pcd = pmc_ri_to_classdep(md, ri, &adjri);
@@ -1390,7 +1390,7 @@ pmc_process_csw_out(struct thread *td)
 			pcd->pcd_stop_pmc(cpu, adjri);
 
 		/* reduce this PMC's runcount */
-		atomic_subtract_rel_32(&pm->pm_runcount, 1);
+		atomic_subtract_rel_int(&pm->pm_runcount, 1);
 
 		/*
 		 * If this PMC is associated with this process,
@@ -3256,9 +3256,6 @@ pmc_syscall_handler(struct thread *td, v
 			}
 		}
 
-		if (error)
-			break;
-
 		/*
 		 * Look for valid values for 'pm_flags'
 		 */
@@ -4049,7 +4046,7 @@ pmc_process_interrupt(int cpu, struct pm
 	    ("[pmc,%d] pm=%p runcount %d", __LINE__, (void *) pm,
 		pm->pm_runcount));
 
-	atomic_add_rel_32(&pm->pm_runcount, 1);	/* hold onto PMC */
+	atomic_add_rel_int(&pm->pm_runcount, 1);	/* hold onto PMC */
 	ps->ps_pmc = pm;
 	if ((td = curthread) && td->td_proc)
 		ps->ps_pid = td->td_proc->p_pid;
@@ -4250,7 +4247,7 @@ pmc_process_samples(int cpu)
 
 	entrydone:
 		ps->ps_nsamples = 0;	/* mark entry as free */
-		atomic_subtract_rel_32(&pm->pm_runcount, 1);
+		atomic_subtract_rel_int(&pm->pm_runcount, 1);
 
 		/* increment read pointer, modulo sample size */
 		if (++ps == psb->ps_fence)
@@ -4422,7 +4419,7 @@ pmc_process_exit(void *arg __unused, str
 				mtx_pool_unlock_spin(pmc_mtxpool, pm);
 			}
 
-			atomic_subtract_rel_32(&pm->pm_runcount,1);
+			atomic_subtract_rel_int(&pm->pm_runcount,1);
 
 			KASSERT((int) pm->pm_runcount >= 0,
 			    ("[pmc,%d] runcount is %d", __LINE__, ri));

Modified: stable/7/sys/sys/pmc.h
==============================================================================
--- stable/7/sys/sys/pmc.h	Tue Aug  3 16:30:56 2010	(r210819)
+++ stable/7/sys/sys/pmc.h	Tue Aug  3 16:31:18 2010	(r210820)
@@ -676,7 +676,7 @@ struct pmc {
 	enum pmc_event	pm_event;	/* event being measured */
 	uint32_t	pm_flags;	/* additional flags PMC_F_... */
 	struct pmc_owner *pm_owner;	/* owner thread state */
-	uint32_t	pm_runcount;	/* #cpus currently on */
+	int		pm_runcount;	/* #cpus currently on */
 	enum pmc_state	pm_state;	/* current PMC state */
 
 	/*

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 16:35:12 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D93B31065674;
	Tue,  3 Aug 2010 16:35:12 +0000 (UTC)
	(envelope-from fabient@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C61F18FC1A;
	Tue,  3 Aug 2010 16:35:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73GZC6d099961;
	Tue, 3 Aug 2010 16:35:12 GMT (envelope-from fabient@svn.freebsd.org)
Received: (from fabient@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73GZCoS099959;
	Tue, 3 Aug 2010 16:35:12 GMT (envelope-from fabient@svn.freebsd.org)
Message-Id: <201008031635.o73GZCoS099959@svn.freebsd.org>
From: Fabien Thomas 
Date: Tue, 3 Aug 2010 16:35: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: r210821 - stable/8/sys/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 16:35:13 -0000

Author: fabient
Date: Tue Aug  3 16:35:12 2010
New Revision: 210821
URL: http://svn.freebsd.org/changeset/base/210821

Log:
  MFC r209196:
  Set the comment at the right place for PMC uncore classes.

Modified:
  stable/8/sys/sys/pmc.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/sys/pmc.h
==============================================================================
--- stable/8/sys/sys/pmc.h	Tue Aug  3 16:31:18 2010	(r210820)
+++ stable/8/sys/sys/pmc.h	Tue Aug  3 16:35:12 2010	(r210821)
@@ -109,8 +109,8 @@ enum pmc_cputype {
 	__PMC_CLASS(P4)		/* Intel Pentium-IV counters */		\
 	__PMC_CLASS(IAF)	/* Intel Core2/Atom, fixed function */	\
 	__PMC_CLASS(IAP)	/* Intel Core...Atom, programmable */   \
-	__PMC_CLASS(UCF)	/* Intel Uncore programmable */		\
-	__PMC_CLASS(UCP)	/* Intel Uncore fixed function */
+	__PMC_CLASS(UCF)	/* Intel Uncore fixed function */	\
+	__PMC_CLASS(UCP)	/* Intel Uncore programmable */
 
 enum pmc_class {
 #undef  __PMC_CLASS

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 16:37:30 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 54D50106566B;
	Tue,  3 Aug 2010 16:37:30 +0000 (UTC)
	(envelope-from fabient@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 42E728FC14;
	Tue,  3 Aug 2010 16:37:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73GbUZ8000614;
	Tue, 3 Aug 2010 16:37:30 GMT (envelope-from fabient@svn.freebsd.org)
Received: (from fabient@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73GbUXT000612;
	Tue, 3 Aug 2010 16:37:30 GMT (envelope-from fabient@svn.freebsd.org)
Message-Id: <201008031637.o73GbUXT000612@svn.freebsd.org>
From: Fabien Thomas 
Date: Tue, 3 Aug 2010 16:37: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: r210822 - stable/7/sys/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 16:37:30 -0000

Author: fabient
Date: Tue Aug  3 16:37:29 2010
New Revision: 210822
URL: http://svn.freebsd.org/changeset/base/210822

Log:
  MFC r209196:
  Set the comment at the right place for PMC uncore classes.

Modified:
  stable/7/sys/sys/pmc.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/sys/pmc.h
==============================================================================
--- stable/7/sys/sys/pmc.h	Tue Aug  3 16:35:12 2010	(r210821)
+++ stable/7/sys/sys/pmc.h	Tue Aug  3 16:37:29 2010	(r210822)
@@ -109,8 +109,8 @@ enum pmc_cputype {
 	__PMC_CLASS(P4)		/* Intel Pentium-IV counters */		\
 	__PMC_CLASS(IAF)	/* Intel Core2/Atom, fixed function */	\
 	__PMC_CLASS(IAP)	/* Intel Core...Atom, programmable */   \
-	__PMC_CLASS(UCF)	/* Intel Uncore programmable */		\
-	__PMC_CLASS(UCP)	/* Intel Uncore fixed function */	\
+	__PMC_CLASS(UCF)	/* Intel Uncore fixed function */	\
+	__PMC_CLASS(UCP)	/* Intel Uncore programmable */
 
 enum pmc_class {
 #undef  __PMC_CLASS

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 17:37:09 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 73D01106566B
	for ; Tue,  3 Aug 2010 17:37:09 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4])
	by mx1.freebsd.org (Postfix) with ESMTP id AA2BB8FC1E
	for ; Tue,  3 Aug 2010 17:37:08 +0000 (UTC)
Received: (qmail 29896 invoked by uid 399); 3 Aug 2010 17:37:07 -0000
Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1)
	by localhost with ESMTPAM; 3 Aug 2010 17:37:07 -0000
X-Originating-IP: 127.0.0.1
X-Sender: dougb@dougbarton.us
Message-ID: <4C5853C2.9090900@FreeBSD.org>
Date: Tue, 03 Aug 2010 10:37:06 -0700
From: Doug Barton 
Organization: http://SupersetSolutions.com/
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1
MIME-Version: 1.0
To: Benedict Reuschling 
References: <201008031621.o73GLms7096458@svn.freebsd.org>
In-Reply-To: <201008031621.o73GLms7096458@svn.freebsd.org>
X-Enigmail-Version: 1.1.1
OpenPGP: id=1A1ABC84
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r210812 - head/share/man/man5
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 17:37:09 -0000

On 08/03/10 09:21, Benedict Reuschling wrote:
>   .Xr sh 1 ,
> -.Xr usbconfig 1 ,
> +.Xr usbconfig 8 ,
>   .Xr vi 1 ,

I was going to comment on this bit, but you beat me to it. :)  The 
usbconfig entry needs to be sorted down with the other 8's. The .Xr's in 
the "SEE ALSO" section get sorted by section number first, then 
alphabetical order.


hth,

Doug

-- 

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/

	Computers are useless. They can only give you answers.
			-- Pablo Picasso


From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 17:40:10 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 146AE1065670;
	Tue,  3 Aug 2010 17:40:10 +0000 (UTC)
	(envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 00C958FC21;
	Tue,  3 Aug 2010 17:40:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73He9im014702;
	Tue, 3 Aug 2010 17:40:09 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73He9C1014688;
	Tue, 3 Aug 2010 17:40:09 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201008031740.o73He9C1014688@svn.freebsd.org>
From: Joel Dahl 
Date: Tue, 3 Aug 2010 17:40:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210823 - in head/lib: libbluetooth libdevstat libefi
	libelf libmemstat libpmc librtld_db libusb libutil
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 17:40:10 -0000

Author: joel (doc committer)
Date: Tue Aug  3 17:40:09 2010
New Revision: 210823
URL: http://svn.freebsd.org/changeset/base/210823

Log:
  Spelling fixes.

Modified:
  head/lib/libbluetooth/bluetooth.3
  head/lib/libdevstat/devstat.3
  head/lib/libefi/libefi.3
  head/lib/libelf/elf_strptr.3
  head/lib/libmemstat/libmemstat.3
  head/lib/libpmc/pmc.corei7.3
  head/lib/libpmc/pmc.westmere.3
  head/lib/libpmc/pmc.xscale.3
  head/lib/librtld_db/librtld_db.3
  head/lib/libusb/libusb.3
  head/lib/libutil/kinfo_getfile.3
  head/lib/libutil/kinfo_getvmmap.3
  head/lib/libutil/property.3

Modified: head/lib/libbluetooth/bluetooth.3
==============================================================================
--- head/lib/libbluetooth/bluetooth.3	Tue Aug  3 16:37:29 2010	(r210822)
+++ head/lib/libbluetooth/bluetooth.3	Tue Aug  3 17:40:09 2010	(r210823)
@@ -383,7 +383,7 @@ previously obtained with
 .Xr bt_devopen 3 .
 The
 .Fa opcode
-parameter is exppected to be in the host byte order.
+parameter is expected to be in the host byte order.
 The
 .Fa param
 and
@@ -422,7 +422,7 @@ function does not modify the
 .Dv HCI
 filter on the provided socket
 .Fa s .
-The function returns total number of bytes recevied,
+The function returns total number of bytes received,
 or -1 if an error occurred.
 .Pp
 The

Modified: head/lib/libdevstat/devstat.3
==============================================================================
--- head/lib/libdevstat/devstat.3	Tue Aug  3 16:37:29 2010	(r210822)
+++ head/lib/libdevstat/devstat.3	Tue Aug  3 17:40:09 2010	(r210823)
@@ -626,7 +626,7 @@ blocksize of 512 bytes will be used in t
 type:
 .Vt "long double *"
 .Pp
-The average number of blocks per second in the specificed type of transaction
+The average number of blocks per second in the specified type of transaction
 between the acquisition of
 .Fa previous
 and

Modified: head/lib/libefi/libefi.3
==============================================================================
--- head/lib/libefi/libefi.3	Tue Aug  3 16:37:29 2010	(r210822)
+++ head/lib/libefi/libefi.3	Tue Aug  3 17:40:09 2010	(r210823)
@@ -91,7 +91,7 @@ consists of the bit values defined by th
 Variables can be created, modified and deleted using the
 .Fn efi_setvar
 function.
-All new variables must be non-volatile and runtime accessable in
+All new variables must be non-volatile and runtime accessible in
 order for the request to succeed.
 Note that for runtime accessable variables the boottime accessable bit must
 be set as well.

Modified: head/lib/libelf/elf_strptr.3
==============================================================================
--- head/lib/libelf/elf_strptr.3	Tue Aug  3 16:37:29 2010	(r210822)
+++ head/lib/libelf/elf_strptr.3	Tue Aug  3 17:40:09 2010	(r210823)
@@ -76,7 +76,7 @@ was not the section index for a string t
 .It Bq Er ELF_E_ARGUMENT
 Argument
 .Ar stroffset
-exceeeded the size of the string table.
+exceeded the size of the string table.
 .It Bq Er ELF_E_ARGUMENT
 Argument
 .Ar stroffset

Modified: head/lib/libmemstat/libmemstat.3
==============================================================================
--- head/lib/libmemstat/libmemstat.3	Tue Aug  3 16:37:29 2010	(r210822)
+++ head/lib/libmemstat/libmemstat.3	Tue Aug  3 17:40:09 2010	(r210823)
@@ -258,7 +258,7 @@ Two additional constants in the allocato
 which will only be returned as a result of a library error, and
 .Dv ALLOCATOR_ANY ,
 which can be used to specify that returning types matching any allocator is
-permittible from
+permittable from
 .Fn memstat_mtl_find .
 .Ss Access Method List
 The following accessor methods are defined, of which some will be valid for
@@ -281,7 +281,7 @@ If the memory type has an administrative
 allocations, return it.
 .It Fn memstat_get_byteslimit
 If the memory type has an administrative limit on the number of bytes of
-memory that may be simultaenously allocated for the memory type, return it.
+memory that may be simultaneously allocated for the memory type, return it.
 .It Fn memstat_get_sizemask
 If the memory type supports variable allocation sizes, return a bitmask of
 sizes allocated for the memory type.

Modified: head/lib/libpmc/pmc.corei7.3
==============================================================================
--- head/lib/libpmc/pmc.corei7.3	Tue Aug  3 16:37:29 2010	(r210822)
+++ head/lib/libpmc/pmc.corei7.3	Tue Aug  3 17:40:09 2010	(r210823)
@@ -898,7 +898,7 @@ necessarily executed or retired.
 .It Li BACLEAR_FORCE_IQ
 .Pq Event A7H , Umask 01H
 Counts number of times a BACLEAR was forced by the Instruction Queue. The IQ
-is also responsible for providing conditional branch prediciton direction
+is also responsible for providing conditional branch prediction direction
 based on a static scheme and dynamic data provided by the L2 Branch
 Prediction Unit. If the conditional branch target is not found in the Target
 Array and the IQ predicts that the branch is taken, then the IQ will force
@@ -1179,7 +1179,7 @@ Counts unfusion events due to floating p
 Counts the number of branch instructions decoded.
 .It Li BPU_MISSED_CALL_RET
 .Pq Event E5H , Umask 01H
-Counts number of times the Branch Prediciton Unit missed predicting a call
+Counts number of times the Branch Prediction Unit missed predicting a call
 or return branch.
 .It Li BACLEAR.CLEAR
 .Pq Event E6H , Umask 01H

Modified: head/lib/libpmc/pmc.westmere.3
==============================================================================
--- head/lib/libpmc/pmc.westmere.3	Tue Aug  3 16:37:29 2010	(r210822)
+++ head/lib/libpmc/pmc.westmere.3	Tue Aug  3 17:40:09 2010	(r210823)
@@ -840,7 +840,7 @@ necessarily executed or retired.
 .It Li BACLEAR_FORCE_IQ
 .Pq Event A7H , Umask 01H
 Counts number of times a BACLEAR was forced by the Instruction Queue. The IQ
-is also responsible for providing conditional branch prediciton direction
+is also responsible for providing conditional branch prediction direction
 based on a static scheme and dynamic data provided by the L2 Branch
 Prediction Unit. If the conditional branch target is not found in the Target
 Array and the IQ predicts that the branch is taken, then the IQ will force
@@ -1170,7 +1170,7 @@ Counts unfusion events due to floating p
 Counts the number of branch instructions decoded.
 .It Li BPU_MISSED_CALL_RET
 .Pq Event E5H , Umask 01H
-Counts number of times the Branch Prediciton Unit missed predicting a call
+Counts number of times the Branch Prediction Unit missed predicting a call
 or return branch.
 .It Li BACLEAR.CLEAR
 .Pq Event E6H , Umask 01H

Modified: head/lib/libpmc/pmc.xscale.3
==============================================================================
--- head/lib/libpmc/pmc.xscale.3	Tue Aug  3 16:37:29 2010	(r210822)
+++ head/lib/libpmc/pmc.xscale.3	Tue Aug  3 17:40:09 2010	(r210823)
@@ -107,7 +107,7 @@ Multiplier stalled the instruction pipel
 .It Li DATA_CACHE_STALLED
 Data cache stalled the instruction pipeline.
 .It Li L2_CACHE_REQ
-L2 cache request, not inclusing cache operations.
+L2 cache request, not including cache operations.
 .It Li L2_CACHE_MISS
 L2 cache miss, not including cache operations.
 .It Li ADDRESS_BUS_TRANS

Modified: head/lib/librtld_db/librtld_db.3
==============================================================================
--- head/lib/librtld_db/librtld_db.3	Tue Aug  3 16:37:29 2010	(r210822)
+++ head/lib/librtld_db/librtld_db.3	Tue Aug  3 17:40:09 2010	(r210823)
@@ -131,7 +131,7 @@ you received from
 resets your previously created agent.
 .Pp
 .Fn rd_delete
-dealocates the resources associated with the agent.
+deallocates the resources associated with the agent.
 .Pp
 .Fn rd_errstr
 returns an error string describing the error present in
@@ -144,11 +144,11 @@ This function always returns RD_OK.
 .Fn rd_event_addr
 returns the event address in the
 .Ft event
-paramenter.
+parameter.
 At the moment we only report RD_NOTIFY_BPT events.
 .Pp
 .Fn rd_event_getmsg
-returns the message assoicated wit hthe latest event.
+returns the message associated with the latest event.
 At the moment only RD_POSTINIT events are supported.
 .Pp
 .Fn rd_loadobj_iter

Modified: head/lib/libusb/libusb.3
==============================================================================
--- head/lib/libusb/libusb.3	Tue Aug  3 16:37:29 2010	(r210822)
+++ head/lib/libusb/libusb.3	Tue Aug  3 17:40:09 2010	(r210823)
@@ -200,7 +200,7 @@ been disconnected and a LIBUSB_ERROR cod
 .Fn libusb_release_interface "libusb_device_handle *devh" "int interface_number"
 This function release an interface. All the claimed interface must be released
 before closing a device. Returns 0 on success, LIBUSB_ERROR_NOT_FOUND if the 
-interafce was not claimed, LIBUSB_ERROR_NO_DEVICE if the device has been 
+interface was not claimed, LIBUSB_ERROR_NO_DEVICE if the device has been 
 disconnected and LIBUSB_ERROR on failure.
 .
 .Pp

Modified: head/lib/libutil/kinfo_getfile.3
==============================================================================
--- head/lib/libutil/kinfo_getfile.3	Tue Aug  3 16:37:29 2010	(r210822)
+++ head/lib/libutil/kinfo_getfile.3	Tue Aug  3 17:40:09 2010	(r210823)
@@ -45,7 +45,7 @@ of a particular process.
 The
 .Ar pid
 field contains the process identifier.
-This should be the a process that you have privilige to access.
+This should be the a process that you have privilege to access.
 The
 .Ar cntp
 field is allows the caller to know how many records are returned.

Modified: head/lib/libutil/kinfo_getvmmap.3
==============================================================================
--- head/lib/libutil/kinfo_getvmmap.3	Tue Aug  3 16:37:29 2010	(r210822)
+++ head/lib/libutil/kinfo_getvmmap.3	Tue Aug  3 17:40:09 2010	(r210823)
@@ -45,7 +45,7 @@ of a particular process.
 The
 .Ar pid
 field contains the process identifier.
-This should be the a process that you have privilige to access.
+This should be the a process that you have privilege to access.
 The
 .Ar cntp
 field is allows the caller to know how many records are returned.

Modified: head/lib/libutil/property.3
==============================================================================
--- head/lib/libutil/property.3	Tue Aug  3 16:37:29 2010	(r210822)
+++ head/lib/libutil/property.3	Tue Aug  3 17:40:09 2010	(r210823)
@@ -30,7 +30,7 @@
 .Os
 .Sh NAME
 .Nm properties_read ,
-.Nm propery_find ,
+.Nm property_find ,
 .Nm properties_free
 .Nd "functions to allow creating simple property lists from ASCII file data"
 .Sh LIBRARY

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 17:47:27 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B491D1065674;
	Tue,  3 Aug 2010 17:47:27 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A1FC78FC0C;
	Tue,  3 Aug 2010 17:47:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73HlReV016360;
	Tue, 3 Aug 2010 17:47:27 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73HlR2M016357;
	Tue, 3 Aug 2010 17:47:27 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201008031747.o73HlR2M016357@svn.freebsd.org>
From: Gavin Atkinson 
Date: Tue, 3 Aug 2010 17:47: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: r210824 - in stable/8/sys/dev/usb: . quirk
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 17:47:27 -0000

Author: gavin
Date: Tue Aug  3 17:47:27 2010
New Revision: 210824
URL: http://svn.freebsd.org/changeset/base/210824

Log:
  Merge r210515,210516,210543 from head:
  
    Prevent ukbd(4) and uhid(4) from attaching when a WiSPY DBx Spectrum
    Analyzer is attached. [1]
  
    Prevent uhid(4) from attaching to the Gembird Silver Shield remote power
    plug. [2]
  
    Prevent uhid(4) from attaching to the Liebert PowerSure Personal XT UPS.
    [3]
  
  PR:		usb/134631 [1], usb/132785 [2], usb/129251 [3]
  Submitted by:	Jesse Kempf  [1]
  Submitted by:	Dirk-Willem van Gulik  [2]
  Submitted by:	Andrew D Wiles  [3]

Modified:
  stable/8/sys/dev/usb/quirk/usb_quirk.c
  stable/8/sys/dev/usb/usbdevs
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c
==============================================================================
--- stable/8/sys/dev/usb/quirk/usb_quirk.c	Tue Aug  3 17:40:09 2010	(r210823)
+++ stable/8/sys/dev/usb/quirk/usb_quirk.c	Tue Aug  3 17:47:27 2010	(r210824)
@@ -111,9 +111,11 @@ static struct usb_quirk_entry usb_quirks
 	USB_QUIRK(APC, UPS, 0x0000, 0xffff, UQ_HID_IGNORE),
 	USB_QUIRK(BELKIN, F6C550AVR, 0x0000, 0xffff, UQ_HID_IGNORE),
 	USB_QUIRK(CYBERPOWER, 1500CAVRLCD, 0x0000, 0xffff, UQ_HID_IGNORE),
+	USB_QUIRK(CYPRESS, SILVERSHIELD, 0x0000, 0xffff, UQ_HID_IGNORE),
 	USB_QUIRK(DELORME, EARTHMATE, 0x0000, 0xffff, UQ_HID_IGNORE),
 	USB_QUIRK(ITUNERNET, USBLCD2X20, 0x0000, 0xffff, UQ_HID_IGNORE),
 	USB_QUIRK(ITUNERNET, USBLCD4X20, 0x0000, 0xffff, UQ_HID_IGNORE),
+	USB_QUIRK(LIEBERT, POWERSURE_PXT, 0x0000, 0xffff, UQ_HID_IGNORE),
 	USB_QUIRK(MGE, UPS1, 0x0000, 0xffff, UQ_HID_IGNORE),
 	USB_QUIRK(MGE, UPS2, 0x0000, 0xffff, UQ_HID_IGNORE),
 	USB_QUIRK(APPLE, IPHONE, 0x0000, 0xffff, UQ_HID_IGNORE),
@@ -121,10 +123,11 @@ static struct usb_quirk_entry usb_quirks
 	/* Devices which should be ignored by both ukbd and uhid */
 	USB_QUIRK(CYPRESS, WISPY1A, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE),
 	USB_QUIRK(METAGEEK, WISPY1B, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE),
+	USB_QUIRK(METAGEEK, WISPY24X, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE),
+	USB_QUIRK(METAGEEK2, WISPYDBX, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE),
 	USB_QUIRK(TENX, UAUDIO0, 0x0101, 0x0101, UQ_AUDIO_SWAP_LR),
 	/* MS keyboards do weird things */
 	USB_QUIRK(MICROSOFT, WLINTELLIMOUSE, 0x0000, 0xffff, UQ_MS_LEADING_BYTE),
-	USB_QUIRK(METAGEEK, WISPY24X, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE),
 	/* umodem(4) device quirks */
 	USB_QUIRK(METRICOM, RICOCHET_GS, 0x100, 0x100, UQ_ASSUME_CM_OVER_DATA),
 	USB_QUIRK(SANYO, SCP4900, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA),

Modified: stable/8/sys/dev/usb/usbdevs
==============================================================================
--- stable/8/sys/dev/usb/usbdevs	Tue Aug  3 17:40:09 2010	(r210823)
+++ stable/8/sys/dev/usb/usbdevs	Tue Aug  3 17:47:27 2010	(r210824)
@@ -353,6 +353,7 @@ vendor ASIAMD		0x06be	Asia Microelectron
 vendor BIZLINK		0x06c4	Bizlink International
 vendor KEYSPAN		0x06cd	Keyspan / InnoSys Inc.
 vendor AASHIMA		0x06d6	Aashima Technology
+vendor LIEBERT		0x06da	Liebert
 vendor MULTITECH	0x06e0	MultiTech
 vendor ADS		0x06e1	ADS Technologies
 vendor ALCATELM		0x06e4	Alcatel Microelectronics
@@ -653,6 +654,7 @@ vendor MPMAN		0x1cae	MpMan
 vendor DRESDENELEKTRONIK 0x1cf1 dresden elektronik
 vendor PEGATRON		0x1d4d	Pegatron
 vendor QISDA		0x1da5  Qisda
+vendor METAGEEK2	0x1dd5	MetaGeek
 vendor ALINK		0x1e0e  Alink
 vendor AIRTIES		0x1eda	AirTies
 vendor DLINK		0x2001	D-Link
@@ -1274,6 +1276,7 @@ product CYPRESS IKARILASER	0x121f	Ikari 
 product CYPRESS USBRS232	0x5500	USB-RS232 Interface
 product CYPRESS SLIM_HUB	0x6560	Slim Hub
 product CYPRESS XX6830XX	0x6830	PATA Storage Device
+product CYPRESS SILVERSHIELD	0xfd13	Gembird Silver Shield PM
 
 /* Daisy Technology products */
 product DAISY DMC		0x6901	USB MultiMedia Reader
@@ -1926,6 +1929,9 @@ product LEXAR CF_READER		0xb002	USB CF R
 /* Lexmark products */
 product LEXMARK S2450		0x0009	Optra S 2450
 
+/* Liebert products */
+product LIEBERT POWERSURE_PXT	0xffff	PowerSure Personal XT
+
 /* Linksys products */
 product LINKSYS MAUSB2		0x0105	Camedia MAUSB-2
 product LINKSYS USB10TX1	0x200c	USB10TX
@@ -2026,6 +2032,7 @@ product MERLIN V620             0x1110  
 /* MetaGeek products */
 product METAGEEK WISPY1B	0x083e	MetaGeek Wi-Spy
 product METAGEEK WISPY24X	0x083f	MetaGeek Wi-Spy 2.4x
+product METAGEEK2 WISPYDBX	0x5000	MetaGeek Wi-Spy DBx
 
 /* Metricom products */
 product METRICOM RICOCHET_GS	0x0001	Ricochet GS

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 18:29:58 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C3B8E106566B;
	Tue,  3 Aug 2010 18:29:58 +0000 (UTC)
	(envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B2B3E8FC0C;
	Tue,  3 Aug 2010 18:29:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73ITwQY025895;
	Tue, 3 Aug 2010 18:29:58 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73ITwXB025894;
	Tue, 3 Aug 2010 18:29:58 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201008031829.o73ITwXB025894@svn.freebsd.org>
From: Joel Dahl 
Date: Tue, 3 Aug 2010 18:29:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210825 - head/lib/libarchive
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 18:29:58 -0000

Author: joel (doc committer)
Date: Tue Aug  3 18:29:58 2010
New Revision: 210825
URL: http://svn.freebsd.org/changeset/base/210825

Log:
  Fix typo.

Modified:
  head/lib/libarchive/libarchive_internals.3

Modified: head/lib/libarchive/libarchive_internals.3
==============================================================================
--- head/lib/libarchive/libarchive_internals.3	Tue Aug  3 17:47:27 2010	(r210824)
+++ head/lib/libarchive/libarchive_internals.3	Tue Aug  3 18:29:58 2010	(r210825)
@@ -126,7 +126,7 @@ to read the entire file into memory at o
 entire file to libarchive as a single block;
 other clients may begin asynchronous I/O operations for the
 next block on each request.
-.Ss Decompresssion Layer
+.Ss Decompression Layer
 The decompression layer not only handles decompression,
 it also buffers data so that the format handlers see a
 much nicer I/O model.

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 19:08:02 2010
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1122D1065676;
	Tue,  3 Aug 2010 19:08:02 +0000 (UTC) (envelope-from bcr@FreeBSD.org)
Received: from mxout0.bln1.prohost.de (mxout0.bln1.prohost.de [213.160.84.46])
	by mx1.freebsd.org (Postfix) with ESMTP id 784E18FC08;
	Tue,  3 Aug 2010 19:07:57 +0000 (UTC)
Received: from mx1bln1.prossl.de (localhost.localdomain [127.0.0.1])
	by localhost.localdomain (8.14.1/8.14.1) with ESMTP id o73J7oLw020031; 
	Tue, 3 Aug 2010 21:07:50 +0200
Received: from 79.199.27.231 (SquirrelMail authenticated user benedict)
	by mx1bln1.prossl.de with HTTP; Tue, 3 Aug 2010 21:07:50 +0200 (CEST)
Message-ID: <10675.79.199.27.231.1280862470.squirrel@mx1bln1.prossl.de>
In-Reply-To: <4C5853C2.9090900@FreeBSD.org>
References: <201008031621.o73GLms7096458@svn.freebsd.org>
	<4C5853C2.9090900@FreeBSD.org>
Date: Tue, 3 Aug 2010 21:07:50 +0200 (CEST)
From: "Benedict Reuschling" 
To: "Doug Barton" 
User-Agent: SquirrelMail/1.4.13
MIME-Version: 1.0
Content-Type: multipart/mixed;boundary="----=_20100803210750_55339"
X-Priority: 3 (Normal)
Importance: Normal
X-Null-Tag: 7a05cc17a1342cba9b1534a2646a53d3
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r210812 - head/share/man/man5
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 19:08:02 -0000

------=_20100803210750_55339
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

> On 08/03/10 09:21, Benedict Reuschling wrote:
>>   .Xr sh 1 ,
>> -.Xr usbconfig 1 ,
>> +.Xr usbconfig 8 ,
>>   .Xr vi 1 ,
>
> I was going to comment on this bit, but you beat me to it. :)  The
> usbconfig entry needs to be sorted down with the other 8's. The .Xr's in
> the "SEE ALSO" section get sorted by section number first, then
> alphabetical order.
You're absolutely right. It kind of sticks out like a sore spot. :)
How about the attached patch?

Kind regards

Benedict
------=_20100803210750_55339
Content-Type: application/octet-stream; name="rc.conf.5.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="rc.conf.5.diff"

SW5kZXg6IHJjLmNvbmYuNQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSByYy5jb25mLjUJKHJldmlzaW9uIDIxMDgy
NSkKKysrIHJjLmNvbmYuNQkod29ya2luZyBjb3B5KQpAQCAtNDI3OSw3ICs0Mjc5LDYgQEAKIC5Y
ciBrYmRjb250cm9sIDEgLAogLlhyIG1ha2V3aGF0aXMgMSAsCiAuWHIgc2ggMSAsCi0uWHIgdXNi
Y29uZmlnIDggLAogLlhyIHZpIDEgLAogLlhyIHZpZGNvbnRyb2wgMSAsCiAuWHIgYnJpZGdlIDQg
LApAQCAtNDM1NSw2ICs0MzU0LDcgQEAKIC5YciBzeXNjdGwgOCAsCiAuWHIgc3lzbG9nZCA4ICwK
IC5YciB0aW1lZCA4ICwKKy5YciB1c2Jjb25maWcgOCAsCiAuWHIgd2xhbmRlYnVnIDggLAogLlhy
IHlwIDggLAogLlhyIHlwYmluZCA4ICwK
------=_20100803210750_55339--



From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 19:09:43 2010
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 82454106574A
	for ; Tue,  3 Aug 2010 19:09:43 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4])
	by mx1.freebsd.org (Postfix) with ESMTP id 0FE968FC13
	for ; Tue,  3 Aug 2010 19:09:42 +0000 (UTC)
Received: (qmail 27350 invoked by uid 399); 3 Aug 2010 19:09:42 -0000
Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1)
	by localhost with ESMTPAM; 3 Aug 2010 19:09:42 -0000
X-Originating-IP: 127.0.0.1
X-Sender: dougb@dougbarton.us
Message-ID: <4C586974.9090207@FreeBSD.org>
Date: Tue, 03 Aug 2010 12:09:40 -0700
From: Doug Barton 
Organization: http://SupersetSolutions.com/
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1
MIME-Version: 1.0
To: Benedict Reuschling 
References: <201008031621.o73GLms7096458@svn.freebsd.org>
	<4C5853C2.9090900@FreeBSD.org>
	<10675.79.199.27.231.1280862470.squirrel@mx1bln1.prossl.de>
In-Reply-To: <10675.79.199.27.231.1280862470.squirrel@mx1bln1.prossl.de>
X-Enigmail-Version: 1.1.1
OpenPGP: id=1A1ABC84
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r210812 - head/share/man/man5
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 19:09:43 -0000

On 08/03/10 12:07, Benedict Reuschling wrote:
>> On 08/03/10 09:21, Benedict Reuschling wrote:
>>>    .Xr sh 1 ,
>>> -.Xr usbconfig 1 ,
>>> +.Xr usbconfig 8 ,
>>>    .Xr vi 1 ,
>>
>> I was going to comment on this bit, but you beat me to it. :)  The
>> usbconfig entry needs to be sorted down with the other 8's. The .Xr's in
>> the "SEE ALSO" section get sorted by section number first, then
>> alphabetical order.
> You're absolutely right. It kind of sticks out like a sore spot. :)
> How about the attached patch?

Right-O! Thanks. :)


Doug

-- 

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/

	Computers are useless. They can only give you answers.
			-- Pablo Picasso


From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 19:25:58 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6FC4D1065673;
	Tue,  3 Aug 2010 19:25:58 +0000 (UTC) (envelope-from bcr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5E9E28FC16;
	Tue,  3 Aug 2010 19:25:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73JPwpS038512;
	Tue, 3 Aug 2010 19:25:58 GMT (envelope-from bcr@svn.freebsd.org)
Received: (from bcr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73JPwZR038510;
	Tue, 3 Aug 2010 19:25:58 GMT (envelope-from bcr@svn.freebsd.org)
Message-Id: <201008031925.o73JPwZR038510@svn.freebsd.org>
From: Benedict Reuschling 
Date: Tue, 3 Aug 2010 19:25:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210826 - head/share/man/man5
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 19:25:58 -0000

Author: bcr (doc committer)
Date: Tue Aug  3 19:25:58 2010
New Revision: 210826
URL: http://svn.freebsd.org/changeset/base/210826

Log:
  Correctly sort usbconfig(8) within the SEE ALSO section.
  
  Noticed by:     dougb
  MFC after:      3 days

Modified:
  head/share/man/man5/rc.conf.5

Modified: head/share/man/man5/rc.conf.5
==============================================================================
--- head/share/man/man5/rc.conf.5	Tue Aug  3 18:29:58 2010	(r210825)
+++ head/share/man/man5/rc.conf.5	Tue Aug  3 19:25:58 2010	(r210826)
@@ -4279,7 +4279,6 @@ on your system to find this information.
 .Xr kbdcontrol 1 ,
 .Xr makewhatis 1 ,
 .Xr sh 1 ,
-.Xr usbconfig 8 ,
 .Xr vi 1 ,
 .Xr vidcontrol 1 ,
 .Xr bridge 4 ,
@@ -4355,6 +4354,7 @@ on your system to find this information.
 .Xr sysctl 8 ,
 .Xr syslogd 8 ,
 .Xr timed 8 ,
+.Xr usbconfig 8 ,
 .Xr wlandebug 8 ,
 .Xr yp 8 ,
 .Xr ypbind 8 ,

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 20:56:24 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0F7E1106564A;
	Tue,  3 Aug 2010 20:56:24 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F21E78FC1B;
	Tue,  3 Aug 2010 20:56:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73KuNJu058701;
	Tue, 3 Aug 2010 20:56:23 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73KuNVh058700;
	Tue, 3 Aug 2010 20:56:23 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008032056.o73KuNVh058700@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Tue, 3 Aug 2010 20:56:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210827 - head/games/grdc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 20:56:24 -0000

Author: uqs
Date: Tue Aug  3 20:56:23 2010
New Revision: 210827
URL: http://svn.freebsd.org/changeset/base/210827

Log:
  grdc(6): de-obfuscate the timekeeping of now/delay
  
  - 'now' only contains current time readings
  - delay is only used as parameter to nanosleep
  - prev_sec contains the time_t of the previous loop iteration
  
  Submitted by:	bde
  MFC after:	2 weeks

Modified:
  head/games/grdc/grdc.c

Modified: head/games/grdc/grdc.c
==============================================================================
--- head/games/grdc/grdc.c	Tue Aug  3 19:25:58 2010	(r210826)
+++ head/games/grdc/grdc.c	Tue Aug  3 20:56:23 2010	(r210827)
@@ -55,6 +55,7 @@ int
 main(int argc, char *argv[])
 {
 	struct timespec delay;
+	time_t prev_sec;
 	long t, a;
 	int i, j, s, k;
 	int n;
@@ -138,6 +139,7 @@ main(int argc, char *argv[])
 		attrset(COLOR_PAIR(2));
 	}
 	clock_gettime(CLOCK_REALTIME_FAST, &now);
+	prev_sec = now.tv_sec;
 	do {
 		mask = 0;
 		tm = localtime(&now.tv_sec);
@@ -194,20 +196,20 @@ main(int argc, char *argv[])
 		}
 		movto(6, 0);
 		refresh();
-		clock_gettime(CLOCK_REALTIME_FAST, &delay);
-		if (delay.tv_sec == now.tv_sec) {
+		clock_gettime(CLOCK_REALTIME_FAST, &now);
+		if (now.tv_sec == prev_sec) {
 			if (delay.tv_nsec > 0) {
 				delay.tv_sec = 0;
-				delay.tv_nsec = 1000000000 - delay.tv_nsec;
+				delay.tv_nsec = 1000000000 - now.tv_nsec;
 			} else {
 				delay.tv_sec = 1;
 				delay.tv_nsec = 0;
 			}
 			nanosleep(&delay, NULL);
-			clock_gettime(CLOCK_REALTIME_FAST, &delay);
+			clock_gettime(CLOCK_REALTIME_FAST, &now);
 		}
-		n -= delay.tv_sec - now.tv_sec;
-		now.tv_sec = delay.tv_sec;
+		n -= now.tv_sec - prev_sec;
+		prev_sec = now.tv_sec;
 		if (sigtermed) {
 			standend();
 			clear();

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 22:06:34 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C7D15106567B;
	Tue,  3 Aug 2010 22:06:34 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B53AF8FC2A;
	Tue,  3 Aug 2010 22:06:34 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73M6Ywl074595;
	Tue, 3 Aug 2010 22:06:34 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73M6YkX074592;
	Tue, 3 Aug 2010 22:06:34 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201008032206.o73M6YkX074592@svn.freebsd.org>
From: Gavin Atkinson 
Date: Tue, 3 Aug 2010 22:06:34 +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: r210828 - stable/7/sys/dev/usb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 22:06:35 -0000

Author: gavin
Date: Tue Aug  3 22:06:34 2010
New Revision: 210828
URL: http://svn.freebsd.org/changeset/base/210828

Log:
  Merge r210515,210516,210543 from head:
  
    Prevent ukbd(4) and uhid(4) from attaching when a WiSPY DBx Spectrum
    Analyzer is attached. [1]
  
    Prevent uhid(4) from attaching to the Gembird Silver Shield remote power
    plug. [2]
  
    Prevent uhid(4) from attaching to the Liebert PowerSure Personal XT UPS.
    [3]
  
  PR:		usb/134631 [1], usb/132785 [2], usb/129251 [3]
  Submitted by:	Jesse Kempf  [1]
  Submitted by:	Dirk-Willem van Gulik  [2]
  Submitted by:	Andrew D Wiles  [3]

Modified:
  stable/7/sys/dev/usb/usb_quirks.c
  stable/7/sys/dev/usb/usbdevs
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/usb/usb_quirks.c
==============================================================================
--- stable/7/sys/dev/usb/usb_quirks.c	Tue Aug  3 20:56:23 2010	(r210827)
+++ stable/7/sys/dev/usb/usb_quirks.c	Tue Aug  3 22:06:34 2010	(r210828)
@@ -100,8 +100,12 @@ static const struct usbd_quirk_entry {
 	ANY, { UQ_HID_IGNORE }},
  { USB_VENDOR_CYBERPOWER, USB_PRODUCT_CYBERPOWER_1500CAVRLCD,
 	ANY, { UQ_HID_IGNORE }},
+ { USB_VENDOR_CYPRESS, USB_PRODUCT_CYPRESS_SILVERSHIELD,
+	ANY, { UQ_HID_IGNORE }},
  { USB_VENDOR_DELORME, USB_PRODUCT_DELORME_EARTHMATE,
 	ANY, { UQ_HID_IGNORE }},
+ { USB_VENDOR_LIEBERT, USB_PRODUCT_LIEBERT_POWERSURE_PXT,
+	ANY, { UQ_HID_IGNORE }},
  { USB_VENDOR_ITUNERNET, USB_PRODUCT_ITUNERNET_USBLCD2X20,
 	ANY, { UQ_HID_IGNORE }},
  { USB_VENDOR_MGE, USB_PRODUCT_MGE_UPS1,
@@ -120,6 +124,8 @@ static const struct usbd_quirk_entry {
 	ANY, { UQ_KBD_IGNORE }},
  { USB_VENDOR_METAGEEK, USB_PRODUCT_METAGEEK_WISPY24X,
 	ANY, { UQ_KBD_IGNORE }},
+ { USB_VENDOR_METAGEEK, USB_PRODUCT_METAGEEK2_WISPYDBX,
+	ANY, { UQ_KBD_IGNORE }},
  { 0, 0, 0, { 0 } }
 };
 

Modified: stable/7/sys/dev/usb/usbdevs
==============================================================================
--- stable/7/sys/dev/usb/usbdevs	Tue Aug  3 20:56:23 2010	(r210827)
+++ stable/7/sys/dev/usb/usbdevs	Tue Aug  3 22:06:34 2010	(r210828)
@@ -350,6 +350,7 @@ vendor ASIAMD		0x06be	Asia Microelectron
 vendor BIZLINK		0x06c4	Bizlink International
 vendor KEYSPAN		0x06cd	Keyspan / InnoSys Inc.
 vendor AASHIMA		0x06d6	Aashima Technology
+vendor LIEBERT		0x06da	Liebert
 vendor MULTITECH	0x06e0	MultiTech
 vendor ADS		0x06e1	ADS Technologies
 vendor ALCATELM		0x06e4	Alcatel Microelectronics
@@ -627,6 +628,7 @@ vendor QUALCOMMINC	0x19d2	Qualcomm, Inco
 vendor MATRIXORBITAL	0x1b3d	Matrix Orbital
 vendor STELERA		0x1a8d	Stelera Wireless
 vendor DRESDENELEKTRONIK 0x1cf1 dresden elektronik
+vendor METAGEEK2	0x1dd5	MetaGeek
 vendor DLINK		0x2001	D-Link
 vendor PLANEX2		0x2019	Planex Communications
 vendor ERICSSON		0x2282	Ericsson
@@ -1108,6 +1110,7 @@ product CYPRESS KBDHUB		0x0101	Keyboard/
 product CYPRESS FMRADIO		0x1002	FM Radio
 product CYPRESS USBRS232	0x5500	USB-RS232 Interface
 product CYPRESS SLIM_HUB	0x6560	Slim Hub
+product CYPRESS SILVERSHIELD	0xfd13	Gembird Silver Shield PM
 
 /* Daisy Technology products */
 product DAISY DMC		0x6901	USB MultiMedia Reader
@@ -1619,6 +1622,9 @@ product LEXAR CF_READER		0xb002	USB CF R
 /* Lexmark products */
 product LEXMARK S2450		0x0009	Optra S 2450
 
+/* Liebert products */
+product LIEBERT POWERSURE_PXT	0xffff	PowerSure Personal XT
+
 /* Linksys products */
 product LINKSYS MAUSB2		0x0105	Camedia MAUSB-2
 product LINKSYS USB10TX1	0x200c	USB10TX
@@ -1702,6 +1708,7 @@ product MERLIN V620             0x1110  
 /* MetaGeek products */
 product METAGEEK WISPY1B	0x083e	MetaGeek Wi-Spy
 product METAGEEK WISPY24X	0x083f	MetaGeek Wi-Spy 2.4x
+product METAGEEK2 WISPYDBX	0x5000	MetaGeek Wi-Spy DBx
 
 /* Metricom products */
 product METRICOM RICOCHET_GS	0x0001	Ricochet GS

From owner-svn-src-all@FreeBSD.ORG  Tue Aug  3 22:17:30 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0AA76106566C;
	Tue,  3 Aug 2010 22:17:30 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D44E98FC1A;
	Tue,  3 Aug 2010 22:17:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73MHTKG077115;
	Tue, 3 Aug 2010 22:17:29 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73MHTSK077084;
	Tue, 3 Aug 2010 22:17:29 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201008032217.o73MHTSK077084@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Tue, 3 Aug 2010 22:17:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210829 - in head: bin/sh
	tools/regression/bin/sh/builtins
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 03 Aug 2010 22:17:30 -0000

Author: jilles
Date: Tue Aug  3 22:17:29 2010
New Revision: 210829
URL: http://svn.freebsd.org/changeset/base/210829

Log:
  sh: Return 0 from eval if no command was given.
  
  This makes a difference if there is a command substitution.
  
  To make this work, evalstring() has been changed to set exitstatus to 0 if
  no command was executed (the string contained only whitespace).
  
  Example:
    eval $(false); echo $?
  should print 0.

Added:
  head/tools/regression/bin/sh/builtins/eval5.0   (contents, props changed)
Modified:
  head/bin/sh/eval.c

Modified: head/bin/sh/eval.c
==============================================================================
--- head/bin/sh/eval.c	Tue Aug  3 22:06:34 2010	(r210828)
+++ head/bin/sh/eval.c	Tue Aug  3 22:17:29 2010	(r210829)
@@ -145,7 +145,8 @@ evalcmd(int argc, char **argv)
                         p = grabstackstr(concat);
                 }
                 evalstring(p, builtin_flags & EV_TESTED);
-        }
+        } else
+                exitstatus = 0;
         return exitstatus;
 }
 
@@ -160,9 +161,11 @@ evalstring(char *s, int flags)
 	union node *n;
 	struct stackmark smark;
 	int flags_exit;
+	int any;
 
 	flags_exit = flags & EV_EXIT;
 	flags &= ~EV_EXIT;
+	any = 0;
 	setstackmark(&smark);
 	setinputstring(s, 1);
 	while ((n = parsecmd(0)) != NEOF) {
@@ -171,11 +174,14 @@ evalstring(char *s, int flags)
 				evaltree(n, flags | EV_EXIT);
 			else
 				evaltree(n, flags);
+			any = 1;
 		}
 		popstackmark(&smark);
 	}
 	popfile();
 	popstackmark(&smark);
+	if (!any)
+		exitstatus = 0;
 	if (flags_exit)
 		exitshell(exitstatus);
 }

Added: head/tools/regression/bin/sh/builtins/eval5.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/builtins/eval5.0	Tue Aug  3 22:17:29 2010	(r210829)
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+# eval should return 0 if no command was executed.
+eval $(false)

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 00:25:13 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6EF8D1065675;
	Wed,  4 Aug 2010 00:25:13 +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 51A888FC0A;
	Wed,  4 Aug 2010 00:25:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o740PD03005807;
	Wed, 4 Aug 2010 00:25:13 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o740PDS3005805;
	Wed, 4 Aug 2010 00:25:13 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201008040025.o740PDS3005805@svn.freebsd.org>
From: Xin LI 
Date: Wed, 4 Aug 2010 00:25:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210833 - head/sys/dev/coretemp
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 00:25:13 -0000

Author: delphij
Date: Wed Aug  4 00:25:13 2010
New Revision: 210833
URL: http://svn.freebsd.org/changeset/base/210833

Log:
  Catch known CPUs before using IA32_TEMPERATURE_TARGET.
  This way we would have an opportunity to hide the
  Tj(target) value doesn't seem right stuff if we know
  it's not working there.
  
  Add temperature value for Core2 Duo Extreme Mobile that
  I have access to.

Modified:
  head/sys/dev/coretemp/coretemp.c

Modified: head/sys/dev/coretemp/coretemp.c
==============================================================================
--- head/sys/dev/coretemp/coretemp.c	Tue Aug  3 23:11:23 2010	(r210832)
+++ head/sys/dev/coretemp/coretemp.c	Wed Aug  4 00:25:13 2010	(r210833)
@@ -178,34 +178,6 @@ coretemp_attach(device_t dev)
 	 */
 	sc->sc_tjmax = 100;
 
-	/*
-	 * Attempt to get Tj(max) from MSR IA32_TEMPERATURE_TARGET.
-	 *
-	 * This method is described in Intel white paper
-	 * "CPU Monitoring With DTS/PECI". (#322683)
-	 */
-	ret = rdmsr_safe(MSR_IA32_TEMPERATURE_TARGET, &msr);
-	if (ret == 0) {
-		tjtarget = (msr >> 16) & 0xff;
-		/*
-		 * On earlier generation of processors, the value obtained
-		 * from IA32_TEMPERATURE_TARGET register is an offset that
-		 * needs to be summed with a model specific base.  It is
-		 * however not clear what these numbers are, with the
-		 * publicly available documents from Intel.
-		 *
-		 * For now, we consider [70, 100]C range, as described in
-		 * #322683, as "reasonable" and accept these values
-		 * whenever the MSR is available for read, regardless the
-		 * CPU model.
-		 */
-		if (tjtarget >= 70 && tjtarget <= 100)
-			sc->sc_tjmax = tjtarget;
-		else
-			device_printf(dev, "Tj(target) value %d does "
-				    "not seem right.\n", tjtarget);
-	}
-
 	if ((cpu_model == 0xf && cpu_stepping >= 2) || cpu_model == 0xe) {
 		/*
 		 * On some Core 2 CPUs, there's an undocumented MSR that
@@ -217,6 +189,46 @@ coretemp_attach(device_t dev)
 		msr = rdmsr(MSR_IA32_EXT_CONFIG);
 		if (msr & (1 << 30))
 			sc->sc_tjmax = 85;
+	} else if (cpu_model == 0x17) {
+		switch (cpu_stepping) {
+		case 0x6:	/* Mobile Core 2 Duo */
+			sc->sc_tjmax = 104;
+			break;
+		default:	/* Unknown stepping */
+			break;
+		}
+	} else {
+		/*
+		 * Attempt to get Tj(max) from MSR IA32_TEMPERATURE_TARGET.
+		 *
+		 * This method is described in Intel white paper "CPU
+		 * Monitoring With DTS/PECI". (#322683)
+		 */
+		ret = rdmsr_safe(MSR_IA32_TEMPERATURE_TARGET, &msr);
+		if (ret == 0) {
+			tjtarget = (msr >> 16) & 0xff;
+			
+			/*
+			 * On earlier generation of processors, the value
+			 * obtained from IA32_TEMPERATURE_TARGET register is
+			 * an offset that needs to be summed with a model
+			 * specific base.  It is however not clear what
+			 * these numbers are, with the publicly available
+			 * documents from Intel.
+			 *
+			 * For now, we consider [70, 100]C range, as
+			 * described in #322683, as "reasonable" and accept
+			 * these values whenever the MSR is available for
+			 * read, regardless the CPU model.
+			 */
+			if (tjtarget >= 70 && tjtarget <= 100)
+				sc->sc_tjmax = tjtarget;
+			else
+				device_printf(dev, "Tj(target) value %d "
+				    "does not seem right.\n", tjtarget);
+		} else
+			device_printf(dev, "Can not get Tj(target) "
+			    "from your CPU, using 100C.\n");
 	}
 
 	if (bootverbose)

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 01:19:11 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9142A106566B;
	Wed,  4 Aug 2010 01:19:11 +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 740618FC15;
	Wed,  4 Aug 2010 01:19:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o741JBab017683;
	Wed, 4 Aug 2010 01:19:11 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o741JBTr017680;
	Wed, 4 Aug 2010 01:19:11 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008040119.o741JBTr017680@svn.freebsd.org>
From: Rick Macklem 
Date: Wed, 4 Aug 2010 01:19:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210834 - head/sys/nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 01:19:11 -0000

Author: rmacklem
Date: Wed Aug  4 01:19:11 2010
New Revision: 210834
URL: http://svn.freebsd.org/changeset/base/210834

Log:
  Add some mutex locking on the nfsnode to the regular NFS client.
  
  Reviewed by:	jhb

Modified:
  head/sys/nfsclient/nfs_node.c
  head/sys/nfsclient/nfs_vnops.c

Modified: head/sys/nfsclient/nfs_node.c
==============================================================================
--- head/sys/nfsclient/nfs_node.c	Wed Aug  4 00:25:13 2010	(r210833)
+++ head/sys/nfsclient/nfs_node.c	Wed Aug  4 01:19:11 2010	(r210834)
@@ -193,12 +193,14 @@ nfs_inactive(struct vop_inactive_args *a
 	np = VTONFS(ap->a_vp);
 	if (prtactive && vrefcnt(ap->a_vp) != 0)
 		vprint("nfs_inactive: pushing active", ap->a_vp);
+	mtx_lock(&np->n_mtx);
 	if (ap->a_vp->v_type != VDIR) {
 		sp = np->n_sillyrename;
 		np->n_sillyrename = NULL;
 	} else
 		sp = NULL;
 	if (sp) {
+		mtx_unlock(&np->n_mtx);
 		(void)nfs_vinvalbuf(ap->a_vp, 0, td, 1);
 		/*
 		 * Remove the silly file that was rename'd earlier
@@ -207,8 +209,10 @@ nfs_inactive(struct vop_inactive_args *a
 		crfree(sp->s_cred);
 		vrele(sp->s_dvp);
 		free((caddr_t)sp, M_NFSREQ);
+		mtx_lock(&np->n_mtx);
 	}
 	np->n_flag &= NMODIFIED;
+	mtx_unlock(&np->n_mtx);
 	return (0);
 }
 

Modified: head/sys/nfsclient/nfs_vnops.c
==============================================================================
--- head/sys/nfsclient/nfs_vnops.c	Wed Aug  4 00:25:13 2010	(r210833)
+++ head/sys/nfsclient/nfs_vnops.c	Wed Aug  4 01:19:11 2010	(r210834)
@@ -521,7 +521,7 @@ nfs_open(struct vop_open_args *ap)
 	 */
 	mtx_lock(&np->n_mtx);
 	if (np->n_flag & NMODIFIED) {
-		mtx_unlock(&np->n_mtx);			
+		mtx_unlock(&np->n_mtx);
 		error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1);
 		if (error == EINTR || error == EIO)
 			return (error);
@@ -536,9 +536,8 @@ nfs_open(struct vop_open_args *ap)
 			return (error);
 		mtx_lock(&np->n_mtx);
 		np->n_mtime = vattr.va_mtime;
-		mtx_unlock(&np->n_mtx);
 	} else {
-		mtx_unlock(&np->n_mtx);						
+		mtx_unlock(&np->n_mtx);
 		error = VOP_GETATTR(vp, &vattr, ap->a_cred);
 		if (error)
 			return (error);
@@ -554,22 +553,22 @@ nfs_open(struct vop_open_args *ap)
 			mtx_lock(&np->n_mtx);
 			np->n_mtime = vattr.va_mtime;
 		}
-		mtx_unlock(&np->n_mtx);
 	}
 	/*
 	 * If the object has >= 1 O_DIRECT active opens, we disable caching.
 	 */
 	if (nfs_directio_enable && (fmode & O_DIRECT) && (vp->v_type == VREG)) {
 		if (np->n_directio_opens == 0) {
+			mtx_unlock(&np->n_mtx);
 			error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1);
 			if (error)
 				return (error);
 			mtx_lock(&np->n_mtx);
 			np->n_flag |= NNONCACHE;
-			mtx_unlock(&np->n_mtx);
 		}
 		np->n_directio_opens++;
 	}
+	mtx_unlock(&np->n_mtx);
 	vnode_create_vobject(vp, vattr.va_size, ap->a_td);
 	return (0);
 }
@@ -1745,7 +1744,9 @@ nfs_remove(struct vop_remove_args *ap)
 			error = 0;
 	} else if (!np->n_sillyrename)
 		error = nfs_sillyrename(dvp, vp, cnp);
+	mtx_lock(&np->n_mtx);
 	np->n_attrstamp = 0;
+	mtx_unlock(&np->n_mtx);
 	KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp);
 	return (error);
 }

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 01:34:36 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2F2E6106564A;
	Wed,  4 Aug 2010 01:34:36 +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 1B7B08FC0C;
	Wed,  4 Aug 2010 01:34:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o741YaYi021122;
	Wed, 4 Aug 2010 01:34:36 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o741Yawx021119;
	Wed, 4 Aug 2010 01:34:36 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201008040134.o741Yawx021119@svn.freebsd.org>
From: Xin LI 
Date: Wed, 4 Aug 2010 01:34:36 +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: r210835 - stable/7/sys/dev/arcmsr
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 01:34:36 -0000

Author: delphij
Date: Wed Aug  4 01:34:35 2010
New Revision: 210835
URL: http://svn.freebsd.org/changeset/base/210835

Log:
  MFC r210358:
  
  Apply vendor version 1.20.00.17.
  
  This version adds support for ARC1880; additionally this version fixed
  an issue where all devices on a SAS port gets offlined when any device
  failed on the port [1].
  
  Many thanks to Areca for continuing to support FreeBSD.
  
  PR:		kern/148502 [1]
  Submitted by:	Ching-Lung Huang 
  Obtained from:	Areca
  Tested by:	Rich Ercolani  [1]

Modified:
  stable/7/sys/dev/arcmsr/arcmsr.c
  stable/7/sys/dev/arcmsr/arcmsr.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/arcmsr/arcmsr.c
==============================================================================
--- stable/7/sys/dev/arcmsr/arcmsr.c	Wed Aug  4 01:19:11 2010	(r210834)
+++ stable/7/sys/dev/arcmsr/arcmsr.c	Wed Aug  4 01:34:35 2010	(r210835)
@@ -2,15 +2,15 @@
 *****************************************************************************************
 **        O.S   : FreeBSD
 **   FILE NAME  : arcmsr.c
-**        BY    : Erich Chen   
+**        BY    : Erich Chen, Ching Huang
 **   Description: SCSI RAID Device Driver for 
-**                ARECA (ARC11XX/ARC12XX/ARC13XX/ARC16XX) SATA/SAS RAID HOST Adapter
+**                ARECA (ARC11XX/ARC12XX/ARC13XX/ARC16XX/ARC188x) SATA/SAS RAID HOST Adapter
 **                ARCMSR RAID Host adapter
 **                [RAID controller:INTEL 331(PCI-X) 341(PCI-EXPRESS) chip set]
 ******************************************************************************************
 ************************************************************************
 **
-** Copyright (c) 2004-2006 ARECA Co. Ltd.
+** Copyright (c) 2004-2010 ARECA Co. Ltd.
 **        Erich Chen, Taipei Taiwan All rights reserved.
 **
 ** Redistribution and use in source and binary forms, with or without
@@ -57,6 +57,10 @@
 **     1.20.00.15   10/10/2007         Erich Chen        support new RAID adapter type ARC120x
 **     1.20.00.16   10/10/2009         Erich Chen        Bug fix for RAID adapter type ARC120x
 **                                                       bus_dmamem_alloc() with BUS_DMA_ZERO
+**     1.20.00.17   07/15/2010         Ching Huang       Added support ARC1880
+**							 report CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT when device failed,
+**							 prevent cam_periph_error removing all LUN devices of one Target id
+**							 for any one LUN device failed
 ******************************************************************************************
 * $FreeBSD$
 */
@@ -90,6 +94,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -165,6 +171,8 @@ static void arcmsr_build_srb(struct Comm
 static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, union ccb * pccb);
 static int arcmsr_resume(device_t dev);
 static int arcmsr_suspend(device_t dev);
+static void arcmsr_rescanLun_cb(struct cam_periph *periph, union ccb *ccb);
+static void	arcmsr_polling_devmap(void* arg);
 /*
 **************************************************************************
 **************************************************************************
@@ -191,7 +199,6 @@ static device_method_t arcmsr_methods[]=
 	DEVMETHOD(device_shutdown,	arcmsr_shutdown),
 	DEVMETHOD(device_suspend,	arcmsr_suspend),
 	DEVMETHOD(device_resume,	arcmsr_resume),
-	
 	DEVMETHOD(bus_print_child,	bus_generic_print_child),
 	DEVMETHOD(bus_driver_added, 	bus_generic_driver_added),
 	{ 0, 0 }
@@ -215,7 +222,7 @@ MODULE_DEPEND(arcmsr, cam, 1, 1, 1);
 	#ifndef D_VERSION
 		#define D_VERSION	0x20011966
 	#endif
-	static struct cdevsw arcmsr_cdevsw={
+static struct cdevsw arcmsr_cdevsw={
 	#if __FreeBSD_version > 502010
 		.d_version = D_VERSION, 
 	#endif
@@ -228,7 +235,7 @@ MODULE_DEPEND(arcmsr, cam, 1, 1, 1);
 #else
 	#define ARCMSR_CDEV_MAJOR	180
 	
-	static struct cdevsw arcmsr_cdevsw = {
+static struct cdevsw arcmsr_cdevsw = {
 		arcmsr_open, 		        /* open     */
 		arcmsr_close, 		        /* close    */
 		noread, 		        /* read     */
@@ -244,7 +251,10 @@ MODULE_DEPEND(arcmsr, cam, 1, 1, 1);
 		0				/* flags    */
 	};
 #endif
-
+/*
+**************************************************************************
+**************************************************************************
+*/
 #if __FreeBSD_version < 500005
 	static int arcmsr_open(dev_t dev, int flags, int fmt, struct proc *proc)
 #else
@@ -328,18 +338,21 @@ static u_int32_t arcmsr_disable_allintr(
 	switch (acb->adapter_type) {
 	case ACB_ADAPTER_TYPE_A: {
 			/* disable all outbound interrupt */
-			intmask_org=CHIP_REG_READ32(HBA_MessageUnit, 
-			0, outbound_intmask)|ARCMSR_MU_OUTBOUND_MESSAGE0_INTMASKENABLE; /* disable outbound message0 int */
-			CHIP_REG_WRITE32(HBA_MessageUnit, 
-			0, outbound_intmask, intmask_org|ARCMSR_MU_OUTBOUND_ALL_INTMASKENABLE);
+			intmask_org=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intmask); /* disable outbound message0 int */
+			CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intmask, intmask_org|ARCMSR_MU_OUTBOUND_ALL_INTMASKENABLE);
 		}
 		break;
 	case ACB_ADAPTER_TYPE_B: {
 			/* disable all outbound interrupt */
 			intmask_org=CHIP_REG_READ32(HBB_DOORBELL, 
 			0, iop2drv_doorbell_mask) & (~ARCMSR_IOP2DRV_MESSAGE_CMD_DONE); /* disable outbound message0 int */
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, iop2drv_doorbell_mask, 0); /* disable all interrupt */
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell_mask, 0); /* disable all interrupt */
+		}
+		break;
+	case ACB_ADAPTER_TYPE_C: {
+			/* disable all outbound interrupt */
+			intmask_org=CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_mask)	; /* disable outbound message0 int */
+			CHIP_REG_WRITE32(HBC_MessageUnit, 0, host_int_mask, intmask_org|ARCMSR_HBCMU_ALL_INTMASKENABLE);
 		}
 		break;
 	}
@@ -356,19 +369,25 @@ static void arcmsr_enable_allintr( struc
 	switch (acb->adapter_type) {
 	case ACB_ADAPTER_TYPE_A: {
 			/* enable outbound Post Queue, outbound doorbell Interrupt */
-			mask=~(ARCMSR_MU_OUTBOUND_POSTQUEUE_INTMASKENABLE|ARCMSR_MU_OUTBOUND_DOORBELL_INTMASKENABLE);
+			mask=~(ARCMSR_MU_OUTBOUND_POSTQUEUE_INTMASKENABLE|ARCMSR_MU_OUTBOUND_DOORBELL_INTMASKENABLE|ARCMSR_MU_OUTBOUND_MESSAGE0_INTMASKENABLE);
 			CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intmask, intmask_org & mask);
 			acb->outbound_int_enable = ~(intmask_org & mask) & 0x000000ff;
 		}
 		break;
 	case ACB_ADAPTER_TYPE_B: {
-			/* disable ARCMSR_IOP2DRV_MESSAGE_CMD_DONE */
-			mask=(ARCMSR_IOP2DRV_DATA_WRITE_OK|ARCMSR_IOP2DRV_DATA_READ_OK|ARCMSR_IOP2DRV_CDB_DONE);
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, iop2drv_doorbell_mask, intmask_org | mask); /*1=interrupt enable, 0=interrupt disable*/
+			/* enable ARCMSR_IOP2DRV_MESSAGE_CMD_DONE */
+			mask=(ARCMSR_IOP2DRV_DATA_WRITE_OK|ARCMSR_IOP2DRV_DATA_READ_OK|ARCMSR_IOP2DRV_CDB_DONE|ARCMSR_IOP2DRV_MESSAGE_CMD_DONE);
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell_mask, intmask_org | mask); /*1=interrupt enable, 0=interrupt disable*/
 			acb->outbound_int_enable = (intmask_org | mask) & 0x0000000f;
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			/* enable outbound Post Queue, outbound doorbell Interrupt */
+			mask=~(ARCMSR_HBCMU_UTILITY_A_ISR_MASK | ARCMSR_HBCMU_OUTBOUND_DOORBELL_ISR_MASK | ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR_MASK);
+			CHIP_REG_WRITE32(HBC_MessageUnit, 0, host_int_mask, intmask_org & mask);
+			acb->outbound_int_enable= ~(intmask_org & mask) & 0x0000000f;
+		}
+		break;
 	}
 	return;
 }
@@ -383,10 +402,8 @@ static u_int8_t arcmsr_hba_wait_msgint_r
 	
 	do {
 		for(Index=0; Index < 100; Index++) {
-			if(CHIP_REG_READ32(HBA_MessageUnit, 
-				0, outbound_intstatus) & ARCMSR_MU_OUTBOUND_MESSAGE0_INT) {
-				CHIP_REG_WRITE32(HBA_MessageUnit, 
-				0, outbound_intstatus, ARCMSR_MU_OUTBOUND_MESSAGE0_INT);/*clear interrupt*/
+			if(CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & ARCMSR_MU_OUTBOUND_MESSAGE0_INT) {
+				CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, ARCMSR_MU_OUTBOUND_MESSAGE0_INT);/*clear interrupt*/
 				return TRUE;
 			}
 			UDELAY(10000);
@@ -405,12 +422,29 @@ static u_int8_t arcmsr_hbb_wait_msgint_r
 	
 	do {
 		for(Index=0; Index < 100; Index++) {
-			if(CHIP_REG_READ32(HBB_DOORBELL, 
-				0, iop2drv_doorbell) & ARCMSR_IOP2DRV_MESSAGE_CMD_DONE) {
-				CHIP_REG_WRITE32(HBB_DOORBELL, 
-				0, iop2drv_doorbell, ARCMSR_MESSAGE_INT_CLEAR_PATTERN);/*clear interrupt*/
-				CHIP_REG_WRITE32(HBB_DOORBELL, 
-				0, drv2iop_doorbell, ARCMSR_DRV2IOP_END_OF_INTERRUPT);
+			if(CHIP_REG_READ32(HBB_DOORBELL, 0, iop2drv_doorbell) & ARCMSR_IOP2DRV_MESSAGE_CMD_DONE) {
+				CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell, ARCMSR_MESSAGE_INT_CLEAR_PATTERN);/*clear interrupt*/
+				CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_DRV2IOP_END_OF_INTERRUPT);
+				return TRUE;
+			}
+			UDELAY(10000);
+		}/*max 1 seconds*/
+	}while(Retries++ < 20);/*max 20 sec*/
+	return FALSE;
+}
+/*
+**********************************************************************
+**********************************************************************
+*/
+static u_int8_t arcmsr_hbc_wait_msgint_ready(struct AdapterControlBlock *acb)
+{
+	u_int32_t Index;
+	u_int8_t Retries=0x00;
+	
+	do {
+		for(Index=0; Index < 100; Index++) {
+			if(CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_doorbell) & ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE) {
+				CHIP_REG_WRITE32(HBC_MessageUnit, 0, outbound_doorbell_clear, ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE_DOORBELL_CLEAR);/*clear interrupt*/
 				return TRUE;
 			}
 			UDELAY(10000);
@@ -426,8 +460,7 @@ static void arcmsr_flush_hba_cache(struc
 {
 	int retry_count=30;/* enlarge wait flush adapter cache time: 10 minute */
 	
-	CHIP_REG_WRITE32(HBA_MessageUnit, 
-	0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_FLUSH_CACHE);
+	CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_FLUSH_CACHE);
 	do {
 		if(arcmsr_hba_wait_msgint_ready(acb)) {
 			break;
@@ -460,6 +493,25 @@ static void arcmsr_flush_hbb_cache(struc
 ************************************************************************
 ************************************************************************
 */
+static void arcmsr_flush_hbc_cache(struct AdapterControlBlock *acb)
+{
+	int retry_count=30;/* enlarge wait flush adapter cache time: 10 minute */
+	
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_FLUSH_CACHE);
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_MESSAGE_CMD_DONE);
+	do {
+		if(arcmsr_hbc_wait_msgint_ready(acb)) {
+			break;
+		} else {
+			retry_count--;
+		}
+	}while(retry_count!=0);
+	return;
+}
+/*
+************************************************************************
+************************************************************************
+*/
 static void arcmsr_flush_adapter_cache(struct AdapterControlBlock *acb)
 {
 	switch (acb->adapter_type) {
@@ -471,6 +523,10 @@ static void arcmsr_flush_adapter_cache(s
 			arcmsr_flush_hbb_cache(acb);
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			arcmsr_flush_hbc_cache(acb);
+		}
+		break;
 	}
 	return;
 }
@@ -482,10 +538,10 @@ static int arcmsr_suspend(device_t dev)
 {
 	struct AdapterControlBlock	*acb = device_get_softc(dev);
 	
-	/* disable all outbound interrupt */
-	arcmsr_disable_allintr(acb);
 	/* flush controller */
 	arcmsr_iop_parking(acb);
+	/* disable all outbound interrupt */
+	arcmsr_disable_allintr(acb);
 	return(0);
 }
 /*
@@ -515,12 +571,10 @@ static void arcmsr_async(void *cb_arg, u
 	case AC_LOST_DEVICE:
 		target_id=xpt_path_target_id(path);
 		target_lun=xpt_path_lun_id(path);
-		if((target_id > ARCMSR_MAX_TARGETID) 
-		|| (target_lun > ARCMSR_MAX_TARGETLUN)) {
+		if((target_id > ARCMSR_MAX_TARGETID) || (target_lun > ARCMSR_MAX_TARGETLUN)) {
 			break;
 		}
-		printf("%s:scsi id%d lun%d device lost \n"
-			, device_get_name(acb->pci_dev), target_id, target_lun);
+		printf("%s:scsi id=%d lun=%d device lost \n", device_get_name(acb->pci_dev), target_id, target_lun);
 		break;
 	default:
 		break;
@@ -589,8 +643,7 @@ static void arcmsr_abort_hba_allcmd(stru
 {
 	CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_ABORT_CMD);
 	if(!arcmsr_hba_wait_msgint_ready(acb)) {
-		printf("arcmsr%d: wait 'abort all outstanding command' timeout \n"
-			, acb->pci_unit);
+		printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit);
 	}
 	return;
 }
@@ -602,8 +655,20 @@ static void arcmsr_abort_hbb_allcmd(stru
 {
 	CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_MESSAGE_ABORT_CMD);
 	if(!arcmsr_hbb_wait_msgint_ready(acb)) {
-		printf("arcmsr%d: wait 'abort all outstanding command' timeout \n"
-			, acb->pci_unit);
+		printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit);
+	}
+	return;
+}
+/*
+*********************************************************************
+*********************************************************************
+*/
+static void arcmsr_abort_hbc_allcmd(struct AdapterControlBlock *acb)
+{
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_ABORT_CMD);
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_MESSAGE_CMD_DONE);
+	if(!arcmsr_hbc_wait_msgint_ready(acb)) {
+		printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit);
 	}
 	return;
 }
@@ -622,6 +687,10 @@ static void arcmsr_abort_allcmd(struct A
 			arcmsr_abort_hbb_allcmd(acb);
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			arcmsr_abort_hbc_allcmd(acb);
+		}
+		break;
 	}
 	return;
 }
@@ -629,14 +698,13 @@ static void arcmsr_abort_allcmd(struct A
 **************************************************************************
 **************************************************************************
 */
-static void arcmsr_report_srb_state(struct AdapterControlBlock *acb, 
-	struct CommandControlBlock *srb, u_int32_t flag_srb)
+static void arcmsr_report_srb_state(struct AdapterControlBlock *acb, struct CommandControlBlock *srb, u_int16_t error)
 {
 	int target, lun;
 	
 	target=srb->pccb->ccb_h.target_id;
 	lun=srb->pccb->ccb_h.target_lun;
-	if((flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR)==0) {
+	if(error == FALSE) {
 		if(acb->devstate[target][lun]==ARECA_RAID_GONE) {
 			acb->devstate[target][lun]=ARECA_RAID_GOOD;
 		}
@@ -646,12 +714,10 @@ static void arcmsr_report_srb_state(stru
 		switch(srb->arcmsr_cdb.DeviceStatus) {
 		case ARCMSR_DEV_SELECT_TIMEOUT: {
 				if(acb->devstate[target][lun]==ARECA_RAID_GOOD) {
-					printf( "arcmsr%d: select timeout"
-						", raid volume was kicked out \n"
-						, acb->pci_unit);
+					printf( "arcmsr%d: Target=%x, Lun=%x, selection timeout, raid volume was lost\n", acb->pci_unit, target, lun);
 				}
 				acb->devstate[target][lun]=ARECA_RAID_GONE;
-				srb->pccb->ccb_h.status |= CAM_SEL_TIMEOUT;
+				srb->pccb->ccb_h.status |= CAM_DEV_NOT_THERE;
 				arcmsr_srb_complete(srb, 1);
 			}
 			break;
@@ -669,11 +735,8 @@ static void arcmsr_report_srb_state(stru
 			}
 			break;
 		default:
-			printf("arcmsr%d: scsi id=%d lun=%d"
-				"isr get command error done,"
-				"but got unknow DeviceStatus=0x%x \n"
-				, acb->pci_unit, target, lun 
-				,srb->arcmsr_cdb.DeviceStatus);
+			printf("arcmsr%d: scsi id=%d lun=%d isr got command error done,but got unknow DeviceStatus=0x%x \n"
+					, acb->pci_unit, target, lun ,srb->arcmsr_cdb.DeviceStatus);
 			acb->devstate[target][lun]=ARECA_RAID_GONE;
 			srb->pccb->ccb_h.status |= CAM_UNCOR_PARITY;
 			/*unknow error or crc error just for retry*/
@@ -687,29 +750,34 @@ static void arcmsr_report_srb_state(stru
 **************************************************************************
 **************************************************************************
 */
-static void arcmsr_drain_donequeue(struct AdapterControlBlock *acb, u_int32_t flag_srb)
+static void arcmsr_drain_donequeue(struct AdapterControlBlock *acb, u_int32_t flag_srb, u_int16_t error)
 {
 	struct CommandControlBlock *srb;
 	
 	/* check if command done with no error*/
-	srb=(struct CommandControlBlock *)
-		(acb->vir2phy_offset+(flag_srb << 5));/*frame must be 32 bytes aligned*/
+	switch (acb->adapter_type) {
+	case ACB_ADAPTER_TYPE_C:
+		srb = (struct CommandControlBlock *)(acb->vir2phy_offset+(flag_srb & 0xFFFFFFF0));/*frame must be 32 bytes aligned*/
+		break;
+	case ACB_ADAPTER_TYPE_A:
+	case ACB_ADAPTER_TYPE_B:
+	default:
+		srb = (struct CommandControlBlock *)(acb->vir2phy_offset+(flag_srb << 5));/*frame must be 32 bytes aligned*/
+		break;
+	}
 	if((srb->acb!=acb) || (srb->startdone!=ARCMSR_SRB_START)) {
 		if(srb->startdone==ARCMSR_SRB_ABORTED) {
-			printf("arcmsr%d: srb='%p' isr got aborted command \n"
-				, acb->pci_unit, srb);
+			printf("arcmsr%d: srb='%p' isr got aborted command \n", acb->pci_unit, srb);
 			srb->pccb->ccb_h.status |= CAM_REQ_ABORTED;
 			arcmsr_srb_complete(srb, 1);
 			return;
 		}
 		printf("arcmsr%d: isr get an illegal srb command done"
-			"acb='%p' srb='%p' srbacb='%p' startdone=0x%x"
-			"srboutstandingcount=%d \n",
-			acb->pci_unit, acb, srb, srb->acb,
-			srb->startdone, acb->srboutstandingcount);
+			"acb='%p' srb='%p' srbacb='%p' startdone=0x%xsrboutstandingcount=%d \n",
+			acb->pci_unit, acb, srb, srb->acb,srb->startdone, acb->srboutstandingcount);
 		return;
 	}
-	arcmsr_report_srb_state(acb, srb, flag_srb);
+	arcmsr_report_srb_state(acb, srb, error);
 	return;
 }
 /*
@@ -720,20 +788,18 @@ static void arcmsr_done4abort_postqueue(
 {
 	int i=0;
 	u_int32_t flag_srb;
+	u_int16_t error;
 	
 	switch (acb->adapter_type) {
 	case ACB_ADAPTER_TYPE_A: {
 			u_int32_t outbound_intstatus;
 	
 			/*clear and abort all outbound posted Q*/
-			outbound_intstatus=CHIP_REG_READ32(HBA_MessageUnit, 
-			0, outbound_intstatus) & acb->outbound_int_enable;
-			CHIP_REG_WRITE32(HBA_MessageUnit, 
-			0, outbound_intstatus, outbound_intstatus);/*clear interrupt*/
-			while(((flag_srb=CHIP_REG_READ32(HBA_MessageUnit, 
-				0, outbound_queueport)) != 0xFFFFFFFF) 
-				&& (i++ < ARCMSR_MAX_OUTSTANDING_CMD)) {
-				arcmsr_drain_donequeue(acb, flag_srb);
+			outbound_intstatus=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & acb->outbound_int_enable;
+			CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, outbound_intstatus);/*clear interrupt*/
+			while(((flag_srb=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_queueport)) != 0xFFFFFFFF) && (i++ < ARCMSR_MAX_OUTSTANDING_CMD)) {
+                error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+				arcmsr_drain_donequeue(acb, flag_srb, error);
 			}
 		}
 		break;
@@ -741,13 +807,12 @@ static void arcmsr_done4abort_postqueue(
 			struct HBB_MessageUnit *phbbmu=(struct HBB_MessageUnit *)acb->pmu;
 	
 			/*clear all outbound posted Q*/
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, iop2drv_doorbell, 
-			ARCMSR_DOORBELL_INT_CLEAR_PATTERN); /* clear doorbell interrupt */
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell, ARCMSR_DOORBELL_INT_CLEAR_PATTERN); /* clear doorbell interrupt */
 			for(i=0; i < ARCMSR_MAX_HBB_POSTQUEUE; i++) {
 				if((flag_srb=phbbmu->done_qbuffer[i])!=0) {
 					phbbmu->done_qbuffer[i]=0;
-					arcmsr_drain_donequeue(acb, flag_srb);
+                	error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+					arcmsr_drain_donequeue(acb, flag_srb, error);
 				}
 				phbbmu->post_qbuffer[i]=0;
 			}/*drain reply FIFO*/
@@ -755,6 +820,15 @@ static void arcmsr_done4abort_postqueue(
 			phbbmu->postq_index=0;
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+	
+			while((CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_status) & ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR) && (i++ < ARCMSR_MAX_OUTSTANDING_CMD)) {
+				flag_srb=CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_queueport_low);
+                error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1)?TRUE:FALSE;
+				arcmsr_drain_donequeue(acb, flag_srb, error);
+			}
+		}
+		break;
 	}
 	return;
 }
@@ -873,7 +947,10 @@ static void arcmsr_build_srb(struct Comm
 		if( arccdbsize > 256) {
 			arcmsr_cdb->Flags|=ARCMSR_CDB_FLAG_SGL_BSIZE;
 		}
+	} else {
+		arcmsr_cdb->DataLength = 0;
 	}
+    srb->arc_cdb_size=arccdbsize;
 	return;
 }
 /*
@@ -885,19 +962,16 @@ static void arcmsr_post_srb(struct Adapt
 	u_int32_t cdb_shifted_phyaddr=(u_int32_t) srb->cdb_shifted_phyaddr;
 	struct ARCMSR_CDB * arcmsr_cdb=(struct ARCMSR_CDB *)&srb->arcmsr_cdb;
 	
-	bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap, 
-	(srb->srb_flags & SRB_FLAG_WRITE) ? BUS_DMASYNC_POSTWRITE:BUS_DMASYNC_POSTREAD);
+	bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap, (srb->srb_flags & SRB_FLAG_WRITE) ? BUS_DMASYNC_POSTWRITE:BUS_DMASYNC_POSTREAD);
 	atomic_add_int(&acb->srboutstandingcount, 1);
 	srb->startdone=ARCMSR_SRB_START;
+
 	switch (acb->adapter_type) {
 	case ACB_ADAPTER_TYPE_A: {
 			if(arcmsr_cdb->Flags & ARCMSR_CDB_FLAG_SGL_BSIZE) {
-				CHIP_REG_WRITE32(HBA_MessageUnit, 
-				0, inbound_queueport, 
-				cdb_shifted_phyaddr|ARCMSR_SRBPOST_FLAG_SGL_BSIZE);
+				CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_queueport, cdb_shifted_phyaddr|ARCMSR_SRBPOST_FLAG_SGL_BSIZE);
 			} else {
-				CHIP_REG_WRITE32(HBA_MessageUnit, 
-				0, inbound_queueport, cdb_shifted_phyaddr);
+				CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_queueport, cdb_shifted_phyaddr);
 			}
 		}
 		break;
@@ -909,17 +983,32 @@ static void arcmsr_post_srb(struct Adapt
 			ending_index=((index+1)%ARCMSR_MAX_HBB_POSTQUEUE);
 			phbbmu->post_qbuffer[ending_index]=0;
 			if(arcmsr_cdb->Flags & ARCMSR_CDB_FLAG_SGL_BSIZE) {
-				phbbmu->post_qbuffer[index]=
-					cdb_shifted_phyaddr|ARCMSR_SRBPOST_FLAG_SGL_BSIZE;
+				phbbmu->post_qbuffer[index]= cdb_shifted_phyaddr|ARCMSR_SRBPOST_FLAG_SGL_BSIZE;
 			} else {
-				phbbmu->post_qbuffer[index]=
-					cdb_shifted_phyaddr;
+				phbbmu->post_qbuffer[index]= cdb_shifted_phyaddr;
 			}
 			index++;
 			index %= ARCMSR_MAX_HBB_POSTQUEUE;     /*if last index number set it to 0 */
 			phbbmu->postq_index=index;
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, drv2iop_doorbell, ARCMSR_DRV2IOP_CDB_POSTED);
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_DRV2IOP_CDB_POSTED);
+		}
+		break;
+    case ACB_ADAPTER_TYPE_C:
+        {
+            u_int32_t ccb_post_stamp, arc_cdb_size, cdb_phyaddr_hi32;
+
+            arc_cdb_size=(srb->arc_cdb_size>0x300)?0x300:srb->arc_cdb_size;
+            ccb_post_stamp=(cdb_shifted_phyaddr | ((arc_cdb_size-1) >> 6) | 1);
+			cdb_phyaddr_hi32 = acb->srb_phyaddr.B.phyadd_high;
+            if(cdb_phyaddr_hi32)
+            {
+			    CHIP_REG_WRITE32(HBC_MessageUnit,0,inbound_queueport_high, cdb_phyaddr_hi32);
+			    CHIP_REG_WRITE32(HBC_MessageUnit,0,inbound_queueport_low, ccb_post_stamp);
+            }
+            else
+            {
+			    CHIP_REG_WRITE32(HBC_MessageUnit,0,inbound_queueport_low, ccb_post_stamp);
+            }
 		}
 		break;
 	}
@@ -946,6 +1035,12 @@ static struct QBUFFER * arcmsr_get_iop_r
 			qbuffer=(struct QBUFFER *)&phbbmu->hbb_rwbuffer->message_rbuffer;
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			struct HBC_MessageUnit *phbcmu=(struct HBC_MessageUnit *)acb->pmu;
+	
+			qbuffer=(struct QBUFFER *)&phbcmu->message_rbuffer;
+		}
+		break;
 	}
 	return(qbuffer);
 }
@@ -970,6 +1065,12 @@ static struct QBUFFER * arcmsr_get_iop_w
 			qbuffer=(struct QBUFFER *)&phbbmu->hbb_rwbuffer->message_wbuffer;
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			struct HBC_MessageUnit *phbcmu=(struct HBC_MessageUnit *)acb->pmu;
+	
+			qbuffer=(struct QBUFFER *)&phbcmu->message_wbuffer;
+		}
+		break;
 	}
 	return(qbuffer);
 }
@@ -982,16 +1083,18 @@ static void arcmsr_iop_message_read(stru
 	switch (acb->adapter_type) {
 	case ACB_ADAPTER_TYPE_A: {
 			/* let IOP know data has been read */
-			CHIP_REG_WRITE32(HBA_MessageUnit, 
-			0, inbound_doorbell, ARCMSR_INBOUND_DRIVER_DATA_READ_OK);
+			CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_doorbell, ARCMSR_INBOUND_DRIVER_DATA_READ_OK);
 		}
 		break;
 	case ACB_ADAPTER_TYPE_B: {
 			/* let IOP know data has been read */
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, drv2iop_doorbell, ARCMSR_DRV2IOP_DATA_READ_OK);
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_DRV2IOP_DATA_READ_OK);
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			/* let IOP know data has been read */
+			CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_DATA_READ_OK);
+		}
 	}
 	return;
 }
@@ -1007,8 +1110,7 @@ static void arcmsr_iop_message_wrote(str
 			** push inbound doorbell tell iop, driver data write ok 
 			** and wait reply on next hwinterrupt for next Qbuffer post
 			*/
-			CHIP_REG_WRITE32(HBA_MessageUnit, 
-			0, inbound_doorbell, ARCMSR_INBOUND_DRIVER_DATA_WRITE_OK);
+			CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_doorbell, ARCMSR_INBOUND_DRIVER_DATA_WRITE_OK);
 		}
 		break;
 	case ACB_ADAPTER_TYPE_B: {
@@ -1016,8 +1118,15 @@ static void arcmsr_iop_message_wrote(str
 			** push inbound doorbell tell iop, driver data write ok 
 			** and wait reply on next hwinterrupt for next Qbuffer post
 			*/
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, drv2iop_doorbell, ARCMSR_DRV2IOP_DATA_WRITE_OK);
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_DRV2IOP_DATA_WRITE_OK);
+		}
+		break;
+	case ACB_ADAPTER_TYPE_C: {
+			/*
+			** push inbound doorbell tell iop, driver data write ok 
+			** and wait reply on next hwinterrupt for next Qbuffer post
+			*/
+			CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_DATA_WRITE_OK);
 		}
 		break;
 	}
@@ -1064,7 +1173,7 @@ static void arcmsr_stop_hba_bgrb(struct 
 	CHIP_REG_WRITE32(HBA_MessageUnit, 
 	0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_STOP_BGRB);
 	if(!arcmsr_hba_wait_msgint_ready(acb)) {
-		printf("arcmsr%d: wait 'stop adapter rebulid' timeout \n"
+		printf("arcmsr%d: wait 'stop adapter background rebulid' timeout \n"
 			, acb->pci_unit);
 	}
 	return;
@@ -1079,7 +1188,7 @@ static void arcmsr_stop_hbb_bgrb(struct 
 	CHIP_REG_WRITE32(HBB_DOORBELL, 
 	0, drv2iop_doorbell, ARCMSR_MESSAGE_STOP_BGRB);
 	if(!arcmsr_hbb_wait_msgint_ready(acb)) {
-		printf( "arcmsr%d: wait 'stop adapter rebulid' timeout \n"
+		printf( "arcmsr%d: wait 'stop adapter background rebulid' timeout \n"
 			, acb->pci_unit);
 	}
 	return;
@@ -1088,6 +1197,20 @@ static void arcmsr_stop_hbb_bgrb(struct 
 ************************************************************************
 ************************************************************************
 */
+static void arcmsr_stop_hbc_bgrb(struct AdapterControlBlock *acb)
+{
+	acb->acb_flags &=~ACB_F_MSG_START_BGRB;
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_STOP_BGRB);
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell,ARCMSR_HBCMU_DRV2IOP_MESSAGE_CMD_DONE);
+	if(!arcmsr_hbc_wait_msgint_ready(acb)) {
+		printf("arcmsr%d: wait 'stop adapter background rebulid' timeout \n", acb->pci_unit);
+	}
+	return;
+}
+/*
+************************************************************************
+************************************************************************
+*/
 static void arcmsr_stop_adapter_bgrb(struct AdapterControlBlock *acb)
 {
 	switch (acb->adapter_type) {
@@ -1099,6 +1222,10 @@ static void arcmsr_stop_adapter_bgrb(str
 			arcmsr_stop_hbb_bgrb(acb);
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			arcmsr_stop_hbc_bgrb(acb);
+		}
+		break;
 	}
 	return;
 }
@@ -1121,18 +1248,6 @@ static void arcmsr_poll(struct cam_sim *
 	return;
 }
 /*
-**********************************************************************
-**********************************************************************
-*/
-static void arcmsr_intr_handler(void *arg)
-{
-	struct AdapterControlBlock *acb=(struct AdapterControlBlock *)arg;
-	
-	ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
-	arcmsr_interrupt(acb);
-	ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
-}
-/*
 **************************************************************************
 **************************************************************************
 */
@@ -1210,6 +1325,187 @@ static void arcmsr_iop2drv_data_read_han
 	}
 	return;
 }
+
+static void arcmsr_rescanLun_cb(struct cam_periph *periph, union ccb *ccb)
+{
+/*
+	if (ccb->ccb_h.status != CAM_REQ_CMP)
+		printf("arcmsr_rescanLun_cb: Rescan Target=%x, lun=%x, failure status=%x\n",ccb->ccb_h.target_id,ccb->ccb_h.target_lun,ccb->ccb_h.status);
+	else
+		printf("arcmsr_rescanLun_cb: Rescan lun successfully!\n");
+*/
+	xpt_free_path(ccb->ccb_h.path);
+	xpt_free_ccb(ccb);
+}
+
+static void	arcmsr_rescan_lun(struct AdapterControlBlock *acb, int target, int lun)
+{
+	struct cam_path     *path;
+	union ccb           *ccb;
+
+	if ((ccb = (union ccb *)xpt_alloc_ccb_nowait()) == NULL)
+ 		return;
+	if (xpt_create_path(&path, xpt_periph, cam_sim_path(acb->psim), target, lun) != CAM_REQ_CMP)
+	{
+		xpt_free_ccb(ccb);
+		return;
+	}
+/*	printf("arcmsr_rescan_lun: Rescan Target=%x, Lun=%x\n", target, lun); */
+	bzero(ccb, sizeof(union ccb));
+	xpt_setup_ccb(&ccb->ccb_h, path, 5);
+	ccb->ccb_h.func_code = XPT_SCAN_LUN;
+	ccb->ccb_h.cbfcnp = arcmsr_rescanLun_cb;
+	ccb->crcn.flags = CAM_FLAG_NONE;
+	xpt_action(ccb);
+	return;
+}
+
+
+static void arcmsr_abort_dr_ccbs(struct AdapterControlBlock *acb, int target, int lun)
+{
+   	struct CommandControlBlock *srb;
+	u_int32_t intmask_org;
+   	int i;
+
+	ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
+	/* disable all outbound interrupts */
+	intmask_org = arcmsr_disable_allintr(acb);
+	for (i = 0; i < ARCMSR_MAX_FREESRB_NUM; i++)
+	{
+		srb = acb->psrb_pool[i];
+		if (srb->startdone == ARCMSR_SRB_START)
+		{
+           	if((target == srb->pccb->ccb_h.target_id) && (lun == srb->pccb->ccb_h.target_lun))
+            {
+		    	srb->startdone = ARCMSR_SRB_ABORTED;
+				srb->pccb->ccb_h.status |= CAM_REQ_ABORTED;
+		    	arcmsr_srb_complete(srb, 1);
+       		}
+		}
+	}
+	/* enable outbound Post Queue, outbound doorbell Interrupt */
+	arcmsr_enable_allintr(acb, intmask_org);
+	ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
+}
+
+
+/*
+**************************************************************************
+**************************************************************************
+*/
+static void arcmsr_dr_handle(struct AdapterControlBlock *acb) {
+	u_int32_t	devicemap;
+	u_int32_t	target, lun;
+    u_int32_t	deviceMapCurrent[4]={0};
+    u_int8_t	*pDevMap;
+
+	switch (acb->adapter_type) {
+	case ACB_ADAPTER_TYPE_A:
+			devicemap = offsetof(struct HBA_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]);
+			for (target= 0; target < 4; target++) 
+			{
+            	deviceMapCurrent[target]=bus_space_read_4(acb->btag[0], acb->bhandle[0],  devicemap);
+            	devicemap += 4;
+			}
+			break;
+
+	case ACB_ADAPTER_TYPE_B:
+			devicemap = offsetof(struct HBB_RWBUFFER, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]);
+			for (target= 0; target < 4; target++) 
+			{
+            	deviceMapCurrent[target]=bus_space_read_4(acb->btag[1], acb->bhandle[1],  devicemap);
+            	devicemap += 4;
+			}
+			break;
+
+	case ACB_ADAPTER_TYPE_C:
+			devicemap = offsetof(struct HBC_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]);
+			for (target= 0; target < 4; target++) 
+			{
+            	deviceMapCurrent[target]=bus_space_read_4(acb->btag[0], acb->bhandle[0],  devicemap);
+            	devicemap += 4;
+			}
+			break;
+	}
+		if(acb->acb_flags & ACB_F_BUS_HANG_ON)
+		{
+			acb->acb_flags &= ~ACB_F_BUS_HANG_ON;
+		}
+		/* 
+		** adapter posted CONFIG message 
+		** copy the new map, note if there are differences with the current map
+		*/
+		pDevMap = (u_int8_t	*)&deviceMapCurrent[0];
+		for (target= 0; target < ARCMSR_MAX_TARGETID - 1; target++) 
+		{
+			if (*pDevMap != acb->device_map[target])
+			{
+                u_int8_t difference, bit_check;
+
+                difference= *pDevMap ^ acb->device_map[target];
+                for(lun=0; lun < ARCMSR_MAX_TARGETLUN; lun++)
+                {
+                    bit_check=(1 << lun);						/*check bit from 0....31*/
+                    if(difference & bit_check)
+                    {
+                        if(acb->device_map[target] & bit_check)
+                        {/* unit departed */
+							printf("arcmsr_dr_handle: Target=%x, lun=%x, GONE!!!\n",target,lun);
+ 							arcmsr_abort_dr_ccbs(acb, target, lun);
+                        	arcmsr_rescan_lun(acb, target, lun);
+        					acb->devstate[target][lun] = ARECA_RAID_GONE;
+                        }
+                        else
+                        {/* unit arrived */
+							printf("arcmsr_dr_handle: Target=%x, lun=%x, ARRIVING!!!\n",target,lun);
+                        	arcmsr_rescan_lun(acb, target, lun);
+        					acb->devstate[target][lun] = ARECA_RAID_GOOD;
+                        }
+                    }
+                }
+/*				printf("arcmsr_dr_handle: acb->device_map[%x]=0x%x, deviceMapCurrent[%x]=%x\n",target,acb->device_map[target],target,*pDevMap); */
+				acb->device_map[target]= *pDevMap;
+			}
+			pDevMap++;
+		}
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
+static void arcmsr_hba_message_isr(struct AdapterControlBlock *acb) {
+	u_int32_t outbound_message;
+
+	CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, ARCMSR_MU_OUTBOUND_MESSAGE0_INT);
+	outbound_message = CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[0]);
+	if (outbound_message == ARCMSR_SIGNATURE_GET_CONFIG)
+		arcmsr_dr_handle( acb );
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
+static void arcmsr_hbb_message_isr(struct AdapterControlBlock *acb) {
+	u_int32_t outbound_message;
+
+	/* clear interrupts */
+	CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell, ARCMSR_MESSAGE_INT_CLEAR_PATTERN);
+	outbound_message = CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[0]);
+	if (outbound_message == ARCMSR_SIGNATURE_GET_CONFIG)
+		arcmsr_dr_handle( acb );
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
+static void arcmsr_hbc_message_isr(struct AdapterControlBlock *acb) {
+	u_int32_t outbound_message;
+
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, outbound_doorbell_clear, ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE_DOORBELL_CLEAR);
+	outbound_message = CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[0]);
+	if (outbound_message == ARCMSR_SIGNATURE_GET_CONFIG)
+		arcmsr_dr_handle( acb );
+}
 /*
 **************************************************************************
 **************************************************************************
@@ -1241,9 +1537,38 @@ static void arcmsr_hba_doorbell_isr(stru
 **************************************************************************
 **************************************************************************
 */
+static void arcmsr_hbc_doorbell_isr(struct AdapterControlBlock *acb)
+{
+	u_int32_t outbound_doorbell;
+	
+	/*
+	*******************************************************************
+	**  Maybe here we need to check wrqbuffer_lock is lock or not
+	**  DOORBELL: din! don! 
+	**  check if there are any mail need to pack from firmware
+	*******************************************************************
+	*/
+	outbound_doorbell=CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_doorbell);
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, outbound_doorbell_clear, outbound_doorbell); /* clear doorbell interrupt */
+	if(outbound_doorbell & ARCMSR_HBCMU_IOP2DRV_DATA_WRITE_OK) {
+		arcmsr_iop2drv_data_wrote_handle(acb);
+	}
+	if(outbound_doorbell & ARCMSR_HBCMU_IOP2DRV_DATA_READ_OK) {
+		arcmsr_iop2drv_data_read_handle(acb);
+	}
+	if(outbound_doorbell & ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE) {
+		arcmsr_hbc_message_isr(acb);    /* messenger of "driver to iop commands" */
+	}
+	return;
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
 static void arcmsr_hba_postqueue_isr(struct AdapterControlBlock *acb)
 {
 	u_int32_t flag_srb;
+	u_int16_t error;
 	
 	/*
 	*****************************************************************************
@@ -1255,7 +1580,8 @@ static void arcmsr_hba_postqueue_isr(str
 	while((flag_srb=CHIP_REG_READ32(HBA_MessageUnit, 
 		0, outbound_queueport)) != 0xFFFFFFFF) {
 		/* check if command done with no error*/
-		arcmsr_drain_donequeue(acb, flag_srb);
+        error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+		arcmsr_drain_donequeue(acb, flag_srb, error);
 	}	/*drain reply FIFO*/
 	return;
 }
@@ -1268,6 +1594,7 @@ static void arcmsr_hbb_postqueue_isr(str
 	struct HBB_MessageUnit *phbbmu=(struct HBB_MessageUnit *)acb->pmu;
 	u_int32_t flag_srb;
 	int index;
+	u_int16_t error;
 	
 	/*
 	*****************************************************************************
@@ -1283,7 +1610,38 @@ static void arcmsr_hbb_postqueue_isr(str
 		index %= ARCMSR_MAX_HBB_POSTQUEUE;     /*if last index number set it to 0 */
 		phbbmu->doneq_index=index;
 		/* check if command done with no error*/
-		arcmsr_drain_donequeue(acb, flag_srb);
+        error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+		arcmsr_drain_donequeue(acb, flag_srb, error);
+	}	/*drain reply FIFO*/
+	return;
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
+static void arcmsr_hbc_postqueue_isr(struct AdapterControlBlock *acb)
+{
+	u_int32_t flag_srb,throttling=0;
+	u_int16_t error;
+	
+	/*
+	*****************************************************************************
+	**               areca cdb command done
+	*****************************************************************************
+	*/
+	bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap, BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
+		
+	while(CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_status) & ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR) {
+		
+		flag_srb=CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_queueport_low);
+		/* check if command done with no error*/
+        error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1)?TRUE:FALSE;
+		arcmsr_drain_donequeue(acb, flag_srb, error);
+        if(throttling==ARCMSR_HBC_ISR_THROTTLING_LEVEL) {
+            CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell,ARCMSR_HBCMU_DRV2IOP_POSTQUEUE_THROTTLING);
+            break;
+        }
+        throttling++;
 	}	/*drain reply FIFO*/
 	return;
 }
@@ -1299,14 +1657,12 @@ static void arcmsr_handle_hba_isr( struc
 	**   check outbound intstatus 
 	*********************************************
 	*/
-	outbound_intstatus=CHIP_REG_READ32(HBA_MessageUnit, 
-	0, outbound_intstatus) & acb->outbound_int_enable;
+	outbound_intstatus=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & acb->outbound_int_enable;
 	if(!outbound_intstatus) {
 		/*it must be share irq*/
 		return;
 	}
-	CHIP_REG_WRITE32(HBA_MessageUnit, 
-	0, outbound_intstatus, outbound_intstatus);/*clear interrupt*/
+	CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, outbound_intstatus);/*clear interrupt*/
 	/* MU doorbell interrupts*/
 	if(outbound_intstatus & ARCMSR_MU_OUTBOUND_DOORBELL_INT) {
 		arcmsr_hba_doorbell_isr(acb);
@@ -1315,6 +1671,9 @@ static void arcmsr_handle_hba_isr( struc
 	if(outbound_intstatus & ARCMSR_MU_OUTBOUND_POSTQUEUE_INT) {
 		arcmsr_hba_postqueue_isr(acb);
 	}
+	if(outbound_intstatus & ARCMSR_MU_OUTBOUND_MESSAGE0_INT) {
+		arcmsr_hba_message_isr(acb);
+	}
 	return;
 }
 /*
@@ -1348,6 +1707,36 @@ static void arcmsr_handle_hbb_isr( struc
 	if(outbound_doorbell & ARCMSR_IOP2DRV_CDB_DONE) {

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 01:36:48 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E1965106566C;
	Wed,  4 Aug 2010 01:36:48 +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 CE38A8FC0C;
	Wed,  4 Aug 2010 01:36:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o741amWX021654;
	Wed, 4 Aug 2010 01:36:48 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o741amOV021651;
	Wed, 4 Aug 2010 01:36:48 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201008040136.o741amOV021651@svn.freebsd.org>
From: Xin LI 
Date: Wed, 4 Aug 2010 01:36: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: r210836 - stable/8/sys/dev/arcmsr
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 01:36:49 -0000

Author: delphij
Date: Wed Aug  4 01:36:48 2010
New Revision: 210836
URL: http://svn.freebsd.org/changeset/base/210836

Log:
  MFC r210358:
  
  Apply vendor version 1.20.00.17.
  
  This version adds support for ARC1880; additionally this version fixed
  an issue where all devices on a SAS port gets offlined when any device
  failed on the port [1].
  
  Many thanks to Areca for continuing to support FreeBSD.
  
  PR:		kern/148502 [1]
  Submitted by:	Ching-Lung Huang 
  Obtained from:	Areca
  Tested by:	Rich Ercolani  [1]

Modified:
  stable/8/sys/dev/arcmsr/arcmsr.c
  stable/8/sys/dev/arcmsr/arcmsr.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/arcmsr/arcmsr.c
==============================================================================
--- stable/8/sys/dev/arcmsr/arcmsr.c	Wed Aug  4 01:34:35 2010	(r210835)
+++ stable/8/sys/dev/arcmsr/arcmsr.c	Wed Aug  4 01:36:48 2010	(r210836)
@@ -2,15 +2,15 @@
 *****************************************************************************************
 **        O.S   : FreeBSD
 **   FILE NAME  : arcmsr.c
-**        BY    : Erich Chen   
+**        BY    : Erich Chen, Ching Huang
 **   Description: SCSI RAID Device Driver for 
-**                ARECA (ARC11XX/ARC12XX/ARC13XX/ARC16XX) SATA/SAS RAID HOST Adapter
+**                ARECA (ARC11XX/ARC12XX/ARC13XX/ARC16XX/ARC188x) SATA/SAS RAID HOST Adapter
 **                ARCMSR RAID Host adapter
 **                [RAID controller:INTEL 331(PCI-X) 341(PCI-EXPRESS) chip set]
 ******************************************************************************************
 ************************************************************************
 **
-** Copyright (c) 2004-2006 ARECA Co. Ltd.
+** Copyright (c) 2004-2010 ARECA Co. Ltd.
 **        Erich Chen, Taipei Taiwan All rights reserved.
 **
 ** Redistribution and use in source and binary forms, with or without
@@ -57,6 +57,10 @@
 **     1.20.00.15   10/10/2007         Erich Chen        support new RAID adapter type ARC120x
 **     1.20.00.16   10/10/2009         Erich Chen        Bug fix for RAID adapter type ARC120x
 **                                                       bus_dmamem_alloc() with BUS_DMA_ZERO
+**     1.20.00.17   07/15/2010         Ching Huang       Added support ARC1880
+**							 report CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT when device failed,
+**							 prevent cam_periph_error removing all LUN devices of one Target id
+**							 for any one LUN device failed
 ******************************************************************************************
 * $FreeBSD$
 */
@@ -90,6 +94,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -165,6 +171,8 @@ static void arcmsr_build_srb(struct Comm
 static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, union ccb * pccb);
 static int arcmsr_resume(device_t dev);
 static int arcmsr_suspend(device_t dev);
+static void arcmsr_rescanLun_cb(struct cam_periph *periph, union ccb *ccb);
+static void	arcmsr_polling_devmap(void* arg);
 /*
 **************************************************************************
 **************************************************************************
@@ -191,7 +199,6 @@ static device_method_t arcmsr_methods[]=
 	DEVMETHOD(device_shutdown,	arcmsr_shutdown),
 	DEVMETHOD(device_suspend,	arcmsr_suspend),
 	DEVMETHOD(device_resume,	arcmsr_resume),
-	
 	DEVMETHOD(bus_print_child,	bus_generic_print_child),
 	DEVMETHOD(bus_driver_added, 	bus_generic_driver_added),
 	{ 0, 0 }
@@ -215,7 +222,7 @@ MODULE_DEPEND(arcmsr, cam, 1, 1, 1);
 	#ifndef D_VERSION
 		#define D_VERSION	0x20011966
 	#endif
-	static struct cdevsw arcmsr_cdevsw={
+static struct cdevsw arcmsr_cdevsw={
 	#if __FreeBSD_version > 502010
 		.d_version = D_VERSION, 
 	#endif
@@ -228,7 +235,7 @@ MODULE_DEPEND(arcmsr, cam, 1, 1, 1);
 #else
 	#define ARCMSR_CDEV_MAJOR	180
 	
-	static struct cdevsw arcmsr_cdevsw = {
+static struct cdevsw arcmsr_cdevsw = {
 		arcmsr_open, 		        /* open     */
 		arcmsr_close, 		        /* close    */
 		noread, 		        /* read     */
@@ -244,7 +251,10 @@ MODULE_DEPEND(arcmsr, cam, 1, 1, 1);
 		0				/* flags    */
 	};
 #endif
-
+/*
+**************************************************************************
+**************************************************************************
+*/
 #if __FreeBSD_version < 500005
 	static int arcmsr_open(dev_t dev, int flags, int fmt, struct proc *proc)
 #else
@@ -328,18 +338,21 @@ static u_int32_t arcmsr_disable_allintr(
 	switch (acb->adapter_type) {
 	case ACB_ADAPTER_TYPE_A: {
 			/* disable all outbound interrupt */
-			intmask_org=CHIP_REG_READ32(HBA_MessageUnit, 
-			0, outbound_intmask)|ARCMSR_MU_OUTBOUND_MESSAGE0_INTMASKENABLE; /* disable outbound message0 int */
-			CHIP_REG_WRITE32(HBA_MessageUnit, 
-			0, outbound_intmask, intmask_org|ARCMSR_MU_OUTBOUND_ALL_INTMASKENABLE);
+			intmask_org=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intmask); /* disable outbound message0 int */
+			CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intmask, intmask_org|ARCMSR_MU_OUTBOUND_ALL_INTMASKENABLE);
 		}
 		break;
 	case ACB_ADAPTER_TYPE_B: {
 			/* disable all outbound interrupt */
 			intmask_org=CHIP_REG_READ32(HBB_DOORBELL, 
 			0, iop2drv_doorbell_mask) & (~ARCMSR_IOP2DRV_MESSAGE_CMD_DONE); /* disable outbound message0 int */
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, iop2drv_doorbell_mask, 0); /* disable all interrupt */
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell_mask, 0); /* disable all interrupt */
+		}
+		break;
+	case ACB_ADAPTER_TYPE_C: {
+			/* disable all outbound interrupt */
+			intmask_org=CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_mask)	; /* disable outbound message0 int */
+			CHIP_REG_WRITE32(HBC_MessageUnit, 0, host_int_mask, intmask_org|ARCMSR_HBCMU_ALL_INTMASKENABLE);
 		}
 		break;
 	}
@@ -356,19 +369,25 @@ static void arcmsr_enable_allintr( struc
 	switch (acb->adapter_type) {
 	case ACB_ADAPTER_TYPE_A: {
 			/* enable outbound Post Queue, outbound doorbell Interrupt */
-			mask=~(ARCMSR_MU_OUTBOUND_POSTQUEUE_INTMASKENABLE|ARCMSR_MU_OUTBOUND_DOORBELL_INTMASKENABLE);
+			mask=~(ARCMSR_MU_OUTBOUND_POSTQUEUE_INTMASKENABLE|ARCMSR_MU_OUTBOUND_DOORBELL_INTMASKENABLE|ARCMSR_MU_OUTBOUND_MESSAGE0_INTMASKENABLE);
 			CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intmask, intmask_org & mask);
 			acb->outbound_int_enable = ~(intmask_org & mask) & 0x000000ff;
 		}
 		break;
 	case ACB_ADAPTER_TYPE_B: {
-			/* disable ARCMSR_IOP2DRV_MESSAGE_CMD_DONE */
-			mask=(ARCMSR_IOP2DRV_DATA_WRITE_OK|ARCMSR_IOP2DRV_DATA_READ_OK|ARCMSR_IOP2DRV_CDB_DONE);
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, iop2drv_doorbell_mask, intmask_org | mask); /*1=interrupt enable, 0=interrupt disable*/
+			/* enable ARCMSR_IOP2DRV_MESSAGE_CMD_DONE */
+			mask=(ARCMSR_IOP2DRV_DATA_WRITE_OK|ARCMSR_IOP2DRV_DATA_READ_OK|ARCMSR_IOP2DRV_CDB_DONE|ARCMSR_IOP2DRV_MESSAGE_CMD_DONE);
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell_mask, intmask_org | mask); /*1=interrupt enable, 0=interrupt disable*/
 			acb->outbound_int_enable = (intmask_org | mask) & 0x0000000f;
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			/* enable outbound Post Queue, outbound doorbell Interrupt */
+			mask=~(ARCMSR_HBCMU_UTILITY_A_ISR_MASK | ARCMSR_HBCMU_OUTBOUND_DOORBELL_ISR_MASK | ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR_MASK);
+			CHIP_REG_WRITE32(HBC_MessageUnit, 0, host_int_mask, intmask_org & mask);
+			acb->outbound_int_enable= ~(intmask_org & mask) & 0x0000000f;
+		}
+		break;
 	}
 	return;
 }
@@ -383,10 +402,8 @@ static u_int8_t arcmsr_hba_wait_msgint_r
 	
 	do {
 		for(Index=0; Index < 100; Index++) {
-			if(CHIP_REG_READ32(HBA_MessageUnit, 
-				0, outbound_intstatus) & ARCMSR_MU_OUTBOUND_MESSAGE0_INT) {
-				CHIP_REG_WRITE32(HBA_MessageUnit, 
-				0, outbound_intstatus, ARCMSR_MU_OUTBOUND_MESSAGE0_INT);/*clear interrupt*/
+			if(CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & ARCMSR_MU_OUTBOUND_MESSAGE0_INT) {
+				CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, ARCMSR_MU_OUTBOUND_MESSAGE0_INT);/*clear interrupt*/
 				return TRUE;
 			}
 			UDELAY(10000);
@@ -405,12 +422,29 @@ static u_int8_t arcmsr_hbb_wait_msgint_r
 	
 	do {
 		for(Index=0; Index < 100; Index++) {
-			if(CHIP_REG_READ32(HBB_DOORBELL, 
-				0, iop2drv_doorbell) & ARCMSR_IOP2DRV_MESSAGE_CMD_DONE) {
-				CHIP_REG_WRITE32(HBB_DOORBELL, 
-				0, iop2drv_doorbell, ARCMSR_MESSAGE_INT_CLEAR_PATTERN);/*clear interrupt*/
-				CHIP_REG_WRITE32(HBB_DOORBELL, 
-				0, drv2iop_doorbell, ARCMSR_DRV2IOP_END_OF_INTERRUPT);
+			if(CHIP_REG_READ32(HBB_DOORBELL, 0, iop2drv_doorbell) & ARCMSR_IOP2DRV_MESSAGE_CMD_DONE) {
+				CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell, ARCMSR_MESSAGE_INT_CLEAR_PATTERN);/*clear interrupt*/
+				CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_DRV2IOP_END_OF_INTERRUPT);
+				return TRUE;
+			}
+			UDELAY(10000);
+		}/*max 1 seconds*/
+	}while(Retries++ < 20);/*max 20 sec*/
+	return FALSE;
+}
+/*
+**********************************************************************
+**********************************************************************
+*/
+static u_int8_t arcmsr_hbc_wait_msgint_ready(struct AdapterControlBlock *acb)
+{
+	u_int32_t Index;
+	u_int8_t Retries=0x00;
+	
+	do {
+		for(Index=0; Index < 100; Index++) {
+			if(CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_doorbell) & ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE) {
+				CHIP_REG_WRITE32(HBC_MessageUnit, 0, outbound_doorbell_clear, ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE_DOORBELL_CLEAR);/*clear interrupt*/
 				return TRUE;
 			}
 			UDELAY(10000);
@@ -426,8 +460,7 @@ static void arcmsr_flush_hba_cache(struc
 {
 	int retry_count=30;/* enlarge wait flush adapter cache time: 10 minute */
 	
-	CHIP_REG_WRITE32(HBA_MessageUnit, 
-	0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_FLUSH_CACHE);
+	CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_FLUSH_CACHE);
 	do {
 		if(arcmsr_hba_wait_msgint_ready(acb)) {
 			break;
@@ -460,6 +493,25 @@ static void arcmsr_flush_hbb_cache(struc
 ************************************************************************
 ************************************************************************
 */
+static void arcmsr_flush_hbc_cache(struct AdapterControlBlock *acb)
+{
+	int retry_count=30;/* enlarge wait flush adapter cache time: 10 minute */
+	
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_FLUSH_CACHE);
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_MESSAGE_CMD_DONE);
+	do {
+		if(arcmsr_hbc_wait_msgint_ready(acb)) {
+			break;
+		} else {
+			retry_count--;
+		}
+	}while(retry_count!=0);
+	return;
+}
+/*
+************************************************************************
+************************************************************************
+*/
 static void arcmsr_flush_adapter_cache(struct AdapterControlBlock *acb)
 {
 	switch (acb->adapter_type) {
@@ -471,6 +523,10 @@ static void arcmsr_flush_adapter_cache(s
 			arcmsr_flush_hbb_cache(acb);
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			arcmsr_flush_hbc_cache(acb);
+		}
+		break;
 	}
 	return;
 }
@@ -482,10 +538,10 @@ static int arcmsr_suspend(device_t dev)
 {
 	struct AdapterControlBlock	*acb = device_get_softc(dev);
 	
-	/* disable all outbound interrupt */
-	arcmsr_disable_allintr(acb);
 	/* flush controller */
 	arcmsr_iop_parking(acb);
+	/* disable all outbound interrupt */
+	arcmsr_disable_allintr(acb);
 	return(0);
 }
 /*
@@ -515,12 +571,10 @@ static void arcmsr_async(void *cb_arg, u
 	case AC_LOST_DEVICE:
 		target_id=xpt_path_target_id(path);
 		target_lun=xpt_path_lun_id(path);
-		if((target_id > ARCMSR_MAX_TARGETID) 
-		|| (target_lun > ARCMSR_MAX_TARGETLUN)) {
+		if((target_id > ARCMSR_MAX_TARGETID) || (target_lun > ARCMSR_MAX_TARGETLUN)) {
 			break;
 		}
-		printf("%s:scsi id%d lun%d device lost \n"
-			, device_get_name(acb->pci_dev), target_id, target_lun);
+		printf("%s:scsi id=%d lun=%d device lost \n", device_get_name(acb->pci_dev), target_id, target_lun);
 		break;
 	default:
 		break;
@@ -589,8 +643,7 @@ static void arcmsr_abort_hba_allcmd(stru
 {
 	CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_ABORT_CMD);
 	if(!arcmsr_hba_wait_msgint_ready(acb)) {
-		printf("arcmsr%d: wait 'abort all outstanding command' timeout \n"
-			, acb->pci_unit);
+		printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit);
 	}
 	return;
 }
@@ -602,8 +655,20 @@ static void arcmsr_abort_hbb_allcmd(stru
 {
 	CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_MESSAGE_ABORT_CMD);
 	if(!arcmsr_hbb_wait_msgint_ready(acb)) {
-		printf("arcmsr%d: wait 'abort all outstanding command' timeout \n"
-			, acb->pci_unit);
+		printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit);
+	}
+	return;
+}
+/*
+*********************************************************************
+*********************************************************************
+*/
+static void arcmsr_abort_hbc_allcmd(struct AdapterControlBlock *acb)
+{
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_ABORT_CMD);
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_MESSAGE_CMD_DONE);
+	if(!arcmsr_hbc_wait_msgint_ready(acb)) {
+		printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit);
 	}
 	return;
 }
@@ -622,6 +687,10 @@ static void arcmsr_abort_allcmd(struct A
 			arcmsr_abort_hbb_allcmd(acb);
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			arcmsr_abort_hbc_allcmd(acb);
+		}
+		break;
 	}
 	return;
 }
@@ -629,14 +698,13 @@ static void arcmsr_abort_allcmd(struct A
 **************************************************************************
 **************************************************************************
 */
-static void arcmsr_report_srb_state(struct AdapterControlBlock *acb, 
-	struct CommandControlBlock *srb, u_int32_t flag_srb)
+static void arcmsr_report_srb_state(struct AdapterControlBlock *acb, struct CommandControlBlock *srb, u_int16_t error)
 {
 	int target, lun;
 	
 	target=srb->pccb->ccb_h.target_id;
 	lun=srb->pccb->ccb_h.target_lun;
-	if((flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR)==0) {
+	if(error == FALSE) {
 		if(acb->devstate[target][lun]==ARECA_RAID_GONE) {
 			acb->devstate[target][lun]=ARECA_RAID_GOOD;
 		}
@@ -646,12 +714,10 @@ static void arcmsr_report_srb_state(stru
 		switch(srb->arcmsr_cdb.DeviceStatus) {
 		case ARCMSR_DEV_SELECT_TIMEOUT: {
 				if(acb->devstate[target][lun]==ARECA_RAID_GOOD) {
-					printf( "arcmsr%d: select timeout"
-						", raid volume was kicked out \n"
-						, acb->pci_unit);
+					printf( "arcmsr%d: Target=%x, Lun=%x, selection timeout, raid volume was lost\n", acb->pci_unit, target, lun);
 				}
 				acb->devstate[target][lun]=ARECA_RAID_GONE;
-				srb->pccb->ccb_h.status |= CAM_SEL_TIMEOUT;
+				srb->pccb->ccb_h.status |= CAM_DEV_NOT_THERE;
 				arcmsr_srb_complete(srb, 1);
 			}
 			break;
@@ -669,11 +735,8 @@ static void arcmsr_report_srb_state(stru
 			}
 			break;
 		default:
-			printf("arcmsr%d: scsi id=%d lun=%d"
-				"isr get command error done,"
-				"but got unknow DeviceStatus=0x%x \n"
-				, acb->pci_unit, target, lun 
-				,srb->arcmsr_cdb.DeviceStatus);
+			printf("arcmsr%d: scsi id=%d lun=%d isr got command error done,but got unknow DeviceStatus=0x%x \n"
+					, acb->pci_unit, target, lun ,srb->arcmsr_cdb.DeviceStatus);
 			acb->devstate[target][lun]=ARECA_RAID_GONE;
 			srb->pccb->ccb_h.status |= CAM_UNCOR_PARITY;
 			/*unknow error or crc error just for retry*/
@@ -687,29 +750,34 @@ static void arcmsr_report_srb_state(stru
 **************************************************************************
 **************************************************************************
 */
-static void arcmsr_drain_donequeue(struct AdapterControlBlock *acb, u_int32_t flag_srb)
+static void arcmsr_drain_donequeue(struct AdapterControlBlock *acb, u_int32_t flag_srb, u_int16_t error)
 {
 	struct CommandControlBlock *srb;
 	
 	/* check if command done with no error*/
-	srb=(struct CommandControlBlock *)
-		(acb->vir2phy_offset+(flag_srb << 5));/*frame must be 32 bytes aligned*/
+	switch (acb->adapter_type) {
+	case ACB_ADAPTER_TYPE_C:
+		srb = (struct CommandControlBlock *)(acb->vir2phy_offset+(flag_srb & 0xFFFFFFF0));/*frame must be 32 bytes aligned*/
+		break;
+	case ACB_ADAPTER_TYPE_A:
+	case ACB_ADAPTER_TYPE_B:
+	default:
+		srb = (struct CommandControlBlock *)(acb->vir2phy_offset+(flag_srb << 5));/*frame must be 32 bytes aligned*/
+		break;
+	}
 	if((srb->acb!=acb) || (srb->startdone!=ARCMSR_SRB_START)) {
 		if(srb->startdone==ARCMSR_SRB_ABORTED) {
-			printf("arcmsr%d: srb='%p' isr got aborted command \n"
-				, acb->pci_unit, srb);
+			printf("arcmsr%d: srb='%p' isr got aborted command \n", acb->pci_unit, srb);
 			srb->pccb->ccb_h.status |= CAM_REQ_ABORTED;
 			arcmsr_srb_complete(srb, 1);
 			return;
 		}
 		printf("arcmsr%d: isr get an illegal srb command done"
-			"acb='%p' srb='%p' srbacb='%p' startdone=0x%x"
-			"srboutstandingcount=%d \n",
-			acb->pci_unit, acb, srb, srb->acb,
-			srb->startdone, acb->srboutstandingcount);
+			"acb='%p' srb='%p' srbacb='%p' startdone=0x%xsrboutstandingcount=%d \n",
+			acb->pci_unit, acb, srb, srb->acb,srb->startdone, acb->srboutstandingcount);
 		return;
 	}
-	arcmsr_report_srb_state(acb, srb, flag_srb);
+	arcmsr_report_srb_state(acb, srb, error);
 	return;
 }
 /*
@@ -720,20 +788,18 @@ static void arcmsr_done4abort_postqueue(
 {
 	int i=0;
 	u_int32_t flag_srb;
+	u_int16_t error;
 	
 	switch (acb->adapter_type) {
 	case ACB_ADAPTER_TYPE_A: {
 			u_int32_t outbound_intstatus;
 	
 			/*clear and abort all outbound posted Q*/
-			outbound_intstatus=CHIP_REG_READ32(HBA_MessageUnit, 
-			0, outbound_intstatus) & acb->outbound_int_enable;
-			CHIP_REG_WRITE32(HBA_MessageUnit, 
-			0, outbound_intstatus, outbound_intstatus);/*clear interrupt*/
-			while(((flag_srb=CHIP_REG_READ32(HBA_MessageUnit, 
-				0, outbound_queueport)) != 0xFFFFFFFF) 
-				&& (i++ < ARCMSR_MAX_OUTSTANDING_CMD)) {
-				arcmsr_drain_donequeue(acb, flag_srb);
+			outbound_intstatus=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & acb->outbound_int_enable;
+			CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, outbound_intstatus);/*clear interrupt*/
+			while(((flag_srb=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_queueport)) != 0xFFFFFFFF) && (i++ < ARCMSR_MAX_OUTSTANDING_CMD)) {
+                error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+				arcmsr_drain_donequeue(acb, flag_srb, error);
 			}
 		}
 		break;
@@ -741,13 +807,12 @@ static void arcmsr_done4abort_postqueue(
 			struct HBB_MessageUnit *phbbmu=(struct HBB_MessageUnit *)acb->pmu;
 	
 			/*clear all outbound posted Q*/
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, iop2drv_doorbell, 
-			ARCMSR_DOORBELL_INT_CLEAR_PATTERN); /* clear doorbell interrupt */
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell, ARCMSR_DOORBELL_INT_CLEAR_PATTERN); /* clear doorbell interrupt */
 			for(i=0; i < ARCMSR_MAX_HBB_POSTQUEUE; i++) {
 				if((flag_srb=phbbmu->done_qbuffer[i])!=0) {
 					phbbmu->done_qbuffer[i]=0;
-					arcmsr_drain_donequeue(acb, flag_srb);
+                	error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+					arcmsr_drain_donequeue(acb, flag_srb, error);
 				}
 				phbbmu->post_qbuffer[i]=0;
 			}/*drain reply FIFO*/
@@ -755,6 +820,15 @@ static void arcmsr_done4abort_postqueue(
 			phbbmu->postq_index=0;
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+	
+			while((CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_status) & ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR) && (i++ < ARCMSR_MAX_OUTSTANDING_CMD)) {
+				flag_srb=CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_queueport_low);
+                error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1)?TRUE:FALSE;
+				arcmsr_drain_donequeue(acb, flag_srb, error);
+			}
+		}
+		break;
 	}
 	return;
 }
@@ -873,7 +947,10 @@ static void arcmsr_build_srb(struct Comm
 		if( arccdbsize > 256) {
 			arcmsr_cdb->Flags|=ARCMSR_CDB_FLAG_SGL_BSIZE;
 		}
+	} else {
+		arcmsr_cdb->DataLength = 0;
 	}
+    srb->arc_cdb_size=arccdbsize;
 	return;
 }
 /*
@@ -885,19 +962,16 @@ static void arcmsr_post_srb(struct Adapt
 	u_int32_t cdb_shifted_phyaddr=(u_int32_t) srb->cdb_shifted_phyaddr;
 	struct ARCMSR_CDB * arcmsr_cdb=(struct ARCMSR_CDB *)&srb->arcmsr_cdb;
 	
-	bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap, 
-	(srb->srb_flags & SRB_FLAG_WRITE) ? BUS_DMASYNC_POSTWRITE:BUS_DMASYNC_POSTREAD);
+	bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap, (srb->srb_flags & SRB_FLAG_WRITE) ? BUS_DMASYNC_POSTWRITE:BUS_DMASYNC_POSTREAD);
 	atomic_add_int(&acb->srboutstandingcount, 1);
 	srb->startdone=ARCMSR_SRB_START;
+
 	switch (acb->adapter_type) {
 	case ACB_ADAPTER_TYPE_A: {
 			if(arcmsr_cdb->Flags & ARCMSR_CDB_FLAG_SGL_BSIZE) {
-				CHIP_REG_WRITE32(HBA_MessageUnit, 
-				0, inbound_queueport, 
-				cdb_shifted_phyaddr|ARCMSR_SRBPOST_FLAG_SGL_BSIZE);
+				CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_queueport, cdb_shifted_phyaddr|ARCMSR_SRBPOST_FLAG_SGL_BSIZE);
 			} else {
-				CHIP_REG_WRITE32(HBA_MessageUnit, 
-				0, inbound_queueport, cdb_shifted_phyaddr);
+				CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_queueport, cdb_shifted_phyaddr);
 			}
 		}
 		break;
@@ -909,17 +983,32 @@ static void arcmsr_post_srb(struct Adapt
 			ending_index=((index+1)%ARCMSR_MAX_HBB_POSTQUEUE);
 			phbbmu->post_qbuffer[ending_index]=0;
 			if(arcmsr_cdb->Flags & ARCMSR_CDB_FLAG_SGL_BSIZE) {
-				phbbmu->post_qbuffer[index]=
-					cdb_shifted_phyaddr|ARCMSR_SRBPOST_FLAG_SGL_BSIZE;
+				phbbmu->post_qbuffer[index]= cdb_shifted_phyaddr|ARCMSR_SRBPOST_FLAG_SGL_BSIZE;
 			} else {
-				phbbmu->post_qbuffer[index]=
-					cdb_shifted_phyaddr;
+				phbbmu->post_qbuffer[index]= cdb_shifted_phyaddr;
 			}
 			index++;
 			index %= ARCMSR_MAX_HBB_POSTQUEUE;     /*if last index number set it to 0 */
 			phbbmu->postq_index=index;
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, drv2iop_doorbell, ARCMSR_DRV2IOP_CDB_POSTED);
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_DRV2IOP_CDB_POSTED);
+		}
+		break;
+    case ACB_ADAPTER_TYPE_C:
+        {
+            u_int32_t ccb_post_stamp, arc_cdb_size, cdb_phyaddr_hi32;
+
+            arc_cdb_size=(srb->arc_cdb_size>0x300)?0x300:srb->arc_cdb_size;
+            ccb_post_stamp=(cdb_shifted_phyaddr | ((arc_cdb_size-1) >> 6) | 1);
+			cdb_phyaddr_hi32 = acb->srb_phyaddr.B.phyadd_high;
+            if(cdb_phyaddr_hi32)
+            {
+			    CHIP_REG_WRITE32(HBC_MessageUnit,0,inbound_queueport_high, cdb_phyaddr_hi32);
+			    CHIP_REG_WRITE32(HBC_MessageUnit,0,inbound_queueport_low, ccb_post_stamp);
+            }
+            else
+            {
+			    CHIP_REG_WRITE32(HBC_MessageUnit,0,inbound_queueport_low, ccb_post_stamp);
+            }
 		}
 		break;
 	}
@@ -946,6 +1035,12 @@ static struct QBUFFER * arcmsr_get_iop_r
 			qbuffer=(struct QBUFFER *)&phbbmu->hbb_rwbuffer->message_rbuffer;
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			struct HBC_MessageUnit *phbcmu=(struct HBC_MessageUnit *)acb->pmu;
+	
+			qbuffer=(struct QBUFFER *)&phbcmu->message_rbuffer;
+		}
+		break;
 	}
 	return(qbuffer);
 }
@@ -970,6 +1065,12 @@ static struct QBUFFER * arcmsr_get_iop_w
 			qbuffer=(struct QBUFFER *)&phbbmu->hbb_rwbuffer->message_wbuffer;
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			struct HBC_MessageUnit *phbcmu=(struct HBC_MessageUnit *)acb->pmu;
+	
+			qbuffer=(struct QBUFFER *)&phbcmu->message_wbuffer;
+		}
+		break;
 	}
 	return(qbuffer);
 }
@@ -982,16 +1083,18 @@ static void arcmsr_iop_message_read(stru
 	switch (acb->adapter_type) {
 	case ACB_ADAPTER_TYPE_A: {
 			/* let IOP know data has been read */
-			CHIP_REG_WRITE32(HBA_MessageUnit, 
-			0, inbound_doorbell, ARCMSR_INBOUND_DRIVER_DATA_READ_OK);
+			CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_doorbell, ARCMSR_INBOUND_DRIVER_DATA_READ_OK);
 		}
 		break;
 	case ACB_ADAPTER_TYPE_B: {
 			/* let IOP know data has been read */
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, drv2iop_doorbell, ARCMSR_DRV2IOP_DATA_READ_OK);
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_DRV2IOP_DATA_READ_OK);
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			/* let IOP know data has been read */
+			CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_DATA_READ_OK);
+		}
 	}
 	return;
 }
@@ -1007,8 +1110,7 @@ static void arcmsr_iop_message_wrote(str
 			** push inbound doorbell tell iop, driver data write ok 
 			** and wait reply on next hwinterrupt for next Qbuffer post
 			*/
-			CHIP_REG_WRITE32(HBA_MessageUnit, 
-			0, inbound_doorbell, ARCMSR_INBOUND_DRIVER_DATA_WRITE_OK);
+			CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_doorbell, ARCMSR_INBOUND_DRIVER_DATA_WRITE_OK);
 		}
 		break;
 	case ACB_ADAPTER_TYPE_B: {
@@ -1016,8 +1118,15 @@ static void arcmsr_iop_message_wrote(str
 			** push inbound doorbell tell iop, driver data write ok 
 			** and wait reply on next hwinterrupt for next Qbuffer post
 			*/
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, drv2iop_doorbell, ARCMSR_DRV2IOP_DATA_WRITE_OK);
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_DRV2IOP_DATA_WRITE_OK);
+		}
+		break;
+	case ACB_ADAPTER_TYPE_C: {
+			/*
+			** push inbound doorbell tell iop, driver data write ok 
+			** and wait reply on next hwinterrupt for next Qbuffer post
+			*/
+			CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_DATA_WRITE_OK);
 		}
 		break;
 	}
@@ -1064,7 +1173,7 @@ static void arcmsr_stop_hba_bgrb(struct 
 	CHIP_REG_WRITE32(HBA_MessageUnit, 
 	0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_STOP_BGRB);
 	if(!arcmsr_hba_wait_msgint_ready(acb)) {
-		printf("arcmsr%d: wait 'stop adapter rebulid' timeout \n"
+		printf("arcmsr%d: wait 'stop adapter background rebulid' timeout \n"
 			, acb->pci_unit);
 	}
 	return;
@@ -1079,7 +1188,7 @@ static void arcmsr_stop_hbb_bgrb(struct 
 	CHIP_REG_WRITE32(HBB_DOORBELL, 
 	0, drv2iop_doorbell, ARCMSR_MESSAGE_STOP_BGRB);
 	if(!arcmsr_hbb_wait_msgint_ready(acb)) {
-		printf( "arcmsr%d: wait 'stop adapter rebulid' timeout \n"
+		printf( "arcmsr%d: wait 'stop adapter background rebulid' timeout \n"
 			, acb->pci_unit);
 	}
 	return;
@@ -1088,6 +1197,20 @@ static void arcmsr_stop_hbb_bgrb(struct 
 ************************************************************************
 ************************************************************************
 */
+static void arcmsr_stop_hbc_bgrb(struct AdapterControlBlock *acb)
+{
+	acb->acb_flags &=~ACB_F_MSG_START_BGRB;
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_STOP_BGRB);
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell,ARCMSR_HBCMU_DRV2IOP_MESSAGE_CMD_DONE);
+	if(!arcmsr_hbc_wait_msgint_ready(acb)) {
+		printf("arcmsr%d: wait 'stop adapter background rebulid' timeout \n", acb->pci_unit);
+	}
+	return;
+}
+/*
+************************************************************************
+************************************************************************
+*/
 static void arcmsr_stop_adapter_bgrb(struct AdapterControlBlock *acb)
 {
 	switch (acb->adapter_type) {
@@ -1099,6 +1222,10 @@ static void arcmsr_stop_adapter_bgrb(str
 			arcmsr_stop_hbb_bgrb(acb);
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			arcmsr_stop_hbc_bgrb(acb);
+		}
+		break;
 	}
 	return;
 }
@@ -1121,18 +1248,6 @@ static void arcmsr_poll(struct cam_sim *
 	return;
 }
 /*
-**********************************************************************
-**********************************************************************
-*/
-static void arcmsr_intr_handler(void *arg)
-{
-	struct AdapterControlBlock *acb=(struct AdapterControlBlock *)arg;
-	
-	ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
-	arcmsr_interrupt(acb);
-	ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
-}
-/*
 **************************************************************************
 **************************************************************************
 */
@@ -1210,6 +1325,187 @@ static void arcmsr_iop2drv_data_read_han
 	}
 	return;
 }
+
+static void arcmsr_rescanLun_cb(struct cam_periph *periph, union ccb *ccb)
+{
+/*
+	if (ccb->ccb_h.status != CAM_REQ_CMP)
+		printf("arcmsr_rescanLun_cb: Rescan Target=%x, lun=%x, failure status=%x\n",ccb->ccb_h.target_id,ccb->ccb_h.target_lun,ccb->ccb_h.status);
+	else
+		printf("arcmsr_rescanLun_cb: Rescan lun successfully!\n");
+*/
+	xpt_free_path(ccb->ccb_h.path);
+	xpt_free_ccb(ccb);
+}
+
+static void	arcmsr_rescan_lun(struct AdapterControlBlock *acb, int target, int lun)
+{
+	struct cam_path     *path;
+	union ccb           *ccb;
+
+	if ((ccb = (union ccb *)xpt_alloc_ccb_nowait()) == NULL)
+ 		return;
+	if (xpt_create_path(&path, xpt_periph, cam_sim_path(acb->psim), target, lun) != CAM_REQ_CMP)
+	{
+		xpt_free_ccb(ccb);
+		return;
+	}
+/*	printf("arcmsr_rescan_lun: Rescan Target=%x, Lun=%x\n", target, lun); */
+	bzero(ccb, sizeof(union ccb));
+	xpt_setup_ccb(&ccb->ccb_h, path, 5);
+	ccb->ccb_h.func_code = XPT_SCAN_LUN;
+	ccb->ccb_h.cbfcnp = arcmsr_rescanLun_cb;
+	ccb->crcn.flags = CAM_FLAG_NONE;
+	xpt_action(ccb);
+	return;
+}
+
+
+static void arcmsr_abort_dr_ccbs(struct AdapterControlBlock *acb, int target, int lun)
+{
+   	struct CommandControlBlock *srb;
+	u_int32_t intmask_org;
+   	int i;
+
+	ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
+	/* disable all outbound interrupts */
+	intmask_org = arcmsr_disable_allintr(acb);
+	for (i = 0; i < ARCMSR_MAX_FREESRB_NUM; i++)
+	{
+		srb = acb->psrb_pool[i];
+		if (srb->startdone == ARCMSR_SRB_START)
+		{
+           	if((target == srb->pccb->ccb_h.target_id) && (lun == srb->pccb->ccb_h.target_lun))
+            {
+		    	srb->startdone = ARCMSR_SRB_ABORTED;
+				srb->pccb->ccb_h.status |= CAM_REQ_ABORTED;
+		    	arcmsr_srb_complete(srb, 1);
+       		}
+		}
+	}
+	/* enable outbound Post Queue, outbound doorbell Interrupt */
+	arcmsr_enable_allintr(acb, intmask_org);
+	ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
+}
+
+
+/*
+**************************************************************************
+**************************************************************************
+*/
+static void arcmsr_dr_handle(struct AdapterControlBlock *acb) {
+	u_int32_t	devicemap;
+	u_int32_t	target, lun;
+    u_int32_t	deviceMapCurrent[4]={0};
+    u_int8_t	*pDevMap;
+
+	switch (acb->adapter_type) {
+	case ACB_ADAPTER_TYPE_A:
+			devicemap = offsetof(struct HBA_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]);
+			for (target= 0; target < 4; target++) 
+			{
+            	deviceMapCurrent[target]=bus_space_read_4(acb->btag[0], acb->bhandle[0],  devicemap);
+            	devicemap += 4;
+			}
+			break;
+
+	case ACB_ADAPTER_TYPE_B:
+			devicemap = offsetof(struct HBB_RWBUFFER, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]);
+			for (target= 0; target < 4; target++) 
+			{
+            	deviceMapCurrent[target]=bus_space_read_4(acb->btag[1], acb->bhandle[1],  devicemap);
+            	devicemap += 4;
+			}
+			break;
+
+	case ACB_ADAPTER_TYPE_C:
+			devicemap = offsetof(struct HBC_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]);
+			for (target= 0; target < 4; target++) 
+			{
+            	deviceMapCurrent[target]=bus_space_read_4(acb->btag[0], acb->bhandle[0],  devicemap);
+            	devicemap += 4;
+			}
+			break;
+	}
+		if(acb->acb_flags & ACB_F_BUS_HANG_ON)
+		{
+			acb->acb_flags &= ~ACB_F_BUS_HANG_ON;
+		}
+		/* 
+		** adapter posted CONFIG message 
+		** copy the new map, note if there are differences with the current map
+		*/
+		pDevMap = (u_int8_t	*)&deviceMapCurrent[0];
+		for (target= 0; target < ARCMSR_MAX_TARGETID - 1; target++) 
+		{
+			if (*pDevMap != acb->device_map[target])
+			{
+                u_int8_t difference, bit_check;
+
+                difference= *pDevMap ^ acb->device_map[target];
+                for(lun=0; lun < ARCMSR_MAX_TARGETLUN; lun++)
+                {
+                    bit_check=(1 << lun);						/*check bit from 0....31*/
+                    if(difference & bit_check)
+                    {
+                        if(acb->device_map[target] & bit_check)
+                        {/* unit departed */
+							printf("arcmsr_dr_handle: Target=%x, lun=%x, GONE!!!\n",target,lun);
+ 							arcmsr_abort_dr_ccbs(acb, target, lun);
+                        	arcmsr_rescan_lun(acb, target, lun);
+        					acb->devstate[target][lun] = ARECA_RAID_GONE;
+                        }
+                        else
+                        {/* unit arrived */
+							printf("arcmsr_dr_handle: Target=%x, lun=%x, ARRIVING!!!\n",target,lun);
+                        	arcmsr_rescan_lun(acb, target, lun);
+        					acb->devstate[target][lun] = ARECA_RAID_GOOD;
+                        }
+                    }
+                }
+/*				printf("arcmsr_dr_handle: acb->device_map[%x]=0x%x, deviceMapCurrent[%x]=%x\n",target,acb->device_map[target],target,*pDevMap); */
+				acb->device_map[target]= *pDevMap;
+			}
+			pDevMap++;
+		}
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
+static void arcmsr_hba_message_isr(struct AdapterControlBlock *acb) {
+	u_int32_t outbound_message;
+
+	CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, ARCMSR_MU_OUTBOUND_MESSAGE0_INT);
+	outbound_message = CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[0]);
+	if (outbound_message == ARCMSR_SIGNATURE_GET_CONFIG)
+		arcmsr_dr_handle( acb );
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
+static void arcmsr_hbb_message_isr(struct AdapterControlBlock *acb) {
+	u_int32_t outbound_message;
+
+	/* clear interrupts */
+	CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell, ARCMSR_MESSAGE_INT_CLEAR_PATTERN);
+	outbound_message = CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[0]);
+	if (outbound_message == ARCMSR_SIGNATURE_GET_CONFIG)
+		arcmsr_dr_handle( acb );
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
+static void arcmsr_hbc_message_isr(struct AdapterControlBlock *acb) {
+	u_int32_t outbound_message;
+
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, outbound_doorbell_clear, ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE_DOORBELL_CLEAR);
+	outbound_message = CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[0]);
+	if (outbound_message == ARCMSR_SIGNATURE_GET_CONFIG)
+		arcmsr_dr_handle( acb );
+}
 /*
 **************************************************************************
 **************************************************************************
@@ -1241,9 +1537,38 @@ static void arcmsr_hba_doorbell_isr(stru
 **************************************************************************
 **************************************************************************
 */
+static void arcmsr_hbc_doorbell_isr(struct AdapterControlBlock *acb)
+{
+	u_int32_t outbound_doorbell;
+	
+	/*
+	*******************************************************************
+	**  Maybe here we need to check wrqbuffer_lock is lock or not
+	**  DOORBELL: din! don! 
+	**  check if there are any mail need to pack from firmware
+	*******************************************************************
+	*/
+	outbound_doorbell=CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_doorbell);
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, outbound_doorbell_clear, outbound_doorbell); /* clear doorbell interrupt */
+	if(outbound_doorbell & ARCMSR_HBCMU_IOP2DRV_DATA_WRITE_OK) {
+		arcmsr_iop2drv_data_wrote_handle(acb);
+	}
+	if(outbound_doorbell & ARCMSR_HBCMU_IOP2DRV_DATA_READ_OK) {
+		arcmsr_iop2drv_data_read_handle(acb);
+	}
+	if(outbound_doorbell & ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE) {
+		arcmsr_hbc_message_isr(acb);    /* messenger of "driver to iop commands" */
+	}
+	return;
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
 static void arcmsr_hba_postqueue_isr(struct AdapterControlBlock *acb)
 {
 	u_int32_t flag_srb;
+	u_int16_t error;
 	
 	/*
 	*****************************************************************************
@@ -1255,7 +1580,8 @@ static void arcmsr_hba_postqueue_isr(str
 	while((flag_srb=CHIP_REG_READ32(HBA_MessageUnit, 
 		0, outbound_queueport)) != 0xFFFFFFFF) {
 		/* check if command done with no error*/
-		arcmsr_drain_donequeue(acb, flag_srb);
+        error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+		arcmsr_drain_donequeue(acb, flag_srb, error);
 	}	/*drain reply FIFO*/
 	return;
 }
@@ -1268,6 +1594,7 @@ static void arcmsr_hbb_postqueue_isr(str
 	struct HBB_MessageUnit *phbbmu=(struct HBB_MessageUnit *)acb->pmu;
 	u_int32_t flag_srb;
 	int index;
+	u_int16_t error;
 	
 	/*
 	*****************************************************************************
@@ -1283,7 +1610,38 @@ static void arcmsr_hbb_postqueue_isr(str
 		index %= ARCMSR_MAX_HBB_POSTQUEUE;     /*if last index number set it to 0 */
 		phbbmu->doneq_index=index;
 		/* check if command done with no error*/
-		arcmsr_drain_donequeue(acb, flag_srb);
+        error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+		arcmsr_drain_donequeue(acb, flag_srb, error);
+	}	/*drain reply FIFO*/
+	return;
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
+static void arcmsr_hbc_postqueue_isr(struct AdapterControlBlock *acb)
+{
+	u_int32_t flag_srb,throttling=0;
+	u_int16_t error;
+	
+	/*
+	*****************************************************************************
+	**               areca cdb command done
+	*****************************************************************************
+	*/
+	bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap, BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
+		
+	while(CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_status) & ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR) {
+		
+		flag_srb=CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_queueport_low);
+		/* check if command done with no error*/
+        error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1)?TRUE:FALSE;
+		arcmsr_drain_donequeue(acb, flag_srb, error);
+        if(throttling==ARCMSR_HBC_ISR_THROTTLING_LEVEL) {
+            CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell,ARCMSR_HBCMU_DRV2IOP_POSTQUEUE_THROTTLING);
+            break;
+        }
+        throttling++;
 	}	/*drain reply FIFO*/
 	return;
 }
@@ -1299,14 +1657,12 @@ static void arcmsr_handle_hba_isr( struc
 	**   check outbound intstatus 
 	*********************************************
 	*/
-	outbound_intstatus=CHIP_REG_READ32(HBA_MessageUnit, 
-	0, outbound_intstatus) & acb->outbound_int_enable;
+	outbound_intstatus=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & acb->outbound_int_enable;
 	if(!outbound_intstatus) {
 		/*it must be share irq*/
 		return;
 	}
-	CHIP_REG_WRITE32(HBA_MessageUnit, 
-	0, outbound_intstatus, outbound_intstatus);/*clear interrupt*/
+	CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, outbound_intstatus);/*clear interrupt*/
 	/* MU doorbell interrupts*/
 	if(outbound_intstatus & ARCMSR_MU_OUTBOUND_DOORBELL_INT) {
 		arcmsr_hba_doorbell_isr(acb);
@@ -1315,6 +1671,9 @@ static void arcmsr_handle_hba_isr( struc
 	if(outbound_intstatus & ARCMSR_MU_OUTBOUND_POSTQUEUE_INT) {
 		arcmsr_hba_postqueue_isr(acb);
 	}
+	if(outbound_intstatus & ARCMSR_MU_OUTBOUND_MESSAGE0_INT) {
+		arcmsr_hba_message_isr(acb);
+	}
 	return;
 }
 /*
@@ -1348,6 +1707,36 @@ static void arcmsr_handle_hbb_isr( struc
 	if(outbound_doorbell & ARCMSR_IOP2DRV_CDB_DONE) {

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 01:55:54 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 652BE1065674;
	Wed,  4 Aug 2010 01:55:54 +0000 (UTC)
	(envelope-from rmacklem@uoguelph.ca)
Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca
	[131.104.91.36])
	by mx1.freebsd.org (Postfix) with ESMTP id D2C328FC17;
	Wed,  4 Aug 2010 01:55:53 +0000 (UTC)
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApwEAA9eWEyDaFvO/2dsb2JhbACDFZ14sXySDoEmgyBzBIkP
X-IronPort-AV: E=Sophos;i="4.55,312,1278302400"; d="scan'208";a="87232916"
Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca)
	([131.104.91.206])
	by esa-annu-pri.mail.uoguelph.ca with ESMTP; 03 Aug 2010 21:26:39 -0400
Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1])
	by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id B0F3BB3EA5;
	Tue,  3 Aug 2010 21:26:39 -0400 (EDT)
Date: Tue, 3 Aug 2010 21:26:39 -0400 (EDT)
From: Rick Macklem 
To: Rick Macklem 
Message-ID: <1680701073.278604.1280885199696.JavaMail.root@erie.cs.uoguelph.ca>
In-Reply-To: <201008040119.o741JBTr017680@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Originating-IP: [24.65.230.102]
X-Mailer: Zimbra 6.0.7_GA_2476.RHEL4 (ZimbraWebClient - SAF3
	(Mac)/6.0.7_GA_2473.RHEL4_64)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r210834 - head/sys/nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 01:55:54 -0000

> From: "Rick Macklem" 
> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
> Sent: Tuesday, August 3, 2010 9:19:11 PM
> Subject: svn commit: r210834 - head/sys/nfsclient
> Author: rmacklem
> Date: Wed Aug 4 01:19:11 2010
> New Revision: 210834
> URL: http://svn.freebsd.org/changeset/base/210834
> 
> Log:
> Add some mutex locking on the nfsnode to the regular NFS client.
> 
> Reviewed by: jhb
> 
> Modified:
> head/sys/nfsclient/nfs_node.c
> head/sys/nfsclient/nfs_vnops.c
> 
Oops, sorry, forgot the MFC..

MFC: 3 weeks


From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 05:09:02 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B536D1065688;
	Wed,  4 Aug 2010 05:09:02 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A45418FC24;
	Wed,  4 Aug 2010 05:09:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o74592Vw068774;
	Wed, 4 Aug 2010 05:09:02 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o74592lI068772;
	Wed, 4 Aug 2010 05:09:02 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201008040509.o74592lI068772@svn.freebsd.org>
From: Alan Cox 
Date: Wed, 4 Aug 2010 05:09:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210837 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 05:09:02 -0000

Author: alc
Date: Wed Aug  4 05:09:02 2010
New Revision: 210837
URL: http://svn.freebsd.org/changeset/base/210837

Log:
  In order for MAXVNODES_MAX to be an "int" on powerpc and sparc, we must
  cast PAGE_SIZE to an "int".  (Powerpc and sparc, unlike the other
  architectures, define PAGE_SIZE as a "long".)
  
  Submitted by:	Andreas Tobler

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Wed Aug  4 01:36:48 2010	(r210836)
+++ head/sys/kern/vfs_subr.c	Wed Aug  4 05:09:02 2010	(r210837)
@@ -288,7 +288,7 @@ SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhe
  * grows, the ratio of physical pages to vnodes approaches sixteen to one.
  */
 #ifndef	MAXVNODES_MAX
-#define	MAXVNODES_MAX	(512 * (1024 * 1024 * 1024 / PAGE_SIZE / 16))
+#define	MAXVNODES_MAX	(512 * (1024 * 1024 * 1024 / (int)PAGE_SIZE / 16))
 #endif
 static void
 vntblinit(void *dummy __unused)

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 07:47:19 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7A51F106566B;
	Wed,  4 Aug 2010 07:47:19 +0000 (UTC)
	(envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 694248FC1E;
	Wed,  4 Aug 2010 07:47:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o747lJA9004077;
	Wed, 4 Aug 2010 07:47:19 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o747lJhH004076;
	Wed, 4 Aug 2010 07:47:19 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201008040747.o747lJhH004076@svn.freebsd.org>
From: Joel Dahl 
Date: Wed, 4 Aug 2010 07:47:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210838 - head/libexec/ypxfr
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 07:47:19 -0000

Author: joel (doc committer)
Date: Wed Aug  4 07:47:19 2010
New Revision: 210838
URL: http://svn.freebsd.org/changeset/base/210838

Log:
  Fix typo.

Modified:
  head/libexec/ypxfr/ypxfr.8

Modified: head/libexec/ypxfr/ypxfr.8
==============================================================================
--- head/libexec/ypxfr/ypxfr.8	Wed Aug  4 05:09:02 2010	(r210837)
+++ head/libexec/ypxfr/ypxfr.8	Wed Aug  4 07:47:19 2010	(r210838)
@@ -85,7 +85,7 @@ any updates are made (i.e., when a user 
 When run,
 .Nm
 creates a temporary database file in
-.Pa /var/yp/[domainmame] ,
+.Pa /var/yp/[domainname] ,
 and fills it with the contents of
 .Ar mapname
 as supplied by the specified

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 07:49:41 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5905B106567A;
	Wed,  4 Aug 2010 07:49:41 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8B66B8FC22;
	Wed,  4 Aug 2010 07:49:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o747nevA004640;
	Wed, 4 Aug 2010 07:49:40 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o747ne3B004638;
	Wed, 4 Aug 2010 07:49:40 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201008040749.o747ne3B004638@svn.freebsd.org>
From: Gavin Atkinson 
Date: Wed, 4 Aug 2010 07:49:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210839 - head/sys/dev/sound/pci/hda
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 07:49:41 -0000

Author: gavin
Date: Wed Aug  4 07:49:40 2010
New Revision: 210839
URL: http://svn.freebsd.org/changeset/base/210839

Log:
  Do not free sc if attach failed, as it was allocated by the bus
  infrastructure, not us.  This appears to be a leftover from an older
  version of the driver.
  
  Submitted by:	avg
  Tested by:	Anton Shterenlikht 
  MFC after:	1 week
  X-MFC-Note:	To stable/8 and stable/7 only

Modified:
  head/sys/dev/sound/pci/hda/hdac.c

Modified: head/sys/dev/sound/pci/hda/hdac.c
==============================================================================
--- head/sys/dev/sound/pci/hda/hdac.c	Wed Aug  4 07:47:19 2010	(r210838)
+++ head/sys/dev/sound/pci/hda/hdac.c	Wed Aug  4 07:49:40 2010	(r210839)
@@ -4314,7 +4314,6 @@ hdac_attach_fail:
 	hdac_dma_free(sc, &sc->corb_dma);
 	hdac_mem_free(sc);
 	snd_mtxfree(sc->lock);
-	free(sc, M_DEVBUF);
 
 	return (ENXIO);
 }

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 09:56:44 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0CFED1065673;
	Wed,  4 Aug 2010 09:56:44 +0000 (UTC)
	(envelope-from tijl@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EF1818FC17;
	Wed,  4 Aug 2010 09:56:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o749uh5X032999;
	Wed, 4 Aug 2010 09:56:43 GMT (envelope-from tijl@svn.freebsd.org)
Received: (from tijl@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o749uhG9032997;
	Wed, 4 Aug 2010 09:56:43 GMT (envelope-from tijl@svn.freebsd.org)
Message-Id: <201008040956.o749uhG9032997@svn.freebsd.org>
From: Tijl Coosemans 
Date: Wed, 4 Aug 2010 09:56:43 +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: r210840 - stable/7/sys/amd64/amd64
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 09:56:44 -0000

Author: tijl
Date: Wed Aug  4 09:56:43 2010
New Revision: 210840
URL: http://svn.freebsd.org/changeset/base/210840

Log:
  MFC r209955:
  
  When switching the thread from the processor, store %dr7 content
  into the pcb before disabling watchpoints. Otherwise, when the
  thread is restored on a processor, watchpoints are still disabled.
  
  Approved by:	kib (mentor)

Modified:
  stable/7/sys/amd64/amd64/cpu_switch.S
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/amd64/amd64/cpu_switch.S
==============================================================================
--- stable/7/sys/amd64/amd64/cpu_switch.S	Wed Aug  4 07:49:40 2010	(r210839)
+++ stable/7/sys/amd64/amd64/cpu_switch.S	Wed Aug  4 09:56:43 2010	(r210840)
@@ -296,13 +296,13 @@ store_dr:
 	movq	%dr2,%r13
 	movq	%dr3,%r12
 	movq	%dr6,%r11
-	andq	$0x0000fc00, %rax		/* disable all watchpoints */
 	movq	%r15,PCB_DR0(%r8)
 	movq	%r14,PCB_DR1(%r8)
 	movq	%r13,PCB_DR2(%r8)
 	movq	%r12,PCB_DR3(%r8)
 	movq	%r11,PCB_DR6(%r8)
 	movq	%rax,PCB_DR7(%r8)
+	andq	$0x0000fc00, %rax		/* disable all watchpoints */
 	movq	%rax,%dr7
 	jmp	done_store_dr
 

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 10:24:38 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 62FFD106566C;
	Wed,  4 Aug 2010 10:24:38 +0000 (UTC)
	(envelope-from tijl@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 348ED8FC12;
	Wed,  4 Aug 2010 10:24:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o74AOcwO039281;
	Wed, 4 Aug 2010 10:24:38 GMT (envelope-from tijl@svn.freebsd.org)
Received: (from tijl@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o74AOcU1039278;
	Wed, 4 Aug 2010 10:24:38 GMT (envelope-from tijl@svn.freebsd.org)
Message-Id: <201008041024.o74AOcU1039278@svn.freebsd.org>
From: Tijl Coosemans 
Date: Wed, 4 Aug 2010 10:24:38 +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: r210841 - in stable/8/sys/dev/usb: . quirk
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 10:24:38 -0000

Author: tijl
Date: Wed Aug  4 10:24:37 2010
New Revision: 210841
URL: http://svn.freebsd.org/changeset/base/210841

Log:
  MFC r210576:
  
  Add quirk for Apacer HT202 USB 2.0 Flash Drive.
  
  PR:		usb/107243
  Approved by:	kib (mentor)

Modified:
  stable/8/sys/dev/usb/quirk/usb_quirk.c
  stable/8/sys/dev/usb/usbdevs
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c
==============================================================================
--- stable/8/sys/dev/usb/quirk/usb_quirk.c	Wed Aug  4 09:56:43 2010	(r210840)
+++ stable/8/sys/dev/usb/quirk/usb_quirk.c	Wed Aug  4 10:24:37 2010	(r210841)
@@ -161,6 +161,8 @@ static struct usb_quirk_entry usb_quirks
 	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
 	USB_QUIRK(ALCOR, TRANSCEND, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
 	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
+	USB_QUIRK(APACER, HT202, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY,
+	    UQ_MSC_NO_SYNC_CACHE),
 	USB_QUIRK(ASAHIOPTICAL, OPTIO230, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
 	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
 	USB_QUIRK(ASAHIOPTICAL, OPTIO330, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,

Modified: stable/8/sys/dev/usb/usbdevs
==============================================================================
--- stable/8/sys/dev/usb/usbdevs	Wed Aug  4 09:56:43 2010	(r210840)
+++ stable/8/sys/dev/usb/usbdevs	Wed Aug  4 10:24:37 2010	(r210841)
@@ -929,6 +929,9 @@ product APC UPS			0x0002	Uninterruptible
 product AMBIT WLAN		0x0302	WLAN
 product AMBIT NTL_250		0x6098	NTL 250 cable modem
 
+/* Apacer products */
+product APACER HT202		0xb113	USB 2.0 Flash Drive
+
 /* American Power Conversion products */
 product APC UPS			0x0002	Uninterruptible Power Supply
 

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 10:42:06 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8322B1065783;
	Wed,  4 Aug 2010 10:42:06 +0000 (UTC)
	(envelope-from jchandra@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6F60A8FC1F;
	Wed,  4 Aug 2010 10:42:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o74Ag6qG043181;
	Wed, 4 Aug 2010 10:42:06 GMT (envelope-from jchandra@svn.freebsd.org)
Received: (from jchandra@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o74Ag626043180;
	Wed, 4 Aug 2010 10:42:06 GMT (envelope-from jchandra@svn.freebsd.org)
Message-Id: <201008041042.o74Ag626043180@svn.freebsd.org>
From: "Jayachandran C." 
Date: Wed, 4 Aug 2010 10:42:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210842 - head/secure/lib/libcrypto
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 10:42:06 -0000

Author: jchandra
Date: Wed Aug  4 10:42:06 2010
New Revision: 210842
URL: http://svn.freebsd.org/changeset/base/210842

Log:
  MIPS 64 bit support.
  
  When compiled for MIPS n64 ABI
  - DES_LONG should be 'unsigned int'
  - BN_LLONG should be undefined
  - SIXTY_FOUR_BIT_LONG should be defined.

Modified:
  head/secure/lib/libcrypto/opensslconf-mips.h

Modified: head/secure/lib/libcrypto/opensslconf-mips.h
==============================================================================
--- head/secure/lib/libcrypto/opensslconf-mips.h	Wed Aug  4 10:24:37 2010	(r210841)
+++ head/secure/lib/libcrypto/opensslconf-mips.h	Wed Aug  4 10:42:06 2010	(r210842)
@@ -110,23 +110,37 @@
 /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
  * %20 speed up (longs are 8 bytes, int's are 4). */
 #ifndef DES_LONG
+#ifdef __mips_n64
+#define DES_LONG unsigned int
+#else
 #define DES_LONG unsigned long
 #endif
 #endif
+#endif
 
 #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
 #define CONFIG_HEADER_BN_H
+#ifdef __mips_n64
+#undef BN_LLONG
+#else
 #define BN_LLONG
 
+#endif
 /* Should we define BN_DIV2W here? */
 
 /* Only one for the following should be defined */
 /* The prime number generation stuff may not work when
  * EIGHT_BIT but I don't care since I've only used this mode
  * for debuging the bignum libraries */
+#ifdef __mips_n64
+#define SIXTY_FOUR_BIT_LONG
+#undef SIXTY_FOUR_BIT
+#undef THIRTY_TWO_BIT
+#else
 #undef SIXTY_FOUR_BIT_LONG
 #undef SIXTY_FOUR_BIT
 #define THIRTY_TWO_BIT
+#endif
 #undef SIXTEEN_BIT
 #undef EIGHT_BIT
 #endif

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 10:46:18 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1CEAC106564A;
	Wed,  4 Aug 2010 10:46:18 +0000 (UTC)
	(envelope-from jchandra@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0B61D8FC28;
	Wed,  4 Aug 2010 10:46:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o74AkHmW044143;
	Wed, 4 Aug 2010 10:46:17 GMT (envelope-from jchandra@svn.freebsd.org)
Received: (from jchandra@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o74AkHo7044141;
	Wed, 4 Aug 2010 10:46:17 GMT (envelope-from jchandra@svn.freebsd.org)
Message-Id: <201008041046.o74AkHo7044141@svn.freebsd.org>
From: "Jayachandran C." 
Date: Wed, 4 Aug 2010 10:46:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210843 - head/secure/lib/libcrypto
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 10:46:18 -0000

Author: jchandra
Date: Wed Aug  4 10:46:17 2010
New Revision: 210843
URL: http://svn.freebsd.org/changeset/base/210843

Log:
  Whitespace fix for last check-in, move empty line to below endif.

Modified:
  head/secure/lib/libcrypto/opensslconf-mips.h

Modified: head/secure/lib/libcrypto/opensslconf-mips.h
==============================================================================
--- head/secure/lib/libcrypto/opensslconf-mips.h	Wed Aug  4 10:42:06 2010	(r210842)
+++ head/secure/lib/libcrypto/opensslconf-mips.h	Wed Aug  4 10:46:17 2010	(r210843)
@@ -124,8 +124,8 @@
 #undef BN_LLONG
 #else
 #define BN_LLONG
-
 #endif
+
 /* Should we define BN_DIV2W here? */
 
 /* Only one for the following should be defined */

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 13:20:34 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BF2F11065675;
	Wed,  4 Aug 2010 13:20:34 +0000 (UTC)
	(envelope-from attilio@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id ACF108FC29;
	Wed,  4 Aug 2010 13:20:34 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o74DKY9V080979;
	Wed, 4 Aug 2010 13:20:34 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o74DKYDK080978;
	Wed, 4 Aug 2010 13:20:34 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <201008041320.o74DKYDK080978@svn.freebsd.org>
From: Attilio Rao 
Date: Wed, 4 Aug 2010 13:20:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210844 - stable/6/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 13:20:34 -0000

Author: attilio
Date: Wed Aug  4 13:20:34 2010
New Revision: 210844
URL: http://svn.freebsd.org/changeset/base/210844

Log:
  MFC CVS r1.30:
  Remove a bogus KASSERT which will prevent rwlock to be acquired
  recursively in exclusive mode with debugging kernels.
  
  Reported by:	rwatson

Modified:
  stable/6/sys/kern/kern_rwlock.c

Modified: stable/6/sys/kern/kern_rwlock.c
==============================================================================
--- stable/6/sys/kern/kern_rwlock.c	Wed Aug  4 10:46:17 2010	(r210843)
+++ stable/6/sys/kern/kern_rwlock.c	Wed Aug  4 13:20:34 2010	(r210844)
@@ -152,9 +152,6 @@ _rw_wlock(struct rwlock *rw, const char 
 	MPASS(curthread != NULL);
 	KASSERT(rw->rw_lock != RW_DESTROYED,
 	    ("rw_wlock() of destroyed rwlock @ %s:%d", file, line));
-	KASSERT(rw_wowner(rw) != curthread,
-	    ("%s (%s): wlock already held @ %s:%d", __func__,
-	    rw->lock_object.lo_name, file, line));
 	WITNESS_CHECKORDER(&rw->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE, file,
 	    line);
 	__rw_wlock(rw, curthread, file, line);

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 14:03:24 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 103331065679;
	Wed,  4 Aug 2010 14:03:24 +0000 (UTC)
	(envelope-from jchandra@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F29078FC16;
	Wed,  4 Aug 2010 14:03:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o74E3N0g090473;
	Wed, 4 Aug 2010 14:03:23 GMT (envelope-from jchandra@svn.freebsd.org)
Received: (from jchandra@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o74E3NR2090471;
	Wed, 4 Aug 2010 14:03:23 GMT (envelope-from jchandra@svn.freebsd.org)
Message-Id: <201008041403.o74E3NR2090471@svn.freebsd.org>
From: "Jayachandran C." 
Date: Wed, 4 Aug 2010 14:03:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210845 - head/sys/mips/rmi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 14:03:24 -0000

Author: jchandra
Date: Wed Aug  4 14:03:23 2010
New Revision: 210845
URL: http://svn.freebsd.org/changeset/base/210845

Log:
  ithd_name no longer defined, use td_name. Fix compile with KTR enabled.

Modified:
  head/sys/mips/rmi/on_chip.c

Modified: head/sys/mips/rmi/on_chip.c
==============================================================================
--- head/sys/mips/rmi/on_chip.c	Wed Aug  4 13:20:34 2010	(r210844)
+++ head/sys/mips/rmi/on_chip.c	Wed Aug  4 14:03:23 2010	(r210845)
@@ -356,7 +356,7 @@ create_msgring_thread(int core, int cpu)
 	sched_class(td, PRI_ITHD);
 	sched_add(td, SRQ_INTR);
 	thread_unlock(td);
-	CTR2(KTR_INTR, "%s: created %s", __func__, ithd_name[core]);
+	CTR2(KTR_INTR, "%s: created %s", __func__, td->td_name);
 }
 
 int 

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 14:12:10 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 49D811065676;
	Wed,  4 Aug 2010 14:12:10 +0000 (UTC)
	(envelope-from jchandra@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 367018FC1A;
	Wed,  4 Aug 2010 14:12:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o74ECApY092421;
	Wed, 4 Aug 2010 14:12:10 GMT (envelope-from jchandra@svn.freebsd.org)
Received: (from jchandra@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o74ECAix092415;
	Wed, 4 Aug 2010 14:12:10 GMT (envelope-from jchandra@svn.freebsd.org)
Message-Id: <201008041412.o74ECAix092415@svn.freebsd.org>
From: "Jayachandran C." 
Date: Wed, 4 Aug 2010 14:12:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210846 - in head/sys/mips: include mips
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 14:12:10 -0000

Author: jchandra
Date: Wed Aug  4 14:12:09 2010
New Revision: 210846
URL: http://svn.freebsd.org/changeset/base/210846

Log:
  Add 3 level page tables for MIPS in n64.
  
  - 32 bit compilation will still use old 2 level page tables
  - re-arrange pmap code so that adding another level is easier
  - pmap code for 3 level page tables for n64
  - update TLB handler to traverse 3 levels in n64
  
  Reviewed by:	jmallett

Modified:
  head/sys/mips/include/param.h
  head/sys/mips/include/vmparam.h
  head/sys/mips/mips/exception.S
  head/sys/mips/mips/genassym.c
  head/sys/mips/mips/pmap.c

Modified: head/sys/mips/include/param.h
==============================================================================
--- head/sys/mips/include/param.h	Wed Aug  4 14:03:23 2010	(r210845)
+++ head/sys/mips/include/param.h	Wed Aug  4 14:12:09 2010	(r210846)
@@ -107,8 +107,18 @@
 #define	NPTEPG		(PAGE_SIZE/(sizeof (pt_entry_t)))
 #define	NPDEPG		(PAGE_SIZE/(sizeof (pd_entry_t)))
 
+#if defined(__mips_n64)
+#define	SEGSHIFT	31		/* LOG2(NBSEG) */
+#define	NBSEG		(1ul << SEGSHIFT)	/* bytes/segment */
+#define	PDRSHIFT	22              /* second level */
+#define	PDRMASK		((1 << PDRSHIFT) - 1)
+#else
 #define	SEGSHIFT	22		/* LOG2(NBSEG) */
 #define	NBSEG		(1 << SEGSHIFT)	/* bytes/segment */
+#define	PDRSHIFT	SEGSHIFT	/* alias for SEG in 32 bit */
+#define	PDRMASK		((1 << PDRSHIFT) - 1)
+#endif
+#define	NBPDR		(1 << PDRSHIFT)	/* bytes/pagedir */
 #define	SEGMASK		(NBSEG-1)	/* byte offset into segment */
 
 #define	MAXPAGESIZES	1		/* maximum number of supported page sizes */
@@ -119,7 +129,7 @@
 /*
  * The kernel stack needs to be aligned on a (PAGE_SIZE * 2) boundary.
  */
-#define	KSTACK_PAGES		2	/* kernel stack*/
+#define	KSTACK_PAGES		2	/* kernel stack */
 #define	KSTACK_GUARD_PAGES	2	/* pages of kstack guard; 0 disables */
 
 #define	UPAGES			2

Modified: head/sys/mips/include/vmparam.h
==============================================================================
--- head/sys/mips/include/vmparam.h	Wed Aug  4 14:03:23 2010	(r210845)
+++ head/sys/mips/include/vmparam.h	Wed Aug  4 14:12:09 2010	(r210846)
@@ -185,7 +185,7 @@
  *	  allocations use HIGHMEM if available, and then DEFAULT. 
  *	- HIGHMEM for other pages 
  */
-#ifdef __mips_n64
+#if 0 /* Not yet, change n64 to use xkphys */
 #define	VM_NFREELIST		1
 #define	VM_FREELIST_DEFAULT	0
 #define	VM_FREELIST_DIRECT	VM_FREELIST_DEFAULT

Modified: head/sys/mips/mips/exception.S
==============================================================================
--- head/sys/mips/mips/exception.S	Wed Aug  4 14:03:23 2010	(r210845)
+++ head/sys/mips/mips/exception.S	Wed Aug  4 14:12:09 2010	(r210846)
@@ -137,7 +137,15 @@ MipsDoTLBMiss:
 	PTR_L		k1, 0(k1)			#08: k1=seg entry
 	MFC0		k0, MIPS_COP_0_BAD_VADDR	#09: k0=bad address (again)
 	beq		k1, zero, 2f			#0a: ==0 -- no page table
-	srl		k0, PAGE_SHIFT - 2		#0b: k0=VPN (aka va>>10)
+#ifdef __mips_n64
+	PTR_SRL		k0, PDRSHIFT - PTRSHIFT		# k0=VPN
+	andi		k0, k0, PTRMASK			# k0=pde offset
+	PTR_ADDU	k1, k0, k1			# k1=pde entry address
+	PTR_L		k1, 0(k1)			# k1=pde entry
+	MFC0		k0, MIPS_COP_0_BAD_VADDR	# k0=bad address (again)
+	beq		k1, zero, 2f			# ==0 -- no page table
+#endif
+	PTR_SRL		k0, PAGE_SHIFT - 2		#0b: k0=VPN (aka va>>10)
 	andi		k0, k0, 0xff8			#0c: k0=page tab offset
 	PTR_ADDU	k1, k1, k0			#0d: k1=pte address
 	lw		k0, 0(k1)			#0e: k0=lo0 pte
@@ -836,6 +844,18 @@ NLEAF(MipsTLBInvalidException)
 	beqz		k1, 3f
 	nop
 
+#ifdef __mips_n64
+	MFC0		k0, MIPS_COP_0_BAD_VADDR
+	PTR_SRL		k0, PDRSHIFT - PTRSHIFT		# k0=pde offset (almost)
+	beq		k1, zero, MipsKernGenException	# ==0 -- no pde tab
+	andi		k0, k0, PTRMASK			# k0=pde offset
+	PTR_ADDU	k1, k0, k1			# k1=pde entry address
+	PTR_L		k1, 0(k1)			# k1=pde entry
+
+	/* Validate pde table pointer.  */
+	beqz		k1, 3f
+	nop
+#endif
 	MFC0		k0, MIPS_COP_0_BAD_VADDR	# k0=bad address (again)
 	PTR_SRL		k0, PAGE_SHIFT - 2		# k0=VPN
 	andi		k0, k0, 0xffc			# k0=page tab offset
@@ -996,6 +1016,14 @@ NLEAF(MipsTLBMissException)
 	PTR_L		k1, 0(k1)			# k1=seg entry
 	MFC0		k0, MIPS_COP_0_BAD_VADDR	# k0=bad address (again)
 	beq		k1, zero, MipsKernGenException	# ==0 -- no page table
+#ifdef __mips_n64
+	PTR_SRL		k0, PDRSHIFT - PTRSHIFT		# k0=VPN
+	andi		k0, k0, PTRMASK			# k0=pde offset
+	PTR_ADDU	k1, k0, k1			# k1=pde entry address
+	PTR_L		k1, 0(k1)			# k1=pde entry
+	MFC0		k0, MIPS_COP_0_BAD_VADDR	# k0=bad address (again)
+  	beq		k1, zero, MipsKernGenException	# ==0 -- no page table
+#endif
 	PTR_SRL		k0, PAGE_SHIFT - 2		# k0=VPN
 	andi		k0, k0, 0xff8			# k0=page tab offset
 	PTR_ADDU	k1, k1, k0			# k1=pte address

Modified: head/sys/mips/mips/genassym.c
==============================================================================
--- head/sys/mips/mips/genassym.c	Wed Aug  4 14:03:23 2010	(r210845)
+++ head/sys/mips/mips/genassym.c	Wed Aug  4 14:12:09 2010	(r210846)
@@ -93,6 +93,7 @@ ASSYM(SIGFPE, SIGFPE);
 ASSYM(PAGE_SHIFT, PAGE_SHIFT);
 ASSYM(PAGE_SIZE, PAGE_SIZE);
 ASSYM(PAGE_MASK, PAGE_MASK);
+ASSYM(PDRSHIFT, PDRSHIFT);
 ASSYM(SEGSHIFT, SEGSHIFT);
 ASSYM(NPTEPG, NPTEPG);
 ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED);

Modified: head/sys/mips/mips/pmap.c
==============================================================================
--- head/sys/mips/mips/pmap.c	Wed Aug  4 14:03:23 2010	(r210845)
+++ head/sys/mips/mips/pmap.c	Wed Aug  4 14:12:09 2010	(r210846)
@@ -69,6 +69,8 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_msgbuf.h"
+#include "opt_ddb.h"
+
 #include 
 #include 
 #include 
@@ -76,6 +78,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifdef DDB
+#include 
+#endif
 
 #include 
 #include 
@@ -125,22 +130,20 @@ __FBSDID("$FreeBSD$");
  *     is defined such that it ends immediately after NPDEPG*NPTEPG*PAGE_SIZE,
  *     so we end up getting NUSERPGTBLS of 0.
  */
-#define	pmap_segshift(v)	(((v) >> SEGSHIFT) & (NPDEPG - 1))
-#define	segtab_pde(m, v)	((m)[pmap_segshift((v))])
-
-#if defined(__mips_n64)
-#define	NUSERPGTBLS		(NPDEPG)
+#define	pmap_seg_index(v)	(((v) >> SEGSHIFT) & (NPDEPG - 1))
+#define	pmap_pde_index(v)	(((v) >> PDRSHIFT) & (NPDEPG - 1))
+#define	pmap_pte_index(v)	(((v) >> PAGE_SHIFT) & (NPTEPG - 1))
+#define	pmap_pde_pindex(v)	((v) >> PDRSHIFT)
+
+#ifdef __mips_n64
+#define	NUPDE			(NPDEPG * NPDEPG)
+#define	NUSERPGTBLS		(NUPDE + NPDEPG)
 #else
-#define	NUSERPGTBLS		(pmap_segshift(VM_MAXUSER_ADDRESS))
+#define	NUPDE			(NPDEPG)
+#define	NUSERPGTBLS		(NUPDE)
 #endif
-#define	mips_segtrunc(va)	((va) & ~SEGMASK)
-#define	is_kernel_pmap(x)	((x) == kernel_pmap)
 
-/*
- * Given a virtual address, get the offset of its PTE within its page
- * directory page.
- */
-#define	PDE_OFFSET(va)	(((vm_offset_t)(va) >> PAGE_SHIFT) & (NPTEPG - 1))
+#define	is_kernel_pmap(x)	((x) == kernel_pmap)
 
 struct pmap kernel_pmap_store;
 pd_entry_t *kernel_segmap;
@@ -151,10 +154,9 @@ vm_offset_t virtual_end;	/* VA of last a
 static int nkpt;
 unsigned pmap_max_asid;		/* max ASID supported by the system */
 
-
 #define	PMAP_ASID_RESERVED	0
 
-vm_offset_t kernel_vm_end;
+vm_offset_t kernel_vm_end = VM_MIN_KERNEL_ADDRESS;
 
 static void pmap_asid_alloc(pmap_t pmap);
 
@@ -179,11 +181,10 @@ static void pmap_remove_page(struct pmap
 static void pmap_remove_entry(struct pmap *pmap, vm_page_t m, vm_offset_t va);
 static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_page_t mpte,
     vm_offset_t va, vm_page_t m);
-static __inline void
-pmap_invalidate_page(pmap_t pmap, vm_offset_t va);
+static __inline void pmap_invalidate_page(pmap_t pmap, vm_offset_t va);
+static int _pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m);
 
 static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags);
-
 static vm_page_t _pmap_allocpte(pmap_t pmap, unsigned ptepindex, int flags);
 static int pmap_unuse_pt(pmap_t, vm_offset_t, vm_page_t);
 static int init_pte_prot(vm_offset_t va, vm_page_t m, vm_prot_t prot);
@@ -259,35 +260,70 @@ static struct local_sysmaps sysmap_lmem[
 	intr_restore(intr)
 #endif
 
-static inline pt_entry_t *
+/*
+ * Page table entry lookup routines.
+ */
+static __inline pd_entry_t *
 pmap_segmap(pmap_t pmap, vm_offset_t va)
 {
-	if (pmap->pm_segtab != NULL)
-		return (segtab_pde(pmap->pm_segtab, va));
-	else
+	return (&pmap->pm_segtab[pmap_seg_index(va)]);
+}
+
+#ifdef __mips_n64
+static __inline pd_entry_t *
+pmap_pdpe_to_pde(pd_entry_t *pdpe, vm_offset_t va)
+{
+	pd_entry_t *pde;
+
+	pde = (pd_entry_t *)*pdpe;
+	return (&pde[pmap_pde_index(va)]);
+}
+
+static __inline pd_entry_t *
+pmap_pde(pmap_t pmap, vm_offset_t va)
+{
+	pd_entry_t *pdpe;
+
+	pdpe = pmap_segmap(pmap, va);
+	if (pdpe == NULL || *pdpe == NULL)
 		return (NULL);
+
+	return (pmap_pdpe_to_pde(pdpe, va));
+}
+#else
+static __inline pd_entry_t *
+pmap_pdpe_to_pde(pd_entry_t *pdpe, vm_offset_t va)
+{
+	return pdpe;
+}
+
+static __inline 
+pd_entry_t *pmap_pde(pmap_t pmap, vm_offset_t va)
+{
+	return pmap_segmap(pmap, va);
+}
+#endif
+
+static __inline pt_entry_t *
+pmap_pde_to_pte(pd_entry_t *pde, vm_offset_t va)
+{
+	pt_entry_t *pte;
+
+	pte = (pt_entry_t *)*pde;
+	return (&pte[pmap_pte_index(va)]);
 }
 
-/*
- *	Routine:	pmap_pte
- *	Function:
- *		Extract the page table entry associated
- *		with the given map/virtual_address pair.
- */
 pt_entry_t *
 pmap_pte(pmap_t pmap, vm_offset_t va)
 {
-	pt_entry_t *pdeaddr;
+	pd_entry_t *pde;
 
-	if (pmap) {
-		pdeaddr = pmap_segmap(pmap, va);
-		if (pdeaddr) {
-			return pdeaddr + PDE_OFFSET(va);
-		}
-	}
-	return ((pt_entry_t *)0);
-}
+	pde = pmap_pde(pmap, va);
+	if (pde == NULL || *pde == NULL)
+		return (NULL);
 
+	return (pmap_pde_to_pte(pde, va));
+}
 
 vm_offset_t
 pmap_steal_memory(vm_size_t size)
@@ -326,12 +362,69 @@ pmap_steal_memory(vm_size_t size)
  * Bootstrap the system enough to run with virtual memory.  This
  * assumes that the phys_avail array has been initialized.
  */
+static void 
+pmap_create_kernel_pagetable(void)
+{
+	int i, j;
+	vm_offset_t ptaddr;
+	pt_entry_t *pte;
+#ifdef __mips_n64
+	pd_entry_t *pde;
+	vm_offset_t pdaddr;
+	int npt, npde;
+#endif
+
+	/*
+	 * Allocate segment table for the kernel
+	 */
+	kernel_segmap = (pd_entry_t *)pmap_steal_memory(PAGE_SIZE);
+
+	/*
+	 * Allocate second level page tables for the kernel
+	 */
+#ifdef __mips_n64
+	npde = howmany(NKPT, NPDEPG);
+	pdaddr = pmap_steal_memory(PAGE_SIZE * npde);
+#endif
+	nkpt = NKPT;
+	ptaddr = pmap_steal_memory(PAGE_SIZE * nkpt);
+
+	/*
+	 * The R[4-7]?00 stores only one copy of the Global bit in the
+	 * translation lookaside buffer for each 2 page entry. Thus invalid
+	 * entrys must have the Global bit set so when Entry LO and Entry HI
+	 * G bits are anded together they will produce a global bit to store
+	 * in the tlb.
+	 */
+	for (i = 0, pte = (pt_entry_t *)ptaddr; i < (nkpt * NPTEPG); i++, pte++)
+		*pte = PTE_G;
+
+#ifdef __mips_n64
+	for (i = 0,  npt = nkpt; npt > 0; i++) {
+		kernel_segmap[i] = (pd_entry_t)(pdaddr + i * PAGE_SIZE);
+		pde = (pd_entry_t *)kernel_segmap[i];
+
+		for (j = 0; j < NPDEPG && npt > 0; j++, npt--)
+			pde[j] = (pd_entry_t)(ptaddr + (i * NPDEPG + j) * PAGE_SIZE);
+	}
+#else
+	for (i = 0, j = pmap_seg_index(VM_MIN_KERNEL_ADDRESS); i < nkpt; i++, j++)
+		kernel_segmap[j] = (pd_entry_t)(ptaddr + (i * PAGE_SIZE));
+#endif
+
+	PMAP_LOCK_INIT(kernel_pmap);
+	kernel_pmap->pm_segtab = kernel_segmap;
+	kernel_pmap->pm_active = ~0;
+	TAILQ_INIT(&kernel_pmap->pm_pvlist);
+	kernel_pmap->pm_asid[0].asid = PMAP_ASID_RESERVED;
+	kernel_pmap->pm_asid[0].gen = 0;
+	kernel_vm_end += nkpt * NPTEPG * PAGE_SIZE;
+}
+
 void
 pmap_bootstrap(void)
 {
-	pt_entry_t *pgtab;
-	pt_entry_t *pte;
-	int i, j;
+	int i;
 #if !defined(__mips_n64)
 	int memory_larger_than_512meg = 0;
 #endif
@@ -440,66 +533,10 @@ again:
 		}
 	}
 #endif
-
-	/*
-	 * Allocate segment table for the kernel
-	 */
-	kernel_segmap = (pd_entry_t *)pmap_steal_memory(PAGE_SIZE);
-
-	/*
-	 * Allocate second level page tables for the kernel
-	 */
-	nkpt = NKPT;
-#if !defined(__mips_n64)
-	if (memory_larger_than_512meg) {
-		/*
-		 * If we have a large memory system we CANNOT afford to hit
-		 * pmap_growkernel() and allocate memory. Since we MAY end
-		 * up with a page that is NOT mappable. For that reason we
-		 * up front grab more. Normall NKPT is 120 (YMMV see pmap.h)
-		 * this gives us 480meg of kernel virtual addresses at the
-		 * cost of 120 pages (each page gets us 4 Meg). Since the
-		 * kernel starts at virtual_avail, we can use this to
-		 * calculate how many entris are left from there to the end
-		 * of the segmap, we want to allocate all of it, which would
-		 * be somewhere above 0xC0000000 - 0xFFFFFFFF which results
-		 * in about 256 entries or so instead of the 120.
-		 */
-		nkpt = (PAGE_SIZE / sizeof(pd_entry_t)) - (virtual_avail >> SEGSHIFT);
-	}
-#endif
-	pgtab = (pt_entry_t *)pmap_steal_memory(PAGE_SIZE * nkpt);
-
-	/*
-	 * The R[4-7]?00 stores only one copy of the Global bit in the
-	 * translation lookaside buffer for each 2 page entry. Thus invalid
-	 * entrys must have the Global bit set so when Entry LO and Entry HI
-	 * G bits are anded together they will produce a global bit to store
-	 * in the tlb.
-	 */
-	for (i = 0, pte = pgtab; i < (nkpt * NPTEPG); i++, pte++)
-		*pte = PTE_G;
-
-	/*
-	 * The segment table contains the KVA of the pages in the second
-	 * level page table.
-	 */
-	for (i = 0, j = (virtual_avail >> SEGSHIFT); i < nkpt; i++, j++)
-		kernel_segmap[j] = (pd_entry_t)(pgtab + (i * NPTEPG));
-
-	/*
-	 * The kernel's pmap is statically allocated so we don't have to use
-	 * pmap_create, which is unlikely to work correctly at this part of
-	 * the boot sequence (XXX and which no longer exists).
-	 */
-	PMAP_LOCK_INIT(kernel_pmap);
-	kernel_pmap->pm_segtab = kernel_segmap;
-	kernel_pmap->pm_active = ~0;
-	TAILQ_INIT(&kernel_pmap->pm_pvlist);
-	kernel_pmap->pm_asid[0].asid = PMAP_ASID_RESERVED;
-	kernel_pmap->pm_asid[0].gen = 0;
+	pmap_create_kernel_pagetable();
 	pmap_max_asid = VMNUM_PIDS;
 	mips_wr_entryhi(0);
+	mips_wr_pagemask(0);
 }
 
 /*
@@ -740,7 +777,6 @@ pmap_kenter(vm_offset_t va, vm_paddr_t p
 	pte = pmap_pte(kernel_pmap, va);
 	opte = *pte;
 	*pte = npte;
-
 	pmap_update_page(kernel_pmap, va, npte);
 }
 
@@ -858,16 +894,49 @@ pmap_qremove(vm_offset_t va, int count)
  * This routine unholds page table pages, and if the hold count
  * drops to zero, then it decrements the wire count.
  */
+static PMAP_INLINE int
+pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m)
+{
+	--m->wire_count;
+	if (m->wire_count == 0)
+		return (_pmap_unwire_pte_hold(pmap, va, m));
+	else
+		return (0);
+}
+
 static int
-_pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m)
+_pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m)
 {
+	pd_entry_t *pde;
 
+	PMAP_LOCK_ASSERT(pmap, MA_OWNED);
 	/*
 	 * unmap the page table page
 	 */
-	pmap->pm_segtab[m->pindex] = 0;
-	--pmap->pm_stats.resident_count;
+#ifdef __mips_n64
+	if (m->pindex < NUPDE)
+		pde = pmap_pde(pmap, va);
+	else
+		pde = pmap_segmap(pmap, va);
+#else
+	pde = pmap_pde(pmap, va);
+#endif
+	*pde = 0;
+	pmap->pm_stats.resident_count--;
+
+#ifdef __mips_n64
+	if (m->pindex < NUPDE) {
+		pd_entry_t *pdp;
+		vm_page_t pdpg;
 
+		/*
+		 * Recursively decrement next level pagetable refcount
+		 */
+		pdp = (pd_entry_t *)*pmap_segmap(pmap, va);
+		pdpg = PHYS_TO_VM_PAGE(MIPS_KSEG0_TO_PHYS(pdp));
+		pmap_unwire_pte_hold(pmap, va, pdpg);
+	}
+#endif
 	if (pmap->pm_ptphint == m)
 		pmap->pm_ptphint = NULL;
 
@@ -879,16 +948,6 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_pa
 	return (1);
 }
 
-static PMAP_INLINE int
-pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m)
-{
-	--m->wire_count;
-	if (m->wire_count == 0)
-		return (_pmap_unwire_pte_hold(pmap, m));
-	else
-		return (0);
-}
-
 /*
  * After removing a page table entry, this routine is used to
  * conditionally free the page, and manage the hold/wire counts.
@@ -903,17 +962,17 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t v
 		return (0);
 
 	if (mpte == NULL) {
-		ptepindex = pmap_segshift(va);
+		ptepindex = pmap_pde_pindex(va);
 		if (pmap->pm_ptphint &&
 		    (pmap->pm_ptphint->pindex == ptepindex)) {
 			mpte = pmap->pm_ptphint;
 		} else {
-			pteva = pmap_segmap(pmap, va);
+			pteva = *pmap_pde(pmap, va);
 			mpte = PHYS_TO_VM_PAGE(MIPS_KSEG0_TO_PHYS(pteva));
 			pmap->pm_ptphint = mpte;
 		}
 	}
-	return pmap_unwire_pte_hold(pmap, mpte);
+	return pmap_unwire_pte_hold(pmap, va, mpte);
 }
 
 void
@@ -999,7 +1058,7 @@ pmap_pinit(pmap_t pmap)
 static vm_page_t
 _pmap_allocpte(pmap_t pmap, unsigned ptepindex, int flags)
 {
-	vm_offset_t pteva;
+	vm_offset_t pageva;
 	vm_page_t m;
 
 	KASSERT((flags & (M_NOWAIT | M_WAITOK)) == M_NOWAIT ||
@@ -1029,10 +1088,41 @@ _pmap_allocpte(pmap_t pmap, unsigned pte
 	 * Map the pagetable page into the process address space, if it
 	 * isn't already there.
 	 */
+	pageva = MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(m));
 
-	pteva = MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(m));
+#ifdef __mips_n64
+	if (ptepindex >= NUPDE) {
+		pmap->pm_segtab[ptepindex - NUPDE] = (pd_entry_t)pageva;
+	} else {
+		pd_entry_t *pdep, *pde;
+		int segindex = ptepindex >> (SEGSHIFT - PDRSHIFT);
+		int pdeindex = ptepindex & (NPDEPG - 1);
+		vm_page_t pg;
+		
+		pdep = &pmap->pm_segtab[segindex];
+		if (*pdep == NULL) { 
+			/* recurse for allocating page dir */
+			if (_pmap_allocpte(pmap, NUPDE + segindex, 
+			    flags) == NULL) {
+				/* alloc failed, release current */
+				--m->wire_count;
+				atomic_subtract_int(&cnt.v_wire_count, 1);
+				vm_page_free_zero(m);
+				return (NULL);
+			}
+		} else {
+			pg = PHYS_TO_VM_PAGE(MIPS_KSEG0_TO_PHYS(*pdep));
+			pg->wire_count++;
+		}
+		/* Next level entry */
+		pde = (pd_entry_t *)*pdep;
+		pde[pdeindex] = (pd_entry_t)pageva;
+		pmap->pm_ptphint = m;
+	}
+#else
+	pmap->pm_segtab[ptepindex] = (pd_entry_t)pageva;
+#endif
 	pmap->pm_stats.resident_count++;
-	pmap->pm_segtab[ptepindex] = (pd_entry_t)pteva;
 
 	/*
 	 * Set the page table hint
@@ -1045,7 +1135,7 @@ static vm_page_t
 pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags)
 {
 	unsigned ptepindex;
-	vm_offset_t pteva;
+	pd_entry_t *pde;
 	vm_page_t m;
 
 	KASSERT((flags & (M_NOWAIT | M_WAITOK)) == M_NOWAIT ||
@@ -1055,18 +1145,18 @@ pmap_allocpte(pmap_t pmap, vm_offset_t v
 	/*
 	 * Calculate pagetable page index
 	 */
-	ptepindex = pmap_segshift(va);
+	ptepindex = pmap_pde_pindex(va);
 retry:
 	/*
 	 * Get the page directory entry
 	 */
-	pteva = (vm_offset_t)pmap->pm_segtab[ptepindex];
+	pde = pmap_pde(pmap, va);
 
 	/*
 	 * If the page table page is mapped, we just increment the hold
 	 * count, and activate it.
 	 */
-	if (pteva) {
+	if (pde != NULL && *pde != NULL) {
 		/*
 		 * In order to get the page table page, try the hint first.
 		 */
@@ -1074,7 +1164,7 @@ retry:
 		    (pmap->pm_ptphint->pindex == ptepindex)) {
 			m = pmap->pm_ptphint;
 		} else {
-			m = PHYS_TO_VM_PAGE(MIPS_KSEG0_TO_PHYS(pteva));
+			m = PHYS_TO_VM_PAGE(MIPS_KSEG0_TO_PHYS(*pde));
 			pmap->pm_ptphint = m;
 		}
 		m->wire_count++;
@@ -1087,7 +1177,7 @@ retry:
 		if (m == NULL && (flags & M_WAITOK))
 			goto retry;
 	}
-	return m;
+	return (m);
 }
 
 
@@ -1137,46 +1227,44 @@ void
 pmap_growkernel(vm_offset_t addr)
 {
 	vm_page_t nkpg;
+	pd_entry_t *pde, *pdpe;
 	pt_entry_t *pte;
 	int i;
 
 	mtx_assert(&kernel_map->system_mtx, MA_OWNED);
-	if (kernel_vm_end == 0) {
-		kernel_vm_end = VM_MIN_KERNEL_ADDRESS;
-		nkpt = 0;
-		while (segtab_pde(kernel_segmap, kernel_vm_end)) {
-			kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) &
-			    ~(PAGE_SIZE * NPTEPG - 1);
-			nkpt++;
-			if (kernel_vm_end - 1 >= kernel_map->max_offset) {
-				kernel_vm_end = kernel_map->max_offset;
-				break;
-			}
-		}
-	}
-	addr = (addr + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1);
+	addr = roundup2(addr, NBSEG);
 	if (addr - 1 >= kernel_map->max_offset)
 		addr = kernel_map->max_offset;
 	while (kernel_vm_end < addr) {
-		if (segtab_pde(kernel_segmap, kernel_vm_end)) {
-			kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) &
-			    ~(PAGE_SIZE * NPTEPG - 1);
+		pdpe = pmap_segmap(kernel_pmap, kernel_vm_end);
+#ifdef __mips_n64
+		if (*pdpe == 0) {
+			/* new intermediate page table entry */
+			nkpg = pmap_alloc_pte_page(nkpt, VM_ALLOC_INTERRUPT);
+			if (nkpg == NULL)
+				panic("pmap_growkernel: no memory to grow kernel");
+			*pdpe = (pd_entry_t)MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(nkpg));
+			continue; /* try again */
+		}
+#endif
+		pde = pmap_pdpe_to_pde(pdpe, kernel_vm_end);
+		if (*pde != 0) {
+			kernel_vm_end = (kernel_vm_end + NBPDR) & ~PDRMASK;
 			if (kernel_vm_end - 1 >= kernel_map->max_offset) {
 				kernel_vm_end = kernel_map->max_offset;
 				break;
 			}
 			continue;
 		}
+
 		/*
 		 * This index is bogus, but out of the way
 		 */
- 		nkpg = pmap_alloc_pte_page(nkpt, VM_ALLOC_INTERRUPT);
+		nkpg = pmap_alloc_pte_page(nkpt, VM_ALLOC_INTERRUPT);
 		if (!nkpg)
 			panic("pmap_growkernel: no memory to grow kernel");
-
 		nkpt++;
- 		pte = (pt_entry_t *)MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(nkpg));
-  		segtab_pde(kernel_segmap, kernel_vm_end) = (pd_entry_t)pte;
+		*pde = (pd_entry_t)MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(nkpg));
 
 		/*
 		 * The R[4-7]?00 stores only one copy of the Global bit in
@@ -1185,11 +1273,11 @@ pmap_growkernel(vm_offset_t addr)
 		 * Entry LO and Entry HI G bits are anded together they will
 		 * produce a global bit to store in the tlb.
 		 */
-		for (i = 0; i < NPTEPG; i++, pte++)
-			*pte = PTE_G;
+		pte = (pt_entry_t *)*pde;
+		for (i = 0; i < NPTEPG; i++)
+			pte[i] = PTE_G;
 
-		kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) &
-		    ~(PAGE_SIZE * NPTEPG - 1);
+		kernel_vm_end = (kernel_vm_end + NBPDR) & ~PDRMASK;
 		if (kernel_vm_end - 1 >= kernel_map->max_offset) {
 			kernel_vm_end = kernel_map->max_offset;
 			break;
@@ -1480,7 +1568,9 @@ pmap_remove_page(struct pmap *pmap, vm_o
 void
 pmap_remove(struct pmap *pmap, vm_offset_t sva, vm_offset_t eva)
 {
-	vm_offset_t va, nva;
+	vm_offset_t va_next;
+	pd_entry_t *pde, *pdpe;
+	pt_entry_t *pte;
 
 	if (pmap == NULL)
 		return;
@@ -1499,15 +1589,30 @@ pmap_remove(struct pmap *pmap, vm_offset
 		pmap_remove_page(pmap, sva);
 		goto out;
 	}
-	for (va = sva; va < eva; va = nva) {
-		if (pmap_segmap(pmap, va) == NULL) {
-			nva = mips_segtrunc(va + NBSEG);
+	for (; sva < eva; sva = va_next) {
+		pdpe = pmap_segmap(pmap, sva);
+#ifdef __mips_n64
+		if (*pdpe == 0) {
+			va_next = (sva + NBSEG) & ~SEGMASK;
+			if (va_next < sva)
+				va_next = eva;
 			continue;
 		}
-		pmap_remove_page(pmap, va);
-		nva = va + PAGE_SIZE;
-	}
+#endif
+		va_next = (sva + NBPDR) & ~PDRMASK;
+		if (va_next < sva)
+			va_next = eva;
 
+		pde = pmap_pdpe_to_pde(pdpe, sva);
+		if (*pde == 0)
+			continue;
+		if (va_next > eva)
+			va_next = eva;
+		for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; 
+		    pte++, sva += PAGE_SIZE) {
+			pmap_remove_page(pmap, sva);
+		}
+	}
 out:
 	vm_page_unlock_queues();
 	PMAP_UNLOCK(pmap);
@@ -1596,6 +1701,8 @@ void
 pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
 {
 	pt_entry_t *pte;
+	pd_entry_t *pde, *pdpe;
+	vm_offset_t va_next;
 
 	if (pmap == NULL)
 		return;
@@ -1609,44 +1716,53 @@ pmap_protect(pmap_t pmap, vm_offset_t sv
 
 	vm_page_lock_queues();
 	PMAP_LOCK(pmap);
-	while (sva < eva) {
+	for (; sva < eva; sva = va_next) {
 		pt_entry_t pbits, obits;
 		vm_page_t m;
-		vm_offset_t pa;
+		vm_paddr_t pa;
 
-		/*
-		 * If segment table entry is empty, skip this segment.
-		 */
-		if (pmap_segmap(pmap, sva) == NULL) {
-			sva = mips_segtrunc(sva + NBSEG);
+		pdpe = pmap_segmap(pmap, sva);
+#ifdef __mips_n64
+		if (*pdpe == 0) {
+			va_next = (sva + NBSEG) & ~SEGMASK;
+			if (va_next < sva)
+				va_next = eva;
 			continue;
 		}
-		/*
-		 * If pte is invalid, skip this page
-		 */
-		pte = pmap_pte(pmap, sva);
-		if (!pte_test(pte, PTE_V)) {
-			sva += PAGE_SIZE;
+#endif
+		va_next = (sva + NBPDR) & ~PDRMASK;
+		if (va_next < sva)
+			va_next = eva;
+
+		pde = pmap_pdpe_to_pde(pdpe, sva);
+		if (pde == NULL || *pde == NULL)
 			continue;
-		}
-retry:
-		obits = pbits = *pte;
-		pa = TLBLO_PTE_TO_PA(pbits);
+		if (va_next > eva)
+			va_next = eva;
 
-		if (page_is_managed(pa) && pte_test(&pbits, PTE_D)) {
-			m = PHYS_TO_VM_PAGE(pa);
-			vm_page_dirty(m);
-			m->md.pv_flags &= ~PV_TABLE_MOD;
-		}
-		pte_clear(&pbits, PTE_D);
-		pte_set(&pbits, PTE_RO);
+		for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++,
+		     sva += PAGE_SIZE) {
 
-		if (pbits != *pte) {
-			if (!atomic_cmpset_int((u_int *)pte, obits, pbits))
-				goto retry;
-			pmap_update_page(pmap, sva, pbits);
+			/* Skip invalid PTEs */
+			if (!pte_test(pte, PTE_V))
+				continue;
+retry:
+			obits = pbits = *pte;
+			pa = TLBLO_PTE_TO_PA(pbits);
+			if (page_is_managed(pa) && pte_test(&pbits, PTE_D)) {
+				m = PHYS_TO_VM_PAGE(pa);
+				vm_page_dirty(m);
+				m->md.pv_flags &= ~PV_TABLE_MOD;
+			}
+			pte_clear(&pbits, PTE_D);
+			pte_set(&pbits, PTE_RO);
+			
+			if (pbits != *pte) {
+				if (!atomic_cmpset_int((u_int *)pte, obits, pbits))
+					goto retry;
+				pmap_update_page(pmap, sva, pbits);
+			}
 		}
-		sva += PAGE_SIZE;
 	}
 	vm_page_unlock_queues();
 	PMAP_UNLOCK(pmap);
@@ -1899,32 +2015,32 @@ pmap_enter_quick_locked(pmap_t pmap, vm_
 	 * creating it here.
 	 */
 	if (va < VM_MAXUSER_ADDRESS) {
+		pd_entry_t *pde;
 		unsigned ptepindex;
-		vm_offset_t pteva;
 
 		/*
 		 * Calculate pagetable page index
 		 */
-		ptepindex = pmap_segshift(va);
+		ptepindex = pmap_pde_pindex(va);
 		if (mpte && (mpte->pindex == ptepindex)) {
 			mpte->wire_count++;
 		} else {
 			/*
 			 * Get the page directory entry
 			 */
-			pteva = (vm_offset_t)pmap->pm_segtab[ptepindex];
+			pde = pmap_pde(pmap, va);
 
 			/*
 			 * If the page table page is mapped, we just
 			 * increment the hold count, and activate it.
 			 */
-			if (pteva) {
+			if (pde && *pde != 0) {
 				if (pmap->pm_ptphint &&
 				    (pmap->pm_ptphint->pindex == ptepindex)) {
 					mpte = pmap->pm_ptphint;
 				} else {
 					mpte = PHYS_TO_VM_PAGE(
-						MIPS_KSEG0_TO_PHYS(pteva));
+						MIPS_KSEG0_TO_PHYS(*pde));
 					pmap->pm_ptphint = mpte;
 				}
 				mpte->wire_count++;
@@ -1954,7 +2070,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_
 	if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0 &&
 	    !pmap_try_insert_pv_entry(pmap, mpte, va, m)) {
 		if (mpte != NULL) {
-			pmap_unwire_pte_hold(pmap, mpte);
+			pmap_unwire_pte_hold(pmap, va, mpte);
 			mpte = NULL;
 		}
 		return (mpte);
@@ -2506,21 +2622,19 @@ pmap_changebit(vm_page_t m, int bit, boo
 
 		PMAP_LOCK(pv->pv_pmap);
 		pte = pmap_pte(pv->pv_pmap, pv->pv_va);
-
 		if (setem) {
-			*(int *)pte |= bit;
+			*pte |= bit;
 			pmap_update_page(pv->pv_pmap, pv->pv_va, *pte);
 		} else {
-			vm_offset_t pbits = *(vm_offset_t *)pte;
+			pt_entry_t pbits = *pte;
 
 			if (pbits & bit) {
 				if (bit == PTE_D) {
-					if (pbits & PTE_D) {
+					if (pbits & PTE_D)
 						vm_page_dirty(m);
-					}
-					*(int *)pte = (pbits & ~PTE_D) | PTE_RO;
+					*pte = (pbits & ~PTE_D) | PTE_RO;
 				} else {
-					*(int *)pte = pbits & ~bit;
+					*pte = pbits & ~bit;
 				}
 				pmap_update_page(pv->pv_pmap, pv->pv_va, *pte);
 			}
@@ -2658,13 +2772,15 @@ pmap_is_modified(vm_page_t m)
 boolean_t
 pmap_is_prefaultable(pmap_t pmap, vm_offset_t addr)
 {
+	pd_entry_t *pde;
 	pt_entry_t *pte;
 	boolean_t rv;
 
 	rv = FALSE;
 	PMAP_LOCK(pmap);
-	if (pmap_segmap(pmap, addr) != NULL) {
-		pte = pmap_pte(pmap, addr);
+	pde = pmap_pde(pmap, addr);
+	if (pde != NULL && *pde != 0) {
+		pte = pmap_pde_to_pte(pde, addr);
 		rv = (*pte == 0);
 	}
 	PMAP_UNLOCK(pmap);
@@ -2927,74 +3043,65 @@ pmap_align_tlb(vm_offset_t *addr)
 	return;
 }
 
-int pmap_pid_dump(int pid);
-
-int
-pmap_pid_dump(int pid)
+DB_SHOW_COMMAND(ptable, ddb_pid_dump)
 {
 	pmap_t pmap;
+	struct thread *td = NULL;
 	struct proc *p;
-	int npte = 0;
-	int index;
-
-	sx_slock(&allproc_lock);
-	LIST_FOREACH(p, &allproc, p_list) {
-		if (p->p_pid != pid)
-			continue;
-
-		if (p->p_vmspace) {
-			int i, j;
+	int i, j, k;
+	vm_paddr_t pa;
+	vm_offset_t va;
 
-			printf("vmspace is %p\n",
-			       p->p_vmspace);
-			index = 0;
+	if (have_addr) {
+		td = db_lookup_thread(addr, TRUE);
+		if (td == NULL) {
+			db_printf("Invalid pid or tid");
+			return;
+		}
+		p = td->td_proc;
+		if (p->p_vmspace == NULL) {
+			db_printf("No vmspace for process");
+			return;
+		}
 			pmap = vmspace_pmap(p->p_vmspace);
-			printf("pmap asid:%x generation:%x\n",
+	} else
+		pmap = kernel_pmap;
+
+	db_printf("pmap:%p segtab:%p asid:%x generation:%x\n",
+	    pmap, pmap->pm_segtab,
 			       pmap->pm_asid[0].asid,
 			       pmap->pm_asid[0].gen);
-			for (i = 0; i < NUSERPGTBLS; i++) {
-				pd_entry_t *pde;
-				pt_entry_t *pte;
-				unsigned base = i << SEGSHIFT;
-
-				pde = &pmap->pm_segtab[i];
-				if (pde && *pde != 0) {
-					for (j = 0; j < 1024; j++) {
-						vm_offset_t va = base +
-						(j << PAGE_SHIFT);
-
-						pte = pmap_pte(pmap, va);
-						if (pte && pte_test(pte, PTE_V)) {
-							vm_offset_t pa;
-							vm_page_t m;
-
-							pa = TLBLO_PFN_TO_PA(*pte);
-							m = PHYS_TO_VM_PAGE(pa);

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 14:35:05 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8B7AB1065673;
	Wed,  4 Aug 2010 14:35:05 +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 760B08FC21;
	Wed,  4 Aug 2010 14:35:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o74EZ5KY097490;
	Wed, 4 Aug 2010 14:35:05 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o74EZ5IW097488;
	Wed, 4 Aug 2010 14:35:05 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201008041435.o74EZ5IW097488@svn.freebsd.org>
From: Konstantin Belousov 
Date: Wed, 4 Aug 2010 14:35:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210847 - head/sys/compat/freebsd32
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 14:35:05 -0000

Author: kib
Date: Wed Aug  4 14:35:05 2010
New Revision: 210847
URL: http://svn.freebsd.org/changeset/base/210847

Log:
  Fix style.
  
  MFC after:	1 week

Modified:
  head/sys/compat/freebsd32/freebsd32_misc.c

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_misc.c	Wed Aug  4 14:12:09 2010	(r210846)
+++ head/sys/compat/freebsd32/freebsd32_misc.c	Wed Aug  4 14:35:05 2010	(r210847)
@@ -1616,8 +1616,9 @@ freebsd32_sendfile(struct thread *td, st
 }
 
 static void
-copy_stat( struct stat *in, struct stat32 *out)
+copy_stat(struct stat *in, struct stat32 *out)
 {
+
 	CP(*in, *out, st_dev);
 	CP(*in, *out, st_ino);
 	CP(*in, *out, st_mode);

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 14:38:20 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 865B81065674;
	Wed,  4 Aug 2010 14:38:20 +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 74AC78FC20;
	Wed,  4 Aug 2010 14:38:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o74EcKx1098213;
	Wed, 4 Aug 2010 14:38:20 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o74EcKWD098211;
	Wed, 4 Aug 2010 14:38:20 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201008041438.o74EcKWD098211@svn.freebsd.org>
From: Konstantin Belousov 
Date: Wed, 4 Aug 2010 14:38:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210848 - head/sys/compat/freebsd32
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 14:38:20 -0000

Author: kib
Date: Wed Aug  4 14:38:20 2010
New Revision: 210848
URL: http://svn.freebsd.org/changeset/base/210848

Log:
  Copy inode birthtime to the struct stat32.
  
  MFC after:	1 week

Modified:
  head/sys/compat/freebsd32/freebsd32_misc.c

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_misc.c	Wed Aug  4 14:35:05 2010	(r210847)
+++ head/sys/compat/freebsd32/freebsd32_misc.c	Wed Aug  4 14:38:20 2010	(r210848)
@@ -1634,6 +1634,7 @@ copy_stat(struct stat *in, struct stat32
 	CP(*in, *out, st_blksize);
 	CP(*in, *out, st_flags);
 	CP(*in, *out, st_gen);
+	TS_CP(*in, *out, st_birthtim);
 }
 
 int

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 15:59:46 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 75C40106564A;
	Wed,  4 Aug 2010 15:59:46 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 48D208FC27;
	Wed,  4 Aug 2010 15:59:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o74Fxktg016422;
	Wed, 4 Aug 2010 15:59:46 GMT (envelope-from gnn@svn.freebsd.org)
Received: (from gnn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o74FxkLh016419;
	Wed, 4 Aug 2010 15:59:46 GMT (envelope-from gnn@svn.freebsd.org)
Message-Id: <201008041559.o74FxkLh016419@svn.freebsd.org>
From: "George V. Neville-Neil" 
Date: Wed, 4 Aug 2010 15:59:46 +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: r210850 - in stable/7/sys: conf dev/e1000
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 15:59:46 -0000

Author: gnn
Date: Wed Aug  4 15:59:45 2010
New Revision: 210850
URL: http://svn.freebsd.org/changeset/base/210850

Log:
  Fix a build breakage foudn by the module build in tinderbox.
  
  Update NOTES so that em and igb are both now part of the LINT
  kernel.
  
  Pointed out by: tinderbox

Modified:
  stable/7/sys/conf/NOTES
  stable/7/sys/dev/e1000/if_igb.c

Modified: stable/7/sys/conf/NOTES
==============================================================================
--- stable/7/sys/conf/NOTES	Wed Aug  4 14:58:59 2010	(r210849)
+++ stable/7/sys/conf/NOTES	Wed Aug  4 15:59:45 2010	(r210850)
@@ -1754,6 +1754,7 @@ device		miibus
 #       KNE110TX.
 # de:   Digital Equipment DC21040
 # em:   Intel Pro/1000 Gigabit Ethernet 82542, 82543, 82544 based adapters.
+# igb:  Intel Pro/1000 PCI Express Gigabit Ethernet: 82575 and later adapters.
 # ep:   3Com 3C509, 3C529, 3C556, 3C562D, 3C563D, 3C572, 3C574X, 3C579, 3C589
 #       and PC Card devices using these chipsets.
 # ex:   Intel EtherExpress Pro/10 and other i82595-based adapters,
@@ -1913,6 +1914,8 @@ device		xl		# 3Com 3c90x (``Boomerang'',
 
 # PCI Ethernet NICs.
 device		de		# DEC/Intel DC21x4x (``Tulip'')
+device		em		# Intel Pro/1000 Gigabit Ethernet
+device		igb		# Intel Pro/1000 PCIE Gigabit Ethernet
 device		le		# AMD Am7900 LANCE and Am79C9xx PCnet
 device		mxge		# Myricom Myri-10G 10GbE NIC
 device		nxge		# Neterion Xframe 10GbE Server/Storage Adapter

Modified: stable/7/sys/dev/e1000/if_igb.c
==============================================================================
--- stable/7/sys/dev/e1000/if_igb.c	Wed Aug  4 14:58:59 2010	(r210849)
+++ stable/7/sys/dev/e1000/if_igb.c	Wed Aug  4 15:59:45 2010	(r210850)
@@ -1916,7 +1916,7 @@ igb_local_timer(void *arg)
 
 	/* Trigger an RX interrupt on all queues */
 #ifdef DEVICE_POLLING
-	if (!(ifp->if_capenable & IFCAP_POLLING))
+	if (!(adapter->ifp->if_capenable & IFCAP_POLLING))
 #endif
 	E1000_WRITE_REG(&adapter->hw, E1000_EICS, adapter->rx_mask);
 	callout_reset(&adapter->timer, hz, igb_local_timer, adapter);

From owner-svn-src-all@FreeBSD.ORG  Wed Aug  4 21:02:04 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DF34D1065670;
	Wed,  4 Aug 2010 21:02:04 +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 CDC6E8FC2A;
	Wed,  4 Aug 2010 21:02:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o74L24ci082856;
	Wed, 4 Aug 2010 21:02:04 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o74L24Ne082852;
	Wed, 4 Aug 2010 21:02:04 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008042102.o74L24Ne082852@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 4 Aug 2010 21:02:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210852 - head/gnu/usr.bin/gdb/kgdb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Aug 2010 21:02:05 -0000

Author: jhb
Date: Wed Aug  4 21:02:04 2010
New Revision: 210852
URL: http://svn.freebsd.org/changeset/base/210852

Log:
  Change kgdb_lookup() to resolve symbols via GDB instead of via libkvm(3).

Modified:
  head/gnu/usr.bin/gdb/kgdb/kgdb.h
  head/gnu/usr.bin/gdb/kgdb/kthr.c
  head/gnu/usr.bin/gdb/kgdb/trgt_i386.c

Modified: head/gnu/usr.bin/gdb/kgdb/kgdb.h
==============================================================================
--- head/gnu/usr.bin/gdb/kgdb/kgdb.h	Wed Aug  4 16:37:50 2010	(r210851)
+++ head/gnu/usr.bin/gdb/kgdb/kgdb.h	Wed Aug  4 21:02:04 2010	(r210852)
@@ -67,7 +67,7 @@ struct kthr *kgdb_thr_next(struct kthr *
 struct kthr *kgdb_thr_select(struct kthr *);
 char        *kgdb_thr_extra_thread_info(int);
 
-uintptr_t kgdb_lookup(const char *sym);
+CORE_ADDR kgdb_lookup(const char *sym);
 CORE_ADDR kgdb_parse_1(const char *, int);
 
 #define	kgdb_parse(exp)		kgdb_parse_1((exp), 0)

Modified: head/gnu/usr.bin/gdb/kgdb/kthr.c
==============================================================================
--- head/gnu/usr.bin/gdb/kgdb/kthr.c	Wed Aug  4 16:37:50 2010	(r210851)
+++ head/gnu/usr.bin/gdb/kgdb/kthr.c	Wed Aug  4 21:02:04 2010	(r210852)
@@ -44,26 +44,25 @@ __FBSDID("$FreeBSD$");
 #include "kgdb.h"
 #include 
 
-static uintptr_t dumppcb;
+static CORE_ADDR dumppcb;
 static int dumptid;
 
-static uintptr_t stoppcbs;
+static CORE_ADDR stoppcbs;
 static __cpumask_t stopped_cpus;
 
 static struct kthr *first;
 struct kthr *curkthr;
 
-uintptr_t
+CORE_ADDR
 kgdb_lookup(const char *sym)
 {
-	struct nlist nl[2];
+	CORE_ADDR addr;
+	char *name;
 
-	nl[0].n_type = N_UNDF;
-	nl[0].n_name = (char *)(uintptr_t)sym;
-	nl[1].n_name = NULL;
-	if (kvm_nlist(kvm, nl) != 0)
-		return (0);
-	return (nl[0].n_value);
+	asprintf(&name, "&%s", sym);
+	addr = kgdb_parse(name);
+	free(name);
+	return (addr);
 }
 
 struct kthr *
@@ -78,7 +77,8 @@ kgdb_thr_init(void)
 	struct proc p;
 	struct thread td;
 	struct kthr *kt;
-	uintptr_t addr, paddr;
+	CORE_ADDR addr;
+	uintptr_t paddr;
 	
 	while (first != NULL) {
 		kt = first;
@@ -86,32 +86,28 @@ kgdb_thr_init(void)
 		free(kt);
 	}
 
-	addr = kgdb_lookup("_allproc");
-	if (addr == 0) {
-		warnx("kvm_nlist(_allproc): %s", kvm_geterr(kvm));
+	addr = kgdb_lookup("allproc");
+	if (addr == 0)
 		return (NULL);
-	}
 	kvm_read(kvm, addr, &paddr, sizeof(paddr));
 
-	dumppcb = kgdb_lookup("_dumppcb");
-	if (dumppcb == 0) {
-		warnx("kvm_nlist(_dumppcb): %s", kvm_geterr(kvm));
+	dumppcb = kgdb_lookup("dumppcb");
+	if (dumppcb == 0)
 		return (NULL);
-	}
 
-	addr = kgdb_lookup("_dumptid");
+	addr = kgdb_lookup("dumptid");
 	if (addr != 0)
 		kvm_read(kvm, addr, &dumptid, sizeof(dumptid));
 	else
 		dumptid = -1;
 
-	addr =  kgdb_lookup("_stopped_cpus");
+	addr = kgdb_lookup("stopped_cpus");
 	if (addr != 0)
 		kvm_read(kvm, addr, &stopped_cpus, sizeof(stopped_cpus));
 	else
 		stopped_cpus = 0;
 
-	stoppcbs = kgdb_lookup("_stoppcbs");
+	stoppcbs = kgdb_lookup("stoppcbs");
 
 	while (paddr != 0) {
 		if (kvm_read(kvm, paddr, &p, sizeof(p)) != sizeof(p)) {

Modified: head/gnu/usr.bin/gdb/kgdb/trgt_i386.c
==============================================================================
--- head/gnu/usr.bin/gdb/kgdb/trgt_i386.c	Wed Aug  4 16:37:50 2010	(r210851)
+++ head/gnu/usr.bin/gdb/kgdb/trgt_i386.c	Wed Aug  4 21:02:04 2010	(r210852)
@@ -136,7 +136,7 @@ kgdb_trgt_fetch_tss(void)
 	if (kt == NULL || kt->cpu == NOCPU)
 		return (0);
 
-	addr = kgdb_lookup("_gdt");
+	addr = kgdb_lookup("gdt");
 	if (addr == 0)
 		return (0);
 	addr += (kt->cpu * NGDT + GPROC0_SEL) * sizeof(sd);
@@ -159,11 +159,9 @@ kgdb_trgt_fetch_tss(void)
 	 * change it to be relative to cpu0prvpage instead.
 	 */ 
 	if (trunc_page(tss) == 0xffc00000) {
-		addr = kgdb_lookup("_cpu0prvpage");
-		if (addr == 0) {
-			warnx("kvm_nlist(_cpu0prvpage): %s", kvm_geterr(kvm));
+		addr = kgdb_lookup("cpu0prvpage");
+		if (addr == 0)
 			return (0);
-		}
 		if (kvm_read(kvm, addr, &cpu0prvpage, sizeof(cpu0prvpage)) !=
 		    sizeof(cpu0prvpage)) {
 			warnx("kvm_read: %s", kvm_geterr(kvm));

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 01:39:25 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E10761065672;
	Thu,  5 Aug 2010 01:39:25 +0000 (UTC)
	(envelope-from ache@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CF2568FC13;
	Thu,  5 Aug 2010 01:39:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o751dP88044132;
	Thu, 5 Aug 2010 01:39:25 GMT (envelope-from ache@svn.freebsd.org)
Received: (from ache@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o751dPOr044130;
	Thu, 5 Aug 2010 01:39:25 GMT (envelope-from ache@svn.freebsd.org)
Message-Id: <201008050139.o751dPOr044130@svn.freebsd.org>
From: "Andrey A. Chernov" 
Date: Thu, 5 Aug 2010 01:39:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210853 - head/lib/libc/stdlib
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 01:39:26 -0000

Author: ache
Date: Thu Aug  5 01:39:25 2010
New Revision: 210853
URL: http://svn.freebsd.org/changeset/base/210853

Log:
  Comment out IEEE Std 1003.1-2001 conformance proclaimed too early,
  see problems described in the comment to:
  http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/128933

Modified:
  head/lib/libc/stdlib/realpath.3

Modified: head/lib/libc/stdlib/realpath.3
==============================================================================
--- head/lib/libc/stdlib/realpath.3	Wed Aug  4 21:02:04 2010	(r210852)
+++ head/lib/libc/stdlib/realpath.3	Thu Aug  5 01:39:25 2010	(r210853)
@@ -111,11 +111,11 @@ and
 .Xr getcwd 3 .
 .Sh SEE ALSO
 .Xr getcwd 3
-.Sh STANDARDS
-The
-.Fn realpath
-function conforms to
-.St -p1003.1-2001 .
+.\" .Sh STANDARDS
+.\" The
+.\" .Fn realpath
+.\" function conforms to
+.\" .St -p1003.1-2001 .
 .Sh HISTORY
 The
 .Fn realpath

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 04:59:54 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 87F971065679;
	Thu,  5 Aug 2010 04:59:54 +0000 (UTC)
	(envelope-from neel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7676C8FC17;
	Thu,  5 Aug 2010 04:59:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o754xs6t088381;
	Thu, 5 Aug 2010 04:59:54 GMT (envelope-from neel@svn.freebsd.org)
Received: (from neel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o754xsRJ088378;
	Thu, 5 Aug 2010 04:59:54 GMT (envelope-from neel@svn.freebsd.org)
Message-Id: <201008050459.o754xsRJ088378@svn.freebsd.org>
From: Neel Natu 
Date: Thu, 5 Aug 2010 04:59:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210854 - in head/sys/mips: mips sibyte
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 04:59:54 -0000

Author: neel
Date: Thu Aug  5 04:59:54 2010
New Revision: 210854
URL: http://svn.freebsd.org/changeset/base/210854

Log:
  Fix a race between clock_intr() and tick_ticker() when updating
  'counter_upper' and 'counter_lower_last'. The race exists because
  interrupts are enabled even though tick_ticker() executes in a
  critical section.
  
  Fix a bug in clock_intr() in how it updates the cached values of
  'counter_upper' and 'counter_lower_last'. They are updated only
  when the COUNT register rolls over. More interestingly it will *never*
  update the cached values if 'counter_lower_last' happens to be zero.
  
  Get rid of superfluous critical section in clock_intr(). There is no
  reason to do this because clock_intr() executes in hard interrupt
  context.
  
  Switch back to using 'tick_ticker()' as the cpu ticker for Sibyte.
  
  Reviewed by:	jmallett, mav

Modified:
  head/sys/mips/mips/tick.c
  head/sys/mips/sibyte/sb_machdep.c

Modified: head/sys/mips/mips/tick.c
==============================================================================
--- head/sys/mips/mips/tick.c	Thu Aug  5 01:39:25 2010	(r210853)
+++ head/sys/mips/mips/tick.c	Thu Aug  5 04:59:54 2010	(r210854)
@@ -60,9 +60,8 @@ struct timecounter *platform_timecounter
 static DPCPU_DEFINE(uint32_t, cycles_per_tick);
 static uint32_t cycles_per_usec;
 
-static u_int32_t counter_upper = 0;
-static u_int32_t counter_lower_last = 0;
-
+static DPCPU_DEFINE(volatile uint32_t, counter_upper);
+static DPCPU_DEFINE(volatile uint32_t, counter_lower_last);
 static DPCPU_DEFINE(uint32_t, compare_ticks);
 static DPCPU_DEFINE(uint32_t, lost_ticks);
 
@@ -104,21 +103,35 @@ tick_ticker(void)
 {
 	uint64_t ret;
 	uint32_t ticktock;
+	uint32_t t_lower_last, t_upper;
 
 	/*
-	 * XXX: MIPS64 platforms can read 64-bits of counter directly.
-	 * Also: the tc code is supposed to cope with things wrapping
-	 * from the time counter, so I'm not sure why all these hoops
-	 * are even necessary.
+	 * Disable preemption because we are working with cpu specific data.
 	 */
-	ticktock = mips_rd_count();
 	critical_enter();
-	if (ticktock < counter_lower_last)
-		counter_upper++;
-	counter_lower_last = ticktock;
+
+	/*
+	 * Note that even though preemption is disabled, interrupts are
+	 * still enabled. In particular there is a race with clock_intr()
+	 * reading the values of 'counter_upper' and 'counter_lower_last'.
+	 *
+	 * XXX this depends on clock_intr() being executed periodically
+	 * so that 'counter_upper' and 'counter_lower_last' are not stale.
+	 */
+	do {
+		t_upper = DPCPU_GET(counter_upper);
+		t_lower_last = DPCPU_GET(counter_lower_last);
+	} while (t_upper != DPCPU_GET(counter_upper));
+
+	ticktock = mips_rd_count();
+
 	critical_exit();
 
-	ret = ((uint64_t) counter_upper << 32) | counter_lower_last;
+	/* COUNT register wrapped around */
+	if (ticktock < t_lower_last)
+		t_upper++;
+
+	ret = ((uint64_t)t_upper << 32) | ticktock;
 	return (ret);
 }
 
@@ -262,11 +275,11 @@ clock_intr(void *arg)
 	} else	/* In one-shot mode timer should be stopped after the event. */
 		mips_wr_compare(0xffffffff);
 
-	critical_enter();
-	if (count < counter_lower_last) {
-		counter_upper++;
-		counter_lower_last = count;
+	/* COUNT register wrapped around */
+	if (count < DPCPU_GET(counter_lower_last)) {
+		DPCPU_SET(counter_upper, DPCPU_GET(counter_upper) + 1);
 	}
+	DPCPU_SET(counter_lower_last, count);
 
 	if (cycles_per_tick > 0) {
 
@@ -296,7 +309,6 @@ clock_intr(void *arg)
 	}
 	if (sc->et.et_active)
 		sc->et.et_event_cb(&sc->et, sc->et.et_arg);
-	critical_exit();
 	return (FILTER_HANDLED);
 }
 

Modified: head/sys/mips/sibyte/sb_machdep.c
==============================================================================
--- head/sys/mips/sibyte/sb_machdep.c	Thu Aug  5 01:39:25 2010	(r210853)
+++ head/sys/mips/sibyte/sb_machdep.c	Thu Aug  5 04:59:54 2010	(r210854)
@@ -454,6 +454,4 @@ platform_start(__register_t a0, __regist
 	mips_init();
 
 	mips_timer_init_params(sb_cpu_speed(), 0);
-
-	set_cputicker(sb_zbbus_cycle_count, sb_cpu_speed() / 2, 1);
 }

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 08:57:53 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F06D61065675;
	Thu,  5 Aug 2010 08:57:53 +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 DD3EE8FC0C;
	Thu,  5 Aug 2010 08:57:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o758vrDA040724;
	Thu, 5 Aug 2010 08:57:53 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o758vrSU040718;
	Thu, 5 Aug 2010 08:57:53 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201008050857.o758vrSU040718@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 5 Aug 2010 08:57:53 +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: r210855 - in stable/8/sys: amd64/amd64 amd64/include
	ia64/include kern powerpc/include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 08:57:54 -0000

Author: kib
Date: Thu Aug  5 08:57:53 2010
New Revision: 210855
URL: http://svn.freebsd.org/changeset/base/210855

Log:
  MFC r210369:
  When compat32 binary asks for the value of hw.machine_arch, report the
  name of 32bit sibling architecture instead of the host one.

Modified:
  stable/8/sys/amd64/amd64/identcpu.c
  stable/8/sys/amd64/include/param.h
  stable/8/sys/ia64/include/param.h
  stable/8/sys/kern/kern_mib.c
  stable/8/sys/powerpc/include/param.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/amd64/amd64/identcpu.c
==============================================================================
--- stable/8/sys/amd64/amd64/identcpu.c	Thu Aug  5 04:59:54 2010	(r210854)
+++ stable/8/sys/amd64/amd64/identcpu.c	Thu Aug  5 08:57:53 2010	(r210855)
@@ -76,8 +76,30 @@ static void print_via_padlock_info(void)
 
 int	cpu_class;
 char machine[] = "amd64";
-SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, 
-    machine, 0, "Machine class");
+
+#ifdef SCTL_MASK32
+extern int adaptive_machine_arch;
+#endif
+
+static int
+sysctl_hw_machine(SYSCTL_HANDLER_ARGS)
+{
+#ifdef SCTL_MASK32
+	static const char machine32[] = "i386";
+#endif
+	int error;
+
+#ifdef SCTL_MASK32
+	if ((req->flags & SCTL_MASK32) != 0 && adaptive_machine_arch)
+		error = SYSCTL_OUT(req, machine32, sizeof(machine32));
+	else
+#endif
+		error = SYSCTL_OUT(req, machine, sizeof(machine));
+	return (error);
+
+}
+SYSCTL_PROC(_hw, HW_MACHINE, machine, CTLTYPE_STRING | CTLFLAG_RD,
+    NULL, 0, sysctl_hw_machine, "A", "Machine class");
 
 static char cpu_model[128];
 SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, 

Modified: stable/8/sys/amd64/include/param.h
==============================================================================
--- stable/8/sys/amd64/include/param.h	Thu Aug  5 04:59:54 2010	(r210854)
+++ stable/8/sys/amd64/include/param.h	Thu Aug  5 08:57:53 2010	(r210855)
@@ -69,6 +69,9 @@
 #ifndef MACHINE_ARCH
 #define	MACHINE_ARCH	"amd64"
 #endif
+#ifndef MACHINE_ARCH32
+#define	MACHINE_ARCH32	"i386"
+#endif
 
 #if defined(SMP) || defined(KLD_MODULE)
 #define MAXCPU		32

Modified: stable/8/sys/ia64/include/param.h
==============================================================================
--- stable/8/sys/ia64/include/param.h	Thu Aug  5 04:59:54 2010	(r210854)
+++ stable/8/sys/ia64/include/param.h	Thu Aug  5 08:57:53 2010	(r210855)
@@ -68,6 +68,9 @@
 #ifndef MACHINE_ARCH
 #define	MACHINE_ARCH	"ia64"
 #endif
+#ifndef MACHINE_ARCH32
+#define	MACHINE_ARCH32	"i386"
+#endif
 
 #if defined(SMP) || defined(KLD_MODULE)
 #define	MAXCPU		32

Modified: stable/8/sys/kern/kern_mib.c
==============================================================================
--- stable/8/sys/kern/kern_mib.c	Thu Aug  5 04:59:54 2010	(r210854)
+++ stable/8/sys/kern/kern_mib.c	Thu Aug  5 08:57:53 2010	(r210855)
@@ -232,9 +232,31 @@ sysctl_hw_pagesizes(SYSCTL_HANDLER_ARGS)
 SYSCTL_PROC(_hw, OID_AUTO, pagesizes, CTLTYPE_ULONG | CTLFLAG_RD,
     NULL, 0, sysctl_hw_pagesizes, "LU", "Supported page sizes");
 
-static char	machine_arch[] = MACHINE_ARCH;
-SYSCTL_STRING(_hw, HW_MACHINE_ARCH, machine_arch, CTLFLAG_RD,
-    machine_arch, 0, "System architecture");
+#ifdef SCTL_MASK32
+int adaptive_machine_arch = 1;
+SYSCTL_INT(_debug, OID_AUTO, adaptive_machine_arch, CTLFLAG_RW,
+    &adaptive_machine_arch, 1,
+    "Adapt reported machine architecture to the ABI of the binary");
+#endif
+
+static int
+sysctl_hw_machine_arch(SYSCTL_HANDLER_ARGS)
+{
+	int error;
+	static const char machine_arch[] = MACHINE_ARCH;
+#ifdef SCTL_MASK32
+	static const char machine_arch32[] = MACHINE_ARCH32;
+
+	if ((req->flags & SCTL_MASK32) != 0 && adaptive_machine_arch)
+		error = SYSCTL_OUT(req, machine_arch32, sizeof(machine_arch32));
+	else
+#endif
+		error = SYSCTL_OUT(req, machine_arch, sizeof(machine_arch));
+	return (error);
+
+}
+SYSCTL_PROC(_hw, HW_MACHINE_ARCH, machine_arch, CTLTYPE_STRING | CTLFLAG_RD,
+    NULL, 0, sysctl_hw_machine_arch, "A", "System architecture");
 
 static int
 sysctl_hostname(SYSCTL_HANDLER_ARGS)

Modified: stable/8/sys/powerpc/include/param.h
==============================================================================
--- stable/8/sys/powerpc/include/param.h	Thu Aug  5 04:59:54 2010	(r210854)
+++ stable/8/sys/powerpc/include/param.h	Thu Aug  5 08:57:53 2010	(r210855)
@@ -69,6 +69,11 @@
 #define	MACHINE_ARCH	"powerpc"
 #endif
 #define	MID_MACHINE	MID_POWERPC
+#ifdef __powerpc64__
+#ifndef	MACHINE_ARCH32
+#define	MACHINE_ARCH32	"powerpc"
+#endif
+#endif
 
 #if defined(SMP) || defined(KLD_MODULE)
 #define	MAXCPU		2

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 10:45:28 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F173F106564A;
	Thu,  5 Aug 2010 10:45:27 +0000 (UTC) (envelope-from bcr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DEF698FC1A;
	Thu,  5 Aug 2010 10:45:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75AjR9q066456;
	Thu, 5 Aug 2010 10:45:27 GMT (envelope-from bcr@svn.freebsd.org)
Received: (from bcr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75AjRwG066453;
	Thu, 5 Aug 2010 10:45:27 GMT (envelope-from bcr@svn.freebsd.org)
Message-Id: <201008051045.o75AjRwG066453@svn.freebsd.org>
From: Benedict Reuschling 
Date: Thu, 5 Aug 2010 10:45: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: r210856 - in stable/8/sys/cam: . scsi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 10:45:28 -0000

Author: bcr (doc committer)
Date: Thu Aug  5 10:45:27 2010
New Revision: 210856
URL: http://svn.freebsd.org/changeset/base/210856

Log:
  MFC r210779:
  
  Fix two (very common) occurrences of s/sytem/system in comments.
  
  Approved by:    mav
  MFC after:      3 days

Modified:
  stable/8/sys/cam/cam.c
  stable/8/sys/cam/scsi/scsi_target.c
Directory Properties:
  stable/8/sys/cam/   (props changed)

Modified: stable/8/sys/cam/cam.c
==============================================================================
--- stable/8/sys/cam/cam.c	Thu Aug  5 08:57:53 2010	(r210855)
+++ stable/8/sys/cam/cam.c	Thu Aug  5 10:45:27 2010	(r210856)
@@ -59,7 +59,7 @@ const struct cam_status_entry cam_status
 	{ CAM_REQ_ABORTED,	 "CCB request aborted by the host"	     },
 	{ CAM_UA_ABORT,		 "Unable to abort CCB request"		     },
 	{ CAM_REQ_CMP_ERR,	 "CCB request completed with an error"	     },
-	{ CAM_BUSY,		 "CAM subsytem is busy"			     },
+	{ CAM_BUSY,		 "CAM subsystem is busy"		     },
 	{ CAM_REQ_INVALID,	 "CCB request was invalid"		     },
 	{ CAM_PATH_INVALID,	 "Supplied Path ID is invalid"		     },
 	{ CAM_DEV_NOT_THERE,	 "Device Not Present"			     },

Modified: stable/8/sys/cam/scsi/scsi_target.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_target.c	Thu Aug  5 08:57:53 2010	(r210855)
+++ stable/8/sys/cam/scsi/scsi_target.c	Thu Aug  5 10:45:27 2010	(r210856)
@@ -1138,7 +1138,7 @@ targcamstatus(cam_status status)
 		return (EINVAL);
 	case CAM_RESRC_UNAVAIL:	/* Resource Unavailable */
 		return (ENOMEM);
-	case CAM_BUSY:		/* CAM subsytem is busy */
+	case CAM_BUSY:		/* CAM subsystem is busy */
 	case CAM_UA_ABORT:	/* Unable to abort CCB request */
 		return (EBUSY);
 	default:

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 15:07:28 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CDB1A1065674;
	Thu,  5 Aug 2010 15:07:28 +0000 (UTC) (envelope-from ume@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BC7968FC0C;
	Thu,  5 Aug 2010 15:07:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75F7Sso024429;
	Thu, 5 Aug 2010 15:07:28 GMT (envelope-from ume@svn.freebsd.org)
Received: (from ume@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75F7SFZ024427;
	Thu, 5 Aug 2010 15:07:28 GMT (envelope-from ume@svn.freebsd.org)
Message-Id: <201008051507.o75F7SFZ024427@svn.freebsd.org>
From: Hajimu UMEMOTO 
Date: Thu, 5 Aug 2010 15:07:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210861 - head/etc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 15:07:28 -0000

Author: ume
Date: Thu Aug  5 15:07:28 2010
New Revision: 210861
URL: http://svn.freebsd.org/changeset/base/210861

Log:
  /etc/rc.d/ip6fw was deprecated.
  
  Reported by:	Alex Kozlov 
  MFC after:	3 days

Modified:
  head/etc/netstart

Modified: head/etc/netstart
==============================================================================
--- head/etc/netstart	Thu Aug  5 12:33:15 2010	(r210860)
+++ head/etc/netstart	Thu Aug  5 15:07:28 2010	(r210861)
@@ -55,7 +55,6 @@ _start=quietstart
 /etc/rc.d/dhclient ${_start}
 /etc/rc.d/ppp ${_start}
 /etc/rc.d/ipfw ${_start}
-/etc/rc.d/ip6fw ${_start}
 /etc/rc.d/network_ipv6 ${_start}
 /etc/rc.d/routing ${_start}
 /etc/rc.d/mroute6d ${_start}

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 15:11:03 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 94315106564A;
	Thu,  5 Aug 2010 15:11:03 +0000 (UTC) (envelope-from ume@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 830768FC1C;
	Thu,  5 Aug 2010 15:11:03 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75FB3h2025270;
	Thu, 5 Aug 2010 15:11:03 GMT (envelope-from ume@svn.freebsd.org)
Received: (from ume@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75FB3jR025268;
	Thu, 5 Aug 2010 15:11:03 GMT (envelope-from ume@svn.freebsd.org)
Message-Id: <201008051511.o75FB3jR025268@svn.freebsd.org>
From: Hajimu UMEMOTO 
Date: Thu, 5 Aug 2010 15:11:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210862 - head/etc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 15:11:03 -0000

Author: ume
Date: Thu Aug  5 15:11:03 2010
New Revision: 210862
URL: http://svn.freebsd.org/changeset/base/210862

Log:
  /etc/rc.d/network_ipv6 was deprecated.
  
  Reported by:	Alex Kozlov 

Modified:
  head/etc/netstart

Modified: head/etc/netstart
==============================================================================
--- head/etc/netstart	Thu Aug  5 15:07:28 2010	(r210861)
+++ head/etc/netstart	Thu Aug  5 15:11:03 2010	(r210862)
@@ -55,7 +55,6 @@ _start=quietstart
 /etc/rc.d/dhclient ${_start}
 /etc/rc.d/ppp ${_start}
 /etc/rc.d/ipfw ${_start}
-/etc/rc.d/network_ipv6 ${_start}
 /etc/rc.d/routing ${_start}
 /etc/rc.d/mroute6d ${_start}
 /etc/rc.d/route6d ${_start}

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 15:53:34 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4C3DF1065675;
	Thu,  5 Aug 2010 15:53:34 +0000 (UTC)
	(envelope-from olli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2017A8FC13;
	Thu,  5 Aug 2010 15:53:34 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75FrYCe034728;
	Thu, 5 Aug 2010 15:53:34 GMT (envelope-from olli@svn.freebsd.org)
Received: (from olli@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75FrXQt034726;
	Thu, 5 Aug 2010 15:53:34 GMT (envelope-from olli@svn.freebsd.org)
Message-Id: <201008051553.o75FrXQt034726@svn.freebsd.org>
From: Oliver Fromme 
Date: Thu, 5 Aug 2010 15:53:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210863 - in head/etc: defaults periodic/daily
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 15:53:34 -0000

Author: olli
Date: Thu Aug  5 15:53:33 2010
New Revision: 210863
URL: http://svn.freebsd.org/changeset/base/210863

Log:
  Add a daily script to the periodic framework that reports
  changes to the package database, i.e. any packages that
  have been added, updated or deleted in the past 24 hours.
  The format is intentionally simple and concise.
  
  That information is particularly useful on servers that
  are maintained by multiple administrators.  When someone
  adds, updates or deletes a package, the others will see
  it in the daily periodic output.
  
  This script is disabled by default.
  
  PR:		conf/113913
  Submitted by:	olli
  Approved by:	des (mentor)
  MFC after:	3 weeks

Added:
  head/etc/periodic/daily/490.status-pkg-changes   (contents, props changed)
Modified:
  head/etc/defaults/periodic.conf

Modified: head/etc/defaults/periodic.conf
==============================================================================
--- head/etc/defaults/periodic.conf	Thu Aug  5 15:11:03 2010	(r210862)
+++ head/etc/defaults/periodic.conf	Thu Aug  5 15:53:33 2010	(r210863)
@@ -136,6 +136,9 @@ daily_status_named_usedns="YES"				# DNS
 # 480.status-ntpd
 daily_status_ntpd_enable="NO"				# Check NTP status
 
+# 490.status-pkg-changes
+daily_status_pkg_changes_enable="NO"			# Show package changes
+
 # 500.queuerun
 daily_queuerun_enable="YES"				# Run mail queue
 daily_submit_queuerun="YES"				# Also submit queue

Added: head/etc/periodic/daily/490.status-pkg-changes
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/etc/periodic/daily/490.status-pkg-changes	Thu Aug  5 15:53:33 2010	(r210863)
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# If there is a global system configuration file, suck it in.
+#
+if [ -r /etc/defaults/periodic.conf ]; then
+    . /etc/defaults/periodic.conf
+    source_periodic_confs
+fi
+
+case "$daily_status_pkg_changes_enable" in
+    [Yy][Ee][Ss])
+	if [ ! -f /usr/sbin/pkg_info ]; then
+	    echo '$daily_status_pkg_changes_enable is enabled but' \
+		 "/usr/sbin/pkg_info doesn't exist"
+	    rc=2
+	else
+	    bak=/var/backups
+	    rc=0
+
+	    if [ -f $bak/pkg_info.bak ]; then
+	    	mv -f $bak/pkg_info.bak $bak/pkg_info.bak2
+	    fi
+	    /usr/sbin/pkg_info > $bak/pkg_info.bak
+
+	    cmp -sz $bak/pkg_info.bak $bak/pkg_info.bak2
+	    if [ $? -eq 1 ]; then
+		echo ""
+		echo "Changes in installed packages:"
+		diff -U 0 $bak/pkg_info.bak2 $bak/pkg_info.bak \
+		| grep '^[-+][^-+]' | sort -k 1.2
+	    fi
+	fi
+	;;
+
+    *)
+	rc=0
+	;;
+esac
+
+exit $rc

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 16:10:12 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7B9391065672;
	Thu,  5 Aug 2010 16:10:12 +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 69CE38FC1D;
	Thu,  5 Aug 2010 16:10:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75GACCe038509;
	Thu, 5 Aug 2010 16:10:12 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75GACFh038503;
	Thu, 5 Aug 2010 16:10:12 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008051610.o75GACFh038503@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 16:10:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210864 - in head/sys/dev: acpica pci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 16:10:12 -0000

Author: jhb
Date: Thu Aug  5 16:10:12 2010
New Revision: 210864
URL: http://svn.freebsd.org/changeset/base/210864

Log:
  - Retire acpi_pcib_resume().  It is has just been an alias for
    bus_generic_resume() since the pci_link(4) driver was added.
  - Change the ACPI PCI-PCI bridge driver to inherit most of its methods
    from the generic PCI-PCI bridge driver.  In particular, this will now
    restore PCI config registers for ACPI PCI-PCI bridges.
  
  Tested by:	Oleg Sharoyko  osharoiko of gmail

Modified:
  head/sys/dev/acpica/acpi_pcib.c
  head/sys/dev/acpica/acpi_pcib_acpi.c
  head/sys/dev/acpica/acpi_pcib_pci.c
  head/sys/dev/acpica/acpi_pcibvar.h
  head/sys/dev/pci/pcib_private.h

Modified: head/sys/dev/acpica/acpi_pcib.c
==============================================================================
--- head/sys/dev/acpica/acpi_pcib.c	Thu Aug  5 15:53:33 2010	(r210863)
+++ head/sys/dev/acpica/acpi_pcib.c	Thu Aug  5 16:10:12 2010	(r210864)
@@ -171,13 +171,6 @@ acpi_pcib_attach(device_t dev, ACPI_BUFF
     return_VALUE (bus_generic_attach(dev));
 }
 
-int
-acpi_pcib_resume(device_t dev)
-{
-
-    return (bus_generic_resume(dev));
-}
-
 static void
 prt_lookup_device(ACPI_PCI_ROUTING_TABLE *entry, void *arg)
 {

Modified: head/sys/dev/acpica/acpi_pcib_acpi.c
==============================================================================
--- head/sys/dev/acpica/acpi_pcib_acpi.c	Thu Aug  5 15:53:33 2010	(r210863)
+++ head/sys/dev/acpica/acpi_pcib_acpi.c	Thu Aug  5 16:10:12 2010	(r210864)
@@ -65,7 +65,6 @@ struct acpi_hpcib_softc {
 
 static int		acpi_pcib_acpi_probe(device_t bus);
 static int		acpi_pcib_acpi_attach(device_t bus);
-static int		acpi_pcib_acpi_resume(device_t bus);
 static int		acpi_pcib_read_ivar(device_t dev, device_t child,
 			    int which, uintptr_t *result);
 static int		acpi_pcib_write_ivar(device_t dev, device_t child,
@@ -94,7 +93,7 @@ static device_method_t acpi_pcib_acpi_me
     DEVMETHOD(device_attach,		acpi_pcib_acpi_attach),
     DEVMETHOD(device_shutdown,		bus_generic_shutdown),
     DEVMETHOD(device_suspend,		bus_generic_suspend),
-    DEVMETHOD(device_resume,		acpi_pcib_acpi_resume),
+    DEVMETHOD(device_resume,		bus_generic_resume),
 
     /* Bus interface */
     DEVMETHOD(bus_print_child,		bus_generic_print_child),
@@ -257,13 +256,6 @@ acpi_pcib_acpi_attach(device_t dev)
     return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_bus));
 }
 
-static int
-acpi_pcib_acpi_resume(device_t dev)
-{
-
-    return (acpi_pcib_resume(dev));
-}
-
 /*
  * Support for standard PCI bridge ivars.
  */

Modified: head/sys/dev/acpica/acpi_pcib_pci.c
==============================================================================
--- head/sys/dev/acpica/acpi_pcib_pci.c	Thu Aug  5 15:53:33 2010	(r210863)
+++ head/sys/dev/acpica/acpi_pcib_pci.c	Thu Aug  5 16:10:12 2010	(r210864)
@@ -65,7 +65,6 @@ struct acpi_pcib_lookup_info {
 
 static int		acpi_pcib_pci_probe(device_t bus);
 static int		acpi_pcib_pci_attach(device_t bus);
-static int		acpi_pcib_pci_resume(device_t bus);
 static int		acpi_pcib_read_ivar(device_t dev, device_t child,
 			    int which, uintptr_t *result);
 static int		acpi_pcib_pci_route_interrupt(device_t pcib,
@@ -75,39 +74,20 @@ static device_method_t acpi_pcib_pci_met
     /* Device interface */
     DEVMETHOD(device_probe,		acpi_pcib_pci_probe),
     DEVMETHOD(device_attach,		acpi_pcib_pci_attach),
-    DEVMETHOD(device_shutdown,		bus_generic_shutdown),
-    DEVMETHOD(device_suspend,		bus_generic_suspend),
-    DEVMETHOD(device_resume,		acpi_pcib_pci_resume),
 
     /* Bus interface */
-    DEVMETHOD(bus_print_child,		bus_generic_print_child),
     DEVMETHOD(bus_read_ivar,		acpi_pcib_read_ivar),
-    DEVMETHOD(bus_write_ivar,		pcib_write_ivar),
-    DEVMETHOD(bus_alloc_resource,	pcib_alloc_resource),
-    DEVMETHOD(bus_release_resource,	bus_generic_release_resource),
-    DEVMETHOD(bus_activate_resource,	bus_generic_activate_resource),
-    DEVMETHOD(bus_deactivate_resource, 	bus_generic_deactivate_resource),
-    DEVMETHOD(bus_setup_intr,		bus_generic_setup_intr),
-    DEVMETHOD(bus_teardown_intr,	bus_generic_teardown_intr),
 
     /* pcib interface */
-    DEVMETHOD(pcib_maxslots,		pcib_maxslots),
-    DEVMETHOD(pcib_read_config,		pcib_read_config),
-    DEVMETHOD(pcib_write_config,	pcib_write_config),
     DEVMETHOD(pcib_route_interrupt,	acpi_pcib_pci_route_interrupt),
-    DEVMETHOD(pcib_alloc_msi,		pcib_alloc_msi),
-    DEVMETHOD(pcib_release_msi,		pcib_release_msi),
-    DEVMETHOD(pcib_alloc_msix,		pcib_alloc_msix),
-    DEVMETHOD(pcib_release_msix,	pcib_release_msix),
-    DEVMETHOD(pcib_map_msi,		pcib_map_msi),
 
     {0, 0}
 };
 
 static devclass_t pcib_devclass;
 
-DEFINE_CLASS_0(pcib, acpi_pcib_pci_driver, acpi_pcib_pci_methods,
-    sizeof(struct acpi_pcib_softc));
+DEFINE_CLASS_1(pcib, acpi_pcib_pci_driver, acpi_pcib_pci_methods,
+    sizeof(struct acpi_pcib_softc), pcib_driver);
 DRIVER_MODULE(acpi_pcib, pci, acpi_pcib_pci_driver, pcib_devclass, 0, 0);
 MODULE_DEPEND(acpi_pcib, acpi, 1, 1, 1);
 
@@ -142,13 +122,6 @@ acpi_pcib_pci_attach(device_t dev)
 }
 
 static int
-acpi_pcib_pci_resume(device_t dev)
-{
-
-    return (acpi_pcib_resume(dev));
-}
-
-static int
 acpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
 {
     struct acpi_pcib_softc *sc = device_get_softc(dev);

Modified: head/sys/dev/acpica/acpi_pcibvar.h
==============================================================================
--- head/sys/dev/acpica/acpi_pcibvar.h	Thu Aug  5 15:53:33 2010	(r210863)
+++ head/sys/dev/acpica/acpi_pcibvar.h	Thu Aug  5 16:10:12 2010	(r210864)
@@ -31,13 +31,14 @@
 #define	_ACPI_PCIBVAR_H_
 
 #ifdef _KERNEL
+
 void	acpi_pci_link_add_reference(device_t dev, int index, device_t pcib,
     int slot, int pin);
 int	acpi_pci_link_route_interrupt(device_t dev, int index);
 int	acpi_pcib_attach(device_t bus, ACPI_BUFFER *prt, int busno);
 int	acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin,
     ACPI_BUFFER *prtbuf);
-int	acpi_pcib_resume(device_t dev);
+
 #endif /* _KERNEL */
 
 #endif /* !_ACPI_PCIBVAR_H_ */

Modified: head/sys/dev/pci/pcib_private.h
==============================================================================
--- head/sys/dev/pci/pcib_private.h	Thu Aug  5 15:53:33 2010	(r210863)
+++ head/sys/dev/pci/pcib_private.h	Thu Aug  5 16:10:12 2010	(r210864)
@@ -37,6 +37,7 @@
  * Export portions of generic PCI:PCI bridge support so that it can be
  * used by subclasses.
  */
+DECLARE_CLASS(pcib_driver);
 
 /*
  * Bridge-specific data.

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 16:28:17 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D8072106566B;
	Thu,  5 Aug 2010 16:28:17 +0000 (UTC)
	(envelope-from olli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C5C2E8FC1A;
	Thu,  5 Aug 2010 16:28:17 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75GSHd3042529;
	Thu, 5 Aug 2010 16:28:17 GMT (envelope-from olli@svn.freebsd.org)
Received: (from olli@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75GSHYi042527;
	Thu, 5 Aug 2010 16:28:17 GMT (envelope-from olli@svn.freebsd.org)
Message-Id: <201008051628.o75GSHYi042527@svn.freebsd.org>
From: Oliver Fromme 
Date: Thu, 5 Aug 2010 16:28:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210865 - head/sys/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 16:28:18 -0000

Author: olli
Date: Thu Aug  5 16:28:17 2010
New Revision: 210865
URL: http://svn.freebsd.org/changeset/base/210865

Log:
  Fix a bunch of errors (spelling and similar).
  
  As des noted, the section on SCTP would benefit from
  a rewrite by a native speaker (which I am not).
  Any volunteers?
  
  Approved by:	des (mentor)
  MFC after:	1 week

Modified:
  head/sys/conf/NOTES

Modified: head/sys/conf/NOTES
==============================================================================
--- head/sys/conf/NOTES	Thu Aug  5 16:10:12 2010	(r210864)
+++ head/sys/conf/NOTES	Thu Aug  5 16:28:17 2010	(r210865)
@@ -195,7 +195,7 @@ options 	ROOTDEVNAME=\"ufs:da0s2e\"
 # workloads on SMP machines.  It supports cpu-affinity, per-cpu runqueues
 # and scheduler locks.  It also has a stronger notion of interactivity 
 # which leads to better responsiveness even on uniprocessor machines.  This
-# will eventually become the default scheduler.
+# is the default scheduler.
 #
 # SCHED_STATS is a debugging option which keeps some stats in the sysctl
 # tree at 'kern.sched.stats' and is useful for debugging scheduling decisions.
@@ -501,7 +501,7 @@ options 	REGRESSION
 #options 	RESTARTABLE_PANICS
 
 #
-# This option let some drivers co-exist that can't co-exist in a running
+# This option lets some drivers co-exist that can't co-exist in a running
 # system.  This is used to be able to compile all kernel code in one go for
 # quality assurance purposes (like this file, which the option takes it name
 # from.)
@@ -521,7 +521,7 @@ options 	STACK
 
 #
 # The hwpmc driver that allows the use of in-CPU performance monitoring
-# counters for performance monitoring.  The base kernel needs to configured
+# counters for performance monitoring.  The base kernel needs to be configured
 # with the 'options' line, while the hwpmc device can be either compiled
 # in or loaded as a loadable kernel module.
 #
@@ -592,12 +592,12 @@ options 	FLOWTABLE
 # soon to have a new base RFC and many many more
 # extensions. This release supports all the extensions
 # including many drafts (most about to become RFC's).
-# It is the premeier SCTP implementation in the NET
+# It is the reference implementation of SCTP
 # and is quite well tested.
 #
 # Note YOU MUST have both INET and INET6 defined.
-# you don't have to enable V6, but SCTP is 
-# dual stacked and so far we have not teased apart
+# You don't have to enable V6, but SCTP is 
+# dual stacked and so far we have not torn apart
 # the V6 and V4.. since an association can span
 # both a V6 and V4 address at the SAME time :-)
 #
@@ -605,7 +605,7 @@ options 	SCTP
 # There are bunches of options:
 # this one turns on all sorts of
 # nastly printing that you can
-# do. Its all controled by a
+# do. It's all controlled by a
 # bit mask (settable by socket opt and
 # by sysctl). Including will not cause
 # logging until you set the bits.. but it
@@ -615,9 +615,9 @@ options 	SCTP
 # faster.. if you are not debugging don't use.
 options 	SCTP_DEBUG
 #
-# This option turns off the CRC32c checksum. Basically
-# You will not be able to talk to anyone else that
-# has not done this. Its more for expermentation to
+# This option turns off the CRC32c checksum. Basically,
+# you will not be able to talk to anyone else who
+# has not done this. Its more for experimentation to
 # see how much CPU the CRC32c really takes. Most new
 # cards for TCP support checksum offload.. so this 
 # option gives you a "view" into what SCTP would be
@@ -636,13 +636,13 @@ options 	SCTP_WITH_NO_CSUM
 # see. I have used this to produce interesting 
 # charts and graphs as well :->
 # 
-# I have not yet commited the tools to get and print
+# I have not yet committed the tools to get and print
 # the logs, I will do that eventually .. before then
 # if you want them send me an email rrs@freebsd.org
 # You basically must have ktr(4) enabled for these
 # and you then set the sysctl to turn on/off various
 # logging bits. Use ktrdump(8) to pull the log and run
-# it through a dispaly program.. and graphs and other
+# it through a display program.. and graphs and other
 # things too.
 #
 options 	SCTP_LOCK_LOGGING
@@ -798,8 +798,7 @@ device		sppp
 
 #  The `bpf' device enables the Berkeley Packet Filter.  Be
 #  aware of the legal and administrative consequences of enabling this
-#  option.  The number of devices determines the maximum number of
-#  simultaneous BPF clients programs runnable.  DHCP requires bpf.
+#  option.  DHCP requires bpf.
 device		bpf
 
 #  The `disc' device implements a minimal network interface,
@@ -938,7 +937,7 @@ options 	TCPDEBUG
 options 	MBUF_STRESS_TEST
 options 	MBUF_PROFILING
 
-# Statically Link in accept filters
+# Statically link in accept filters
 options 	ACCEPT_FILTER_DATA
 options 	ACCEPT_FILTER_DNS
 options 	ACCEPT_FILTER_HTTP
@@ -996,7 +995,7 @@ options 	NFSSERVER		#Network File System
 options 	NFSLOCKD		#Network Lock Manager
 options 	NFSCL			#experimental NFS client with NFSv4
 options 	NFSD			#experimental NFS server with NFSv4
-options 	KGSSAPI			#Kernel GSSAPI implementaion
+options 	KGSSAPI			#Kernel GSSAPI implementation
 
 # NT File System. Read-mostly, see mount_ntfs(8) for details.
 # For a full read-write NTFS support consider sysutils/fusefs-ntfs
@@ -1059,7 +1058,7 @@ options 	QUOTA			#enable disk quotas
 # if you let these users run programs, so confine it to file-servers
 # (but it'll save you lots of headaches in those cases). Root owned
 # directories are exempt and X bits are cleared. The suid bit must be
-# set on the directory as well; see chmod(1) PC owners can't see/set
+# set on the directory as well; see chmod(1). PC owners can't see/set
 # ownerships so they keep getting their toes trodden on. This saves
 # you all the support calls as the filesystem it's used on will act as
 # they expect: "It's my dir so it must be my file".
@@ -1338,8 +1337,7 @@ options 	SCSI_PT_DEFAULT_TIMEOUT=60
 #
 # Normally disabled because a lot of newer SCSI disks report themselves
 # as having SES capabilities, but this can then clot up attempts to build
-# build a topology with the SES device that's on the box these drives
-# are in....
+# a topology with the SES device that's on the box these drives are in....
 options 	SES_ENABLE_PASSTHROUGH
 
 
@@ -1601,7 +1599,7 @@ options 	ISP_DEFAULT_ROLES=2
 #                           instruments are enabled.  The tools in
 #                           /usr/sbin/dpt_* assume these to be enabled.
 #   DPT_HANDLE_TIMEOUTS     Normally device timeouts are handled by the DPT.
-#                           If you ant the driver to handle timeouts, enable
+#                           If you want the driver to handle timeouts, enable
 #                           this option.  If your system is very busy, this
 #                           option will create more trouble than solve.
 #   DPT_TIMEOUT_FACTOR      Used to compute the excessive amount of time to
@@ -1747,7 +1745,7 @@ hint.ata.1.irq="15"
 # ATA_CAM:		Turn ata(4) subsystem controller drivers into cam(4)
 #			interface modules. This deprecates all ata(4)
 #			peripheral device drivers (atadisk, ataraid, atapicd,
-#			atapifd. atapist, atapicam) and all user-level APIs.
+#			atapifd, atapist, atapicam) and all user-level APIs.
 #			cam(4) drivers and APIs will be connected instead.
 
 options 	ATA_STATIC_ID
@@ -1822,7 +1820,7 @@ options 	BREAK_TO_DEBUGGER	# A BREAK on 
 
 # Solaris implements a new BREAK which is initiated by a character
 # sequence CR ~ ^b which is similar to a familiar pattern used on
-# Sun servers by the Remote Console.  There are FreeBSD extentions:
+# Sun servers by the Remote Console.  There are FreeBSD extensions:
 # CR ~ ^p requests force panic and CR ~ ^r requests a clean reboot.
 options 	ALT_BREAK_TO_DEBUGGER
 
@@ -2189,7 +2187,7 @@ device		sound
 #
 # snd_*: Device-specific drivers.
 #
-# The flags of the device tells the device a bit more info about the
+# The flags of the device tell the device a bit more info about the
 # device that normally is obtained through the PnP interface.
 #	bit  2..0   secondary DMA channel;
 #	bit  4      set if the board uses two dma channels;
@@ -2386,7 +2384,7 @@ device		cmx
 # crystal, e.g. some new Bt878 cards.
 #
 # options 	BKTR_GPIO_ACCESS
-# This enable IOCTLs which give user level access to the GPIO port.
+# This enables IOCTLs which give user level access to the GPIO port.
 #
 # options 	BKTR_NO_MSP_RESET
 # Prevents the MSP34xx reset. Good if you initialise the MSP in another OS first
@@ -2594,7 +2592,7 @@ options 	NSFBUFS=1024
 
 #
 # Enable extra debugging code for locks.  This stores the filename and
-# line of whatever acquired the lock in the lock itself, and change a
+# line of whatever acquired the lock in the lock itself, and changes a
 # number of function calls to pass around the relevant data.  This is
 # not at all useful unless you are debugging lock code.  Also note
 # that it is likely to break e.g. fstat(1) unless you recompile your
@@ -2870,7 +2868,7 @@ options 	NSWBUF_MIN=120
 #####################################################################
 
 # More undocumented options for linting.
-# Note that documenting these are not considered an affront.
+# Note that documenting these is not considered an affront.
 
 options 	CAM_DEBUG_DELAY
 

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 16:52:14 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 10006106568E;
	Thu,  5 Aug 2010 16:52:14 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D89628FC23;
	Thu,  5 Aug 2010 16:52:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75GqDtg047868;
	Thu, 5 Aug 2010 16:52:13 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75GqDvJ047866;
	Thu, 5 Aug 2010 16:52:13 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <201008051652.o75GqDvJ047866@svn.freebsd.org>
From: Michael Tuexen 
Date: Thu, 5 Aug 2010 16:52:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210866 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 16:52:14 -0000

Author: tuexen
Date: Thu Aug  5 16:52:13 2010
New Revision: 210866
URL: http://svn.freebsd.org/changeset/base/210866

Log:
  Fix a bug where endpoints bound to wildcard addresses where
  using addresses not announced to the peer due to address
  scoping.
  
  MFC after: 3 weeks

Modified:
  head/sys/netinet/sctp_output.c

Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c	Thu Aug  5 16:28:17 2010	(r210865)
+++ head/sys/netinet/sctp_output.c	Thu Aug  5 16:52:13 2010	(r210866)
@@ -2740,6 +2740,15 @@ sctp_select_nth_preferred_addr_from_ifn_
 			}
 		}
 		if (stcb) {
+			if (sctp_is_address_in_scope(ifa,
+			    stcb->asoc.ipv4_addr_legal,
+			    stcb->asoc.ipv6_addr_legal,
+			    stcb->asoc.loopback_scope,
+			    stcb->asoc.ipv4_local_scope,
+			    stcb->asoc.local_scope,
+			    stcb->asoc.site_scope, 0) == 0) {
+				continue;
+			}
 			if (((non_asoc_addr_ok == 0) &&
 			    (sctp_is_addr_restricted(stcb, sifa))) ||
 			    (non_asoc_addr_ok &&
@@ -2783,6 +2792,15 @@ sctp_count_num_preferred_boundall(struct
 			continue;
 		}
 		if (stcb) {
+			if (sctp_is_address_in_scope(ifa,
+			    stcb->asoc.ipv4_addr_legal,
+			    stcb->asoc.ipv6_addr_legal,
+			    stcb->asoc.loopback_scope,
+			    stcb->asoc.ipv4_local_scope,
+			    stcb->asoc.local_scope,
+			    stcb->asoc.site_scope, 0) == 0) {
+				continue;
+			}
 			if (((non_asoc_addr_ok == 0) &&
 			    (sctp_is_addr_restricted(stcb, sifa))) ||
 			    (non_asoc_addr_ok &&
@@ -2963,6 +2981,15 @@ bound_all_plan_b:
 		if (sifa == NULL)
 			continue;
 		if (stcb) {
+			if (sctp_is_address_in_scope(sifa,
+			    stcb->asoc.ipv4_addr_legal,
+			    stcb->asoc.ipv6_addr_legal,
+			    stcb->asoc.loopback_scope,
+			    stcb->asoc.ipv4_local_scope,
+			    stcb->asoc.local_scope,
+			    stcb->asoc.site_scope, 0) == 0) {
+				continue;
+			}
 			if (((non_asoc_addr_ok == 0) &&
 			    (sctp_is_addr_restricted(stcb, sifa))) ||
 			    (non_asoc_addr_ok &&
@@ -3005,6 +3032,15 @@ plan_d:
 			if (sifa == NULL)
 				continue;
 			if (stcb) {
+				if (sctp_is_address_in_scope(sifa,
+				    stcb->asoc.ipv4_addr_legal,
+				    stcb->asoc.ipv6_addr_legal,
+				    stcb->asoc.loopback_scope,
+				    stcb->asoc.ipv4_local_scope,
+				    stcb->asoc.local_scope,
+				    stcb->asoc.site_scope, 0) == 0) {
+					continue;
+				}
 				if (((non_asoc_addr_ok == 0) &&
 				    (sctp_is_addr_restricted(stcb, sifa))) ||
 				    (non_asoc_addr_ok &&

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 17:08:24 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2775F1065672;
	Thu,  5 Aug 2010 17:08:24 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 14C478FC14;
	Thu,  5 Aug 2010 17:08:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75H8NID051446;
	Thu, 5 Aug 2010 17:08:23 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75H8NBj051442;
	Thu, 5 Aug 2010 17:08:23 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201008051708.o75H8NBj051442@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Thu, 5 Aug 2010 17:08: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: r210867 - stable/8/lib/libc/posix1e
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 17:08:24 -0000

Author: trasz
Date: Thu Aug  5 17:08:23 2010
New Revision: 210867
URL: http://svn.freebsd.org/changeset/base/210867

Log:
  MFC r209736:
  
  Fix acl_from_text(3) - and, therefore, setfacl(1) - for user and group
  names names starting with a digit.

Modified:
  stable/8/lib/libc/posix1e/acl_from_text.c
  stable/8/lib/libc/posix1e/acl_from_text_nfs4.c
  stable/8/lib/libc/posix1e/acl_support.h
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/locale/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/lib/libc/sys/   (props changed)

Modified: stable/8/lib/libc/posix1e/acl_from_text.c
==============================================================================
--- stable/8/lib/libc/posix1e/acl_from_text.c	Thu Aug  5 16:52:13 2010	(r210866)
+++ stable/8/lib/libc/posix1e/acl_from_text.c	Thu Aug  5 17:08:23 2010	(r210867)
@@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$");
 
 #include "acl_support.h"
 
-static int _posix1e_acl_name_to_id(acl_tag_t tag, char *name, uid_t *id);
 static acl_tag_t acl_string_to_tag(char *tag, char *qualifier);
 
 int _nfs4_acl_entry_from_text(acl_t aclp, char *entry);
@@ -148,8 +147,7 @@ _posix1e_acl_entry_from_text(acl_t aclp,
 
 		case ACL_USER:
 		case ACL_GROUP:
-			error = _posix1e_acl_name_to_id(t, qualifier,
-					&id);
+			error = _acl_name_to_id(t, qualifier, &id);
 			if (error == -1)
 				return (-1);
 			break;
@@ -275,8 +273,8 @@ error_label:
  * XXX currently doesn't deal correctly with a numeric uid being passed
  * instead of a username.  What is correct behavior here?  Check chown.
  */
-static int
-_posix1e_acl_name_to_id(acl_tag_t tag, char *name, uid_t *id)
+int
+_acl_name_to_id(acl_tag_t tag, char *name, uid_t *id)
 {
 	struct group	*g;
 	struct passwd	*p;

Modified: stable/8/lib/libc/posix1e/acl_from_text_nfs4.c
==============================================================================
--- stable/8/lib/libc/posix1e/acl_from_text_nfs4.c	Thu Aug  5 16:52:13 2010	(r210866)
+++ stable/8/lib/libc/posix1e/acl_from_text_nfs4.c	Thu Aug  5 17:08:23 2010	(r210867)
@@ -79,16 +79,14 @@ parse_tag(const char *str, acl_entry_t e
 /*
  * Parse the qualifier field of ACL entry passed as "str".
  * If user or group name cannot be resolved, then the variable
- * referenced by "need_qualifier" is set to 1.
+ * referenced by "need_qualifier" is set to 1; it will be checked
+ * later to figure out whether the appended_id is required.
  */
 static int
 parse_qualifier(char *str, acl_entry_t entry, int *need_qualifier)
 {
 	int qualifier_length, error;
-	id_t id;
-	char *end;
-	struct passwd *pwd;
-	struct group *grp;
+	uid_t id;
 	acl_tag_t tag;
 
 	assert(need_qualifier != NULL);
@@ -101,44 +99,17 @@ parse_qualifier(char *str, acl_entry_t e
 		return (-1);
 	}
 
-	/* XXX: Can we assume that valid username never begins with a digit? */
-	if (isdigit(str[0])) {
-		id = strtod(str, &end);
-
-		if (end - str != qualifier_length) {
-			warnx("malformed ACL: trailing characters "
-			    "after numerical id");
-			return (-1);
-		}
-
-		return (acl_set_qualifier(entry, &id));
-	}
-
 	error = acl_get_tag_type(entry, &tag);
 	if (error)
 		return (error);
 
-	assert(tag == ACL_USER || tag == ACL_GROUP);
-
-	if (tag == ACL_USER) {
-		/* XXX: Thread-unsafe. */
-		pwd = getpwnam(str);
-		if (pwd == NULL) {
-			*need_qualifier = 1;
-			return (0);
-		}
-
-		return (acl_set_qualifier(entry, &(pwd->pw_uid)));
-	}
-
-	/* XXX: Thread-unsafe. */
-	grp = getgrnam(str);
-	if (grp == NULL) {
+	error = _acl_name_to_id(tag, str, &id);
+	if (error) {
 		*need_qualifier = 1;
 		return (0);
 	}
 
-	return (acl_set_qualifier(entry, &(grp->gr_gid)));
+	return (acl_set_qualifier(entry, &id));
 }
 
 static int

Modified: stable/8/lib/libc/posix1e/acl_support.h
==============================================================================
--- stable/8/lib/libc/posix1e/acl_support.h	Thu Aug  5 16:52:13 2010	(r210866)
+++ stable/8/lib/libc/posix1e/acl_support.h	Thu Aug  5 17:08:23 2010	(r210867)
@@ -61,5 +61,6 @@ int	_posix1e_acl_add_entry(acl_t acl, ac
 	    acl_perm_t perm);
 char	*string_skip_whitespace(char *string);
 void	string_trim_trailing_whitespace(char *string);
+int	_acl_name_to_id(acl_tag_t tag, char *name, uid_t *id);
 
 #endif

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 17:48:38 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 05B271065673;
	Thu,  5 Aug 2010 17:48:38 +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 E7BEC8FC20;
	Thu,  5 Aug 2010 17:48:37 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75HmbbR060645;
	Thu, 5 Aug 2010 17:48:37 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75Hmbcs060641;
	Thu, 5 Aug 2010 17:48:37 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008051748.o75Hmbcs060641@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 17:48:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210868 - in head/sys: amd64/amd64 i386/i386 i386/pci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 17:48:38 -0000

Author: jhb
Date: Thu Aug  5 17:48:37 2010
New Revision: 210868
URL: http://svn.freebsd.org/changeset/base/210868

Log:
  Change the MPTable and $PIR PCI-PCI bridge drivers to inherit from the
  generic PCI-PCI bridge driver and only override specific methods.  This
  should fix suspend/resume of PCI-PCI bridges using these drivers.

Modified:
  head/sys/amd64/amd64/mptable_pci.c
  head/sys/i386/i386/mptable_pci.c
  head/sys/i386/pci/pci_bus.c

Modified: head/sys/amd64/amd64/mptable_pci.c
==============================================================================
--- head/sys/amd64/amd64/mptable_pci.c	Thu Aug  5 17:08:23 2010	(r210867)
+++ head/sys/amd64/amd64/mptable_pci.c	Thu Aug  5 17:48:37 2010	(r210868)
@@ -163,38 +163,15 @@ mptable_pcib_probe(device_t dev)
 static device_method_t mptable_pcib_pci_methods[] = {
 	/* Device interface */
 	DEVMETHOD(device_probe,		mptable_pcib_probe),
-	DEVMETHOD(device_attach,	pcib_attach),
-	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
-	DEVMETHOD(device_suspend,	bus_generic_suspend),
-	DEVMETHOD(device_resume,	bus_generic_resume),
-
-	/* Bus interface */
-	DEVMETHOD(bus_print_child,	bus_generic_print_child),
-	DEVMETHOD(bus_read_ivar,	pcib_read_ivar),
-	DEVMETHOD(bus_write_ivar,	pcib_write_ivar),
-	DEVMETHOD(bus_alloc_resource,	pcib_alloc_resource),
-	DEVMETHOD(bus_release_resource,	bus_generic_release_resource),
-	DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
-	DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
-	DEVMETHOD(bus_setup_intr,	bus_generic_setup_intr),
-	DEVMETHOD(bus_teardown_intr,	bus_generic_teardown_intr),
 
 	/* pcib interface */
-	DEVMETHOD(pcib_maxslots,	pcib_maxslots),
-	DEVMETHOD(pcib_read_config,	pcib_read_config),
-	DEVMETHOD(pcib_write_config,	pcib_write_config),
 	DEVMETHOD(pcib_route_interrupt,	mptable_pci_route_interrupt),
-	DEVMETHOD(pcib_alloc_msi,	pcib_alloc_msi),
-	DEVMETHOD(pcib_release_msi,	pcib_release_msi),
-	DEVMETHOD(pcib_alloc_msix,	pcib_alloc_msix),
-	DEVMETHOD(pcib_release_msix,	pcib_release_msix),
-	DEVMETHOD(pcib_map_msi,		pcib_map_msi),
 
 	{0, 0}
 };
 
 static devclass_t pcib_devclass;
 
-DEFINE_CLASS_0(pcib, mptable_pcib_driver, mptable_pcib_pci_methods,
-    sizeof(struct pcib_softc));
+DEFINE_CLASS_1(pcib, mptable_pcib_driver, mptable_pcib_pci_methods,
+    sizeof(struct pcib_softc), pcib_driver);
 DRIVER_MODULE(mptable_pcib, pci, mptable_pcib_driver, pcib_devclass, 0, 0);

Modified: head/sys/i386/i386/mptable_pci.c
==============================================================================
--- head/sys/i386/i386/mptable_pci.c	Thu Aug  5 17:08:23 2010	(r210867)
+++ head/sys/i386/i386/mptable_pci.c	Thu Aug  5 17:48:37 2010	(r210868)
@@ -163,38 +163,15 @@ mptable_pcib_probe(device_t dev)
 static device_method_t mptable_pcib_pci_methods[] = {
 	/* Device interface */
 	DEVMETHOD(device_probe,		mptable_pcib_probe),
-	DEVMETHOD(device_attach,	pcib_attach),
-	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
-	DEVMETHOD(device_suspend,	bus_generic_suspend),
-	DEVMETHOD(device_resume,	bus_generic_resume),
-
-	/* Bus interface */
-	DEVMETHOD(bus_print_child,	bus_generic_print_child),
-	DEVMETHOD(bus_read_ivar,	pcib_read_ivar),
-	DEVMETHOD(bus_write_ivar,	pcib_write_ivar),
-	DEVMETHOD(bus_alloc_resource,	pcib_alloc_resource),
-	DEVMETHOD(bus_release_resource,	bus_generic_release_resource),
-	DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
-	DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
-	DEVMETHOD(bus_setup_intr,	bus_generic_setup_intr),
-	DEVMETHOD(bus_teardown_intr,	bus_generic_teardown_intr),
 
 	/* pcib interface */
-	DEVMETHOD(pcib_maxslots,	pcib_maxslots),
-	DEVMETHOD(pcib_read_config,	pcib_read_config),
-	DEVMETHOD(pcib_write_config,	pcib_write_config),
 	DEVMETHOD(pcib_route_interrupt,	mptable_pci_route_interrupt),
-	DEVMETHOD(pcib_alloc_msi,	pcib_alloc_msi),
-	DEVMETHOD(pcib_release_msi,	pcib_release_msi),
-	DEVMETHOD(pcib_alloc_msix,	pcib_alloc_msix),
-	DEVMETHOD(pcib_release_msix,	pcib_release_msix),
-	DEVMETHOD(pcib_map_msi,		pcib_map_msi),
 
 	{0, 0}
 };
 
 static devclass_t pcib_devclass;
 
-DEFINE_CLASS_0(pcib, mptable_pcib_driver, mptable_pcib_pci_methods,
-    sizeof(struct pcib_softc));
+DEFINE_CLASS_1(pcib, mptable_pcib_driver, mptable_pcib_pci_methods,
+    sizeof(struct pcib_softc), pcib_driver);
 DRIVER_MODULE(mptable_pcib, pci, mptable_pcib_driver, pcib_devclass, 0, 0);

Modified: head/sys/i386/pci/pci_bus.c
==============================================================================
--- head/sys/i386/pci/pci_bus.c	Thu Aug  5 17:08:23 2010	(r210867)
+++ head/sys/i386/pci/pci_bus.c	Thu Aug  5 17:48:37 2010	(r210868)
@@ -645,40 +645,17 @@ static int	pcibios_pcib_probe(device_t b
 static device_method_t pcibios_pcib_pci_methods[] = {
 	/* Device interface */
 	DEVMETHOD(device_probe,		pcibios_pcib_probe),
-	DEVMETHOD(device_attach,	pcib_attach),
-	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
-	DEVMETHOD(device_suspend,	bus_generic_suspend),
-	DEVMETHOD(device_resume,	bus_generic_resume),
-
-	/* Bus interface */
-	DEVMETHOD(bus_print_child,	bus_generic_print_child),
-	DEVMETHOD(bus_read_ivar,	pcib_read_ivar),
-	DEVMETHOD(bus_write_ivar,	pcib_write_ivar),
-	DEVMETHOD(bus_alloc_resource,	pcib_alloc_resource),
-	DEVMETHOD(bus_release_resource,	bus_generic_release_resource),
-	DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
-	DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
-	DEVMETHOD(bus_setup_intr,	bus_generic_setup_intr),
-	DEVMETHOD(bus_teardown_intr,	bus_generic_teardown_intr),
 
 	/* pcib interface */
-	DEVMETHOD(pcib_maxslots,	pcib_maxslots),
-	DEVMETHOD(pcib_read_config,	pcib_read_config),
-	DEVMETHOD(pcib_write_config,	pcib_write_config),
 	DEVMETHOD(pcib_route_interrupt,	pcibios_pcib_route_interrupt),
-	DEVMETHOD(pcib_alloc_msi,	pcib_alloc_msi),
-	DEVMETHOD(pcib_release_msi,	pcib_release_msi),
-	DEVMETHOD(pcib_alloc_msix,	pcib_alloc_msix),
-	DEVMETHOD(pcib_release_msix,	pcib_release_msix),
-	DEVMETHOD(pcib_map_msi,		pcib_map_msi),
 
 	{0, 0}
 };
 
 static devclass_t pcib_devclass;
 
-DEFINE_CLASS_0(pcib, pcibios_pcib_driver, pcibios_pcib_pci_methods,
-    sizeof(struct pcib_softc));
+DEFINE_CLASS_1(pcib, pcibios_pcib_driver, pcibios_pcib_pci_methods,
+    sizeof(struct pcib_softc), pcib_driver);
 DRIVER_MODULE(pcibios_pcib, pci, pcibios_pcib_driver, pcib_devclass, 0, 0);
 
 static int

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 17:56:41 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6FB7B1065673;
	Thu,  5 Aug 2010 17:56:41 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5E2BC8FC17;
	Thu,  5 Aug 2010 17:56:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75Huflw062434;
	Thu, 5 Aug 2010 17:56:41 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75HufXE062428;
	Thu, 5 Aug 2010 17:56:41 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008051756.o75HufXE062428@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 5 Aug 2010 17:56:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210869 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 17:56:41 -0000

Author: pjd
Date: Thu Aug  5 17:56:41 2010
New Revision: 210869
URL: http://svn.freebsd.org/changeset/base/210869

Log:
  Add an argument to the proto_register() function which allows protocol to
  declare it is the default and be placed at the end of the queue so it is
  checked last.
  
  MFC after:	1 month

Modified:
  head/sbin/hastd/proto.c
  head/sbin/hastd/proto_impl.h
  head/sbin/hastd/proto_socketpair.c
  head/sbin/hastd/proto_tcp4.c
  head/sbin/hastd/proto_uds.c

Modified: head/sbin/hastd/proto.c
==============================================================================
--- head/sbin/hastd/proto.c	Thu Aug  5 17:48:37 2010	(r210868)
+++ head/sbin/hastd/proto.c	Thu Aug  5 17:56:41 2010	(r210869)
@@ -52,13 +52,20 @@ struct proto_conn {
 #define	PROTO_SIDE_SERVER_WORK		2
 };
 
-static LIST_HEAD(, hast_proto) protos = LIST_HEAD_INITIALIZER(protos);
+static TAILQ_HEAD(, hast_proto) protos = TAILQ_HEAD_INITIALIZER(protos);
 
 void
-proto_register(struct hast_proto *proto)
+proto_register(struct hast_proto *proto, bool isdefault)
 {
+	static bool seen_default = false;
 
-	LIST_INSERT_HEAD(&protos, proto, hp_next);
+	if (!isdefault)
+		TAILQ_INSERT_HEAD(&protos, proto, hp_next);
+	else {
+		assert(!seen_default);
+		seen_default = true;
+		TAILQ_INSERT_TAIL(&protos, proto, hp_next);
+	}
 }
 
 static int
@@ -75,7 +82,7 @@ proto_common_setup(const char *addr, str
 	if (conn == NULL)
 		return (-1);
 
-	LIST_FOREACH(proto, &protos, hp_next) {
+	TAILQ_FOREACH(proto, &protos, hp_next) {
 		if (side == PROTO_SIDE_CLIENT)
 			ret = proto->hp_client(addr, &ctx);
 		else /* if (side == PROTO_SIDE_SERVER_LISTEN) */

Modified: head/sbin/hastd/proto_impl.h
==============================================================================
--- head/sbin/hastd/proto_impl.h	Thu Aug  5 17:48:37 2010	(r210868)
+++ head/sbin/hastd/proto_impl.h	Thu Aug  5 17:56:41 2010	(r210869)
@@ -64,10 +64,10 @@ struct hast_proto {
 	hp_local_address_t *hp_local_address;
 	hp_remote_address_t *hp_remote_address;
 	hp_close_t	*hp_close;
-	LIST_ENTRY(hast_proto) hp_next;
+	TAILQ_ENTRY(hast_proto) hp_next;
 };
 
-void proto_register(struct hast_proto *proto);
+void proto_register(struct hast_proto *proto, bool isdefault);
 
 int proto_common_send(int fd, const unsigned char *data, size_t size);
 int proto_common_recv(int fd, unsigned char *data, size_t size);

Modified: head/sbin/hastd/proto_socketpair.c
==============================================================================
--- head/sbin/hastd/proto_socketpair.c	Thu Aug  5 17:48:37 2010	(r210868)
+++ head/sbin/hastd/proto_socketpair.c	Thu Aug  5 17:56:41 2010	(r210869)
@@ -271,5 +271,5 @@ static __constructor void
 sp_ctor(void)
 {
 
-	proto_register(&sp_proto);
+	proto_register(&sp_proto, false);
 }

Modified: head/sbin/hastd/proto_tcp4.c
==============================================================================
--- head/sbin/hastd/proto_tcp4.c	Thu Aug  5 17:48:37 2010	(r210868)
+++ head/sbin/hastd/proto_tcp4.c	Thu Aug  5 17:56:41 2010	(r210869)
@@ -515,5 +515,5 @@ static __constructor void
 tcp4_ctor(void)
 {
 
-	proto_register(&tcp4_proto);
+	proto_register(&tcp4_proto, true);
 }

Modified: head/sbin/hastd/proto_uds.c
==============================================================================
--- head/sbin/hastd/proto_uds.c	Thu Aug  5 17:48:37 2010	(r210868)
+++ head/sbin/hastd/proto_uds.c	Thu Aug  5 17:56:41 2010	(r210869)
@@ -326,5 +326,5 @@ static __constructor void
 uds_ctor(void)
 {
 
-	proto_register(&uds_proto);
+	proto_register(&uds_proto, false);
 }

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 17:57:59 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BE3CC106567B;
	Thu,  5 Aug 2010 17:57:59 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AD02D8FC19;
	Thu,  5 Aug 2010 17:57:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75Hvxqb062769;
	Thu, 5 Aug 2010 17:57:59 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75Hvx0g062767;
	Thu, 5 Aug 2010 17:57:59 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008051757.o75Hvx0g062767@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 5 Aug 2010 17:57:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210870 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 17:57:59 -0000

Author: pjd
Date: Thu Aug  5 17:57:59 2010
New Revision: 210870
URL: http://svn.freebsd.org/changeset/base/210870

Log:
  Now that TCP will be checked last we don't need any knowledge about other
  protocols.
  
  MFC after:	1 month

Modified:
  head/sbin/hastd/proto_tcp4.c

Modified: head/sbin/hastd/proto_tcp4.c
==============================================================================
--- head/sbin/hastd/proto_tcp4.c	Thu Aug  5 17:56:41 2010	(r210869)
+++ head/sbin/hastd/proto_tcp4.c	Thu Aug  5 17:57:59 2010	(r210870)
@@ -126,11 +126,12 @@ tcp4_addr(const char *addr, struct socka
 		addr += 7;
 	else if (strncasecmp(addr, "tcp://", 6) == 0)
 		addr += 6;
-	else if (addr[0] != '/' &&	/* If this is not path... */
-	    strstr(addr, "://") == NULL)/* ...and has no prefix... */
-		;			/* ...tcp4 is the default. */
-	else
-		return (-1);
+	else {
+		/*
+		 * Because TCP4 is the default assume IP or host is given without
+		 * prefix.
+		 */
+	}
 
 	sinp->sin_family = AF_INET;
 	sinp->sin_len = sizeof(*sinp);

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 18:05:37 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B6EBC106566C;
	Thu,  5 Aug 2010 18:05:37 +0000 (UTC)
	(envelope-from maxim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A582D8FC1A;
	Thu,  5 Aug 2010 18:05:37 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75I5bCE064506;
	Thu, 5 Aug 2010 18:05:37 GMT (envelope-from maxim@svn.freebsd.org)
Received: (from maxim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75I5bpX064504;
	Thu, 5 Aug 2010 18:05:37 GMT (envelope-from maxim@svn.freebsd.org)
Message-Id: <201008051805.o75I5bpX064504@svn.freebsd.org>
From: Maxim Konovalov 
Date: Thu, 5 Aug 2010 18:05:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210871 - head/share/misc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 18:05:37 -0000

Author: maxim
Date: Thu Aug  5 18:05:37 2010
New Revision: 210871
URL: http://svn.freebsd.org/changeset/base/210871

Log:
  o FreeBSD 8.1-RELEASED added.
  
  PR:		misc/149118
  Submitted by:	pluknet

Modified:
  head/share/misc/bsd-family-tree

Modified: head/share/misc/bsd-family-tree
==============================================================================
--- head/share/misc/bsd-family-tree	Thu Aug  5 17:57:59 2010	(r210870)
+++ head/share/misc/bsd-family-tree	Thu Aug  5 18:05:37 2010	(r210871)
@@ -235,8 +235,12 @@ FreeBSD 5.2           |      |          
  *--FreeBSD     |     |      |                 |                       |
  |    8.0       |     |      |                 |                       |
  |     |    FreeBSD   |      |                 |                       |
- |     V      7.3     |      |                 |                DragonFly 2.6.0
- |                    |      |             OpenBSD 4.7                 |
+ |     |       7.3    |      |                 |                DragonFly 2.6.0
+ |     |              |      |             OpenBSD 4.7                 |
+ |  FreeBSD           |      |                 |                       |
+ |    8.1             |      |                 |                       |
+ |     |              |      |                 |                       |
+ |     V              |      |                 |                       |
  |                    |      |                 |                       |
 FreeBSD 9 -current    |  NetBSD -current  OpenBSD -current             |
  |                    |      |                 |                       |
@@ -515,6 +519,7 @@ FreeBSD 8.0		2009-11-26 [FBD]
 FreeBSD 7.3		2010-03-23 [FBD]
 DragonFly 2.6.0		2010-03-28 [DFB]
 OpenBSD 4.7		2010-05-19 [OBD]
+FreeBSD 8.1		2010-07-24 [FBD]
 
 Bibliography
 ------------------------

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 18:21:45 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D314C106567B;
	Thu,  5 Aug 2010 18:21:45 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C1C988FC14;
	Thu,  5 Aug 2010 18:21:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75ILjvT068104;
	Thu, 5 Aug 2010 18:21:45 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75ILjCe068102;
	Thu, 5 Aug 2010 18:21:45 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008051821.o75ILjCe068102@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 5 Aug 2010 18:21:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210872 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 18:21:45 -0000

Author: pjd
Date: Thu Aug  5 18:21:45 2010
New Revision: 210872
URL: http://svn.freebsd.org/changeset/base/210872

Log:
  Mark two more places that we won't reach.
  
  MFC after:	1 month

Modified:
  head/sbin/hastd/pjdlog.c

Modified: head/sbin/hastd/pjdlog.c
==============================================================================
--- head/sbin/hastd/pjdlog.c	Thu Aug  5 18:05:37 2010	(r210871)
+++ head/sbin/hastd/pjdlog.c	Thu Aug  5 18:21:45 2010	(r210872)
@@ -325,6 +325,7 @@ pjdlogv_exit(int exitcode, const char *f
 
 	pjdlogv_errno(LOG_ERR, fmt, ap);
 	exit(exitcode);
+	/* NOTREACHED */
 }
 
 /*
@@ -350,6 +351,7 @@ pjdlogv_exitx(int exitcode, const char *
 
 	pjdlogv(LOG_ERR, fmt, ap);
 	exit(exitcode);
+	/* NOTREACHED */
 }
 
 /*

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 18:23:43 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9FA691065674;
	Thu,  5 Aug 2010 18:23:43 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8E37B8FC1D;
	Thu,  5 Aug 2010 18:23:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75INhdC068583;
	Thu, 5 Aug 2010 18:23:43 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75INhJP068581;
	Thu, 5 Aug 2010 18:23:43 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008051823.o75INhJP068581@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 5 Aug 2010 18:23:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210873 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 18:23:43 -0000

Author: pjd
Date: Thu Aug  5 18:23:43 2010
New Revision: 210873
URL: http://svn.freebsd.org/changeset/base/210873

Log:
  Keep $FreeBSD$ in __FBSDID() only for C files.
  
  MFC after:	1 month

Modified:
  head/sbin/hastd/pjdlog.c

Modified: head/sbin/hastd/pjdlog.c
==============================================================================
--- head/sbin/hastd/pjdlog.c	Thu Aug  5 18:21:45 2010	(r210872)
+++ head/sbin/hastd/pjdlog.c	Thu Aug  5 18:23:43 2010	(r210873)
@@ -25,8 +25,6 @@
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
- *
- * $FreeBSD$
  */
 
 #include 

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 18:26:03 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8CEFD1065675;
	Thu,  5 Aug 2010 18:26:03 +0000 (UTC)
	(envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7BA1F8FC27;
	Thu,  5 Aug 2010 18:26:03 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75IQ33m069125;
	Thu, 5 Aug 2010 18:26:03 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75IQ3SJ069122;
	Thu, 5 Aug 2010 18:26:03 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201008051826.o75IQ3SJ069122@svn.freebsd.org>
From: Joel Dahl 
Date: Thu, 5 Aug 2010 18:26:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210874 - head/usr.bin/csup
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 18:26:03 -0000

Author: joel (doc committer)
Date: Thu Aug  5 18:26:03 2010
New Revision: 210874
URL: http://svn.freebsd.org/changeset/base/210874

Log:
  Don't point users at the old csup homepage.
  
  Approved by:	lulf

Modified:
  head/usr.bin/csup/csup.1
  head/usr.bin/csup/main.c

Modified: head/usr.bin/csup/csup.1
==============================================================================
--- head/usr.bin/csup/csup.1	Thu Aug  5 18:23:43 2010	(r210873)
+++ head/usr.bin/csup/csup.1	Thu Aug  5 18:26:03 2010	(r210874)
@@ -971,10 +971,6 @@ List files.
 .Xr cvs 1 ,
 .Xr rcsintro 1 ,
 .Xr ssh 1 .
-.Pp
-.Bd -literal
-http://mu.org/~mux/csup.html
-.Ed
 .Sh AUTHORS
 .An -nosplit
 .An Maxime Henrion Aq mux@FreeBSD.org

Modified: head/usr.bin/csup/main.c
==============================================================================
--- head/usr.bin/csup/main.c	Thu Aug  5 18:23:43 2010	(r210873)
+++ head/usr.bin/csup/main.c	Thu Aug  5 18:26:03 2010	(r210874)
@@ -265,7 +265,6 @@ main(int argc, char *argv[])
 			lprintf(0, "Software version: %s\n", PROTO_SWVER);
 			lprintf(0, "Protocol version: %d.%d\n",
 			    PROTO_MAJ, PROTO_MIN);
-			lprintf(0, "http://mu.org/~mux/csup.html\n");
 			return (0);
 			break;
 		case 'z':

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 18:26:38 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 80509106566B;
	Thu,  5 Aug 2010 18:26:38 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 549878FC0A;
	Thu,  5 Aug 2010 18:26:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75IQc3t069289;
	Thu, 5 Aug 2010 18:26:38 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75IQceK069286;
	Thu, 5 Aug 2010 18:26:38 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008051826.o75IQceK069286@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 5 Aug 2010 18:26:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210875 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 18:26:38 -0000

Author: pjd
Date: Thu Aug  5 18:26:38 2010
New Revision: 210875
URL: http://svn.freebsd.org/changeset/base/210875

Log:
  Problem with assertion is that it logs on stderr. Add two macros:
  PJDLOG_ASSERT() and PJDLOG_VERIFY() that will check the given condition
  and log the problem where appropriate. The difference between those
  two is that PJDLOG_VERIFY() always work and PJDLOG_ASSERT() can be
  turned off by defining NDEBUG.
  
  MFC after:	1 month

Modified:
  head/sbin/hastd/pjdlog.c
  head/sbin/hastd/pjdlog.h

Modified: head/sbin/hastd/pjdlog.c
==============================================================================
--- head/sbin/hastd/pjdlog.c	Thu Aug  5 18:26:03 2010	(r210874)
+++ head/sbin/hastd/pjdlog.c	Thu Aug  5 18:26:38 2010	(r210875)
@@ -365,3 +365,23 @@ pjdlog_exitx(int exitcode, const char *f
 	/* NOTREACHED */
 	va_end(ap);
 }
+
+/*
+ * Log assertion and exit.
+ */
+void
+pjdlog_verify(const char *func, const char *file, int line,
+    const char *failedexpr)
+{
+
+	if (func == NULL) {
+		pjdlog_critical("Assertion failed: (%s), file %s, line %d.",
+		    failedexpr, file, line);
+	} else {
+		pjdlog_critical("Assertion failed: (%s), function %s, file %s, line %d.",
+		    failedexpr, func, file, line);
+	}
+	abort();
+        /* NOTREACHED */
+}
+

Modified: head/sbin/hastd/pjdlog.h
==============================================================================
--- head/sbin/hastd/pjdlog.h	Thu Aug  5 18:26:03 2010	(r210874)
+++ head/sbin/hastd/pjdlog.h	Thu Aug  5 18:26:38 2010	(r210875)
@@ -85,4 +85,17 @@ void pjdlogv_exit(int exitcode, const ch
 void pjdlog_exitx(int exitcode, const char *fmt, ...) __printflike(2, 3) __dead2;
 void pjdlogv_exitx(int exitcode, const char *fmt, va_list ap) __printflike(2, 0) __dead2;
 
+void pjdlog_verify(const char *func, const char *file, int line,
+    const char *failedexpr) __dead2;
+
+#define	PJDLOG_VERIFY(expr)	do {					\
+	if (!(expr))							\
+		pjdlog_verify(__func__, __FILE__, __LINE__, #expr);	\
+} while (0)
+#ifdef NDEBUG
+#define	PJDLOG_ASSERT(expr)	do { } while (0)
+#else
+#define	PJDLOG_ASSERT(expr)	PJDLOG_VERIFY(expr)
+#endif
+
 #endif	/* !_PJDLOG_H_ */

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 18:27:41 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8E64E1065675;
	Thu,  5 Aug 2010 18:27:41 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 712738FC0A;
	Thu,  5 Aug 2010 18:27:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75IRfcD069565;
	Thu, 5 Aug 2010 18:27:41 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75IRf21069562;
	Thu, 5 Aug 2010 18:27:41 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008051827.o75IRf21069562@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 5 Aug 2010 18:27:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210876 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 18:27:41 -0000

Author: pjd
Date: Thu Aug  5 18:27:41 2010
New Revision: 210876
URL: http://svn.freebsd.org/changeset/base/210876

Log:
  Assert that various buffers we are large enough.
  
  MFC after:	1 month

Modified:
  head/sbin/hastd/proto_tcp4.c
  head/sbin/hastd/proto_uds.c

Modified: head/sbin/hastd/proto_tcp4.c
==============================================================================
--- head/sbin/hastd/proto_tcp4.c	Thu Aug  5 18:26:38 2010	(r210875)
+++ head/sbin/hastd/proto_tcp4.c	Thu Aug  5 18:27:41 2010	(r210876)
@@ -156,7 +156,8 @@ tcp4_addr(const char *addr, struct socka
 		size = (size_t)(pp - addr + 1);
 		if (size > sizeof(iporhost))
 			return (ENAMETOOLONG);
-		strlcpy(iporhost, addr, size);
+		if (strlcpy(iporhost, addr, size) >= size)
+			return (ENAMETOOLONG);
 	}
 	/* Convert string (IP address or host name) to in_addr_t. */
 	ip = str2ip(iporhost);
@@ -420,8 +421,9 @@ sin2str(struct sockaddr_in *sinp, char *
 
 	ip = ntohl(sinp->sin_addr.s_addr);
 	port = ntohs(sinp->sin_port);
-	snprintf(addr, size, "tcp4://%u.%u.%u.%u:%u", ((ip >> 24) & 0xff),
-	    ((ip >> 16) & 0xff), ((ip >> 8) & 0xff), (ip & 0xff), port);
+	PJDLOG_VERIFY(snprintf(addr, size, "tcp4://%u.%u.%u.%u:%u",
+	    ((ip >> 24) & 0xff), ((ip >> 16) & 0xff), ((ip >> 8) & 0xff),
+	    (ip & 0xff), port) < (ssize_t)size);
 }
 
 static bool
@@ -459,7 +461,7 @@ tcp4_local_address(const void *ctx, char
 
 	sinlen = sizeof(sin);
 	if (getsockname(tctx->tc_fd, (struct sockaddr *)&sin, &sinlen) < 0) {
-		strlcpy(addr, "N/A", size);
+		PJDLOG_VERIFY(strlcpy(addr, "N/A", size) < size);
 		return;
 	}
 	sin2str(&sin, addr, size);
@@ -477,7 +479,7 @@ tcp4_remote_address(const void *ctx, cha
 
 	sinlen = sizeof(sin);
 	if (getpeername(tctx->tc_fd, (struct sockaddr *)&sin, &sinlen) < 0) {
-		strlcpy(addr, "N/A", size);
+		PJDLOG_VERIFY(strlcpy(addr, "N/A", size) < size);
 		return;
 	}
 	sin2str(&sin, addr, size);

Modified: head/sbin/hastd/proto_uds.c
==============================================================================
--- head/sbin/hastd/proto_uds.c	Thu Aug  5 18:26:38 2010	(r210875)
+++ head/sbin/hastd/proto_uds.c	Thu Aug  5 18:27:41 2010	(r210876)
@@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include "hast.h"
+#include "pjdlog.h"
 #include "proto_impl.h"
 
 #define	UDS_CTX_MAGIC	0xd541c
@@ -257,15 +258,15 @@ uds_local_address(const void *ctx, char 
 
 	sunlen = sizeof(sun);
 	if (getsockname(uctx->uc_fd, (struct sockaddr *)&sun, &sunlen) < 0) {
-		strlcpy(addr, "N/A", size);
+		PJDLOG_VERIFY(strlcpy(addr, "N/A", size) < size);
 		return;
 	}
 	assert(sun.sun_family == AF_UNIX);
 	if (sun.sun_path[0] == '\0') {
-		strlcpy(addr, "N/A", size);
+		PJDLOG_VERIFY(strlcpy(addr, "N/A", size) < size);
 		return;
 	}
-	snprintf(addr, size, "uds://%s", sun.sun_path);
+	PJDLOG_VERIFY(snprintf(addr, size, "uds://%s", sun.sun_path) < (ssize_t)size);
 }
 
 static void
@@ -281,12 +282,12 @@ uds_remote_address(const void *ctx, char
 
 	sunlen = sizeof(sun);
 	if (getpeername(uctx->uc_fd, (struct sockaddr *)&sun, &sunlen) < 0) {
-		strlcpy(addr, "N/A", size);
+		PJDLOG_VERIFY(strlcpy(addr, "N/A", size) < size);
 		return;
 	}
 	assert(sun.sun_family == AF_UNIX);
 	if (sun.sun_path[0] == '\0') {
-		strlcpy(addr, "N/A", size);
+		PJDLOG_VERIFY(strlcpy(addr, "N/A", size) < size);
 		return;
 	}
 	snprintf(addr, size, "uds://%s", sun.sun_path);

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 18:48:30 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A4406106564A;
	Thu,  5 Aug 2010 18:48:30 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 912088FC3A;
	Thu,  5 Aug 2010 18:48:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75ImU21074258;
	Thu, 5 Aug 2010 18:48:30 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75ImUfA074254;
	Thu, 5 Aug 2010 18:48:30 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008051848.o75ImUfA074254@svn.freebsd.org>
From: Jung-uk Kim 
Date: Thu, 5 Aug 2010 18:48:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210877 - in head/sys: compat/x86bios i386/include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 18:48:30 -0000

Author: jkim
Date: Thu Aug  5 18:48:30 2010
New Revision: 210877
URL: http://svn.freebsd.org/changeset/base/210877

Log:
  Implement a simple native VM86 backend for X86BIOS.  Now i386 uses native
  VM86 calls instead of the real mode emulator as a backend.  VM86 has been
  proven reliable for very long time and it is actually few times faster than
  emulation.  Increase maximum number of page table entries per VM86 context
  from 3 to 8 pages.  It was (ridiculously) low and insufficient for new VM86
  backend, which shares one context globally.  Slighly rearrange and clean up
  the emulator backend to accommodate new code.  The only visible change here
  is stack size, which is decreased from 64K to 4K bytes to sync. with VM86.
  Actually, it seems there is no need for big stack in real mode.
  
  MFC after:	1 month

Modified:
  head/sys/compat/x86bios/x86bios.c
  head/sys/compat/x86bios/x86bios.h
  head/sys/i386/include/vm86.h

Modified: head/sys/compat/x86bios/x86bios.c
==============================================================================
--- head/sys/compat/x86bios/x86bios.c	Thu Aug  5 18:27:41 2010	(r210876)
+++ head/sys/compat/x86bios/x86bios.c	Thu Aug  5 18:48:30 2010	(r210877)
@@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
@@ -47,36 +46,237 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-
 #include 
 #include 
 
-#if defined(__amd64__) || defined(__i386__)
+#ifdef __amd64__
 #define	X86BIOS_NATIVE_ARCH
 #endif
+#ifdef __i386__
+#define	X86BIOS_NATIVE_VM86
+#endif
+
+#define	X86BIOS_MEM_SIZE	0x00100000	/* 1M */
+
+static struct mtx x86bios_lock;
+
+SYSCTL_NODE(_debug, OID_AUTO, x86bios, CTLFLAG_RD, NULL, "x86bios debugging");
+static int x86bios_trace_call;
+TUNABLE_INT("debug.x86bios.call", &x86bios_trace_call);
+SYSCTL_INT(_debug_x86bios, OID_AUTO, call, CTLFLAG_RW, &x86bios_trace_call, 0,
+    "Trace far function calls");
+static int x86bios_trace_int;
+TUNABLE_INT("debug.x86bios.int", &x86bios_trace_int);
+SYSCTL_INT(_debug_x86bios, OID_AUTO, int, CTLFLAG_RW, &x86bios_trace_int, 0,
+    "Trace software interrupt handlers");
+
+#ifdef X86BIOS_NATIVE_VM86
+
+#include 
+#include 
+#include 
+
+struct vm86context x86bios_vmc;
+
+static void
+x86bios_emu2vmf(struct x86emu_regs *regs, struct vm86frame *vmf)
+{
+
+	vmf->vmf_ds = regs->R_DS;
+	vmf->vmf_es = regs->R_ES;
+	vmf->vmf_ss = regs->R_SS;
+	vmf->vmf_flags = regs->R_FLG;
+	vmf->vmf_ax = regs->R_AX;
+	vmf->vmf_bx = regs->R_BX;
+	vmf->vmf_cx = regs->R_CX;
+	vmf->vmf_dx = regs->R_DX;
+	vmf->vmf_sp = regs->R_SP;
+	vmf->vmf_bp = regs->R_BP;
+	vmf->vmf_si = regs->R_SI;
+	vmf->vmf_di = regs->R_DI;
+}
+
+static void
+x86bios_vmf2emu(struct vm86frame *vmf, struct x86emu_regs *regs)
+{
+
+	regs->R_DS = vmf->vmf_ds;
+	regs->R_ES = vmf->vmf_es;
+	regs->R_SS = vmf->vmf_ss;
+	regs->R_FLG = vmf->vmf_flags;
+	regs->R_AX = vmf->vmf_ax;
+	regs->R_BX = vmf->vmf_bx;
+	regs->R_CX = vmf->vmf_cx;
+	regs->R_DX = vmf->vmf_dx;
+	regs->R_SP = vmf->vmf_sp;
+	regs->R_BP = vmf->vmf_bp;
+	regs->R_SI = vmf->vmf_si;
+	regs->R_DI = vmf->vmf_di;
+}
+
+void *
+x86bios_alloc(uint32_t *offset, size_t size, int flags)
+{
+	vm_offset_t addr;
+	int i;
+
+	addr = (vm_offset_t)contigmalloc(size, M_DEVBUF, flags, 0,
+	    X86BIOS_MEM_SIZE, PAGE_SIZE, 0);
+	if (addr != 0) {
+		*offset = vtophys(addr);
+		mtx_lock(&x86bios_lock);
+		for (i = 0; i < howmany(size, PAGE_SIZE); i++)
+			vm86_addpage(&x86bios_vmc, atop(*offset),
+			    addr + i * PAGE_SIZE);
+		mtx_unlock(&x86bios_lock);
+	}
+
+	return ((void *)addr);
+}
+
+void
+x86bios_free(void *addr, size_t size)
+{
+	int i, last;
+
+	mtx_lock(&x86bios_lock);
+	for (i = 0, last = -1; i < x86bios_vmc.npages; i++)
+		if (x86bios_vmc.pmap[i].kva >= (vm_offset_t)addr &&
+		    x86bios_vmc.pmap[i].kva < (vm_offset_t)addr + size) {
+			bzero(&x86bios_vmc.pmap[i],
+			    sizeof(x86bios_vmc.pmap[i]));
+			last = i;
+		}
+	if (last == x86bios_vmc.npages - 1) {
+		x86bios_vmc.npages -= howmany(size, PAGE_SIZE);
+		for (i = x86bios_vmc.npages - 1;
+		    i >= 0 && x86bios_vmc.pmap[i].kva == 0; i--)
+			x86bios_vmc.npages--;
+	}
+	mtx_unlock(&x86bios_lock);
+	contigfree(addr, size, M_DEVBUF);
+}
+
+void
+x86bios_init_regs(struct x86regs *regs)
+{
+
+	bzero(regs, sizeof(*regs));
+}
+
+void
+x86bios_call(struct x86regs *regs, uint16_t seg, uint16_t off)
+{
+	struct vm86frame vmf;
+
+	if (x86bios_trace_call)
+		printf("Calling 0x%05x (ax=0x%04x bx=0x%04x "
+		    "cx=0x%04x dx=0x%04x es=0x%04x di=0x%04x)\n",
+		    (seg << 4) + off, regs->R_AX, regs->R_BX, regs->R_CX,
+		    regs->R_DX, regs->R_ES, regs->R_DI);
+
+	bzero(&vmf, sizeof(vmf));
+	x86bios_emu2vmf((struct x86emu_regs *)regs, &vmf);
+	vmf.vmf_cs = seg;
+	vmf.vmf_ip = off;
+	mtx_lock(&x86bios_lock);
+	vm86_datacall(-1, &vmf, &x86bios_vmc);
+	mtx_unlock(&x86bios_lock);
+	x86bios_vmf2emu(&vmf, (struct x86emu_regs *)regs);
+
+	if (x86bios_trace_call)
+		printf("Exiting 0x%05x (ax=0x%04x bx=0x%04x "
+		    "cx=0x%04x dx=0x%04x es=0x%04x di=0x%04x)\n",
+		    (seg << 4) + off, regs->R_AX, regs->R_BX, regs->R_CX,
+		    regs->R_DX, regs->R_ES, regs->R_DI);
+}
+
+uint32_t
+x86bios_get_intr(int intno)
+{
+
+	return (readl(x86bios_offset(intno * 4)));
+}
+
+void
+x86bios_intr(struct x86regs *regs, int intno)
+{
+	struct vm86frame vmf;
+
+	if (x86bios_trace_int)
+		printf("Calling int 0x%x (ax=0x%04x bx=0x%04x "
+		    "cx=0x%04x dx=0x%04x es=0x%04x di=0x%04x)\n",
+		    intno, regs->R_AX, regs->R_BX, regs->R_CX,
+		    regs->R_DX, regs->R_ES, regs->R_DI);
+
+	bzero(&vmf, sizeof(vmf));
+	x86bios_emu2vmf((struct x86emu_regs *)regs, &vmf);
+	mtx_lock(&x86bios_lock);
+	vm86_datacall(intno, &vmf, &x86bios_vmc);
+	mtx_unlock(&x86bios_lock);
+	x86bios_vmf2emu(&vmf, (struct x86emu_regs *)regs);
+
+	if (x86bios_trace_int)
+		printf("Exiting int 0x%x (ax=0x%04x bx=0x%04x "
+		    "cx=0x%04x dx=0x%04x es=0x%04x di=0x%04x)\n",
+		    intno, regs->R_AX, regs->R_BX, regs->R_CX,
+		    regs->R_DX, regs->R_ES, regs->R_DI);
+}
+
+void *
+x86bios_offset(uint32_t offset)
+{
+	vm_offset_t addr;
+
+	addr = vm86_getaddr(&x86bios_vmc, X86BIOS_PHYSTOSEG(offset),
+	    X86BIOS_PHYSTOOFF(offset));
+	if (addr == 0)
+		addr = BIOS_PADDRTOVADDR(offset);
+
+	return ((void *)addr);
+}
+
+static int
+x86bios_init(void)
+{
+
+	mtx_init(&x86bios_lock, "x86bios lock", NULL, MTX_DEF);
+	bzero(&x86bios_vmc, sizeof(x86bios_vmc));
+
+	return (0);
+}
+
+static int
+x86bios_uninit(void)
+{
+
+	mtx_destroy(&x86bios_lock);
+
+	return (0);
+}
+
+#else
+
+#include 
 
 #define	X86BIOS_PAGE_SIZE	0x00001000	/* 4K */
 
 #define	X86BIOS_IVT_SIZE	0x00000500	/* 1K + 256 (BDA) */
-#define	X86BIOS_SEG_SIZE	0x00010000	/* 64K */
-#define	X86BIOS_MEM_SIZE	0x00100000	/* 1M */
 
 #define	X86BIOS_IVT_BASE	0x00000000
 #define	X86BIOS_RAM_BASE	0x00001000
 #define	X86BIOS_ROM_BASE	0x000a0000
 
 #define	X86BIOS_ROM_SIZE	(X86BIOS_MEM_SIZE - (uint32_t)x86bios_rom_phys)
+#define	X86BIOS_SEG_SIZE	X86BIOS_PAGE_SIZE
 
 #define	X86BIOS_PAGES		(X86BIOS_MEM_SIZE / X86BIOS_PAGE_SIZE)
 
-#define	X86BIOS_R_DS		_pad1
 #define	X86BIOS_R_SS		_pad2
+#define	X86BIOS_R_SP		_pad3.I16_reg.x_reg
 
 static struct x86emu x86bios_emu;
 
-static struct mtx x86bios_lock;
-
 static void *x86bios_ivt;
 static void *x86bios_rom;
 static void *x86bios_seg;
@@ -91,16 +291,6 @@ static uint32_t x86bios_fault_addr;
 static uint16_t x86bios_fault_cs;
 static uint16_t x86bios_fault_ip;
 
-SYSCTL_NODE(_debug, OID_AUTO, x86bios, CTLFLAG_RD, NULL, "x86bios debugging");
-static int x86bios_trace_call;
-TUNABLE_INT("debug.x86bios.call", &x86bios_trace_call);
-SYSCTL_INT(_debug_x86bios, OID_AUTO, call, CTLFLAG_RW, &x86bios_trace_call, 0,
-    "Trace far function calls");
-static int x86bios_trace_int;
-TUNABLE_INT("debug.x86bios.int", &x86bios_trace_int);
-SYSCTL_INT(_debug_x86bios, OID_AUTO, int, CTLFLAG_RW, &x86bios_trace_int, 0,
-    "Trace software interrupt handlers");
-
 static void
 x86bios_set_fault(struct x86emu *emu, uint32_t addr)
 {
@@ -115,18 +305,18 @@ x86bios_set_fault(struct x86emu *emu, ui
 static void *
 x86bios_get_pages(uint32_t offset, size_t size)
 {
-	vm_offset_t page;
+	vm_offset_t addr;
 
 	if (offset + size > X86BIOS_MEM_SIZE + X86BIOS_IVT_SIZE)
 		return (NULL);
 
 	if (offset >= X86BIOS_MEM_SIZE)
 		offset -= X86BIOS_MEM_SIZE;
-	page = x86bios_map[offset / X86BIOS_PAGE_SIZE];
-	if (page != 0)
-		return ((void *)(page + offset % X86BIOS_PAGE_SIZE));
+	addr = x86bios_map[offset / X86BIOS_PAGE_SIZE];
+	if (addr != 0)
+		addr += offset % X86BIOS_PAGE_SIZE;
 
-	return (NULL);
+	return ((void *)addr);
 }
 
 static void
@@ -393,8 +583,8 @@ x86bios_init_regs(struct x86regs *regs)
 {
 
 	bzero(regs, sizeof(*regs));
-	regs->X86BIOS_R_DS = 0x40;
-	regs->X86BIOS_R_SS = x86bios_seg_phys >> 4;
+	regs->X86BIOS_R_SS = X86BIOS_PHYSTOSEG(x86bios_seg_phys);
+	regs->X86BIOS_R_SP = X86BIOS_PAGE_SIZE - 2;
 }
 
 void
@@ -481,51 +671,6 @@ x86bios_offset(uint32_t offset)
 	return (x86bios_get_pages(offset, 1));
 }
 
-void *
-x86bios_get_orm(uint32_t offset)
-{
-	uint8_t *p;
-
-	/* Does the shadow ROM contain BIOS POST code for x86? */
-	p = x86bios_offset(offset);
-	if (p == NULL || p[0] != 0x55 || p[1] != 0xaa || p[3] != 0xe9)
-		return (NULL);
-
-	return (p);
-}
-
-int
-x86bios_match_device(uint32_t offset, device_t dev)
-{
-	uint8_t *p;
-	uint16_t device, vendor;
-	uint8_t class, progif, subclass;
-
-	/* Does the shadow ROM contain BIOS POST code for x86? */
-	p = x86bios_get_orm(offset);
-	if (p == NULL)
-		return (0);
-
-	/* Does it contain PCI data structure? */
-	p += le16toh(*(uint16_t *)(p + 0x18));
-	if (bcmp(p, "PCIR", 4) != 0 ||
-	    le16toh(*(uint16_t *)(p + 0x0a)) < 0x18 || *(p + 0x14) != 0)
-		return (0);
-
-	/* Does it match the vendor, device, and classcode? */
-	vendor = le16toh(*(uint16_t *)(p + 0x04));
-	device = le16toh(*(uint16_t *)(p + 0x06));
-	progif = *(p + 0x0d);
-	subclass = *(p + 0x0e);
-	class = *(p + 0x0f);
-	if (vendor != pci_get_vendor(dev) || device != pci_get_device(dev) ||
-	    class != pci_get_class(dev) || subclass != pci_get_subclass(dev) ||
-	    progif != pci_get_progif(dev))
-		return (0);
-
-	return (1);
-}
-
 static __inline void
 x86bios_unmap_mem(void)
 {
@@ -549,7 +694,6 @@ x86bios_map_mem(void)
 #ifdef X86BIOS_NATIVE_ARCH
 	x86bios_ivt = pmap_mapbios(X86BIOS_IVT_BASE, X86BIOS_IVT_SIZE);
 
-#ifndef PC98
 	/* Probe EBDA via BDA. */
 	x86bios_rom_phys = *(uint16_t *)((caddr_t)x86bios_ivt + 0x40e);
 	x86bios_rom_phys = x86bios_rom_phys << 4;
@@ -558,7 +702,6 @@ x86bios_map_mem(void)
 		x86bios_rom_phys =
 		    rounddown(x86bios_rom_phys, X86BIOS_PAGE_SIZE);
 	else
-#endif
 #else
 	x86bios_ivt = malloc(X86BIOS_IVT_SIZE, M_DEVBUF, M_ZERO | M_WAITOK);
 #endif
@@ -567,7 +710,7 @@ x86bios_map_mem(void)
 	x86bios_rom = pmap_mapdev(x86bios_rom_phys, X86BIOS_ROM_SIZE);
 	if (x86bios_rom == NULL)
 		goto fail;
-#if defined(X86BIOS_NATIVE_ARCH) && !defined(PC98)
+#ifdef X86BIOS_NATIVE_ARCH
 	/* Change attribute for EBDA. */
 	if (x86bios_rom_phys < X86BIOS_ROM_BASE &&
 	    pmap_change_attr((vm_offset_t)x86bios_rom,
@@ -666,6 +809,53 @@ x86bios_uninit(void)
 	return (0);
 }
 
+#endif
+
+void *
+x86bios_get_orm(uint32_t offset)
+{
+	uint8_t *p;
+
+	/* Does the shadow ROM contain BIOS POST code for x86? */
+	p = x86bios_offset(offset);
+	if (p == NULL || p[0] != 0x55 || p[1] != 0xaa || p[3] != 0xe9)
+		return (NULL);
+
+	return (p);
+}
+
+int
+x86bios_match_device(uint32_t offset, device_t dev)
+{
+	uint8_t *p;
+	uint16_t device, vendor;
+	uint8_t class, progif, subclass;
+
+	/* Does the shadow ROM contain BIOS POST code for x86? */
+	p = x86bios_get_orm(offset);
+	if (p == NULL)
+		return (0);
+
+	/* Does it contain PCI data structure? */
+	p += le16toh(*(uint16_t *)(p + 0x18));
+	if (bcmp(p, "PCIR", 4) != 0 ||
+	    le16toh(*(uint16_t *)(p + 0x0a)) < 0x18 || *(p + 0x14) != 0)
+		return (0);
+
+	/* Does it match the vendor, device, and classcode? */
+	vendor = le16toh(*(uint16_t *)(p + 0x04));
+	device = le16toh(*(uint16_t *)(p + 0x06));
+	progif = *(p + 0x0d);
+	subclass = *(p + 0x0e);
+	class = *(p + 0x0f);
+	if (vendor != pci_get_vendor(dev) || device != pci_get_device(dev) ||
+	    class != pci_get_class(dev) || subclass != pci_get_subclass(dev) ||
+	    progif != pci_get_progif(dev))
+		return (0);
+
+	return (1);
+}
+
 static int
 x86bios_modevent(module_t mod __unused, int type, void *data __unused)
 {

Modified: head/sys/compat/x86bios/x86bios.h
==============================================================================
--- head/sys/compat/x86bios/x86bios.h	Thu Aug  5 18:27:41 2010	(r210876)
+++ head/sys/compat/x86bios/x86bios.h	Thu Aug  5 18:48:30 2010	(r210877)
@@ -138,8 +138,8 @@ typedef struct x86regs	x86regs_t;
 #define	R_FS		register_fs
 #define	R_GS		register_gs
 
-#define	X86BIOS_PHYSTOSEG(x)	(((x) >> 4) & 0xffff)
-#define	X86BIOS_PHYSTOOFF(x)	((x) & 0x000f)
+#define	X86BIOS_PHYSTOSEG(x)	(((x) >> 4) & 0xff00)
+#define	X86BIOS_PHYSTOOFF(x)	((x) & 0x0fff)
 
 __BEGIN_DECLS
 void	*x86bios_alloc(uint32_t *offset, size_t size, int flags);

Modified: head/sys/i386/include/vm86.h
==============================================================================
--- head/sys/i386/include/vm86.h	Thu Aug  5 18:27:41 2010	(r210876)
+++ head/sys/i386/include/vm86.h	Thu Aug  5 18:48:30 2010	(r210877)
@@ -93,13 +93,14 @@ struct vm86frame {
 #define vmf_ds		ds.r_w.r_x
 #define vmf_es		es.r_w.r_x
 #define vmf_ss		ss.r_w.r_x
+#define vmf_bp		ebp.r_w.r_x
 #define vmf_sp		esp.r_w.r_x
 #define vmf_ip		eip.r_w.r_x
 #define vmf_flags	eflags.r_w.r_x
 #define vmf_eflags	eflags.r_ex
 };
 
-#define VM86_PMAPSIZE	3
+#define VM86_PMAPSIZE	8
 #define VMAP_MALLOC	1	/* page was malloced by us */
 
 struct vm86context {

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 18:49:06 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C58E4106566C;
	Thu,  5 Aug 2010 18:49:06 +0000 (UTC)
	(envelope-from csjp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B3FEE8FC08;
	Thu,  5 Aug 2010 18:49:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75In6jT074431;
	Thu, 5 Aug 2010 18:49:06 GMT (envelope-from csjp@svn.freebsd.org)
Received: (from csjp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75In6TC074429;
	Thu, 5 Aug 2010 18:49:06 GMT (envelope-from csjp@svn.freebsd.org)
Message-Id: <201008051849.o75In6TC074429@svn.freebsd.org>
From: "Christian S.J. Peron" 
Date: Thu, 5 Aug 2010 18:49:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210878 - head/contrib/pf/pflogd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 18:49:06 -0000

Author: csjp
Date: Thu Aug  5 18:49:06 2010
New Revision: 210878
URL: http://svn.freebsd.org/changeset/base/210878

Log:
  Enable closefrom(2) here, as we have supported it for some time now.
  
  Discussed with:	mlaier
  MFC after:	2 weeks

Modified:
  head/contrib/pf/pflogd/pflogd.c

Modified: head/contrib/pf/pflogd/pflogd.c
==============================================================================
--- head/contrib/pf/pflogd/pflogd.c	Thu Aug  5 18:48:30 2010	(r210877)
+++ head/contrib/pf/pflogd/pflogd.c	Thu Aug  5 18:49:06 2010	(r210878)
@@ -583,11 +583,7 @@ main(int argc, char **argv)
 	pcap_handler phandler = dump_packet;
 	const char *errstr = NULL;
 
-#ifdef __FreeBSD__
-	/* another ?paranoid? safety measure we do not have */
-#else
 	closefrom(STDERR_FILENO + 1);
-#endif
 
 	while ((ch = getopt(argc, argv, "Dxd:f:i:s:")) != -1) {
 		switch (ch) {

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 18:56:25 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 30531106566B;
	Thu,  5 Aug 2010 18:56:25 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1EC478FC15;
	Thu,  5 Aug 2010 18:56:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75IuPrk076057;
	Thu, 5 Aug 2010 18:56:25 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75IuPh8076054;
	Thu, 5 Aug 2010 18:56:25 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008051856.o75IuPh8076054@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 5 Aug 2010 18:56:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210879 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 18:56:25 -0000

Author: pjd
Date: Thu Aug  5 18:56:24 2010
New Revision: 210879
URL: http://svn.freebsd.org/changeset/base/210879

Log:
  - Use pjdlog_exitx() to log errors and exit instead of errx().
  - Use 'unable to' (instead of 'cannot') consistently.
  
  MFC after:	1 month

Modified:
  head/sbin/hastd/hastd.c
  head/sbin/hastd/secondary.c

Modified: head/sbin/hastd/hastd.c
==============================================================================
--- head/sbin/hastd/hastd.c	Thu Aug  5 18:49:06 2010	(r210878)
+++ head/sbin/hastd/hastd.c	Thu Aug  5 18:56:24 2010	(r210879)
@@ -490,7 +490,7 @@ main(int argc, char *argv[])
 			    (intmax_t)otherpid);
 		}
 		/* If we cannot create pidfile from other reasons, only warn. */
-		pjdlog_errno(LOG_WARNING, "Cannot open or create pidfile");
+		pjdlog_errno(LOG_WARNING, "Unable to open or create pidfile");
 	}
 
 	cfg = yy_config_parse(cfgpath);

Modified: head/sbin/hastd/secondary.c
==============================================================================
--- head/sbin/hastd/secondary.c	Thu Aug  5 18:49:06 2010	(r210878)
+++ head/sbin/hastd/secondary.c	Thu Aug  5 18:56:24 2010	(r210879)
@@ -127,14 +127,16 @@ init_environment(void)
 	for (ii = 0; ii < HAST_HIO_MAX; ii++) {
 		hio = malloc(sizeof(*hio));
 		if (hio == NULL) {
-			errx(EX_TEMPFAIL, "cannot allocate %zu bytes of memory "
-			    "for hio request", sizeof(*hio));
+			pjdlog_exitx(EX_TEMPFAIL,
+			    "Unable to allocate memory (%zu bytes) for hio request.",
+			    sizeof(*hio));
 		}
 		hio->hio_error = 0;
 		hio->hio_data = malloc(MAXPHYS);
 		if (hio->hio_data == NULL) {
-			errx(EX_TEMPFAIL, "cannot allocate %zu bytes of memory "
-			    "for gctl_data", (size_t)MAXPHYS);
+			pjdlog_exitx(EX_TEMPFAIL,
+			    "Unable to allocate memory (%zu bytes) for gctl_data.",
+			    (size_t)MAXPHYS);
 		}
 		TAILQ_INSERT_HEAD(&hio_free_list, hio, hio_next);
 	}

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 18:58:01 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 153EA106564A;
	Thu,  5 Aug 2010 18:58:01 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 03BEB8FC1C;
	Thu,  5 Aug 2010 18:58:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75Iw0Qb076460;
	Thu, 5 Aug 2010 18:58:00 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75Iw0ec076456;
	Thu, 5 Aug 2010 18:58:00 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008051858.o75Iw0ec076456@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 5 Aug 2010 18:58:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210880 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 18:58:01 -0000

Author: pjd
Date: Thu Aug  5 18:58:00 2010
New Revision: 210880
URL: http://svn.freebsd.org/changeset/base/210880

Log:
  Reset signal handlers after fork().
  
  MFC after:	1 month

Modified:
  head/sbin/hastd/primary.c
  head/sbin/hastd/secondary.c

Modified: head/sbin/hastd/primary.c
==============================================================================
--- head/sbin/hastd/primary.c	Thu Aug  5 18:56:24 2010	(r210879)
+++ head/sbin/hastd/primary.c	Thu Aug  5 18:58:00 2010	(r210880)
@@ -761,6 +761,9 @@ hastd_primary(struct hast_resource *res)
 
 	setproctitle("%s (primary)", res->hr_name);
 
+	signal(SIGHUP, SIG_DFL);
+	signal(SIGCHLD, SIG_DFL);
+
 	init_local(res);
 	if (init_remote(res, NULL, NULL))
 		sync_start();

Modified: head/sbin/hastd/secondary.c
==============================================================================
--- head/sbin/hastd/secondary.c	Thu Aug  5 18:56:24 2010	(r210879)
+++ head/sbin/hastd/secondary.c	Thu Aug  5 18:58:00 2010	(r210880)
@@ -340,6 +340,9 @@ hastd_secondary(struct hast_resource *re
 
 	setproctitle("%s (secondary)", res->hr_name);
 
+	signal(SIGHUP, SIG_DFL);
+	signal(SIGCHLD, SIG_DFL);
+
 	/* Error in setting timeout is not critical, but why should it fail? */
 	if (proto_timeout(res->hr_remotein, 0) < 0)
 		pjdlog_errno(LOG_WARNING, "Unable to set connection timeout");

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 19:01:57 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D4EC01065679;
	Thu,  5 Aug 2010 19:01:57 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C3A2C8FC18;
	Thu,  5 Aug 2010 19:01:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75J1vrb077387;
	Thu, 5 Aug 2010 19:01:57 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75J1vLT077385;
	Thu, 5 Aug 2010 19:01:57 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008051901.o75J1vLT077385@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 5 Aug 2010 19:01:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210881 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 19:01:57 -0000

Author: pjd
Date: Thu Aug  5 19:01:57 2010
New Revision: 210881
URL: http://svn.freebsd.org/changeset/base/210881

Log:
  Allow to use 'none' keywork as remote address in case second cluster node
  is not setup yet.
  
  MFC after:	1 month

Modified:
  head/sbin/hastd/primary.c

Modified: head/sbin/hastd/primary.c
==============================================================================
--- head/sbin/hastd/primary.c	Thu Aug  5 18:58:00 2010	(r210880)
+++ head/sbin/hastd/primary.c	Thu Aug  5 19:01:57 2010	(r210881)
@@ -298,6 +298,13 @@ hast_activemap_flush(struct hast_resourc
 	return (0);
 }
 
+static bool
+real_remote(const struct hast_resource *res)
+{
+
+	return (strcmp(res->hr_remoteaddr, "none") != 0);
+}
+
 static void
 init_environment(struct hast_resource *res __unused)
 {
@@ -479,6 +486,7 @@ init_remote(struct hast_resource *res, s
 	size_t size;
 
 	assert((inp == NULL && outp == NULL) || (inp != NULL && outp != NULL));
+	assert(real_remote(res));
 
 	in = out = NULL;
 
@@ -765,7 +773,7 @@ hastd_primary(struct hast_resource *res)
 	signal(SIGCHLD, SIG_DFL);
 
 	init_local(res);
-	if (init_remote(res, NULL, NULL))
+	if (real_remote(res) && init_remote(res, NULL, NULL))
 		sync_start();
 	init_ggate(res);
 	init_environment(res);
@@ -1760,7 +1768,7 @@ guard_thread(void *arg)
 				pjdlog_debug(2,
 				    "remote_guard: Connection to %s is ok.",
 				    res->hr_remoteaddr);
-			} else {
+			} else if (real_remote(res)) {
 				assert(res->hr_remotein == NULL);
 				assert(res->hr_remoteout == NULL);
 				/*
@@ -1795,6 +1803,8 @@ guard_thread(void *arg)
 					    res->hr_remoteaddr);
 					timeout = RECONNECT_SLEEP;
 				}
+			} else {
+				rw_unlock(&hio_remote_lock[ii]);
 			}
 		}
 		(void)cv_timedwait(&hio_guard_cond, &hio_guard_lock, timeout);

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 19:04:29 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 72DFE106566B;
	Thu,  5 Aug 2010 19:04:29 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 46E268FC1E;
	Thu,  5 Aug 2010 19:04:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75J4Tke077972;
	Thu, 5 Aug 2010 19:04:29 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75J4THx077969;
	Thu, 5 Aug 2010 19:04:29 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008051904.o75J4THx077969@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 5 Aug 2010 19:04:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210882 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 19:04:29 -0000

Author: pjd
Date: Thu Aug  5 19:04:29 2010
New Revision: 210882
URL: http://svn.freebsd.org/changeset/base/210882

Log:
  Make control_set_role() more public. We will need it soon.
  
  MFC after:	1 month

Modified:
  head/sbin/hastd/control.c
  head/sbin/hastd/control.h

Modified: head/sbin/hastd/control.c
==============================================================================
--- head/sbin/hastd/control.c	Thu Aug  5 19:01:57 2010	(r210881)
+++ head/sbin/hastd/control.c	Thu Aug  5 19:04:29 2010	(r210882)
@@ -51,18 +51,18 @@ __FBSDID("$FreeBSD$");
 #include "control.h"
 
 static void
-control_set_role(struct hastd_config *cfg, struct nv *nvout, uint8_t role,
-    struct hast_resource *res, const char *name, unsigned int no)
+control_set_role_common(struct hastd_config *cfg, struct nv *nvout,
+    uint8_t role, struct hast_resource *res, const char *name, unsigned int no)
 {
 
-	assert(cfg != NULL);
-	assert(nvout != NULL);
-	assert(name != NULL);
-
 	/* Name is always needed. */
-	nv_add_string(nvout, name, "resource%u", no);
+	if (name != NULL)
+		nv_add_string(nvout, name, "resource%u", no);
 
 	if (res == NULL) {
+		assert(cfg != NULL);
+		assert(name != NULL);
+
 		TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) {
 			if (strcmp(res->hr_name, name) == 0)
 				break;
@@ -115,6 +115,13 @@ control_set_role(struct hastd_config *cf
 	pjdlog_prefix_set("%s", "");
 }
 
+void
+control_set_role(struct hast_resource *res, uint8_t role)
+{
+
+	control_set_role_common(NULL, NULL, role, res, NULL, 0);
+}
+
 static void
 control_status_worker(struct hast_resource *res, struct nv *nvout,
     unsigned int no)
@@ -306,7 +313,7 @@ control_handle(struct hastd_config *cfg)
 		TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) {
 			switch (cmd) {
 			case HASTCTL_SET_ROLE:
-				control_set_role(cfg, nvout, role, res,
+				control_set_role_common(cfg, nvout, role, res,
 				    res->hr_name, ii++);
 				break;
 			case HASTCTL_STATUS:
@@ -329,8 +336,8 @@ control_handle(struct hastd_config *cfg)
 				break;
 			switch (cmd) {
 			case HASTCTL_SET_ROLE:
-				control_set_role(cfg, nvout, role, NULL, str,
-				    ii);
+				control_set_role_common(cfg, nvout, role, NULL,
+				    str, ii);
 				break;
 			case HASTCTL_STATUS:
 				control_status(cfg, nvout, NULL, str, ii);

Modified: head/sbin/hastd/control.h
==============================================================================
--- head/sbin/hastd/control.h	Thu Aug  5 19:01:57 2010	(r210881)
+++ head/sbin/hastd/control.h	Thu Aug  5 19:04:29 2010	(r210882)
@@ -36,6 +36,9 @@
 #define	HASTCTL_STATUS		2
 
 struct hastd_config;
+struct hast_resource;
+
+void control_set_role(struct hast_resource *res, uint8_t role);
 
 void control_handle(struct hastd_config *cfg);
 

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 19:08:55 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 15518106566B;
	Thu,  5 Aug 2010 19:08:55 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 02B678FC12;
	Thu,  5 Aug 2010 19:08:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75J8sPI078968;
	Thu, 5 Aug 2010 19:08:54 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75J8sFW078964;
	Thu, 5 Aug 2010 19:08:54 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008051908.o75J8sFW078964@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 5 Aug 2010 19:08:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210883 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 19:08:55 -0000

Author: pjd
Date: Thu Aug  5 19:08:54 2010
New Revision: 210883
URL: http://svn.freebsd.org/changeset/base/210883

Log:
  Prepare configuration parsing code to be called multiple times:
  - Don't exit on errors if not requested.
  - Don't keep configuration in global variable, but allocate memory for
    configuration.
  - Call yyrestart() before yyparse() so that on error in configuration file
    we will start from the begining next time and not from the place we left of.
  
  MFC after:	1 month

Modified:
  head/sbin/hastd/hast.h
  head/sbin/hastd/hastd.c
  head/sbin/hastd/parse.y

Modified: head/sbin/hastd/hast.h
==============================================================================
--- head/sbin/hastd/hast.h	Thu Aug  5 19:04:29 2010	(r210882)
+++ head/sbin/hastd/hast.h	Thu Aug  5 19:08:54 2010	(r210883)
@@ -183,7 +183,7 @@ struct hast_resource {
 	TAILQ_ENTRY(hast_resource) hr_next;
 };
 
-struct hastd_config *yy_config_parse(const char *config);
+struct hastd_config *yy_config_parse(const char *config, bool exitonerror);
 void yy_config_free(struct hastd_config *config);
 
 void yyerror(const char *);

Modified: head/sbin/hastd/hastd.c
==============================================================================
--- head/sbin/hastd/hastd.c	Thu Aug  5 19:04:29 2010	(r210882)
+++ head/sbin/hastd/hastd.c	Thu Aug  5 19:08:54 2010	(r210883)
@@ -493,7 +493,7 @@ main(int argc, char *argv[])
 		pjdlog_errno(LOG_WARNING, "Unable to open or create pidfile");
 	}
 
-	cfg = yy_config_parse(cfgpath);
+	cfg = yy_config_parse(cfgpath, true);
 	assert(cfg != NULL);
 
 	signal(SIGHUP, sighandler);

Modified: head/sbin/hastd/parse.y
==============================================================================
--- head/sbin/hastd/parse.y	Thu Aug  5 19:04:29 2010	(r210882)
+++ head/sbin/hastd/parse.y	Thu Aug  5 19:08:54 2010	(r210883)
@@ -43,6 +43,8 @@
 #include 
 #include 
 
+#include 
+
 #include "hast.h"
 
 extern int depth;
@@ -51,7 +53,7 @@ extern int lineno;
 extern FILE *yyin;
 extern char *yytext;
 
-static struct hastd_config lconfig;
+static struct hastd_config *lconfig;
 static struct hast_resource *curres;
 static bool mynode;
 
@@ -63,7 +65,9 @@ static int depth0_timeout;
 static char depth1_provname[PATH_MAX];
 static char depth1_localpath[PATH_MAX];
 
-static bool
+extern void yyrestart(FILE *);
+
+static int
 isitme(const char *name)
 {
 	char buf[MAXHOSTNAMELEN];
@@ -73,78 +77,101 @@ isitme(const char *name)
 	/*
 	 * First check if the give name matches our full hostname.
 	 */
-	if (gethostname(buf, sizeof(buf)) < 0)
-		err(EX_OSERR, "gethostname() failed");
+	if (gethostname(buf, sizeof(buf)) < 0) {
+		pjdlog_errno(LOG_ERR, "gethostname() failed");
+		return (-1);
+	}
 	if (strcmp(buf, name) == 0)
-		return (true);
+		return (1);
 
 	/*
 	 * Now check if it matches first part of the host name.
 	 */
 	pos = strchr(buf, '.');
 	if (pos != NULL && pos != buf && strncmp(buf, name, pos - buf) == 0)
-		return (true);
+		return (1);
 
 	/*
 	 * At the end check if name is equal to our host's UUID.
 	 */
 	bufsize = sizeof(buf);
-	if (sysctlbyname("kern.hostuuid", buf, &bufsize, NULL, 0) < 0)
-		err(EX_OSERR, "sysctlbyname(kern.hostuuid) failed");
+	if (sysctlbyname("kern.hostuuid", buf, &bufsize, NULL, 0) < 0) {
+		pjdlog_errno(LOG_ERR, "sysctlbyname(kern.hostuuid) failed");
+		return (-1);
+	}
 	if (strcasecmp(buf, name) == 0)
-		return (true);
+		return (1);
 
 	/*
 	 * Looks like this isn't about us.
 	 */
-	return (false);
+	return (0);
 }
 
 void
 yyerror(const char *str)
 {
 
-	fprintf(stderr, "error at line %d near '%s': %s\n",
+	pjdlog_error("Unable to parse configuration file at line %d near '%s': %s",
 	    lineno, yytext, str);
 }
 
 struct hastd_config *
-yy_config_parse(const char *config)
+yy_config_parse(const char *config, bool exitonerror)
 {
 	int ret;
 
 	curres = NULL;
 	mynode = false;
+	depth = 0;
+	lineno = 0;
 
 	depth0_timeout = HAST_TIMEOUT;
 	depth0_replication = HAST_REPLICATION_MEMSYNC;
 	strlcpy(depth0_control, HAST_CONTROL, sizeof(depth0_control));
 	strlcpy(depth0_listen, HASTD_LISTEN, sizeof(depth0_listen));
 
-	TAILQ_INIT(&lconfig.hc_resources);
+	lconfig = calloc(1, sizeof(*lconfig));
+	if (lconfig == NULL) {
+		pjdlog_error("Unable to allocate memory for configuration.");
+		if (exitonerror)
+			exit(EX_TEMPFAIL);
+		return (NULL);
+	}
+
+	TAILQ_INIT(&lconfig->hc_resources);
 
 	yyin = fopen(config, "r");
-	if (yyin == NULL)
-		err(EX_OSFILE, "cannot open configuration file %s", config);
+	if (yyin == NULL) {
+		pjdlog_errno(LOG_ERR, "Unable to open configuration file %s",
+		    config);
+		yy_config_free(lconfig);
+		if (exitonerror)
+			exit(EX_OSFILE);
+		return (NULL);
+	}
+	yyrestart(yyin);
 	ret = yyparse();
 	fclose(yyin);
 	if (ret != 0) {
-		yy_config_free(&lconfig);
-		exit(EX_CONFIG);
+		yy_config_free(lconfig);
+		if (exitonerror)
+			exit(EX_CONFIG);
+		return (NULL);
 	}
 
 	/*
 	 * Let's see if everything is set up.
 	 */
-	if (lconfig.hc_controladdr[0] == '\0') {
-		strlcpy(lconfig.hc_controladdr, depth0_control,
-		    sizeof(lconfig.hc_controladdr));
-	}
-	if (lconfig.hc_listenaddr[0] == '\0') {
-		strlcpy(lconfig.hc_listenaddr, depth0_listen,
-		    sizeof(lconfig.hc_listenaddr));
+	if (lconfig->hc_controladdr[0] == '\0') {
+		strlcpy(lconfig->hc_controladdr, depth0_control,
+		    sizeof(lconfig->hc_controladdr));
+	}
+	if (lconfig->hc_listenaddr[0] == '\0') {
+		strlcpy(lconfig->hc_listenaddr, depth0_listen,
+		    sizeof(lconfig->hc_listenaddr));
 	}
-	TAILQ_FOREACH(curres, &lconfig.hc_resources, hr_next) {
+	TAILQ_FOREACH(curres, &lconfig->hc_resources, hr_next) {
 		assert(curres->hr_provname[0] != '\0');
 		assert(curres->hr_localpath[0] != '\0');
 		assert(curres->hr_remoteaddr[0] != '\0');
@@ -165,7 +192,7 @@ yy_config_parse(const char *config)
 		}
 	}
 
-	return (&lconfig);
+	return (lconfig);
 }
 
 void
@@ -177,6 +204,7 @@ yy_config_free(struct hastd_config *conf
 		TAILQ_REMOVE(&config->hc_resources, res, hr_next);
 		free(res);
 	}
+	free(config);
 }
 %}
 
@@ -223,16 +251,17 @@ control_statement:	CONTROL STR
 			if (strlcpy(depth0_control, $2,
 			    sizeof(depth0_control)) >=
 			    sizeof(depth0_control)) {
-				errx(EX_CONFIG, "control argument too long");
+				pjdlog_error("control argument is too long.");
+				return (1);
 			}
 			break;
 		case 1:
 			if (mynode) {
-				if (strlcpy(lconfig.hc_controladdr, $2,
-				    sizeof(lconfig.hc_controladdr)) >=
-				    sizeof(lconfig.hc_controladdr)) {
-					errx(EX_CONFIG,
-					    "control argument too long");
+				if (strlcpy(lconfig->hc_controladdr, $2,
+				    sizeof(lconfig->hc_controladdr)) >=
+				    sizeof(lconfig->hc_controladdr)) {
+					pjdlog_error("control argument is too long.");
+					return (1);
 				}
 			}
 			break;
@@ -249,16 +278,17 @@ listen_statement:	LISTEN STR
 			if (strlcpy(depth0_listen, $2,
 			    sizeof(depth0_listen)) >=
 			    sizeof(depth0_listen)) {
-				errx(EX_CONFIG, "listen argument too long");
+				pjdlog_error("listen argument is too long.");
+				return (1);
 			}
 			break;
 		case 1:
 			if (mynode) {
-				if (strlcpy(lconfig.hc_listenaddr, $2,
-				    sizeof(lconfig.hc_listenaddr)) >=
-				    sizeof(lconfig.hc_listenaddr)) {
-					errx(EX_CONFIG,
-					    "listen argument too long");
+				if (strlcpy(lconfig->hc_listenaddr, $2,
+				    sizeof(lconfig->hc_listenaddr)) >=
+				    sizeof(lconfig->hc_listenaddr)) {
+					pjdlog_error("listen argument is too long.");
+					return (1);
 				}
 			}
 			break;
@@ -316,8 +346,17 @@ node_statement:		ON node_start OB node_e
 
 node_start:	STR
 	{
-		if (isitme($1))
+		switch (isitme($1)) {
+		case -1:
+			return (1);
+		case 0:
+			break;
+		case 1:
 			mynode = true;
+			break;
+		default:
+			assert(!"invalid isitme() return value");
+		}
 	}
 	;
 
@@ -372,22 +411,22 @@ resource_statement:	RESOURCE resource_st
 			 * Remote address has to be configured at this point.
 			 */
 			if (curres->hr_remoteaddr[0] == '\0') {
-				errx(EX_CONFIG,
-				    "remote address not configured for resource %s",
+				pjdlog_error("Remote address not configured for resource %s.",
 				    curres->hr_name);
+				return (1);
 			}
 			/*
 			 * Path to local provider has to be configured at this
 			 * point.
 			 */
 			if (curres->hr_localpath[0] == '\0') {
-				errx(EX_CONFIG,
-				    "path local component not configured for resource %s",
+				pjdlog_error("Path to local component not configured for resource %s.",
 				    curres->hr_name);
+				return (1);
 			}
 
 			/* Put it onto resource list. */
-			TAILQ_INSERT_TAIL(&lconfig.hc_resources, curres, hr_next);
+			TAILQ_INSERT_TAIL(&lconfig->hc_resources, curres, hr_next);
 			curres = NULL;
 		}
 	}
@@ -404,14 +443,14 @@ resource_start:	STR
 
 		curres = calloc(1, sizeof(*curres));
 		if (curres == NULL) {
-			errx(EX_TEMPFAIL,
-			    "cannot allocate memory for resource");
+			pjdlog_error("Unable to allocate memory for resource.");
+			return (1);
 		}
 		if (strlcpy(curres->hr_name, $1,
 		    sizeof(curres->hr_name)) >=
 		    sizeof(curres->hr_name)) {
-			errx(EX_CONFIG,
-			    "resource name (%s) too long", $1);
+			pjdlog_error("Resource name is too long.");
+			return (1);
 		}
 		curres->hr_role = HAST_ROLE_INIT;
 		curres->hr_previous_role = HAST_ROLE_INIT;
@@ -449,7 +488,8 @@ name_statement:		NAME STR
 			if (strlcpy(depth1_provname, $2,
 			    sizeof(depth1_provname)) >=
 			    sizeof(depth1_provname)) {
-				errx(EX_CONFIG, "name argument too long");
+				pjdlog_error("name argument is too long.");
+				return (1);
 			}
 			break;
 		case 2:
@@ -458,8 +498,8 @@ name_statement:		NAME STR
 				if (strlcpy(curres->hr_provname, $2,
 				    sizeof(curres->hr_provname)) >=
 				    sizeof(curres->hr_provname)) {
-					errx(EX_CONFIG,
-					    "name argument too long");
+					pjdlog_error("name argument is too long.");
+					return (1);
 				}
 			}
 			break;
@@ -476,7 +516,8 @@ local_statement:	LOCAL STR
 			if (strlcpy(depth1_localpath, $2,
 			    sizeof(depth1_localpath)) >=
 			    sizeof(depth1_localpath)) {
-				errx(EX_CONFIG, "local argument too long");
+				pjdlog_error("local argument is too long.");
+				return (1);
 			}
 			break;
 		case 2:
@@ -485,8 +526,8 @@ local_statement:	LOCAL STR
 				if (strlcpy(curres->hr_localpath, $2,
 				    sizeof(curres->hr_localpath)) >=
 				    sizeof(curres->hr_localpath)) {
-					errx(EX_CONFIG,
-					    "local argument too long");
+					pjdlog_error("local argument is too long.");
+					return (1);
 				}
 			}
 			break;
@@ -504,8 +545,19 @@ resource_node_statement:ON resource_node
 
 resource_node_start:	STR
 	{
-		if (curres != NULL && isitme($1))
-			mynode = true;
+		if (curres != NULL) {
+			switch (isitme($1)) {
+			case -1:
+				return (1);
+			case 0:
+				break;
+			case 1:
+				mynode = true;
+				break;
+			default:
+				assert(!"invalid isitme() return value");
+			}
+		}
 	}
 	;
 
@@ -530,7 +582,8 @@ remote_statement:	REMOTE STR
 			if (strlcpy(curres->hr_remoteaddr, $2,
 			    sizeof(curres->hr_remoteaddr)) >=
 			    sizeof(curres->hr_remoteaddr)) {
-				errx(EX_CONFIG, "remote argument too long");
+				pjdlog_error("remote argument is too long.");
+				return (1);
 			}
 		}
 	}

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 19:11:14 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 12CB71065672;
	Thu,  5 Aug 2010 19:11: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 0068F8FC0A;
	Thu,  5 Aug 2010 19:11:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75JBDkP079545;
	Thu, 5 Aug 2010 19:11:13 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75JBDMa079543;
	Thu, 5 Aug 2010 19:11:13 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008051911.o75JBDMa079543@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 19:11: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: r210884 - stable/8/sys/fs/nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 19:11:14 -0000

Author: jhb
Date: Thu Aug  5 19:11:13 2010
New Revision: 210884
URL: http://svn.freebsd.org/changeset/base/210884

Log:
  MFC 210135:
  Move attribute cache flushes from VOP_OPEN() to VOP_LOOKUP() to provide
  more graceful recovery for stale filehandles and eliminate the need for
  conditionally clearing the attribute cache in the !NMODIFIED case in
  VOP_OPEN().

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/cam/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clvnops.c	Thu Aug  5 19:08:54 2010	(r210883)
+++ stable/8/sys/fs/nfsclient/nfs_clvnops.c	Thu Aug  5 19:11:13 2010	(r210884)
@@ -516,9 +516,11 @@ nfs_open(struct vop_open_args *ap)
 					(void) nfsrpc_close(vp, 0, ap->a_td);
 				return (error);
 			}
+			mtx_lock(&np->n_mtx);
 			np->n_attrstamp = 0;
 			if (vp->v_type == VDIR)
 				np->n_direofoffset = 0;
+			mtx_unlock(&np->n_mtx);
 			error = VOP_GETATTR(vp, &vattr, ap->a_cred);
 			if (error) {
 				if (NFS_ISV4(vp))
@@ -531,14 +533,6 @@ nfs_open(struct vop_open_args *ap)
 				np->n_change = vattr.va_filerev;
 			mtx_unlock(&np->n_mtx);
 		} else {
-			struct thread *td = curthread;
-	
-			if (np->n_ac_ts_syscalls != td->td_syscalls ||
-			    np->n_ac_ts_tid != td->td_tid || 
-			    td->td_proc == NULL ||
-			    np->n_ac_ts_pid != td->td_proc->p_pid) {
-				np->n_attrstamp = 0;
-			}
 			mtx_unlock(&np->n_mtx);						
 			error = VOP_GETATTR(vp, &vattr, ap->a_cred);
 			if (error) {
@@ -998,7 +992,7 @@ nfs_lookup(struct vop_lookup_args *ap)
 	int flags = cnp->cn_flags;
 	struct vnode *newvp;
 	struct nfsmount *nmp;
-	struct nfsnode *np;
+	struct nfsnode *np, *newnp;
 	int error = 0, attrflag, dattrflag, ltype;
 	struct thread *td = cnp->cn_thread;
 	struct nfsfh *nfhp;
@@ -1034,11 +1028,27 @@ nfs_lookup(struct vop_lookup_args *ap)
 		 * change time of the file matches our cached copy.
 		 * Otherwise, we discard the cache entry and fallback
 		 * to doing a lookup RPC.
+		 *
+		 * To better handle stale file handles and attributes,
+		 * clear the attribute cache of this node if it is a
+		 * leaf component, part of an open() call, and not
+		 * locally modified before fetching the attributes.
+		 * This should allow stale file handles to be detected
+		 * here where we can fall back to a LOOKUP RPC to
+		 * recover rather than having nfs_open() detect the
+		 * stale file handle and failing open(2) with ESTALE.
 		 */
 		newvp = *vpp;
+		newnp = VTONFS(newvp);
+		if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) &&
+		    !(newnp->n_flag & NMODIFIED)) {
+			mtx_lock(&newnp->n_mtx);
+			newnp->n_attrstamp = 0;
+			mtx_unlock(&newnp->n_mtx);
+		}
 		if (nfscl_nodeleg(newvp, 0) == 0 ||
-		    (!VOP_GETATTR(newvp, &vattr, cnp->cn_cred)
-		    && vattr.va_ctime.tv_sec == VTONFS(newvp)->n_ctime)) {
+		    (VOP_GETATTR(newvp, &vattr, cnp->cn_cred) == 0 &&
+		    vattr.va_ctime.tv_sec == newnp->n_ctime)) {
 			NFSINCRGLOBAL(newnfsstats.lookupcache_hits);
 			if (cnp->cn_nameiop != LOOKUP &&
 			    (flags & ISLASTCN))
@@ -1224,6 +1234,18 @@ nfs_lookup(struct vop_lookup_args *ap)
 		if (attrflag)
 			(void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL,
 			    0, 1);
+		else if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) &&
+		    !(np->n_flag & NMODIFIED)) {			
+			/*
+			 * Flush the attribute cache when opening a
+			 * leaf node to ensure that fresh attributes
+			 * are fetched in nfs_open() since we did not
+			 * fetch attributes from the LOOKUP reply.
+			 */
+			mtx_lock(&np->n_mtx);
+			np->n_attrstamp = 0;
+			mtx_unlock(&np->n_mtx);
+		}
 	}
 	if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN))
 		cnp->cn_flags |= SAVENAME;

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 19:12:36 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 48D8F1065673;
	Thu,  5 Aug 2010 19:12:36 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 376678FC1D;
	Thu,  5 Aug 2010 19:12:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75JCajg079892;
	Thu, 5 Aug 2010 19:12:36 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75JCaoO079890;
	Thu, 5 Aug 2010 19:12:36 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008051912.o75JCaoO079890@svn.freebsd.org>
From: Jung-uk Kim 
Date: Thu, 5 Aug 2010 19:12:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210885 - head/sys/compat/x86bios
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 19:12:36 -0000

Author: jkim
Date: Thu Aug  5 19:12:35 2010
New Revision: 210885
URL: http://svn.freebsd.org/changeset/base/210885

Log:
  Do not copy stack pointer and flags.  These registers are unconditionally
  destroyed from vm86_prepcall().

Modified:
  head/sys/compat/x86bios/x86bios.c

Modified: head/sys/compat/x86bios/x86bios.c
==============================================================================
--- head/sys/compat/x86bios/x86bios.c	Thu Aug  5 19:11:13 2010	(r210884)
+++ head/sys/compat/x86bios/x86bios.c	Thu Aug  5 19:12:35 2010	(r210885)
@@ -84,13 +84,10 @@ x86bios_emu2vmf(struct x86emu_regs *regs
 
 	vmf->vmf_ds = regs->R_DS;
 	vmf->vmf_es = regs->R_ES;
-	vmf->vmf_ss = regs->R_SS;
-	vmf->vmf_flags = regs->R_FLG;
 	vmf->vmf_ax = regs->R_AX;
 	vmf->vmf_bx = regs->R_BX;
 	vmf->vmf_cx = regs->R_CX;
 	vmf->vmf_dx = regs->R_DX;
-	vmf->vmf_sp = regs->R_SP;
 	vmf->vmf_bp = regs->R_BP;
 	vmf->vmf_si = regs->R_SI;
 	vmf->vmf_di = regs->R_DI;
@@ -102,13 +99,10 @@ x86bios_vmf2emu(struct vm86frame *vmf, s
 
 	regs->R_DS = vmf->vmf_ds;
 	regs->R_ES = vmf->vmf_es;
-	regs->R_SS = vmf->vmf_ss;
-	regs->R_FLG = vmf->vmf_flags;
 	regs->R_AX = vmf->vmf_ax;
 	regs->R_BX = vmf->vmf_bx;
 	regs->R_CX = vmf->vmf_cx;
 	regs->R_DX = vmf->vmf_dx;
-	regs->R_SP = vmf->vmf_sp;
 	regs->R_BP = vmf->vmf_bp;
 	regs->R_SI = vmf->vmf_si;
 	regs->R_DI = vmf->vmf_di;

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 19:16:31 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 652941065676;
	Thu,  5 Aug 2010 19:16:31 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 528DE8FC0A;
	Thu,  5 Aug 2010 19:16:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75JGV1d080820;
	Thu, 5 Aug 2010 19:16:31 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75JGV6J080816;
	Thu, 5 Aug 2010 19:16:31 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008051916.o75JGV6J080816@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 5 Aug 2010 19:16:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210886 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 19:16:31 -0000

Author: pjd
Date: Thu Aug  5 19:16:31 2010
New Revision: 210886
URL: http://svn.freebsd.org/changeset/base/210886

Log:
  Implement configuration reload on SIGHUP. This includes:
  - Load added resources.
  - Stop and forget removed resources.
  - Update modified resources in least intrusive way, ie. don't touch
    /dev/hast/ unless path to local component or provider name were
    modified.
  
  Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com
  MFC after:	1 month

Modified:
  head/sbin/hastd/hastd.c
  head/sbin/hastd/hastd.h
  head/sbin/hastd/primary.c

Modified: head/sbin/hastd/hastd.c
==============================================================================
--- head/sbin/hastd/hastd.c	Thu Aug  5 19:12:35 2010	(r210885)
+++ head/sbin/hastd/hastd.c	Thu Aug  5 19:16:31 2010	(r210886)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2009-2010 The FreeBSD Foundation
+ * Copyright (c) 2010 Pawel Jakub Dawidek 
  * All rights reserved.
  *
  * This software was developed by Pawel Jakub Dawidek under sponsorship from
@@ -57,13 +58,13 @@ __FBSDID("$FreeBSD$");
 #include "subr.h"
 
 /* Path to configuration file. */
-static const char *cfgpath = HAST_CONFIG;
+const char *cfgpath = HAST_CONFIG;
 /* Hastd configuration. */
 static struct hastd_config *cfg;
 /* Was SIGCHLD signal received? */
 static bool sigchld_received = false;
 /* Was SIGHUP signal received? */
-static bool sighup_received = false;
+bool sighup_received = false;
 /* Was SIGINT or SIGTERM signal received? */
 bool sigexit_received = false;
 /* PID file handle. */
@@ -169,12 +170,203 @@ child_exit(void)
 	}
 }
 
+static bool
+resource_needs_restart(const struct hast_resource *res0,
+    const struct hast_resource *res1)
+{
+
+	assert(strcmp(res0->hr_name, res1->hr_name) == 0);
+
+	if (strcmp(res0->hr_provname, res1->hr_provname) != 0)
+		return (true);
+	if (strcmp(res0->hr_localpath, res1->hr_localpath) != 0)
+		return (true);
+	if (res0->hr_role == HAST_ROLE_INIT ||
+	    res0->hr_role == HAST_ROLE_SECONDARY) {
+		if (strcmp(res0->hr_remoteaddr, res1->hr_remoteaddr) != 0)
+			return (true);
+		if (res0->hr_replication != res1->hr_replication)
+			return (true);
+		if (res0->hr_timeout != res1->hr_timeout)
+			return (true);
+	}
+	return (false);
+}
+
+static bool
+resource_needs_reload(const struct hast_resource *res0,
+    const struct hast_resource *res1)
+{
+
+	assert(strcmp(res0->hr_name, res1->hr_name) == 0);
+	assert(strcmp(res0->hr_provname, res1->hr_provname) == 0);
+	assert(strcmp(res0->hr_localpath, res1->hr_localpath) == 0);
+
+	if (res0->hr_role != HAST_ROLE_PRIMARY)
+		return (false);
+
+	if (strcmp(res0->hr_remoteaddr, res1->hr_remoteaddr) != 0)
+		return (true);
+	if (res0->hr_replication != res1->hr_replication)
+		return (true);
+	if (res0->hr_timeout != res1->hr_timeout)
+		return (true);
+	return (false);
+}
+
 static void
 hastd_reload(void)
 {
+	struct hastd_config *newcfg;
+	struct hast_resource *nres, *cres, *tres;
+	uint8_t role;
+
+	pjdlog_info("Reloading configuration...");
+
+	newcfg = yy_config_parse(cfgpath, false);
+	if (newcfg == NULL)
+		goto failed;
+
+	/*
+	 * Check if control address has changed.
+	 */
+	if (strcmp(cfg->hc_controladdr, newcfg->hc_controladdr) != 0) {
+		if (proto_server(newcfg->hc_controladdr,
+		    &newcfg->hc_controlconn) < 0) {
+			pjdlog_errno(LOG_ERR,
+			    "Unable to listen on control address %s",
+			    newcfg->hc_controladdr);
+			goto failed;
+		}
+	}
+	/*
+	 * Check if listen address has changed.
+	 */
+	if (strcmp(cfg->hc_listenaddr, newcfg->hc_listenaddr) != 0) {
+		if (proto_server(newcfg->hc_listenaddr,
+		    &newcfg->hc_listenconn) < 0) {
+			pjdlog_errno(LOG_ERR, "Unable to listen on address %s",
+			    newcfg->hc_listenaddr);
+			goto failed;
+		}
+	}
+	/*
+	 * Only when both control and listen sockets are successfully
+	 * initialized switch them to new configuration.
+	 */
+	if (newcfg->hc_controlconn != NULL) {
+		pjdlog_info("Control socket changed from %s to %s.",
+		    cfg->hc_controladdr, newcfg->hc_controladdr);
+		proto_close(cfg->hc_controlconn);
+		cfg->hc_controlconn = newcfg->hc_controlconn;
+		newcfg->hc_controlconn = NULL;
+		strlcpy(cfg->hc_controladdr, newcfg->hc_controladdr,
+		    sizeof(cfg->hc_controladdr));
+	}
+	if (newcfg->hc_listenconn != NULL) {
+		pjdlog_info("Listen socket changed from %s to %s.",
+		    cfg->hc_listenaddr, newcfg->hc_listenaddr);
+		proto_close(cfg->hc_listenconn);
+		cfg->hc_listenconn = newcfg->hc_listenconn;
+		newcfg->hc_listenconn = NULL;
+		strlcpy(cfg->hc_listenaddr, newcfg->hc_listenaddr,
+		    sizeof(cfg->hc_listenaddr));
+	}
+
+	/*
+	 * Stop and remove resources that were removed from the configuration.
+	 */
+	TAILQ_FOREACH_SAFE(cres, &cfg->hc_resources, hr_next, tres) {
+		TAILQ_FOREACH(nres, &newcfg->hc_resources, hr_next) {
+			if (strcmp(cres->hr_name, nres->hr_name) == 0)
+				break;
+		}
+		if (nres == NULL) {
+			control_set_role(cres, HAST_ROLE_INIT);
+			TAILQ_REMOVE(&cfg->hc_resources, cres, hr_next);
+			pjdlog_info("Resource %s removed.", cres->hr_name);
+			free(cres);
+		}
+	}
+	/*
+	 * Move new resources to the current configuration.
+	 */
+	TAILQ_FOREACH_SAFE(nres, &newcfg->hc_resources, hr_next, tres) {
+		TAILQ_FOREACH(cres, &cfg->hc_resources, hr_next) {
+			if (strcmp(cres->hr_name, nres->hr_name) == 0)
+				break;
+		}
+		if (cres == NULL) {
+			TAILQ_REMOVE(&newcfg->hc_resources, nres, hr_next);
+			TAILQ_INSERT_TAIL(&cfg->hc_resources, nres, hr_next);
+			pjdlog_info("Resource %s added.", nres->hr_name);
+		}
+	}
+	/*
+	 * Deal with modified resources.
+	 * Depending on what has changed exactly we might want to perform
+	 * different actions.
+	 *
+	 * We do full resource restart in the following situations:
+	 * Resource role is INIT or SECONDARY.
+	 * Resource role is PRIMARY and path to local component or provider
+	 * name has changed.
+	 * In case of PRIMARY, the worker process will be killed and restarted,
+	 * which also means removing /dev/hast/ provider and
+	 * recreating it.
+	 *
+	 * We do just reload (send SIGHUP to worker process) if we act as
+	 * PRIMARY, but only remote address, replication mode and timeout
+	 * has changed. For those, there is no need to restart worker process.
+	 * If PRIMARY receives SIGHUP, it will reconnect if remote address or
+	 * replication mode has changed or simply set new timeout if only
+	 * timeout has changed.
+	 */
+	TAILQ_FOREACH_SAFE(nres, &newcfg->hc_resources, hr_next, tres) {
+		TAILQ_FOREACH(cres, &cfg->hc_resources, hr_next) {
+			if (strcmp(cres->hr_name, nres->hr_name) == 0)
+				break;
+		}
+		assert(cres != NULL);
+		if (resource_needs_restart(cres, nres)) {
+			pjdlog_info("Resource %s configuration was modified, restarting it.",
+			    cres->hr_name);
+			role = cres->hr_role;
+			control_set_role(cres, HAST_ROLE_INIT);
+			TAILQ_REMOVE(&cfg->hc_resources, cres, hr_next);
+			free(cres);
+			TAILQ_REMOVE(&newcfg->hc_resources, nres, hr_next);
+			TAILQ_INSERT_TAIL(&cfg->hc_resources, nres, hr_next);
+			control_set_role(nres, role);
+		} else if (resource_needs_reload(cres, nres)) {
+			pjdlog_info("Resource %s configuration was modified, reloading it.",
+			    cres->hr_name);
+			strlcpy(cres->hr_remoteaddr, nres->hr_remoteaddr,
+			    sizeof(cres->hr_remoteaddr));
+			cres->hr_replication = nres->hr_replication;
+			cres->hr_timeout = nres->hr_timeout;
+			if (cres->hr_workerpid != 0) {
+				if (kill(cres->hr_workerpid, SIGHUP) < 0) {
+					pjdlog_errno(LOG_WARNING,
+					    "Unable to send SIGHUP to worker process %u",
+					    (unsigned int)cres->hr_workerpid);
+				}
+			}
+		}
+	}
 
-	/* TODO */
-	pjdlog_warning("Configuration reload is not implemented.");
+	yy_config_free(newcfg);
+	pjdlog_info("Configuration reloaded successfully.");
+	return;
+failed:
+	if (newcfg != NULL) {
+		if (newcfg->hc_controlconn != NULL)
+			proto_close(newcfg->hc_controlconn);
+		if (newcfg->hc_listenconn != NULL)
+			proto_close(newcfg->hc_listenconn);
+		yy_config_free(newcfg);
+	}
+	pjdlog_warning("Configuration not reloaded.");
 }
 
 static void
@@ -402,10 +594,6 @@ main_loop(void)
 	fd_set rfds, wfds;
 	int cfd, lfd, maxfd, ret;
 
-	cfd = proto_descriptor(cfg->hc_controlconn);
-	lfd = proto_descriptor(cfg->hc_listenconn);
-	maxfd = cfd > lfd ? cfd : lfd;
-
 	for (;;) {
 		if (sigchld_received) {
 			sigchld_received = false;
@@ -416,6 +604,10 @@ main_loop(void)
 			hastd_reload();
 		}
 
+		cfd = proto_descriptor(cfg->hc_controlconn);
+		lfd = proto_descriptor(cfg->hc_listenconn);
+		maxfd = cfd > lfd ? cfd : lfd;
+
 		/* Setup descriptors for select(2). */
 		FD_ZERO(&rfds);
 		FD_SET(cfd, &rfds);

Modified: head/sbin/hastd/hastd.h
==============================================================================
--- head/sbin/hastd/hastd.h	Thu Aug  5 19:12:35 2010	(r210885)
+++ head/sbin/hastd/hastd.h	Thu Aug  5 19:16:31 2010	(r210886)
@@ -39,7 +39,8 @@
 
 #include "hast.h"
 
-extern bool sigexit_received;
+extern const char *cfgpath;
+extern bool sigexit_received, sighup_received;
 extern struct pidfh *pfh;
 
 void hastd_primary(struct hast_resource *res);

Modified: head/sbin/hastd/primary.c
==============================================================================
--- head/sbin/hastd/primary.c	Thu Aug  5 19:12:35 2010	(r210885)
+++ head/sbin/hastd/primary.c	Thu Aug  5 19:16:31 2010	(r210886)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2009 The FreeBSD Foundation
+ * Copyright (c) 2010 Pawel Jakub Dawidek 
  * All rights reserved.
  *
  * This software was developed by Pawel Jakub Dawidek under sponsorship from
@@ -65,6 +66,9 @@ __FBSDID("$FreeBSD$");
 #include "subr.h"
 #include "synch.h"
 
+/* The is only one remote component for now. */
+#define	ISREMOTE(no)	((no) == 1)
+
 struct hio {
 	/*
 	 * Number of components we are still waiting for.
@@ -424,6 +428,7 @@ init_environment(struct hast_resource *r
 	 */
 	signal(SIGINT, sighandler);
 	signal(SIGTERM, sighandler);
+	signal(SIGHUP, sighandler);
 }
 
 static void
@@ -1713,6 +1718,9 @@ sighandler(int sig)
 	case SIGTERM:
 		sigexit_received = true;
 		break;
+	case SIGHUP:
+		sighup_received = true;
+		break;
 	default:
 		assert(!"invalid condition");
 	}
@@ -1726,6 +1734,114 @@ sighandler(int sig)
 		mtx_unlock(&hio_guard_lock);
 }
 
+static void
+config_reload(void)
+{
+	struct hastd_config *newcfg;
+	struct hast_resource *res;
+	unsigned int ii, ncomps;
+	int modified;
+
+	pjdlog_info("Reloading configuration...");
+
+	ncomps = HAST_NCOMPONENTS;
+
+	newcfg = yy_config_parse(cfgpath, false);
+	if (newcfg == NULL)
+		goto failed;
+
+	TAILQ_FOREACH(res, &newcfg->hc_resources, hr_next) {
+		if (strcmp(res->hr_name, gres->hr_name) == 0)
+			break;
+	}
+	/*
+	 * If resource was removed from the configuration file, resource
+	 * name, provider name or path to local component was modified we
+	 * shouldn't be here. This means that someone modified configuration
+	 * file and send SIGHUP to us instead of main hastd process.
+	 * Log advice and ignore the signal.
+	 */
+	if (res == NULL || strcmp(gres->hr_name, res->hr_name) != 0 ||
+	    strcmp(gres->hr_provname, res->hr_provname) != 0 ||
+	    strcmp(gres->hr_localpath, res->hr_localpath) != 0) {
+		pjdlog_warning("To reload configuration send SIGHUP to the main hastd process (pid %u).",
+		    (unsigned int)getppid());
+		goto failed;
+	}
+
+#define MODIFIED_REMOTEADDR	0x1
+#define MODIFIED_REPLICATION	0x2
+#define MODIFIED_TIMEOUT	0x4
+	modified = 0;
+	if (strcmp(gres->hr_remoteaddr, res->hr_remoteaddr) != 0) {
+		/*
+		 * Don't copy res->hr_remoteaddr to gres just yet.
+		 * We want remote_close() to log disconnect from the old
+		 * addresses, not from the new ones.
+		 */
+		modified |= MODIFIED_REMOTEADDR;
+	}
+	if (gres->hr_replication != res->hr_replication) {
+		gres->hr_replication = res->hr_replication;
+		modified |= MODIFIED_REPLICATION;
+	}
+	if (gres->hr_timeout != res->hr_timeout) {
+		gres->hr_timeout = res->hr_timeout;
+		modified |= MODIFIED_TIMEOUT;
+	}
+	/*
+	 * If only timeout was modified we only need to change it without
+	 * reconnecting.
+	 */
+	if (modified == MODIFIED_TIMEOUT) {
+		for (ii = 0; ii < ncomps; ii++) {
+			if (!ISREMOTE(ii))
+				continue;
+			rw_rlock(&hio_remote_lock[ii]);
+			if (!ISCONNECTED(gres, ii)) {
+				rw_unlock(&hio_remote_lock[ii]);
+				continue;
+			}
+			rw_unlock(&hio_remote_lock[ii]);
+			if (proto_timeout(gres->hr_remotein,
+			    gres->hr_timeout) < 0) {
+				pjdlog_errno(LOG_WARNING,
+				    "Unable to set connection timeout");
+			}
+			if (proto_timeout(gres->hr_remoteout,
+			    gres->hr_timeout) < 0) {
+				pjdlog_errno(LOG_WARNING,
+				    "Unable to set connection timeout");
+			}
+		}
+	} else {
+		for (ii = 0; ii < ncomps; ii++) {
+			if (!ISREMOTE(ii))
+				continue;
+			remote_close(gres, ii);
+		}
+		if (modified & MODIFIED_REMOTEADDR) {
+			strlcpy(gres->hr_remoteaddr, res->hr_remoteaddr,
+			    sizeof(gres->hr_remoteaddr));
+		}
+	}
+#undef	MODIFIED_REMOTEADDR
+#undef	MODIFIED_REPLICATION
+#undef	MODIFIED_TIMEOUT
+
+	pjdlog_info("Configuration reloaded successfully.");
+	return;
+failed:
+	if (newcfg != NULL) {
+		if (newcfg->hc_controlconn != NULL)
+			proto_close(newcfg->hc_controlconn);
+		if (newcfg->hc_listenconn != NULL)
+			proto_close(newcfg->hc_listenconn);
+		yy_config_free(newcfg);
+	}
+	pjdlog_warning("Configuration not reloaded.");
+}
+
 /*
  * Thread guards remote connections and reconnects when needed, handles
  * signals, etc.
@@ -1739,14 +1855,16 @@ guard_thread(void *arg)
 	int timeout;
 
 	ncomps = HAST_NCOMPONENTS;
-	/* The is only one remote component for now. */
-#define	ISREMOTE(no)	((no) == 1)
 
 	for (;;) {
 		if (sigexit_received) {
 			primary_exitx(EX_OK,
 			    "Termination signal received, exiting.");
 		}
+		if (sighup_received) {
+			sighup_received = false;
+			config_reload();
+		}
 		/*
 		 * If all the connection will be fine, we will sleep until
 		 * someone wakes us up.
@@ -1810,7 +1928,6 @@ guard_thread(void *arg)
 		(void)cv_timedwait(&hio_guard_cond, &hio_guard_lock, timeout);
 		mtx_unlock(&hio_guard_lock);
 	}
-#undef	ISREMOTE
 	/* NOTREACHED */
 	return (NULL);
 }

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 19:30:57 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AF79A1065673;
	Thu,  5 Aug 2010 19:30:57 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9DE6B8FC16;
	Thu,  5 Aug 2010 19:30:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75JUvuH084068;
	Thu, 5 Aug 2010 19:30:57 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75JUvSD084066;
	Thu, 5 Aug 2010 19:30:57 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008051930.o75JUvSD084066@svn.freebsd.org>
From: Jung-uk Kim 
Date: Thu, 5 Aug 2010 19:30:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210887 - head/sys/compat/x86bios
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 19:30:57 -0000

Author: jkim
Date: Thu Aug  5 19:30:57 2010
New Revision: 210887
URL: http://svn.freebsd.org/changeset/base/210887

Log:
  Re-add flag register for output.  Some BIOS calls actually use it to return
  success/failure status.  Oops.

Modified:
  head/sys/compat/x86bios/x86bios.c

Modified: head/sys/compat/x86bios/x86bios.c
==============================================================================
--- head/sys/compat/x86bios/x86bios.c	Thu Aug  5 19:16:31 2010	(r210886)
+++ head/sys/compat/x86bios/x86bios.c	Thu Aug  5 19:30:57 2010	(r210887)
@@ -99,6 +99,7 @@ x86bios_vmf2emu(struct vm86frame *vmf, s
 
 	regs->R_DS = vmf->vmf_ds;
 	regs->R_ES = vmf->vmf_es;
+	regs->R_FLG = vmf->vmf_flags;
 	regs->R_AX = vmf->vmf_ax;
 	regs->R_BX = vmf->vmf_bx;
 	regs->R_CX = vmf->vmf_cx;

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 19:40:49 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1B1B91065677;
	Thu,  5 Aug 2010 19:40: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 0846A8FC26;
	Thu,  5 Aug 2010 19:40:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75JemNL086243;
	Thu, 5 Aug 2010 19:40:48 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75JemTt086238;
	Thu, 5 Aug 2010 19:40:48 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008051940.o75JemTt086238@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 19:40: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: r210888 - in stable/8/sys: fs/nfsclient nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 19:40:49 -0000

Author: jhb
Date: Thu Aug  5 19:40:48 2010
New Revision: 210888
URL: http://svn.freebsd.org/changeset/base/210888

Log:
  MFC 210136:
  Retire the NFS access cache timestamp structure.  It was used in VOP_OPEN()
  to avoid sending multiple ACCESS/GETATTR RPCs during a single open()
  between VOP_LOOKUP() and VOP_OPEN().  Now we always send the RPC in
  VOP_LOOKUP() and not VOP_OPEN() in the cases that multiple RPCs could be
  sent.
  
  To preserve the ABI I have left the structure in place, but renamed it
  to 'n_unused' and just removed the code that updates it.

Modified:
  stable/8/sys/fs/nfsclient/nfs_clport.c
  stable/8/sys/fs/nfsclient/nfsnode.h
  stable/8/sys/nfsclient/nfs_subs.c
  stable/8/sys/nfsclient/nfsnode.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/fs/nfsclient/nfs_clport.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clport.c	Thu Aug  5 19:30:57 2010	(r210887)
+++ stable/8/sys/fs/nfsclient/nfs_clport.c	Thu Aug  5 19:40:48 2010	(r210888)
@@ -340,7 +340,6 @@ nfscl_loadattrcache(struct vnode **vpp, 
 	struct nfsnode *np;
 	struct nfsmount *nmp;
 	struct timespec mtime_save;
-	struct thread *td = curthread;
 
 	/*
 	 * If v_type == VNON it is a new node, so fill in the v_type,
@@ -386,14 +385,6 @@ nfscl_loadattrcache(struct vnode **vpp, 
 	else
 		vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0];
 	np->n_attrstamp = time_second;
-	/* Timestamp the NFS otw getattr fetch */
-	if (td->td_proc) {
-		np->n_ac_ts_tid = td->td_tid;
-		np->n_ac_ts_pid = td->td_proc->p_pid;
-		np->n_ac_ts_syscalls = td->td_syscalls;
-	} else
-		bzero(&np->n_ac_ts, sizeof(struct nfs_attrcache_timestamp));
-	
 	if (vap->va_size != np->n_size) {
 		if (vap->va_type == VREG) {
 			if (dontshrink && vap->va_size < np->n_size) {

Modified: stable/8/sys/fs/nfsclient/nfsnode.h
==============================================================================
--- stable/8/sys/fs/nfsclient/nfsnode.h	Thu Aug  5 19:30:57 2010	(r210887)
+++ stable/8/sys/fs/nfsclient/nfsnode.h	Thu Aug  5 19:40:48 2010	(r210888)
@@ -68,10 +68,6 @@ struct nfsdmap {
 #define	ndm_cookies	ndm_un1.ndmu3_cookies
 #define	ndm4_cookies	ndm_un1.ndmu4_cookies
 
-#define	n_ac_ts_tid		n_ac_ts.nfs_ac_ts_tid
-#define	n_ac_ts_pid		n_ac_ts.nfs_ac_ts_pid
-#define	n_ac_ts_syscalls	n_ac_ts.nfs_ac_ts_syscalls
-
 struct nfs_attrcache_timestamp {
 	lwpid_t		nfs_ac_ts_tid;
 	pid_t		nfs_ac_ts_pid;
@@ -132,7 +128,7 @@ struct nfsnode {
 	u_int32_t		n_flag;		/* Flag for locking.. */
 	int			n_directio_opens;
 	int                     n_directio_asyncwr;
-	struct nfs_attrcache_timestamp n_ac_ts;
+	struct nfs_attrcache_timestamp n_unused;
 	u_int64_t		 n_change;	/* old Change attribute */
 	struct nfsv4node	*n_v4;		/* extra V4 stuff */
 };

Modified: stable/8/sys/nfsclient/nfs_subs.c
==============================================================================
--- stable/8/sys/nfsclient/nfs_subs.c	Thu Aug  5 19:30:57 2010	(r210887)
+++ stable/8/sys/nfsclient/nfs_subs.c	Thu Aug  5 19:40:48 2010	(r210888)
@@ -470,7 +470,6 @@ nfs_loadattrcache(struct vnode **vpp, st
 	u_short vmode;
 	struct timespec mtime, mtime_save;
 	int v3 = NFS_ISV3(vp);
-	struct thread *td = curthread;
 	int error = 0;
 
 	md = *mdp;
@@ -574,14 +573,6 @@ nfs_loadattrcache(struct vnode **vpp, st
 		vap->va_filerev = 0;
 	}
 	np->n_attrstamp = time_second;
-	/* Timestamp the NFS otw getattr fetch */
-	if (td->td_proc) {
-		np->n_ac_ts_tid = td->td_tid;
-		np->n_ac_ts_pid = td->td_proc->p_pid;
-		np->n_ac_ts_syscalls = td->td_syscalls;
-	} else
-		bzero(&np->n_ac_ts, sizeof(struct nfs_attrcache_timestamp));
-	
 	if (vap->va_size != np->n_size) {
 		if (vap->va_type == VREG) {
 			if (dontshrink && vap->va_size < np->n_size) {

Modified: stable/8/sys/nfsclient/nfsnode.h
==============================================================================
--- stable/8/sys/nfsclient/nfsnode.h	Thu Aug  5 19:30:57 2010	(r210887)
+++ stable/8/sys/nfsclient/nfsnode.h	Thu Aug  5 19:40:48 2010	(r210888)
@@ -74,10 +74,6 @@ struct nfsdmap {
 #define ndm_cookies	ndm_un1.ndmu3_cookies
 #define ndm4_cookies	ndm_un1.ndmu4_cookies
 
-#define n_ac_ts_tid		n_ac_ts.nfs_ac_ts_tid
-#define n_ac_ts_pid		n_ac_ts.nfs_ac_ts_pid
-#define n_ac_ts_syscalls	n_ac_ts.nfs_ac_ts_syscalls
-
 struct nfs_attrcache_timestamp {
 	lwpid_t		nfs_ac_ts_tid;
 	pid_t		nfs_ac_ts_pid;
@@ -140,7 +136,7 @@ struct nfsnode {
 	uint32_t		n_namelen;
 	int			n_directio_opens;
 	int                     n_directio_asyncwr;
-	struct nfs_attrcache_timestamp n_ac_ts;
+	struct nfs_attrcache_timestamp n_unused;
 };
 
 #define n_atim		n_un1.nf_atim

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 19:41:43 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AC2AB1065678;
	Thu,  5 Aug 2010 19:41:43 +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 7FADD8FC13;
	Thu,  5 Aug 2010 19:41:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75JfhNt086479;
	Thu, 5 Aug 2010 19:41:43 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75JfhhF086476;
	Thu, 5 Aug 2010 19:41:43 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008051941.o75JfhhF086476@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 19:41:43 +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: r210889 - stable/7/sys/nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 19:41:43 -0000

Author: jhb
Date: Thu Aug  5 19:41:43 2010
New Revision: 210889
URL: http://svn.freebsd.org/changeset/base/210889

Log:
  MFC 210136:
  Retire the NFS access cache timestamp structure.  It was used in VOP_OPEN()
  to avoid sending multiple ACCESS/GETATTR RPCs during a single open()
  between VOP_LOOKUP() and VOP_OPEN().  Now we always send the RPC in
  VOP_LOOKUP() and not VOP_OPEN() in the cases that multiple RPCs could be
  sent.
  
  To preserve the ABI I have left the structure in place, but renamed it
  to 'n_unused' and just removed the code that updates it.

Modified:
  stable/7/sys/nfsclient/nfs_subs.c
  stable/7/sys/nfsclient/nfsnode.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/nfsclient/nfs_subs.c
==============================================================================
--- stable/7/sys/nfsclient/nfs_subs.c	Thu Aug  5 19:40:48 2010	(r210888)
+++ stable/7/sys/nfsclient/nfs_subs.c	Thu Aug  5 19:41:43 2010	(r210889)
@@ -559,7 +559,6 @@ nfs_loadattrcache(struct vnode **vpp, st
 	u_short vmode;
 	struct timespec mtime, mtime_save;
 	int v3 = NFS_ISV3(vp);
-	struct thread *td = curthread;
 
 	md = *mdp;
 	t1 = (mtod(md, caddr_t) + md->m_len) - *dposp;
@@ -660,14 +659,6 @@ nfs_loadattrcache(struct vnode **vpp, st
 		vap->va_filerev = 0;
 	}
 	np->n_attrstamp = time_second;
-	/* Timestamp the NFS otw getattr fetch */
-	if (td->td_proc) {
-		np->n_ac_ts_tid = td->td_tid;
-		np->n_ac_ts_pid = td->td_proc->p_pid;
-		np->n_ac_ts_syscalls = td->td_syscalls;
-	} else
-		bzero(&np->n_ac_ts, sizeof(struct nfs_attrcache_timestamp));
-	
 	if (vap->va_size != np->n_size) {
 		if (vap->va_type == VREG) {
 			if (dontshrink && vap->va_size < np->n_size) {

Modified: stable/7/sys/nfsclient/nfsnode.h
==============================================================================
--- stable/7/sys/nfsclient/nfsnode.h	Thu Aug  5 19:40:48 2010	(r210888)
+++ stable/7/sys/nfsclient/nfsnode.h	Thu Aug  5 19:41:43 2010	(r210889)
@@ -74,10 +74,6 @@ struct nfsdmap {
 #define ndm_cookies	ndm_un1.ndmu3_cookies
 #define ndm4_cookies	ndm_un1.ndmu4_cookies
 
-#define n_ac_ts_tid		n_ac_ts.nfs_ac_ts_tid
-#define n_ac_ts_pid		n_ac_ts.nfs_ac_ts_pid
-#define n_ac_ts_syscalls	n_ac_ts.nfs_ac_ts_syscalls
-
 struct nfs_attrcache_timestamp {
 	lwpid_t		nfs_ac_ts_tid;
 	pid_t		nfs_ac_ts_pid;
@@ -138,7 +134,7 @@ struct nfsnode {
 	uint32_t		n_namelen;
 	int			n_directio_opens;
 	int                     n_directio_asyncwr;
-	struct nfs_attrcache_timestamp n_ac_ts;
+	struct nfs_attrcache_timestamp n_unused;
 };
 
 #define n_atim		n_un1.nf_atim

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 19:43:19 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5777B1065670;
	Thu,  5 Aug 2010 19:43: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 456C38FC14;
	Thu,  5 Aug 2010 19:43:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75JhJSc086984;
	Thu, 5 Aug 2010 19:43:19 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75JhJ0T086982;
	Thu, 5 Aug 2010 19:43:19 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008051943.o75JhJ0T086982@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 19:43: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: r210890 - stable/8/sys/dev/ipmi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 19:43:19 -0000

Author: jhb
Date: Thu Aug  5 19:43:19 2010
New Revision: 210890
URL: http://svn.freebsd.org/changeset/base/210890

Log:
  MFC 210604:
  Fix test for double-nul characters that terminate the string table at
  the end of each SMBIOS/DMI structure.

Modified:
  stable/8/sys/dev/ipmi/ipmi_smbios.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/ipmi/ipmi_smbios.c
==============================================================================
--- stable/8/sys/dev/ipmi/ipmi_smbios.c	Thu Aug  5 19:41:43 2010	(r210889)
+++ stable/8/sys/dev/ipmi/ipmi_smbios.c	Thu Aug  5 19:43:19 2010	(r210890)
@@ -189,7 +189,7 @@ smbios_walk_table(uint8_t *p, int entrie
 		 * formatted area of this structure.
 		 */
 		p += s->length;
-		while (p[0] != 0 && p[1] != 0)
+		while (!(p[0] == 0 && p[1] == 0))
 			p++;
 
 		/*

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 19:43:32 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 99F0D106567F;
	Thu,  5 Aug 2010 19:43: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 87F358FC1E;
	Thu,  5 Aug 2010 19:43:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75JhW7S087054;
	Thu, 5 Aug 2010 19:43:32 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75JhWss087052;
	Thu, 5 Aug 2010 19:43:32 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008051943.o75JhWss087052@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 19:43:32 +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: r210891 - stable/7/sys/dev/ipmi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 19:43:32 -0000

Author: jhb
Date: Thu Aug  5 19:43:32 2010
New Revision: 210891
URL: http://svn.freebsd.org/changeset/base/210891

Log:
  MFC 210604:
  Fix test for double-nul characters that terminate the string table at
  the end of each SMBIOS/DMI structure.

Modified:
  stable/7/sys/dev/ipmi/ipmi_smbios.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/ipmi/ipmi_smbios.c
==============================================================================
--- stable/7/sys/dev/ipmi/ipmi_smbios.c	Thu Aug  5 19:43:19 2010	(r210890)
+++ stable/7/sys/dev/ipmi/ipmi_smbios.c	Thu Aug  5 19:43:32 2010	(r210891)
@@ -189,7 +189,7 @@ smbios_walk_table(uint8_t *p, int entrie
 		 * formatted area of this structure.
 		 */
 		p += s->length;
-		while (p[0] != 0 && p[1] != 0)
+		while (!(p[0] == 0 && p[1] == 0))
 			p++;
 
 		/*

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 19:54:58 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2A97B106567C;
	Thu,  5 Aug 2010 19:54:58 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 18D6E8FC2B;
	Thu,  5 Aug 2010 19:54:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75Jsv4b089685;
	Thu, 5 Aug 2010 19:54:57 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75JsvNZ089683;
	Thu, 5 Aug 2010 19:54:57 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008051954.o75JsvNZ089683@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 5 Aug 2010 19:54:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210892 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 19:54:58 -0000

Author: pjd
Date: Thu Aug  5 19:54:57 2010
New Revision: 210892
URL: http://svn.freebsd.org/changeset/base/210892

Log:
  Document 'none' value for remote.
  
  Reviewed by:	dougb
  MFC after:	1 month

Modified:
  head/sbin/hastd/hast.conf.5

Modified: head/sbin/hastd/hast.conf.5
==============================================================================
--- head/sbin/hastd/hast.conf.5	Thu Aug  5 19:43:32 2010	(r210891)
+++ head/sbin/hastd/hast.conf.5	Thu Aug  5 19:54:57 2010	(r210892)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 1, 2010
+.Dd August 5, 2010
 .Dt HAST.CONF 5
 .Os
 .Sh NAME
@@ -225,6 +225,11 @@ When operating as a primary node this ad
 the secondary node.
 When operating as a secondary node only connections from this address
 will be accepted.
+.Pp
+A special value of
+.Va none
+can be used when the remote address is not yet known (eg. the other node is not
+set up yet).
 .El
 .Sh FILES
 .Bl -tag -width ".Pa /var/run/hastctl" -compact

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 20:02:59 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 961A71065673;
	Thu,  5 Aug 2010 20:02:59 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 82CF18FC12;
	Thu,  5 Aug 2010 20:02:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75K2xvW091593;
	Thu, 5 Aug 2010 20:02:59 GMT (envelope-from gnn@svn.freebsd.org)
Received: (from gnn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75K2xV2091590;
	Thu, 5 Aug 2010 20:02:59 GMT (envelope-from gnn@svn.freebsd.org)
Message-Id: <201008052002.o75K2xV2091590@svn.freebsd.org>
From: "George V. Neville-Neil" 
Date: Thu, 5 Aug 2010 20:02:59 +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: r210893 - stable/8/sys/dev/hwpmc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 20:02:59 -0000

Author: gnn
Date: Thu Aug  5 20:02:59 2010
New Revision: 210893
URL: http://svn.freebsd.org/changeset/base/210893

Log:
  MFC: 210621
  
  Make sure that we clear the correct bits when we turn off
  a PMC.  It was possible that we could have turned a bit on but
  never cleared it.
  
  Extend the calls to rdmsr() to all necessary functions, not
  just those which previously caused a panic.
  
  Pointed out by: jhb@

Modified:
  stable/8/sys/dev/hwpmc/hwpmc_core.c
  stable/8/sys/dev/hwpmc/hwpmc_core.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c
==============================================================================
--- stable/8/sys/dev/hwpmc/hwpmc_core.c	Thu Aug  5 19:54:57 2010	(r210892)
+++ stable/8/sys/dev/hwpmc/hwpmc_core.c	Thu Aug  5 20:02:59 2010	(r210893)
@@ -168,13 +168,13 @@ core_pcpu_fini(struct pmc_mdep *md, int 
 	core_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_ri;
 
 	for (n = 0; n < npmc; n++) {
-		msr = rdmsr(IAP_EVSEL0 + n);
-		wrmsr(IAP_EVSEL0 + n, msr & ~IAP_EVSEL_MASK);
+		msr = rdmsr(IAP_EVSEL0 + n) & ~IAP_EVSEL_MASK;
+		wrmsr(IAP_EVSEL0 + n, msr);
 	}
 
 	if (core_cputype != PMC_CPU_INTEL_CORE) {
-		msr = rdmsr(IAF_CTRL);
-		wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK);
+		msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK;
+		wrmsr(IAF_CTRL, msr);
 		npmc += md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAF].pcd_num;
 	}
 
@@ -392,13 +392,13 @@ iaf_start_pmc(int cpu, int ri)
 
 	iafc->pc_iafctrl |= pm->pm_md.pm_iaf.pm_iaf_ctrl;
 
- 	msr = rdmsr(IAF_CTRL);
+ 	msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK;
  	wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK));
 
 	do {
 		iafc->pc_resync = 0;
 		iafc->pc_globalctrl |= (1ULL << (ri + IAF_OFFSET));
- 		msr = rdmsr(IA_GLOBAL_CTRL);
+ 		msr = rdmsr(IA_GLOBAL_CTRL) & ~IAF_GLOBAL_CTRL_MASK;
  		wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & 
  					     IAF_GLOBAL_CTRL_MASK));
 	} while (iafc->pc_resync != 0);
@@ -434,13 +434,13 @@ iaf_stop_pmc(int cpu, int ri)
 	iafc->pc_iafctrl &= ~fc;
 
 	PMCDBG(MDP,STO,1,"iaf-stop iafctrl=%x", iafc->pc_iafctrl);
- 	msr = rdmsr(IAF_CTRL);
+ 	msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK;
  	wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK));
 
 	do {
 		iafc->pc_resync = 0;
 		iafc->pc_globalctrl &= ~(1ULL << (ri + IAF_OFFSET));
- 		msr = rdmsr(IA_GLOBAL_CTRL);
+ 		msr = rdmsr(IA_GLOBAL_CTRL) & ~IAF_GLOBAL_CTRL_MASK;
  		wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl &
  					     IAF_GLOBAL_CTRL_MASK));
 	} while (iafc->pc_resync != 0);
@@ -473,10 +473,14 @@ iaf_write_pmc(int cpu, int ri, pmc_value
 	if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm)))
 		v = iaf_reload_count_to_perfctr_value(v);
 
-	msr = rdmsr(IAF_CTRL);
-	wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK);
+	/* Turn off fixed counters */
+	msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK;
+	wrmsr(IAF_CTRL, msr); 
+
 	wrmsr(IAF_CTR0 + ri, v & ((1ULL << core_iaf_width) - 1));
-	msr = rdmsr(IAF_CTRL);
+
+	/* Turn on fixed counters */
+	msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK;
 	wrmsr(IAF_CTRL, msr | (cc->pc_iafctrl & IAF_CTRL_MASK));
 
 	PMCDBG(MDP,WRI,1, "iaf-write cpu=%d ri=%d msr=0x%x v=%jx iafctrl=%jx "
@@ -1910,15 +1914,17 @@ iap_stop_pmc(int cpu, int ri)
 
 	PMCDBG(MDP,STO,1, "iap-stop cpu=%d ri=%d", cpu, ri);
 
-	msr = rdmsr(IAP_EVSEL0 + ri);
-	wrmsr(IAP_EVSEL0 + ri, msr & IAP_EVSEL_MASK);	/* stop hw */
+	msr = rdmsr(IAP_EVSEL0 + ri) & ~IAP_EVSEL_MASK;
+	wrmsr(IAP_EVSEL0 + ri, msr);	/* stop hw */
 
 	if (core_cputype == PMC_CPU_INTEL_CORE)
 		return (0);
 
+	msr = 0;
 	do {
 		cc->pc_resync = 0;
 		cc->pc_globalctrl &= ~(1ULL << ri);
+		msr = rdmsr(IA_GLOBAL_CTRL) & ~IA_GLOBAL_CTRL_MASK;
 		wrmsr(IA_GLOBAL_CTRL, cc->pc_globalctrl);
 	} while (cc->pc_resync != 0);
 
@@ -2004,7 +2010,7 @@ core_intr(int cpu, struct trapframe *tf)
 	struct pmc *pm;
 	struct core_cpu *cc;
 	int error, found_interrupt, ri;
-	uint64_t msr = 0;
+	uint64_t msr;
 
 	PMCDBG(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf,
 	    TRAPF_USERMODE(tf));
@@ -2036,15 +2042,15 @@ core_intr(int cpu, struct trapframe *tf)
 		 * Stop the counter, reload it but only restart it if
 		 * the PMC is not stalled.
 		 */
-		msr = rdmsr(IAP_EVSEL0 + ri);
-		wrmsr(IAP_EVSEL0 + ri, msr & ~IAP_EVSEL_MASK);
+		msr = rdmsr(IAP_EVSEL0 + ri) & ~IAP_EVSEL_MASK;
+		wrmsr(IAP_EVSEL0 + ri, msr);
 		wrmsr(IAP_PMC0 + ri, v);
 
 		if (error)
 			continue;
 
-		wrmsr(IAP_EVSEL0 + ri,
-		    pm->pm_md.pm_iap.pm_iap_evsel | IAP_EN);
+		wrmsr(IAP_EVSEL0 + ri, msr | (pm->pm_md.pm_iap.pm_iap_evsel | 
+					      IAP_EN));
 	}
 
 	if (found_interrupt)
@@ -2060,7 +2066,7 @@ static int
 core2_intr(int cpu, struct trapframe *tf)
 {
 	int error, found_interrupt, n;
-	uint64_t flag, intrstatus, intrenable;
+	uint64_t flag, intrstatus, intrenable, msr;
 	struct pmc *pm;
 	struct core_cpu *cc;
 	pmc_value_t v;
@@ -2091,7 +2097,8 @@ core2_intr(int cpu, struct trapframe *tf
 	/*
 	 * Stop PMCs and clear overflow status bits.
 	 */
-	wrmsr(IA_GLOBAL_CTRL, 0);
+	msr = rdmsr(IA_GLOBAL_CTRL) & ~IA_GLOBAL_CTRL_MASK;
+	wrmsr(IA_GLOBAL_CTRL, msr);
 	wrmsr(IA_GLOBAL_OVF_CTRL, intrenable |
 	    IA_GLOBAL_STATUS_FLAG_OVFBUF |
 	    IA_GLOBAL_STATUS_FLAG_CONDCHG);
@@ -2162,7 +2169,7 @@ core2_intr(int cpu, struct trapframe *tf
 
 	cc->pc_globalctrl |= intrenable;
 
-	wrmsr(IA_GLOBAL_CTRL, cc->pc_globalctrl);
+	wrmsr(IA_GLOBAL_CTRL, cc->pc_globalctrl & IA_GLOBAL_CTRL_MASK);
 
 	PMCDBG(MDP,INT, 1, "cpu=%d fixedctrl=%jx globalctrl=%jx status=%jx "
 	    "ovf=%jx", cpu, (uintmax_t) rdmsr(IAF_CTRL),

Modified: stable/8/sys/dev/hwpmc/hwpmc_core.h
==============================================================================
--- stable/8/sys/dev/hwpmc/hwpmc_core.h	Thu Aug  5 19:54:57 2010	(r210892)
+++ stable/8/sys/dev/hwpmc/hwpmc_core.h	Thu Aug  5 20:02:59 2010	(r210893)
@@ -144,6 +144,12 @@ struct pmc_md_iap_op_pmcallocate {
 /* The mask is only for the fixed porttion of the register. */
 #define	IAF_GLOBAL_CTRL_MASK			0x0000000700000000
 
+/* The mask is only for the programmable porttion of the register. */
+#define IAP_GLOBAL_CTRL_MASK			0x00000000ffffffff
+
+/* The mask is for both the fixed and programmable porttions of the register. */
+#define IA_GLOBAL_CTRL_MASK			0x00000007ffffffff
+
 #define	IA_GLOBAL_OVF_CTRL			0x390
 
 #define	IA_GLOBAL_STATUS_FLAG_CONDCHG		(1ULL << 63)

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 20:39:53 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F26831065678;
	Thu,  5 Aug 2010 20:39:52 +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 C5E3D8FC18;
	Thu,  5 Aug 2010 20:39:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75KdqK8099841;
	Thu, 5 Aug 2010 20:39:52 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75KdqAs099839;
	Thu, 5 Aug 2010 20:39:52 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008052039.o75KdqAs099839@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 20:39: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: r210894 - stable/8/sys/dev/cxgb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 20:39:53 -0000

Author: jhb
Date: Thu Aug  5 20:39:52 2010
New Revision: 210894
URL: http://svn.freebsd.org/changeset/base/210894

Log:
  MFC 210505:
  - Change the warning about PCI-e links narrower than x8 to only apply to
    10G cards.  1G cards are x4 only.
  - Use constants from pcireg.h for reading the current link width.
  - Use pci_set_max_read_req() rather than implementing it by hand.

Modified:
  stable/8/sys/dev/cxgb/cxgb_main.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/cxgb/cxgb_main.c
==============================================================================
--- stable/8/sys/dev/cxgb/cxgb_main.c	Thu Aug  5 20:02:59 2010	(r210893)
+++ stable/8/sys/dev/cxgb/cxgb_main.c	Thu Aug  5 20:39:52 2010	(r210894)
@@ -454,20 +454,18 @@ cxgb_controller_attach(device_t dev)
 
 	/* find the PCIe link width and set max read request to 4KB*/
 	if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) {
-		uint16_t lnk, pectl;
-		lnk = pci_read_config(dev, reg + 0x12, 2);
-		sc->link_width = (lnk >> 4) & 0x3f;
-		
-		pectl = pci_read_config(dev, reg + 0x8, 2);
-		pectl = (pectl & ~0x7000) | (5 << 12);
-		pci_write_config(dev, reg + 0x8, pectl, 2);
-	}
+		uint16_t lnk;
+
+		lnk = pci_read_config(dev, reg + PCIR_EXPRESS_LINK_STA, 2);
+		sc->link_width = (lnk & PCIM_LINK_STA_WIDTH) >> 4;
+		if (sc->link_width < 8 &&
+		    (ai->caps & SUPPORTED_10000baseT_Full)) {
+			device_printf(sc->dev,
+			    "PCIe x%d Link, expect reduced performance\n",
+			    sc->link_width);
+		}
 
-	if (sc->link_width != 0 && sc->link_width <= 4 &&
-	    (ai->nports0 + ai->nports1) <= 2) {
-		device_printf(sc->dev,
-		    "PCIe x%d Link, expect reduced performance\n",
-		    sc->link_width);
+		pci_set_max_read_req(dev, 4096);
 	}
 
 	touch_bars(dev);

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 20:40:14 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 32A46106567D;
	Thu,  5 Aug 2010 20:40:14 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1F8438FC1D;
	Thu,  5 Aug 2010 20:40:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75KeEHH099951;
	Thu, 5 Aug 2010 20:40:14 GMT (envelope-from gnn@svn.freebsd.org)
Received: (from gnn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75KeEiX099948;
	Thu, 5 Aug 2010 20:40:14 GMT (envelope-from gnn@svn.freebsd.org)
Message-Id: <201008052040.o75KeEiX099948@svn.freebsd.org>
From: "George V. Neville-Neil" 
Date: Thu, 5 Aug 2010 20:40:13 +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: r210895 - stable/7/sys/dev/hwpmc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 20:40:14 -0000

Author: gnn
Date: Thu Aug  5 20:40:13 2010
New Revision: 210895
URL: http://svn.freebsd.org/changeset/base/210895

Log:
  MFC: 210621
  
  Make sure that we clear the correct bits when we turn off
  a PMC.  It was possible that we could have turned a bit on but
  never cleared it.
  
  Extend the calls to rdmsr() to all necessary functions, not
  just those which previously caused a panic.
  
  Pointed out by: jhb@

Modified:
  stable/7/sys/dev/hwpmc/hwpmc_core.c
  stable/7/sys/dev/hwpmc/hwpmc_core.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/hwpmc/hwpmc_core.c
==============================================================================
--- stable/7/sys/dev/hwpmc/hwpmc_core.c	Thu Aug  5 20:39:52 2010	(r210894)
+++ stable/7/sys/dev/hwpmc/hwpmc_core.c	Thu Aug  5 20:40:13 2010	(r210895)
@@ -168,13 +168,13 @@ core_pcpu_fini(struct pmc_mdep *md, int 
 	core_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_ri;
 
 	for (n = 0; n < npmc; n++) {
-		msr = rdmsr(IAP_EVSEL0 + n);
-		wrmsr(IAP_EVSEL0 + n, msr & ~IAP_EVSEL_MASK);
+		msr = rdmsr(IAP_EVSEL0 + n) & ~IAP_EVSEL_MASK;
+		wrmsr(IAP_EVSEL0 + n, msr);
 	}
 
 	if (core_cputype != PMC_CPU_INTEL_CORE) {
-		msr = rdmsr(IAF_CTRL);
-		wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK);
+		msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK;
+		wrmsr(IAF_CTRL, msr);
 		npmc += md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAF].pcd_num;
 	}
 
@@ -392,13 +392,13 @@ iaf_start_pmc(int cpu, int ri)
 
 	iafc->pc_iafctrl |= pm->pm_md.pm_iaf.pm_iaf_ctrl;
 
- 	msr = rdmsr(IAF_CTRL);
+ 	msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK;
  	wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK));
 
 	do {
 		iafc->pc_resync = 0;
 		iafc->pc_globalctrl |= (1ULL << (ri + IAF_OFFSET));
- 		msr = rdmsr(IA_GLOBAL_CTRL);
+ 		msr = rdmsr(IA_GLOBAL_CTRL) & ~IAF_GLOBAL_CTRL_MASK;
  		wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & 
  					     IAF_GLOBAL_CTRL_MASK));
 	} while (iafc->pc_resync != 0);
@@ -434,13 +434,13 @@ iaf_stop_pmc(int cpu, int ri)
 	iafc->pc_iafctrl &= ~fc;
 
 	PMCDBG(MDP,STO,1,"iaf-stop iafctrl=%x", iafc->pc_iafctrl);
- 	msr = rdmsr(IAF_CTRL);
+ 	msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK;
  	wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK));
 
 	do {
 		iafc->pc_resync = 0;
 		iafc->pc_globalctrl &= ~(1ULL << (ri + IAF_OFFSET));
- 		msr = rdmsr(IA_GLOBAL_CTRL);
+ 		msr = rdmsr(IA_GLOBAL_CTRL) & ~IAF_GLOBAL_CTRL_MASK;
  		wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl &
  					     IAF_GLOBAL_CTRL_MASK));
 	} while (iafc->pc_resync != 0);
@@ -473,10 +473,14 @@ iaf_write_pmc(int cpu, int ri, pmc_value
 	if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm)))
 		v = iaf_reload_count_to_perfctr_value(v);
 
-	msr = rdmsr(IAF_CTRL);
-	wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK);
+	/* Turn off fixed counters */
+	msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK;
+	wrmsr(IAF_CTRL, msr); 
+
 	wrmsr(IAF_CTR0 + ri, v & ((1ULL << core_iaf_width) - 1));
-	msr = rdmsr(IAF_CTRL);
+
+	/* Turn on fixed counters */
+	msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK;
 	wrmsr(IAF_CTRL, msr | (cc->pc_iafctrl & IAF_CTRL_MASK));
 
 	PMCDBG(MDP,WRI,1, "iaf-write cpu=%d ri=%d msr=0x%x v=%jx iafctrl=%jx "
@@ -1910,15 +1914,17 @@ iap_stop_pmc(int cpu, int ri)
 
 	PMCDBG(MDP,STO,1, "iap-stop cpu=%d ri=%d", cpu, ri);
 
-	msr = rdmsr(IAP_EVSEL0 + ri);
-	wrmsr(IAP_EVSEL0 + ri, msr & IAP_EVSEL_MASK);	/* stop hw */
+	msr = rdmsr(IAP_EVSEL0 + ri) & ~IAP_EVSEL_MASK;
+	wrmsr(IAP_EVSEL0 + ri, msr);	/* stop hw */
 
 	if (core_cputype == PMC_CPU_INTEL_CORE)
 		return (0);
 
+	msr = 0;
 	do {
 		cc->pc_resync = 0;
 		cc->pc_globalctrl &= ~(1ULL << ri);
+		msr = rdmsr(IA_GLOBAL_CTRL) & ~IA_GLOBAL_CTRL_MASK;
 		wrmsr(IA_GLOBAL_CTRL, cc->pc_globalctrl);
 	} while (cc->pc_resync != 0);
 
@@ -2004,7 +2010,7 @@ core_intr(int cpu, struct trapframe *tf)
 	struct pmc *pm;
 	struct core_cpu *cc;
 	int error, found_interrupt, ri;
-	uint64_t msr = 0;
+	uint64_t msr;
 
 	PMCDBG(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf,
 	    TRAPF_USERMODE(tf));
@@ -2036,15 +2042,15 @@ core_intr(int cpu, struct trapframe *tf)
 		 * Stop the counter, reload it but only restart it if
 		 * the PMC is not stalled.
 		 */
-		msr = rdmsr(IAP_EVSEL0 + ri);
-		wrmsr(IAP_EVSEL0 + ri, msr & ~IAP_EVSEL_MASK);
+		msr = rdmsr(IAP_EVSEL0 + ri) & ~IAP_EVSEL_MASK;
+		wrmsr(IAP_EVSEL0 + ri, msr);
 		wrmsr(IAP_PMC0 + ri, v);
 
 		if (error)
 			continue;
 
-		wrmsr(IAP_EVSEL0 + ri,
-		    pm->pm_md.pm_iap.pm_iap_evsel | IAP_EN);
+		wrmsr(IAP_EVSEL0 + ri, msr | (pm->pm_md.pm_iap.pm_iap_evsel | 
+					      IAP_EN));
 	}
 
 	if (found_interrupt)
@@ -2060,7 +2066,7 @@ static int
 core2_intr(int cpu, struct trapframe *tf)
 {
 	int error, found_interrupt, n;
-	uint64_t flag, intrstatus, intrenable;
+	uint64_t flag, intrstatus, intrenable, msr;
 	struct pmc *pm;
 	struct core_cpu *cc;
 	pmc_value_t v;
@@ -2091,7 +2097,8 @@ core2_intr(int cpu, struct trapframe *tf
 	/*
 	 * Stop PMCs and clear overflow status bits.
 	 */
-	wrmsr(IA_GLOBAL_CTRL, 0);
+	msr = rdmsr(IA_GLOBAL_CTRL) & ~IA_GLOBAL_CTRL_MASK;
+	wrmsr(IA_GLOBAL_CTRL, msr);
 	wrmsr(IA_GLOBAL_OVF_CTRL, intrenable |
 	    IA_GLOBAL_STATUS_FLAG_OVFBUF |
 	    IA_GLOBAL_STATUS_FLAG_CONDCHG);
@@ -2162,7 +2169,7 @@ core2_intr(int cpu, struct trapframe *tf
 
 	cc->pc_globalctrl |= intrenable;
 
-	wrmsr(IA_GLOBAL_CTRL, cc->pc_globalctrl);
+	wrmsr(IA_GLOBAL_CTRL, cc->pc_globalctrl & IA_GLOBAL_CTRL_MASK);
 
 	PMCDBG(MDP,INT, 1, "cpu=%d fixedctrl=%jx globalctrl=%jx status=%jx "
 	    "ovf=%jx", cpu, (uintmax_t) rdmsr(IAF_CTRL),

Modified: stable/7/sys/dev/hwpmc/hwpmc_core.h
==============================================================================
--- stable/7/sys/dev/hwpmc/hwpmc_core.h	Thu Aug  5 20:39:52 2010	(r210894)
+++ stable/7/sys/dev/hwpmc/hwpmc_core.h	Thu Aug  5 20:40:13 2010	(r210895)
@@ -144,6 +144,12 @@ struct pmc_md_iap_op_pmcallocate {
 /* The mask is only for the fixed porttion of the register. */
 #define	IAF_GLOBAL_CTRL_MASK			0x0000000700000000
 
+/* The mask is only for the programmable porttion of the register. */
+#define IAP_GLOBAL_CTRL_MASK			0x00000000ffffffff
+
+/* The mask is for both the fixed and programmable porttions of the register. */
+#define IA_GLOBAL_CTRL_MASK			0x00000007ffffffff
+
 #define	IA_GLOBAL_OVF_CTRL			0x390
 
 #define	IA_GLOBAL_STATUS_FLAG_CONDCHG		(1ULL << 63)

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 20:45:47 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0F0FC1065677;
	Thu,  5 Aug 2010 20:45: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 F0ADB8FC0C;
	Thu,  5 Aug 2010 20:45:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75KjkaZ001350;
	Thu, 5 Aug 2010 20:45:46 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75Kjkhj001348;
	Thu, 5 Aug 2010 20:45:46 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008052045.o75Kjkhj001348@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 20:45:46 +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: r210896 - stable/7/sys/dev/cxgb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 20:45:47 -0000

Author: jhb
Date: Thu Aug  5 20:45:46 2010
New Revision: 210896
URL: http://svn.freebsd.org/changeset/base/210896

Log:
  MFC 210505:
  - Change the warning about PCI-e links narrower than x8 to only apply to
    10G cards.  1G cards are x4 only.
  - Use constants from pcireg.h for reading the current link width.
  - Use pci_set_max_read_req() rather than implementing it by hand.

Modified:
  stable/7/sys/dev/cxgb/cxgb_main.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/cxgb/cxgb_main.c
==============================================================================
--- stable/7/sys/dev/cxgb/cxgb_main.c	Thu Aug  5 20:40:13 2010	(r210895)
+++ stable/7/sys/dev/cxgb/cxgb_main.c	Thu Aug  5 20:45:46 2010	(r210896)
@@ -461,20 +461,18 @@ cxgb_controller_attach(device_t dev)
 #ifdef MSI_SUPPORTED	
 	/* find the PCIe link width and set max read request to 4KB*/
 	if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) {
-		uint16_t lnk, pectl;
-		lnk = pci_read_config(dev, reg + 0x12, 2);
-		sc->link_width = (lnk >> 4) & 0x3f;
-		
-		pectl = pci_read_config(dev, reg + 0x8, 2);
-		pectl = (pectl & ~0x7000) | (5 << 12);
-		pci_write_config(dev, reg + 0x8, pectl, 2);
-	}
+		uint16_t lnk;
+
+		lnk = pci_read_config(dev, reg + PCIR_EXPRESS_LINK_STA, 2);
+		sc->link_width = (lnk & PCIM_LINK_STA_WIDTH) >> 4;
+		if (sc->link_width < 8 &&
+		    (ai->caps & SUPPORTED_10000baseT_Full)) {
+			device_printf(sc->dev,
+			    "PCIe x%d Link, expect reduced performance\n",
+			    sc->link_width);
+		}
 
-	if (sc->link_width != 0 && sc->link_width <= 4 &&
-	    (ai->nports0 + ai->nports1) <= 2) {
-		device_printf(sc->dev,
-		    "PCIe x%d Link, expect reduced performance\n",
-		    sc->link_width);
+		pci_set_max_read_req(dev, 4096);
 	}
 #endif
 	touch_bars(dev);

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 20:49:48 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 43DDD1065674;
	Thu,  5 Aug 2010 20:49:48 +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 31C818FC1F;
	Thu,  5 Aug 2010 20:49:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75KnmFo002262;
	Thu, 5 Aug 2010 20:49:48 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75KnmgU002260;
	Thu, 5 Aug 2010 20:49:48 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008052049.o75KnmgU002260@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 20:49:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210897 - stable/6/sys/dev/ipmi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 20:49:48 -0000

Author: jhb
Date: Thu Aug  5 20:49:47 2010
New Revision: 210897
URL: http://svn.freebsd.org/changeset/base/210897

Log:
  MFC 210604:
  Fix test for double-nul characters that terminate the string table at
  the end of each SMBIOS/DMI structure.

Modified:
  stable/6/sys/dev/ipmi/ipmi_smbios.c
Directory Properties:
  stable/6/sys/   (props changed)
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)

Modified: stable/6/sys/dev/ipmi/ipmi_smbios.c
==============================================================================
--- stable/6/sys/dev/ipmi/ipmi_smbios.c	Thu Aug  5 20:45:46 2010	(r210896)
+++ stable/6/sys/dev/ipmi/ipmi_smbios.c	Thu Aug  5 20:49:47 2010	(r210897)
@@ -189,7 +189,7 @@ smbios_walk_table(uint8_t *p, int entrie
 		 * formatted area of this structure.
 		 */
 		p += s->length;
-		while (p[0] != 0 && p[1] != 0)
+		while (!(p[0] == 0 && p[1] == 0))
 			p++;
 
 		/*

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 21:01:16 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 355DA106566C;
	Thu,  5 Aug 2010 21:01:16 +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 221A68FC12;
	Thu,  5 Aug 2010 21:01:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75L1GLM004882;
	Thu, 5 Aug 2010 21:01:16 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75L1F9n004877;
	Thu, 5 Aug 2010 21:01:15 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008052101.o75L1F9n004877@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 21:01: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: r210898 - in stable/8/sys: amd64/amd64 amd64/include
	i386/i386 i386/include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 21:01:16 -0000

Author: jhb
Date: Thu Aug  5 21:01:15 2010
New Revision: 210898
URL: http://svn.freebsd.org/changeset/base/210898

Log:
  MFC 210577: The corrected error count field is dependent on CMCI, not TES.

Modified:
  stable/8/sys/amd64/amd64/mca.c
  stable/8/sys/amd64/include/specialreg.h
  stable/8/sys/i386/i386/mca.c
  stable/8/sys/i386/include/specialreg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/amd64/amd64/mca.c
==============================================================================
--- stable/8/sys/amd64/amd64/mca.c	Thu Aug  5 20:49:47 2010	(r210897)
+++ stable/8/sys/amd64/amd64/mca.c	Thu Aug  5 21:01:15 2010	(r210898)
@@ -245,7 +245,7 @@ mca_log(const struct mca_record *rec)
 		printf("UNCOR ");
 	else {
 		printf("COR ");
-		if (rec->mr_mcg_cap & MCG_CAP_TES_P)
+		if (rec->mr_mcg_cap & MCG_CAP_CMCI_P)
 			printf("(%lld) ", ((long long)rec->mr_status &
 			    MC_STATUS_COR_COUNT) >> 38);
 	}

Modified: stable/8/sys/amd64/include/specialreg.h
==============================================================================
--- stable/8/sys/amd64/include/specialreg.h	Thu Aug  5 20:49:47 2010	(r210897)
+++ stable/8/sys/amd64/include/specialreg.h	Thu Aug  5 21:01:15 2010	(r210898)
@@ -372,10 +372,10 @@
 #define	MC_STATUS_MCA_ERROR	0x000000000000ffff
 #define	MC_STATUS_MODEL_ERROR	0x00000000ffff0000
 #define	MC_STATUS_OTHER_INFO	0x01ffffff00000000
-#define	MC_STATUS_COR_COUNT	0x001fffc000000000	/* If MCG_CAP_TES_P */
+#define	MC_STATUS_COR_COUNT	0x001fffc000000000	/* If MCG_CAP_CMCI_P */
 #define	MC_STATUS_TES_STATUS	0x0060000000000000	/* If MCG_CAP_TES_P */
-#define	MC_STATUS_AR		0x0080000000000000	/* If MCG_CAP_CMCI_P */
-#define	MC_STATUS_S		0x0100000000000000	/* If MCG_CAP_CMCI_P */
+#define	MC_STATUS_AR		0x0080000000000000	/* If MCG_CAP_TES_P */
+#define	MC_STATUS_S		0x0100000000000000	/* If MCG_CAP_TES_P */
 #define	MC_STATUS_PCC		0x0200000000000000
 #define	MC_STATUS_ADDRV		0x0400000000000000
 #define	MC_STATUS_MISCV		0x0800000000000000

Modified: stable/8/sys/i386/i386/mca.c
==============================================================================
--- stable/8/sys/i386/i386/mca.c	Thu Aug  5 20:49:47 2010	(r210897)
+++ stable/8/sys/i386/i386/mca.c	Thu Aug  5 21:01:15 2010	(r210898)
@@ -252,7 +252,7 @@ mca_log(const struct mca_record *rec)
 		printf("UNCOR ");
 	else {
 		printf("COR ");
-		if (rec->mr_mcg_cap & MCG_CAP_TES_P)
+		if (rec->mr_mcg_cap & MCG_CAP_CMCI_P)
 			printf("(%lld) ", ((long long)rec->mr_status &
 			    MC_STATUS_COR_COUNT) >> 38);
 	}

Modified: stable/8/sys/i386/include/specialreg.h
==============================================================================
--- stable/8/sys/i386/include/specialreg.h	Thu Aug  5 20:49:47 2010	(r210897)
+++ stable/8/sys/i386/include/specialreg.h	Thu Aug  5 21:01:15 2010	(r210898)
@@ -441,10 +441,10 @@
 #define	MC_STATUS_MCA_ERROR	0x000000000000ffff
 #define	MC_STATUS_MODEL_ERROR	0x00000000ffff0000
 #define	MC_STATUS_OTHER_INFO	0x01ffffff00000000
-#define	MC_STATUS_COR_COUNT	0x001fffc000000000	/* If MCG_CAP_TES_P */
+#define	MC_STATUS_COR_COUNT	0x001fffc000000000	/* If MCG_CAP_CMCI_P */
 #define	MC_STATUS_TES_STATUS	0x0060000000000000	/* If MCG_CAP_TES_P */
-#define	MC_STATUS_AR		0x0080000000000000	/* If MCG_CAP_CMCI_P */
-#define	MC_STATUS_S		0x0100000000000000	/* If MCG_CAP_CMCI_P */
+#define	MC_STATUS_AR		0x0080000000000000	/* If MCG_CAP_TES_P */
+#define	MC_STATUS_S		0x0100000000000000	/* If MCG_CAP_TES_P */
 #define	MC_STATUS_PCC		0x0200000000000000
 #define	MC_STATUS_ADDRV		0x0400000000000000
 #define	MC_STATUS_MISCV		0x0800000000000000

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 21:01:35 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B06311065670;
	Thu,  5 Aug 2010 21:01:35 +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 9D6478FC08;
	Thu,  5 Aug 2010 21:01:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75L1ZE2004985;
	Thu, 5 Aug 2010 21:01:35 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75L1Z6q004980;
	Thu, 5 Aug 2010 21:01:35 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008052101.o75L1Z6q004980@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 21:01: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: r210899 - in stable/7/sys: amd64/amd64 amd64/include
	i386/i386 i386/include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 21:01:35 -0000

Author: jhb
Date: Thu Aug  5 21:01:35 2010
New Revision: 210899
URL: http://svn.freebsd.org/changeset/base/210899

Log:
  MFC 210577: The corrected error count field is dependent on CMCI, not TES.

Modified:
  stable/7/sys/amd64/amd64/mca.c
  stable/7/sys/amd64/include/specialreg.h
  stable/7/sys/i386/i386/mca.c
  stable/7/sys/i386/include/specialreg.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/amd64/amd64/mca.c
==============================================================================
--- stable/7/sys/amd64/amd64/mca.c	Thu Aug  5 21:01:15 2010	(r210898)
+++ stable/7/sys/amd64/amd64/mca.c	Thu Aug  5 21:01:35 2010	(r210899)
@@ -245,7 +245,7 @@ mca_log(const struct mca_record *rec)
 		printf("UNCOR ");
 	else {
 		printf("COR ");
-		if (rec->mr_mcg_cap & MCG_CAP_TES_P)
+		if (rec->mr_mcg_cap & MCG_CAP_CMCI_P)
 			printf("(%lld) ", ((long long)rec->mr_status &
 			    MC_STATUS_COR_COUNT) >> 38);
 	}

Modified: stable/7/sys/amd64/include/specialreg.h
==============================================================================
--- stable/7/sys/amd64/include/specialreg.h	Thu Aug  5 21:01:15 2010	(r210898)
+++ stable/7/sys/amd64/include/specialreg.h	Thu Aug  5 21:01:35 2010	(r210899)
@@ -363,10 +363,10 @@
 #define	MC_STATUS_MCA_ERROR	0x000000000000ffff
 #define	MC_STATUS_MODEL_ERROR	0x00000000ffff0000
 #define	MC_STATUS_OTHER_INFO	0x01ffffff00000000
-#define	MC_STATUS_COR_COUNT	0x001fffc000000000	/* If MCG_CAP_TES_P */
+#define	MC_STATUS_COR_COUNT	0x001fffc000000000	/* If MCG_CAP_CMCI_P */
 #define	MC_STATUS_TES_STATUS	0x0060000000000000	/* If MCG_CAP_TES_P */
-#define	MC_STATUS_AR		0x0080000000000000	/* If MCG_CAP_CMCI_P */
-#define	MC_STATUS_S		0x0100000000000000	/* If MCG_CAP_CMCI_P */
+#define	MC_STATUS_AR		0x0080000000000000	/* If MCG_CAP_TES_P */
+#define	MC_STATUS_S		0x0100000000000000	/* If MCG_CAP_TES_P */
 #define	MC_STATUS_PCC		0x0200000000000000
 #define	MC_STATUS_ADDRV		0x0400000000000000
 #define	MC_STATUS_MISCV		0x0800000000000000

Modified: stable/7/sys/i386/i386/mca.c
==============================================================================
--- stable/7/sys/i386/i386/mca.c	Thu Aug  5 21:01:15 2010	(r210898)
+++ stable/7/sys/i386/i386/mca.c	Thu Aug  5 21:01:35 2010	(r210899)
@@ -252,7 +252,7 @@ mca_log(const struct mca_record *rec)
 		printf("UNCOR ");
 	else {
 		printf("COR ");
-		if (rec->mr_mcg_cap & MCG_CAP_TES_P)
+		if (rec->mr_mcg_cap & MCG_CAP_CMCI_P)
 			printf("(%lld) ", ((long long)rec->mr_status &
 			    MC_STATUS_COR_COUNT) >> 38);
 	}

Modified: stable/7/sys/i386/include/specialreg.h
==============================================================================
--- stable/7/sys/i386/include/specialreg.h	Thu Aug  5 21:01:15 2010	(r210898)
+++ stable/7/sys/i386/include/specialreg.h	Thu Aug  5 21:01:35 2010	(r210899)
@@ -432,10 +432,10 @@
 #define	MC_STATUS_MCA_ERROR	0x000000000000ffff
 #define	MC_STATUS_MODEL_ERROR	0x00000000ffff0000
 #define	MC_STATUS_OTHER_INFO	0x01ffffff00000000
-#define	MC_STATUS_COR_COUNT	0x001fffc000000000	/* If MCG_CAP_TES_P */
+#define	MC_STATUS_COR_COUNT	0x001fffc000000000	/* If MCG_CAP_CMCI_P */
 #define	MC_STATUS_TES_STATUS	0x0060000000000000	/* If MCG_CAP_TES_P */
-#define	MC_STATUS_AR		0x0080000000000000	/* If MCG_CAP_CMCI_P */
-#define	MC_STATUS_S		0x0100000000000000	/* If MCG_CAP_CMCI_P */
+#define	MC_STATUS_AR		0x0080000000000000	/* If MCG_CAP_TES_P */
+#define	MC_STATUS_S		0x0100000000000000	/* If MCG_CAP_TES_P */
 #define	MC_STATUS_PCC		0x0200000000000000
 #define	MC_STATUS_ADDRV		0x0400000000000000
 #define	MC_STATUS_MISCV		0x0800000000000000

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 21:31:30 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 414B5106564A;
	Thu,  5 Aug 2010 21:31:30 +0000 (UTC)
	(envelope-from gonzo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2F5EE8FC1E;
	Thu,  5 Aug 2010 21:31:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75LVUne011632;
	Thu, 5 Aug 2010 21:31:30 GMT (envelope-from gonzo@svn.freebsd.org)
Received: (from gonzo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75LVUsg011630;
	Thu, 5 Aug 2010 21:31:30 GMT (envelope-from gonzo@svn.freebsd.org)
Message-Id: <201008052131.o75LVUsg011630@svn.freebsd.org>
From: Oleksandr Tymoshenko 
Date: Thu, 5 Aug 2010 21:31:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210900 - head/sys/mips/atheros
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 21:31:30 -0000

Author: gonzo
Date: Thu Aug  5 21:31:29 2010
New Revision: 210900
URL: http://svn.freebsd.org/changeset/base/210900

Log:
  - Add interrupts counter for PCI devices

Modified:
  head/sys/mips/atheros/ar71xx_pci.c

Modified: head/sys/mips/atheros/ar71xx_pci.c
==============================================================================
--- head/sys/mips/atheros/ar71xx_pci.c	Thu Aug  5 21:01:35 2010	(r210899)
+++ head/sys/mips/atheros/ar71xx_pci.c	Thu Aug  5 21:31:29 2010	(r210900)
@@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -70,6 +71,7 @@ struct ar71xx_pci_softc {
 	struct rman		sc_irq_rman;
 
 	struct intr_event	*sc_eventstab[AR71XX_PCI_NIRQS];	
+	mips_intrcnt_t		sc_intr_counter[AR71XX_PCI_NIRQS];	
 	struct resource		*sc_irq;
 	void			*sc_ih;
 };
@@ -436,13 +438,20 @@ ar71xx_pci_setup_intr(device_t bus, devi
 	if (event == NULL) {
 		error = intr_event_create(&event, (void *)irq, 0, irq, 
 		    ar71xx_pci_mask_irq, ar71xx_pci_unmask_irq, NULL, NULL,
-		    "ar71xx_pci intr%d:", irq);
+		    "pci intr%d:", irq);
 
-		sc->sc_eventstab[irq] = event;
+		if (error == 0) {
+			sc->sc_eventstab[irq] = event;
+			sc->sc_intr_counter[irq] =
+			    mips_intrcnt_create(event->ie_name);
+		}
+		else
+			return error;
 	}
 
 	intr_event_add_handler(event, device_get_nameunit(child), filt,
 	    handler, arg, intr_priority(flags), flags, cookiep);
+	mips_intrcnt_setname(sc->sc_intr_counter[irq], event->ie_fullname);
 
 	ar71xx_pci_unmask_irq((void*)irq);
 
@@ -497,6 +506,7 @@ ar71xx_pci_intr(void *arg)
 
 			/* TODO: frame instead of NULL? */
 			intr_event_handle(event, NULL);
+			mips_intrcnt_inc(sc->sc_intr_counter[irq]);
 		}
 	}
 

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 22:01:14 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 95464106567D;
	Thu,  5 Aug 2010 22: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 68D2B8FC08;
	Thu,  5 Aug 2010 22:01:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75M1EE0018253;
	Thu, 5 Aug 2010 22:01:14 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75M1EgF018249;
	Thu, 5 Aug 2010 22:01:14 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008052201.o75M1EgF018249@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 22:01:14 +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: r210901 - in stable/8/sys: amd64/include i386/include
	ia64/include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 22:01:14 -0000

Author: jhb
Date: Thu Aug  5 22:01:14 2010
New Revision: 210901
URL: http://svn.freebsd.org/changeset/base/210901

Log:
  MFC 210623:
  Mark the __curthread() functions as __pure2 and remove the volatile keyword
  from the inline assembly.  This allows the compiler to cache invocations of
  curthread since it's value does not change within a thread context.

Modified:
  stable/8/sys/amd64/include/pcpu.h
  stable/8/sys/i386/include/pcpu.h
  stable/8/sys/ia64/include/pcpu.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/amd64/include/pcpu.h
==============================================================================
--- stable/8/sys/amd64/include/pcpu.h	Thu Aug  5 21:31:29 2010	(r210900)
+++ stable/8/sys/amd64/include/pcpu.h	Thu Aug  5 22:01:14 2010	(r210901)
@@ -216,12 +216,12 @@ extern struct pcpu *pcpup;
 #define	PCPU_PTR(member)	__PCPU_PTR(pc_ ## member)
 #define	PCPU_SET(member, val)	__PCPU_SET(pc_ ## member, val)
 
-static __inline struct thread *
+static __inline __pure2 struct thread *
 __curthread(void)
 {
 	struct thread *td;
 
-	__asm __volatile("movq %%gs:0,%0" : "=r" (td));
+	__asm("movq %%gs:0,%0" : "=r" (td));
 	return (td);
 }
 #define	curthread		(__curthread())

Modified: stable/8/sys/i386/include/pcpu.h
==============================================================================
--- stable/8/sys/i386/include/pcpu.h	Thu Aug  5 21:31:29 2010	(r210900)
+++ stable/8/sys/i386/include/pcpu.h	Thu Aug  5 22:01:14 2010	(r210901)
@@ -223,12 +223,12 @@ extern struct pcpu *pcpup;
 #define	PCPU_PTR(member)	__PCPU_PTR(pc_ ## member)
 #define	PCPU_SET(member, val)	__PCPU_SET(pc_ ## member, val)
 
-static __inline struct thread *
+static __inline __pure2 struct thread *
 __curthread(void)
 {
 	struct thread *td;
 
-	__asm __volatile("movl %%fs:0,%0" : "=r" (td));
+	__asm("movl %%fs:0,%0" : "=r" (td));
 	return (td);
 }
 #define	curthread		(__curthread())

Modified: stable/8/sys/ia64/include/pcpu.h
==============================================================================
--- stable/8/sys/ia64/include/pcpu.h	Thu Aug  5 21:31:29 2010	(r210900)
+++ stable/8/sys/ia64/include/pcpu.h	Thu Aug  5 22:01:14 2010	(r210901)
@@ -70,12 +70,12 @@ struct pcpu;
 
 register struct pcpu *pcpup __asm__("r13");
 
-static __inline struct thread *
+static __inline __pure2 struct thread *
 __curthread(void)
 {
 	struct thread *td;
 
-	__asm __volatile("ld8.acq %0=[r13]" : "=r"(td));
+	__asm("ld8.acq %0=[r13]" : "=r"(td));
 	return (td);
 }
 #define	curthread	(__curthread())

From owner-svn-src-all@FreeBSD.ORG  Thu Aug  5 22:04:08 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 30AC5106566C;
	Thu,  5 Aug 2010 22:04:08 +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 04C988FC0C;
	Thu,  5 Aug 2010 22:04:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75M47QG018922;
	Thu, 5 Aug 2010 22:04:07 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75M47Kn018919;
	Thu, 5 Aug 2010 22:04:07 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008052204.o75M47Kn018919@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 22:04:07 +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: r210902 - in stable/7/sys: amd64/include i386/include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Aug 2010 22:04:08 -0000

Author: jhb
Date: Thu Aug  5 22:04:07 2010
New Revision: 210902
URL: http://svn.freebsd.org/changeset/base/210902

Log:
  MFC 210623:
  Mark the __curthread() functions as __pure2 and remove the volatile keyword
  from the inline assembly.  This allows the compiler to cache invocations of
  curthread since it's value does not change within a thread context.

Modified:
  stable/7/sys/amd64/include/pcpu.h
  stable/7/sys/i386/include/pcpu.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/amd64/include/pcpu.h
==============================================================================
--- stable/7/sys/amd64/include/pcpu.h	Thu Aug  5 22:01:14 2010	(r210901)
+++ stable/7/sys/amd64/include/pcpu.h	Thu Aug  5 22:04:07 2010	(r210902)
@@ -188,12 +188,12 @@ extern struct pcpu *pcpup;
 #define	PCPU_PTR(member)	__PCPU_PTR(pc_ ## member)
 #define	PCPU_SET(member, val)	__PCPU_SET(pc_ ## member, val)
 
-static __inline struct thread *
+static __inline __pure2 struct thread *
 __curthread(void)
 {
 	struct thread *td;
 
-	__asm __volatile("movq %%gs:0,%0" : "=r" (td));
+	__asm("movq %%gs:0,%0" : "=r" (td));
 	return (td);
 }
 #define	curthread		(__curthread())

Modified: stable/7/sys/i386/include/pcpu.h
==============================================================================
--- stable/7/sys/i386/include/pcpu.h	Thu Aug  5 22:01:14 2010	(r210901)
+++ stable/7/sys/i386/include/pcpu.h	Thu Aug  5 22:04:07 2010	(r210902)
@@ -189,12 +189,12 @@ extern struct pcpu *pcpup;
 #define	PCPU_PTR(member)	__PCPU_PTR(pc_ ## member)
 #define	PCPU_SET(member, val)	__PCPU_SET(pc_ ## member, val)
 
-static __inline struct thread *
+static __inline __pure2 struct thread *
 __curthread(void)
 {
 	struct thread *td;
 
-	__asm __volatile("movl %%fs:0,%0" : "=r" (td));
+	__asm("movl %%fs:0,%0" : "=r" (td));
 	return (td);
 }
 #define	curthread		(__curthread())

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 00:50:16 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 890151065670;
	Fri,  6 Aug 2010 00:50:16 +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 7678C8FC12;
	Fri,  6 Aug 2010 00:50:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o760oGrC056126;
	Fri, 6 Aug 2010 00:50:16 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o760oGO5056124;
	Fri, 6 Aug 2010 00:50:16 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201008060050.o760oGO5056124@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 6 Aug 2010 00:50:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210904 - head/sys/dev/alc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 00:50:16 -0000

Author: yongari
Date: Fri Aug  6 00:50:16 2010
New Revision: 210904
URL: http://svn.freebsd.org/changeset/base/210904

Log:
  Reduce Tx interrupt moderation timer from 50ms to 1ms. The default
  value resulted in poor performance for UDP packets. With this
  change, UDP bulk transfer performance is more than 940Mbps.
  
  While I'm here fix a wrong register definition.

Modified:
  head/sys/dev/alc/if_alcreg.h

Modified: head/sys/dev/alc/if_alcreg.h
==============================================================================
--- head/sys/dev/alc/if_alcreg.h	Thu Aug  5 22:25:09 2010	(r210903)
+++ head/sys/dev/alc/if_alcreg.h	Fri Aug  6 00:50:16 2010	(r210904)
@@ -106,8 +106,8 @@
 
 #define	ALC_MASTER_CFG			0x1400
 #define	MASTER_RESET			0x00000001
+#define	MASTER_TEST_MODE_MASK		0x0000000C
 #define	MASTER_BERT_START		0x00000010
-#define	MASTER_TEST_MODE_MASK		0x000000C0
 #define	MASTER_MTIMER_ENB		0x00000100
 #define	MASTER_MANUAL_INTR_ENB		0x00000200
 #define	MASTER_IM_TX_TIMER_ENB		0x00000400
@@ -144,7 +144,7 @@
  * alc(4) does not rely on Tx completion interrupts, so set it
  * somewhat large value to reduce Tx completion interrupts.
  */
-#define	ALC_IM_TX_TIMER_DEFAULT		50000	/* 50ms */
+#define	ALC_IM_TX_TIMER_DEFAULT		1000	/* 1ms */
 
 #define	ALC_GPHY_CFG			0x140C	/* 16bits */
 #define	GPHY_CFG_EXT_RESET		0x0001

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 00:52:23 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 705AB106567A;
	Fri,  6 Aug 2010 00:52:23 +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 5E1358FC12;
	Fri,  6 Aug 2010 00:52:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o760qNFv056660;
	Fri, 6 Aug 2010 00:52:23 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o760qNa1056658;
	Fri, 6 Aug 2010 00:52:23 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201008060052.o760qNa1056658@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 6 Aug 2010 00:52:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210905 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 00:52:23 -0000

Author: yongari
Date: Fri Aug  6 00:52:23 2010
New Revision: 210905
URL: http://svn.freebsd.org/changeset/base/210905

Log:
  Reflect default Tx interrupt moderation timer value change(50ms -> 1ms).

Modified:
  head/share/man/man4/alc.4

Modified: head/share/man/man4/alc.4
==============================================================================
--- head/share/man/man4/alc.4	Fri Aug  6 00:50:16 2010	(r210904)
+++ head/share/man/man4/alc.4	Fri Aug  6 00:52:23 2010	(r210905)
@@ -133,7 +133,7 @@ Value 0 completely disables the interrup
 .It Va dev.alc.%d.int_tx_mod
 Maximum amount of time to delay transmit interrupt processing in
 units of 1us.
-The accepted range is 0 to 130000, the default is 50000(50ms).
+The accepted range is 0 to 130000, the default is 1000(1ms).
 Value 0 completely disables the interrupt moderation.
 .It Va dev.alc.%d.process_limit
 Maximum amount of Rx frames to be processed in the event loop before

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 05:20:21 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DC89F106564A;
	Fri,  6 Aug 2010 05:20:21 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CAECF8FC16;
	Fri,  6 Aug 2010 05:20:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o765KLia016303;
	Fri, 6 Aug 2010 05:20:21 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o765KL2I016302;
	Fri, 6 Aug 2010 05:20:21 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201008060520.o765KL2I016302@svn.freebsd.org>
From: Doug Barton 
Date: Fri, 6 Aug 2010 05:20:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210909 - head/sbin/hastctl
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 05:20:22 -0000

Author: dougb
Date: Fri Aug  6 05:20:21 2010
New Revision: 210909
URL: http://svn.freebsd.org/changeset/base/210909

Log:
  Update the arguments to yy_config_parse() to match r210883.
  
  Choose the more conservative option ('yes' to exit on error) to match
  the equivalent code in hastd.

Modified:
  head/sbin/hastctl/hastctl.c

Modified: head/sbin/hastctl/hastctl.c
==============================================================================
--- head/sbin/hastctl/hastctl.c	Fri Aug  6 02:17:58 2010	(r210908)
+++ head/sbin/hastctl/hastctl.c	Fri Aug  6 05:20:21 2010	(r210909)
@@ -432,7 +432,7 @@ main(int argc, char *argv[])
 
 	pjdlog_debug_set(debug);
 
-	cfg = yy_config_parse(cfgpath);
+	cfg = yy_config_parse(cfgpath, true);
 	assert(cfg != NULL);
 
 	switch (cmd) {

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 05:24:41 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A4B7E1065679;
	Fri,  6 Aug 2010 05:24:41 +0000 (UTC)
	(envelope-from neel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 92E408FC16;
	Fri,  6 Aug 2010 05:24:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o765Oflm017298;
	Fri, 6 Aug 2010 05:24:41 GMT (envelope-from neel@svn.freebsd.org)
Received: (from neel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o765Of0K017296;
	Fri, 6 Aug 2010 05:24:41 GMT (envelope-from neel@svn.freebsd.org)
Message-Id: <201008060524.o765Of0K017296@svn.freebsd.org>
From: Neel Natu 
Date: Fri, 6 Aug 2010 05:24:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210910 - head/sys/mips/sibyte
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 05:24:41 -0000

Author: neel
Date: Fri Aug  6 05:24:41 2010
New Revision: 210910
URL: http://svn.freebsd.org/changeset/base/210910

Log:
  uint64_t is 'unsigned long' in n64 build, so compiler is unhappy if the
  format specifier in printf is "%llu".
  
  Use "%ju" instead.

Modified:
  head/sys/mips/sibyte/sb_machdep.c

Modified: head/sys/mips/sibyte/sb_machdep.c
==============================================================================
--- head/sys/mips/sibyte/sb_machdep.c	Fri Aug  6 05:20:21 2010	(r210909)
+++ head/sys/mips/sibyte/sb_machdep.c	Fri Aug  6 05:24:41 2010	(r210910)
@@ -189,11 +189,11 @@ mips_init(void)
 			("CFE DRAM region is not available?"));
 
 		if (bootverbose)
-			printf("cfe_enummem: 0x%016jx/%llu.\n", addr, len);
+			printf("cfe_enummem: 0x%016jx/%ju.\n", addr, len);
 
 		if (maxmem != 0) {
 			if (addr >= maxmem) {
-				printf("Ignoring %llu bytes of memory at 0x%jx "
+				printf("Ignoring %ju bytes of memory at 0x%jx "
 				       "that is above maxmem %dMB\n",
 				       len, addr,
 				       (int)(maxmem / (1024 * 1024)));
@@ -201,7 +201,7 @@ mips_init(void)
 			}
 
 			if (addr + len > maxmem) {
-				printf("Ignoring %llu bytes of memory "
+				printf("Ignoring %ju bytes of memory "
 				       "that is above maxmem %dMB\n",
 				       (addr + len) - maxmem,
 				       (int)(maxmem / (1024 * 1024)));

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 05:30:56 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 14614106566B;
	Fri,  6 Aug 2010 05:30:56 +0000 (UTC)
	(envelope-from neel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DC7128FC08;
	Fri,  6 Aug 2010 05:30:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o765UtTR018689;
	Fri, 6 Aug 2010 05:30:55 GMT (envelope-from neel@svn.freebsd.org)
Received: (from neel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o765Utja018687;
	Fri, 6 Aug 2010 05:30:55 GMT (envelope-from neel@svn.freebsd.org)
Message-Id: <201008060530.o765Utja018687@svn.freebsd.org>
From: Neel Natu 
Date: Fri, 6 Aug 2010 05:30:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210911 - head/sys/mips/sibyte
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 05:30:56 -0000

Author: neel
Date: Fri Aug  6 05:30:55 2010
New Revision: 210911
URL: http://svn.freebsd.org/changeset/base/210911

Log:
  Use a signed integer to hold the address of a register.
  
  This does the right thing by sign extending the address when compiling for
  the n64 abi.

Modified:
  head/sys/mips/sibyte/sb_scd.c

Modified: head/sys/mips/sibyte/sb_scd.c
==============================================================================
--- head/sys/mips/sibyte/sb_scd.c	Fri Aug  6 05:24:41 2010	(r210910)
+++ head/sys/mips/sibyte/sb_scd.c	Fri Aug  6 05:30:55 2010	(r210911)
@@ -45,8 +45,8 @@ __FBSDID("$FreeBSD$");
  *
  * We use the mips_ld() and mips_sd() functions to do this for us.
  */
-#define	sb_store64(addr, val)	mips3_sd((uint64_t *)(addr), (val))
-#define	sb_load64(addr)		mips3_ld((uint64_t *)(addr))
+#define	sb_store64(addr, val)	mips3_sd((uint64_t *)(uintptr_t)(addr), (val))
+#define	sb_load64(addr)		mips3_ld((uint64_t *)(uintptr_t)(addr))
 
 /*
  * System Control and Debug (SCD) unit on the Sibyte ZBbus.
@@ -131,7 +131,7 @@ sb_system_reset(void)
 void
 sb_disable_intsrc(int cpu, int src)
 {
-	uint32_t regaddr;
+	int regaddr;
 	uint64_t val;
 
 	regaddr = INTSRC_MASK_ADDR(cpu);
@@ -144,7 +144,7 @@ sb_disable_intsrc(int cpu, int src)
 void
 sb_enable_intsrc(int cpu, int src)
 {
-	uint32_t regaddr;
+	int regaddr;
 	uint64_t val;
 
 	regaddr = INTSRC_MASK_ADDR(cpu);
@@ -157,7 +157,7 @@ sb_enable_intsrc(int cpu, int src)
 void
 sb_write_intsrc_mask(int cpu, uint64_t val)
 {
-	uint32_t regaddr;
+	int regaddr;
 
 	regaddr = INTSRC_MASK_ADDR(cpu);
 	sb_store64(regaddr, val);
@@ -166,7 +166,7 @@ sb_write_intsrc_mask(int cpu, uint64_t v
 uint64_t
 sb_read_intsrc_mask(int cpu)
 {
-	uint32_t regaddr;
+	int regaddr;
 	uint64_t val;
 
 	regaddr = INTSRC_MASK_ADDR(cpu);
@@ -178,7 +178,7 @@ sb_read_intsrc_mask(int cpu)
 void
 sb_write_intmap(int cpu, int intsrc, int intrnum)
 {
-	uint32_t regaddr;
+	int regaddr;
 
 	regaddr = INTSRC_MAP_ADDR(cpu, intsrc);
 	sb_store64(regaddr, intrnum);
@@ -187,7 +187,7 @@ sb_write_intmap(int cpu, int intsrc, int
 int
 sb_read_intmap(int cpu, int intsrc)
 {
-	uint32_t regaddr;
+	int regaddr;
 
 	regaddr = INTSRC_MAP_ADDR(cpu, intsrc);
 	return (sb_load64(regaddr) & 0x7);
@@ -227,7 +227,7 @@ sb_read_sysrev(void)
 void
 sb_set_mailbox(int cpu, uint64_t val)
 {
-	uint32_t regaddr;
+	int regaddr;
 
 	regaddr = MAILBOX_SET_ADDR(cpu);
 	sb_store64(regaddr, val);
@@ -236,7 +236,7 @@ sb_set_mailbox(int cpu, uint64_t val)
 void
 sb_clear_mailbox(int cpu, uint64_t val)
 {
-	uint32_t regaddr;
+	int regaddr;
 
 	regaddr = MAILBOX_CLEAR_ADDR(cpu);
 	sb_store64(regaddr, val);

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 06:04:27 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E24501065677;
	Fri,  6 Aug 2010 06:04:27 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B550A8FC19;
	Fri,  6 Aug 2010 06:04:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7664Rtk026106;
	Fri, 6 Aug 2010 06:04:27 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7664RQe026104;
	Fri, 6 Aug 2010 06:04:27 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008060604.o7664RQe026104@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 6 Aug 2010 06:04:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210912 - head/sbin/hastctl
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 06:04:28 -0000

Author: pjd
Date: Fri Aug  6 06:04:27 2010
New Revision: 210912
URL: http://svn.freebsd.org/changeset/base/210912

Log:
  Force commit to remind me about MFCing r210909.
  
  MFC after:	1 month

Modified:
  head/sbin/hastctl/hastctl.c

Modified: head/sbin/hastctl/hastctl.c
==============================================================================

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 07:03:23 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 03C361065674;
	Fri,  6 Aug 2010 07:03:23 +0000 (UTC)
	(envelope-from neel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E669B8FC18;
	Fri,  6 Aug 2010 07:03:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7673MYD039194;
	Fri, 6 Aug 2010 07:03:22 GMT (envelope-from neel@svn.freebsd.org)
Received: (from neel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7673MOs039192;
	Fri, 6 Aug 2010 07:03:22 GMT (envelope-from neel@svn.freebsd.org)
Message-Id: <201008060703.o7673MOs039192@svn.freebsd.org>
From: Neel Natu 
Date: Fri, 6 Aug 2010 07:03:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210913 - head/sys/mips/sibyte
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 07:03:23 -0000

Author: neel
Date: Fri Aug  6 07:03:22 2010
New Revision: 210913
URL: http://svn.freebsd.org/changeset/base/210913

Log:
  Remove redundant declaration of 'pcib_driver' class from sb_zbpci.c. This
  causes a compilation error.
  
  The declaration is provided by sys/dev/pci/pcib_private.h starting from r210864.

Modified:
  head/sys/mips/sibyte/sb_zbpci.c

Modified: head/sys/mips/sibyte/sb_zbpci.c
==============================================================================
--- head/sys/mips/sibyte/sb_zbpci.c	Fri Aug  6 06:04:27 2010	(r210912)
+++ head/sys/mips/sibyte/sb_zbpci.c	Fri Aug  6 07:03:22 2010	(r210913)
@@ -457,7 +457,6 @@ static device_method_t zbpci_methods[] =
  * consider drivers belonging to the "pcib" when probing children of
  * "zbpci".
  */
-DECLARE_CLASS(pcib_driver);
 DEFINE_CLASS_1(zbpci, zbpci_driver, zbpci_methods, 0, pcib_driver);
 
 static devclass_t zbpci_devclass;

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 07:32:34 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 09EDE1065679;
	Fri,  6 Aug 2010 07:32:34 +0000 (UTC)
	(envelope-from jchandra@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D06018FC1C;
	Fri,  6 Aug 2010 07:32:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o767WXF9045641;
	Fri, 6 Aug 2010 07:32:33 GMT (envelope-from jchandra@svn.freebsd.org)
Received: (from jchandra@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o767WX4Z045638;
	Fri, 6 Aug 2010 07:32:33 GMT (envelope-from jchandra@svn.freebsd.org)
Message-Id: <201008060732.o767WX4Z045638@svn.freebsd.org>
From: "Jayachandran C." 
Date: Fri, 6 Aug 2010 07:32:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210914 - in head/sys/mips: include mips
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 07:32:34 -0000

Author: jchandra
Date: Fri Aug  6 07:32:33 2010
New Revision: 210914
URL: http://svn.freebsd.org/changeset/base/210914

Log:
  Fix the issue reported by alc:
  
   pmap_page_wired_mappings() counts the number of pv entries for the
   specified page that have the pv entry wired flag set to TRUE.
   pmap_enter() correctly initializes this flag.  However,
   pmap_change_wiring() doesn't update the corresponding pv entry flag,
   only the PTE.  So, the count returned by pmap_page_wired_mappings()
   will sometimes be wrong.
  
   In the short term, the best fix would be to eliminate the pv entry
   flag and use only the PTE.  That flag is wasting non-trivial memory.
  
  Remove pv_wired flag, and use PTE flag to count the wired mappings.
  
  Reviewed by:	alc

Modified:
  head/sys/mips/include/pmap.h
  head/sys/mips/mips/pmap.c

Modified: head/sys/mips/include/pmap.h
==============================================================================
--- head/sys/mips/include/pmap.h	Fri Aug  6 07:03:22 2010	(r210913)
+++ head/sys/mips/include/pmap.h	Fri Aug  6 07:32:33 2010	(r210914)
@@ -124,7 +124,6 @@ typedef struct pv_entry {
 	TAILQ_ENTRY(pv_entry) pv_list;
 	TAILQ_ENTRY(pv_entry) pv_plist;
 	vm_page_t pv_ptem;	/* VM page for pte */
-	boolean_t pv_wired;	/* whether this entry is wired */
 }       *pv_entry_t;
 
 

Modified: head/sys/mips/mips/pmap.c
==============================================================================
--- head/sys/mips/mips/pmap.c	Fri Aug  6 07:03:22 2010	(r210913)
+++ head/sys/mips/mips/pmap.c	Fri Aug  6 07:32:33 2010	(r210914)
@@ -1473,7 +1473,6 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm
 		pv->pv_va = va;
 		pv->pv_pmap = pmap;
 		pv->pv_ptem = mpte;
-		pv->pv_wired = FALSE;
 		TAILQ_INSERT_TAIL(&pmap->pm_pvlist, pv, pv_plist);
 		TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list);
 		m->md.pv_list_count++;
@@ -1897,7 +1896,6 @@ pmap_enter(pmap_t pmap, vm_offset_t va, 
 		pv->pv_va = va;
 		pv->pv_pmap = pmap;
 		pv->pv_ptem = mpte;
-		pv->pv_wired = wired;
 		TAILQ_INSERT_TAIL(&pmap->pm_pvlist, pv, pv_plist);
 		TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list);
 		m->md.pv_list_count++;
@@ -2655,15 +2653,22 @@ int
 pmap_page_wired_mappings(vm_page_t m)
 {
 	pv_entry_t pv;
+	pmap_t pmap;
+	pt_entry_t *pte;
 	int count;
 
 	count = 0;
 	if ((m->flags & PG_FICTITIOUS) != 0)
 		return (count);
 	vm_page_lock_queues();
-	TAILQ_FOREACH(pv, &m->md.pv_list, pv_list)
-	    if (pv->pv_wired)
-		count++;
+	TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) {
+		pmap = pv->pv_pmap;
+		PMAP_LOCK(pmap);
+		pte = pmap_pte(pmap, pv->pv_va);
+		if (pte_test(pte, PTE_W))
+			count++;
+		PMAP_UNLOCK(pmap);
+	}
 	vm_page_unlock_queues();
 	return (count);
 }

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 08:17:44 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 77C031065672;
	Fri,  6 Aug 2010 08:17:44 +0000 (UTC)
	(envelope-from brian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 655D58FC21;
	Fri,  6 Aug 2010 08:17:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o768HihH055935;
	Fri, 6 Aug 2010 08:17:44 GMT (envelope-from brian@svn.freebsd.org)
Received: (from brian@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o768HiTu055933;
	Fri, 6 Aug 2010 08:17:44 GMT (envelope-from brian@svn.freebsd.org)
Message-Id: <201008060817.o768HiTu055933@svn.freebsd.org>
From: Brian Somers 
Date: Fri, 6 Aug 2010 08:17: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: r210915 - stable/8/sbin/dhclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 08:17:44 -0000

Author: brian
Date: Fri Aug  6 08:17:44 2010
New Revision: 210915
URL: http://svn.freebsd.org/changeset/base/210915

Log:
  MFC r209756:
      Log dhclient's reason for exiting and change the 10 second
      ignore-routing-messages dhclient-script timeout to be effective
      from script completion rather than from script start time.
  
      Ignore RTM_DELADDR and RTM_NEWADDR messages when the message
      contains no interface address (which should not happen) rather than
      exiting.

Modified:
  stable/8/sbin/dhclient/dhclient.c
Directory Properties:
  stable/8/sbin/dhclient/   (props changed)

Modified: stable/8/sbin/dhclient/dhclient.c
==============================================================================
--- stable/8/sbin/dhclient/dhclient.c	Fri Aug  6 07:32:33 2010	(r210914)
+++ stable/8/sbin/dhclient/dhclient.c	Fri Aug  6 08:17:44 2010	(r210915)
@@ -126,7 +126,7 @@ int		 fork_privchld(int, int);
 	    ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
 #define	ADVANCE(x, n) (x += ROUNDUP((n)->sa_len))
 
-time_t	scripttime;
+static time_t	scripttime;
 
 int
 findproto(char *cp, int n)
@@ -204,7 +204,7 @@ disassoc(void *arg)
 void
 routehandler(struct protocol *p)
 {
-	char msg[2048];
+	char msg[2048], *addr;
 	struct rt_msghdr *rtm;
 	struct if_msghdr *ifm;
 	struct ifa_msghdr *ifam;
@@ -224,13 +224,6 @@ routehandler(struct protocol *p)
 
 	switch (rtm->rtm_type) {
 	case RTM_NEWADDR:
-		/*
-		 * XXX: If someone other than us adds our address,
-		 * we should assume they are taking over from us,
-		 * delete the lease record, and exit without modifying
-		 * the interface.
-		 */
-		break;
 	case RTM_DELADDR:
 		ifam = (struct ifa_msghdr *)rtm;
 
@@ -243,7 +236,7 @@ routehandler(struct protocol *p)
 
 		sa = get_ifa((char *)(ifam + 1), ifam->ifam_addrs);
 		if (sa == NULL)
-			goto die;
+			break;
 
 		if ((a.len = sizeof(struct in_addr)) > sizeof(a.iabuf))
 			error("king bula sez: len mismatch");
@@ -255,21 +248,42 @@ routehandler(struct protocol *p)
 			if (addr_eq(a, l->address))
 				break;
 
-		if (l == NULL)	/* deleted addr is not the one we set */
+		if (l == NULL)	/* added/deleted addr is not the one we set */
 			break;
-		goto die;
+
+		addr = inet_ntoa(((struct sockaddr_in *)sa)->sin_addr);
+		if (rtm->rtm_type == RTM_NEWADDR)  {
+			/*
+			 * XXX: If someone other than us adds our address,
+			 * should we assume they are taking over from us,
+			 * delete the lease record, and exit without modifying
+			 * the interface?
+			 */
+			warning("My address (%s) was re-added", addr);
+		} else {
+			warning("My address (%s) was deleted, dhclient exiting",
+			    addr);
+			goto die;
+		}
+		break;
 	case RTM_IFINFO:
 		ifm = (struct if_msghdr *)rtm;
 		if (ifm->ifm_index != ifi->index)
 			break;
-		if ((rtm->rtm_flags & RTF_UP) == 0)
+		if ((rtm->rtm_flags & RTF_UP) == 0) {
+			warning("Interface %s is down, dhclient exiting",
+			    ifi->name);
 			goto die;
+		}
 		break;
 	case RTM_IFANNOUNCE:
 		ifan = (struct if_announcemsghdr *)rtm;
 		if (ifan->ifan_what == IFAN_DEPARTURE &&
-		    ifan->ifan_index == ifi->index)
+		    ifan->ifan_index == ifi->index) {
+			warning("Interface %s is gone, dhclient exiting",
+			    ifi->name);
 			goto die;
+		}
 		break;
 	case RTM_IEEE80211:
 		ifan = (struct if_announcemsghdr *)rtm;
@@ -2110,8 +2124,6 @@ script_go(void)
 	struct buf	*buf;
 	int		 ret;
 
-	scripttime = time(NULL);
-
 	hdr.code = IMSG_SCRIPT_GO;
 	hdr.len = sizeof(struct imsg_hdr);
 
@@ -2132,6 +2144,8 @@ script_go(void)
 		error("received corrupted message");
 	buf_read(privfd, &ret, sizeof(ret));
 
+	scripttime = time(NULL);
+
 	return (ret);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 08:21:03 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6168A1065672;
	Fri,  6 Aug 2010 08:21:03 +0000 (UTC)
	(envelope-from brian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4F06D8FC20;
	Fri,  6 Aug 2010 08:21:03 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o768L3GM056788;
	Fri, 6 Aug 2010 08:21:03 GMT (envelope-from brian@svn.freebsd.org)
Received: (from brian@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o768L34T056786;
	Fri, 6 Aug 2010 08:21:03 GMT (envelope-from brian@svn.freebsd.org)
Message-Id: <201008060821.o768L34T056786@svn.freebsd.org>
From: Brian Somers 
Date: Fri, 6 Aug 2010 08:21:03 +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: r210916 - stable/7/sbin/dhclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 08:21:03 -0000

Author: brian
Date: Fri Aug  6 08:21:03 2010
New Revision: 210916
URL: http://svn.freebsd.org/changeset/base/210916

Log:
  MFC r209756:
      Log dhclient's reason for exiting and change the 10 second
      ignore-routing-messages dhclient-script timeout to be effective
      from script completion rather than from script start time.
  
      Ignore RTM_DELADDR and RTM_NEWADDR messages when the message
      contains no interface address (which should not happen) rather than
      exiting.

Modified:
  stable/7/sbin/dhclient/dhclient.c
Directory Properties:
  stable/7/sbin/dhclient/   (props changed)

Modified: stable/7/sbin/dhclient/dhclient.c
==============================================================================
--- stable/7/sbin/dhclient/dhclient.c	Fri Aug  6 08:17:44 2010	(r210915)
+++ stable/7/sbin/dhclient/dhclient.c	Fri Aug  6 08:21:03 2010	(r210916)
@@ -126,7 +126,7 @@ int		 fork_privchld(int, int);
 	    ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
 #define	ADVANCE(x, n) (x += ROUNDUP((n)->sa_len))
 
-time_t	scripttime;
+static time_t	scripttime;
 
 int
 findproto(char *cp, int n)
@@ -204,7 +204,7 @@ disassoc(void *arg)
 void
 routehandler(struct protocol *p)
 {
-	char msg[2048];
+	char msg[2048], *addr;
 	struct rt_msghdr *rtm;
 	struct if_msghdr *ifm;
 	struct ifa_msghdr *ifam;
@@ -224,13 +224,6 @@ routehandler(struct protocol *p)
 
 	switch (rtm->rtm_type) {
 	case RTM_NEWADDR:
-		/*
-		 * XXX: If someone other than us adds our address,
-		 * we should assume they are taking over from us,
-		 * delete the lease record, and exit without modifying
-		 * the interface.
-		 */
-		break;
 	case RTM_DELADDR:
 		ifam = (struct ifa_msghdr *)rtm;
 
@@ -243,7 +236,7 @@ routehandler(struct protocol *p)
 
 		sa = get_ifa((char *)(ifam + 1), ifam->ifam_addrs);
 		if (sa == NULL)
-			goto die;
+			break;
 
 		if ((a.len = sizeof(struct in_addr)) > sizeof(a.iabuf))
 			error("king bula sez: len mismatch");
@@ -255,21 +248,42 @@ routehandler(struct protocol *p)
 			if (addr_eq(a, l->address))
 				break;
 
-		if (l == NULL)	/* deleted addr is not the one we set */
+		if (l == NULL)	/* added/deleted addr is not the one we set */
 			break;
-		goto die;
+
+		addr = inet_ntoa(((struct sockaddr_in *)sa)->sin_addr);
+		if (rtm->rtm_type == RTM_NEWADDR)  {
+			/*
+			 * XXX: If someone other than us adds our address,
+			 * should we assume they are taking over from us,
+			 * delete the lease record, and exit without modifying
+			 * the interface?
+			 */
+			warning("My address (%s) was re-added", addr);
+		} else {
+			warning("My address (%s) was deleted, dhclient exiting",
+			    addr);
+			goto die;
+		}
+		break;
 	case RTM_IFINFO:
 		ifm = (struct if_msghdr *)rtm;
 		if (ifm->ifm_index != ifi->index)
 			break;
-		if ((rtm->rtm_flags & RTF_UP) == 0)
+		if ((rtm->rtm_flags & RTF_UP) == 0) {
+			warning("Interface %s is down, dhclient exiting",
+			    ifi->name);
 			goto die;
+		}
 		break;
 	case RTM_IFANNOUNCE:
 		ifan = (struct if_announcemsghdr *)rtm;
 		if (ifan->ifan_what == IFAN_DEPARTURE &&
-		    ifan->ifan_index == ifi->index)
+		    ifan->ifan_index == ifi->index) {
+			warning("Interface %s is gone, dhclient exiting",
+			    ifi->name);
 			goto die;
+		}
 		break;
 	case RTM_IEEE80211:
 		ifan = (struct if_announcemsghdr *)rtm;
@@ -2110,8 +2124,6 @@ script_go(void)
 	struct buf	*buf;
 	int		 ret;
 
-	scripttime = time(NULL);
-
 	hdr.code = IMSG_SCRIPT_GO;
 	hdr.len = sizeof(struct imsg_hdr);
 
@@ -2132,6 +2144,8 @@ script_go(void)
 		error("received corrupted message");
 	buf_read(privfd, &ret, sizeof(ret));
 
+	scripttime = time(NULL);
+
 	return (ret);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 08:59:54 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AA9271065673;
	Fri,  6 Aug 2010 08:59:54 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 989228FC22;
	Fri,  6 Aug 2010 08:59:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o768xscU065428;
	Fri, 6 Aug 2010 08:59:54 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o768xs7k065426;
	Fri, 6 Aug 2010 08:59:54 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008060859.o768xs7k065426@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Fri, 6 Aug 2010 08:59:54 +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: r210917 - stable/8/games/pom
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 08:59:54 -0000

Author: uqs
Date: Fri Aug  6 08:59:54 2010
New Revision: 210917
URL: http://svn.freebsd.org/changeset/base/210917

Log:
  MFC r210637: Fix typo in pom(6) manpage
  
  PR:		docs/148825
  Submitted by:	Anatoly Borodin

Modified:
  stable/8/games/pom/pom.6
Directory Properties:
  stable/8/games/pom/   (props changed)

Modified: stable/8/games/pom/pom.6
==============================================================================
--- stable/8/games/pom/pom.6	Fri Aug  6 08:21:03 2010	(r210916)
+++ stable/8/games/pom/pom.6	Fri Aug  6 08:59:54 2010	(r210917)
@@ -57,7 +57,7 @@ option to print just the phase as a perc
 Use the arguments
 .Fl d
 and
-.Fl o
+.Fl t
 to specify a specific date and time for which the phase of the moon
 has to be calculated.
 If

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 09:06:56 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5616D106566C;
	Fri,  6 Aug 2010 09:06:56 +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 44D368FC18;
	Fri,  6 Aug 2010 09:06:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7696ur4067028;
	Fri, 6 Aug 2010 09:06:56 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7696uYH067026;
	Fri, 6 Aug 2010 09:06:56 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201008060906.o7696uYH067026@svn.freebsd.org>
From: Konstantin Belousov 
Date: Fri, 6 Aug 2010 09:06:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210918 - head/sys/fs/devfs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 09:06:56 -0000

Author: kib
Date: Fri Aug  6 09:06:55 2010
New Revision: 210918
URL: http://svn.freebsd.org/changeset/base/210918

Log:
  Initialize VV_ISTTY vnode flag on the devfs vnode creation instead of
  doing it on each open.
  
  In collaboration with:	pho
  MFC after:	1 month

Modified:
  head/sys/fs/devfs/devfs_vnops.c

Modified: head/sys/fs/devfs/devfs_vnops.c
==============================================================================
--- head/sys/fs/devfs/devfs_vnops.c	Fri Aug  6 08:59:54 2010	(r210917)
+++ head/sys/fs/devfs/devfs_vnops.c	Fri Aug  6 09:06:55 2010	(r210918)
@@ -337,6 +337,7 @@ devfs_allocv(struct devfs_dirent *de, st
 	struct vnode *vp;
 	struct cdev *dev;
 	struct devfs_mount *dmp;
+	struct cdevsw *dsw;
 
 	dmp = VFSTODEVFS(mp);
 	if (de->de_flags & DE_DOOMED) {
@@ -393,6 +394,10 @@ devfs_allocv(struct devfs_dirent *de, st
 		KASSERT(vp->v_usecount == 1,
 		    ("%s %d (%d)\n", __func__, __LINE__, vp->v_usecount));
 		dev->si_usecount += vp->v_usecount;
+		/* Special casing of ttys for deadfs.  Probably redundant. */
+		dsw = dev->si_devsw;
+		if (dsw != NULL && (dsw->d_flags & D_TTY) != 0)
+			vp->v_vflag |= VV_ISTTY;
 		dev_unlock();
 		VI_UNLOCK(vp);
 		vp->v_op = &devfs_specops;
@@ -972,10 +977,6 @@ devfs_open(struct vop_open_args *ap)
 	if (dsw == NULL)
 		return (ENXIO);
 
-	/* XXX: Special casing of ttys for deadfs.  Probably redundant. */
-	if (dsw->d_flags & D_TTY)
-		vp->v_vflag |= VV_ISTTY;
-
 	VOP_UNLOCK(vp, 0);
 
 	fpop = td->td_fpop;

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 09:08:19 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 064811065674;
	Fri,  6 Aug 2010 09:08:19 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E64418FC22;
	Fri,  6 Aug 2010 09:08:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7698Ij0067413;
	Fri, 6 Aug 2010 09:08:18 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7698IaK067406;
	Fri, 6 Aug 2010 09:08:18 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008060908.o7698IaK067406@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Fri, 6 Aug 2010 09:08: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: r210919 - in stable/8: lib/libc/sys share/man/man4
	tools/debugscripts usr.bin/ar usr.sbin/sysinstall/help
	usr.sbin/ugidfw
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 09:08:19 -0000

Author: uqs
Date: Fri Aug  6 09:08:18 2010
New Revision: 210919
URL: http://svn.freebsd.org/changeset/base/210919

Log:
  MFC r210641: Fix a couple of typos.
  
  PR:		docs/148891
  Submitted by:	olgeni

Modified:
  stable/8/lib/libc/sys/sctp_peeloff.2
  stable/8/share/man/man4/isp.4
  stable/8/tools/debugscripts/README
  stable/8/usr.bin/ar/ar.1
  stable/8/usr.sbin/sysinstall/help/options.hlp
  stable/8/usr.sbin/ugidfw/ugidfw.8
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/locale/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/lib/libc/sys/   (props changed)
  stable/8/share/man/   (props changed)
  stable/8/share/man/man1/   (props changed)
  stable/8/share/man/man3/   (props changed)
  stable/8/share/man/man4/   (props changed)
  stable/8/share/man/man5/   (props changed)
  stable/8/share/man/man7/   (props changed)
  stable/8/share/man/man8/   (props changed)
  stable/8/share/man/man9/   (props changed)
  stable/8/tools/debugscripts/   (props changed)
  stable/8/usr.bin/ar/   (props changed)
  stable/8/usr.sbin/sysinstall/   (props changed)
  stable/8/usr.sbin/ugidfw/   (props changed)

Modified: stable/8/lib/libc/sys/sctp_peeloff.2
==============================================================================
--- stable/8/lib/libc/sys/sctp_peeloff.2	Fri Aug  6 09:06:55 2010	(r210918)
+++ stable/8/lib/libc/sys/sctp_peeloff.2	Fri Aug  6 09:08:18 2010	(r210919)
@@ -50,7 +50,7 @@ The
 .Fn sctp_peeloff
 system call attempts detach the association specified by
 .Fa id
-into its own seperate socket.
+into its own separate socket.
 .Pp
 .Sh RETURN VALUES
 The call returns -1 on failure and the new socket descriptor

Modified: stable/8/share/man/man4/isp.4
==============================================================================
--- stable/8/share/man/man4/isp.4	Fri Aug  6 09:06:55 2010	(r210918)
+++ stable/8/share/man/man4/isp.4	Fri Aug  6 09:08:18 2010	(r210919)
@@ -207,7 +207,7 @@ for the values.
 This value says how long to wait in seconds after loop has gone down before
 giving up and expiring all of the devices that were visible.
 The default is 300 seconds (5 minutes).
-A seperate (nonadjustable) timeout is used when
+A separate (nonadjustable) timeout is used when
 booting to not stop booting on lack of FC connectivity.
 .It Va dev.isp.N.gone_device_time
 This value says how long to wait for devices to reappear if they (temporarily)

Modified: stable/8/tools/debugscripts/README
==============================================================================
--- stable/8/tools/debugscripts/README	Fri Aug  6 09:06:55 2010	(r210918)
+++ stable/8/tools/debugscripts/README	Fri Aug  6 09:08:18 2010	(r210919)
@@ -15,7 +15,7 @@ perform kernel debugging, you would do:
 
 
 This directory also contains a kgdb script that given a crash dump number
-automaticly extract the path to the kernel source, run gdb to extract
+automatically extract the path to the kernel source, run gdb to extract
 information about kernel modules loaded, and then rerun gdb loading the
 necessary symbols for the modules.  You need to make sure you build the
-modules w/ debugging symbols seperately to get things to work.
+modules w/ debugging symbols separately to get things to work.

Modified: stable/8/usr.bin/ar/ar.1
==============================================================================
--- stable/8/usr.bin/ar/ar.1	Fri Aug  6 09:06:55 2010	(r210918)
+++ stable/8/usr.bin/ar/ar.1	Fri Aug  6 09:08:18 2010	(r210919)
@@ -293,7 +293,7 @@ or
 options,
 .Nm
 gives a file-by-file description of the archive modification being
-performed, which consists of three white-space seperated fields:
+performed, which consists of three white-space separated fields:
 the option letter, a dash
 .Dq "-" ,
 and the file name.

Modified: stable/8/usr.sbin/sysinstall/help/options.hlp
==============================================================================
--- stable/8/usr.sbin/sysinstall/help/options.hlp	Fri Aug  6 09:06:55 2010	(r210918)
+++ stable/8/usr.sbin/sysinstall/help/options.hlp	Fri Aug  6 09:08:18 2010	(r210919)
@@ -152,7 +152,7 @@ Package Temp:  Where package temporary f
 
    Some packages, like emacs, can use a LOT of temporary space - up to
    20 or 30MB.  If you are going to configure a small / directory and no
-   seperate /var (and hence a small /var/tmp), then you may wish to set
+   separate /var (and hence a small /var/tmp), then you may wish to set
    this to point at another location (say, /usr/tmp).
 
 

Modified: stable/8/usr.sbin/ugidfw/ugidfw.8
==============================================================================
--- stable/8/usr.sbin/ugidfw/ugidfw.8	Fri Aug  6 09:06:55 2010	(r210918)
+++ stable/8/usr.sbin/ugidfw/ugidfw.8	Fri Aug  6 09:08:18 2010	(r210919)
@@ -223,8 +223,7 @@ The subject can be required to have a pa
 .Ar uid
 and/or
 .Ar gid .
-A range of uids/gids can be specified,
-seperated by a colon.
+A range of uids/gids can be specified, separated by a colon.
 The subject can be required to be in a particular jail with the
 .Ar jailid .
 .It Xo
@@ -274,9 +273,9 @@ Objects can be required to be owned by t
 .Ar uid
 and/or
 .Ar gid .
-A range of uids/gids can be specified, seperated by a colon.
+A range of uids/gids can be specified, separated by a colon.
 The object can be required to be in a particular filesystem by
-specifing the filesystem using
+specifying the filesystem using
 .Cm filesys .
 Note,
 if the filesystem is unmounted and remounted,

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 09:21:07 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8F25C106566B;
	Fri,  6 Aug 2010 09:21:07 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7B6768FC13;
	Fri,  6 Aug 2010 09:21:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o769L7jw070362;
	Fri, 6 Aug 2010 09:21:07 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o769L7I2070356;
	Fri, 6 Aug 2010 09:21:07 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008060921.o769L7I2070356@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Fri, 6 Aug 2010 09:21:07 +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: r210920 - in stable/7: lib/libc/sys share/man/man4
	tools/debugscripts usr.sbin/sysinstall/help usr.sbin/ugidfw
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 09:21:07 -0000

Author: uqs
Date: Fri Aug  6 09:21:07 2010
New Revision: 210920
URL: http://svn.freebsd.org/changeset/base/210920

Log:
  MFC r210641: Fix a couple of typos.
  
  PR:		docs/148891
  Submitted by:	olgeni

Modified:
  stable/7/lib/libc/sys/sctp_peeloff.2
  stable/7/share/man/man4/isp.4
  stable/7/tools/debugscripts/README
  stable/7/usr.sbin/sysinstall/help/options.hlp
  stable/7/usr.sbin/ugidfw/ugidfw.8
Directory Properties:
  stable/7/lib/libc/   (props changed)
  stable/7/lib/libc/stdtime/   (props changed)
  stable/7/share/man/   (props changed)
  stable/7/share/man/man1/   (props changed)
  stable/7/share/man/man3/   (props changed)
  stable/7/share/man/man4/   (props changed)
  stable/7/share/man/man5/   (props changed)
  stable/7/share/man/man7/   (props changed)
  stable/7/share/man/man8/   (props changed)
  stable/7/share/man/man9/   (props changed)
  stable/7/tools/debugscripts/   (props changed)
  stable/7/usr.sbin/sysinstall/   (props changed)
  stable/7/usr.sbin/ugidfw/   (props changed)

Modified: stable/7/lib/libc/sys/sctp_peeloff.2
==============================================================================
--- stable/7/lib/libc/sys/sctp_peeloff.2	Fri Aug  6 09:08:18 2010	(r210919)
+++ stable/7/lib/libc/sys/sctp_peeloff.2	Fri Aug  6 09:21:07 2010	(r210920)
@@ -50,7 +50,7 @@ The
 .Fn sctp_peeloff
 system call attempts detach the association specified by
 .Fa id
-into its own seperate socket.
+into its own separate socket.
 .Pp
 .Sh RETURN VALUES
 The call returns -1 on failure and the new socket descriptor

Modified: stable/7/share/man/man4/isp.4
==============================================================================
--- stable/7/share/man/man4/isp.4	Fri Aug  6 09:08:18 2010	(r210919)
+++ stable/7/share/man/man4/isp.4	Fri Aug  6 09:21:07 2010	(r210920)
@@ -207,7 +207,7 @@ for the values.
 This value says how long to wait in seconds after loop has gone down before
 giving up and expiring all of the devices that were visible.
 The default is 300 seconds (5 minutes).
-A seperate (nonadjustable) timeout is used when
+A separate (nonadjustable) timeout is used when
 booting to not stop booting on lack of FC connectivity.
 .It Va dev.isp.N.gone_device_time
 This value says how long to wait for devices to reappear if they (temporarily)

Modified: stable/7/tools/debugscripts/README
==============================================================================
--- stable/7/tools/debugscripts/README	Fri Aug  6 09:08:18 2010	(r210919)
+++ stable/7/tools/debugscripts/README	Fri Aug  6 09:21:07 2010	(r210920)
@@ -15,7 +15,7 @@ perform kernel debugging, you would do:
 
 
 This directory also contains a kgdb script that given a crash dump number
-automaticly extract the path to the kernel source, run gdb to extract
+automatically extract the path to the kernel source, run gdb to extract
 information about kernel modules loaded, and then rerun gdb loading the
 necessary symbols for the modules.  You need to make sure you build the
-modules w/ debugging symbols seperately to get things to work.
+modules w/ debugging symbols separately to get things to work.

Modified: stable/7/usr.sbin/sysinstall/help/options.hlp
==============================================================================
--- stable/7/usr.sbin/sysinstall/help/options.hlp	Fri Aug  6 09:08:18 2010	(r210919)
+++ stable/7/usr.sbin/sysinstall/help/options.hlp	Fri Aug  6 09:21:07 2010	(r210920)
@@ -152,7 +152,7 @@ Package Temp:  Where package temporary f
 
    Some packages, like emacs, can use a LOT of temporary space - up to
    20 or 30MB.  If you are going to configure a small / directory and no
-   seperate /var (and hence a small /var/tmp), then you may wish to set
+   separate /var (and hence a small /var/tmp), then you may wish to set
    this to point at another location (say, /usr/tmp).
 
 

Modified: stable/7/usr.sbin/ugidfw/ugidfw.8
==============================================================================
--- stable/7/usr.sbin/ugidfw/ugidfw.8	Fri Aug  6 09:08:18 2010	(r210919)
+++ stable/7/usr.sbin/ugidfw/ugidfw.8	Fri Aug  6 09:21:07 2010	(r210920)
@@ -223,8 +223,7 @@ The subject can be required to have a pa
 .Ar uid
 and/or
 .Ar gid .
-A range of uids/gids can be specified,
-seperated by a colon.
+A range of uids/gids can be specified, separated by a colon.
 The subject can be required to be in a particular jail with the
 .Ar jailid .
 .It Xo
@@ -274,9 +273,9 @@ Objects can be required to be owned by t
 .Ar uid
 and/or
 .Ar gid .
-A range of uids/gids can be specified, seperated by a colon.
+A range of uids/gids can be specified, separated by a colon.
 The object can be required to be in a particular filesystem by
-specifing the filesystem using
+specifying the filesystem using
 .Cm filesys .
 Note,
 if the filesystem is unmounted and remounted,

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 09:23:48 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1C1F31065673;
	Fri,  6 Aug 2010 09:23:48 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F42268FC0A;
	Fri,  6 Aug 2010 09:23:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o769Nlvg071001;
	Fri, 6 Aug 2010 09:23:47 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o769Nl5T070997;
	Fri, 6 Aug 2010 09:23:47 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201008060923.o769Nl5T070997@svn.freebsd.org>
From: Konstantin Belousov 
Date: Fri, 6 Aug 2010 09:23:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210921 - head/sys/fs/devfs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 09:23:48 -0000

Author: kib
Date: Fri Aug  6 09:23:47 2010
New Revision: 210921
URL: http://svn.freebsd.org/changeset/base/210921

Log:
  Enable shared locks for the devfs vnodes. Honor the locking mode
  requested by lookup(). This should be a nop at the moment.
  
  In collaboration with:	pho
  MFC after:	1 month

Modified:
  head/sys/fs/devfs/devfs.h
  head/sys/fs/devfs/devfs_vfsops.c
  head/sys/fs/devfs/devfs_vnops.c

Modified: head/sys/fs/devfs/devfs.h
==============================================================================
--- head/sys/fs/devfs/devfs.h	Fri Aug  6 09:21:07 2010	(r210920)
+++ head/sys/fs/devfs/devfs.h	Fri Aug  6 09:23:47 2010	(r210921)
@@ -172,7 +172,7 @@ extern unsigned devfs_rule_depth;
 void devfs_rules_apply(struct devfs_mount *dm, struct devfs_dirent *de);
 void devfs_rules_cleanup (struct devfs_mount *dm);
 int devfs_rules_ioctl(struct devfs_mount *dm, u_long cmd, caddr_t data, struct thread *td);
-int devfs_allocv (struct devfs_dirent *de, struct mount *mp,
+int devfs_allocv(struct devfs_dirent *de, struct mount *mp, int lockmode,
     struct vnode **vpp);
 void devfs_delete(struct devfs_mount *dm, struct devfs_dirent *de, int vp_locked);
 void devfs_dirent_free(struct devfs_dirent *de);

Modified: head/sys/fs/devfs/devfs_vfsops.c
==============================================================================
--- head/sys/fs/devfs/devfs_vfsops.c	Fri Aug  6 09:21:07 2010	(r210920)
+++ head/sys/fs/devfs/devfs_vfsops.c	Fri Aug  6 09:23:47 2010	(r210921)
@@ -155,7 +155,7 @@ devfs_root(struct mount *mp, int flags, 
 
 	dmp = VFSTODEVFS(mp);
 	sx_xlock(&dmp->dm_lock);
-	error = devfs_allocv(dmp->dm_rootdir, mp, &vp);
+	error = devfs_allocv(dmp->dm_rootdir, mp, LK_EXCLUSIVE, &vp);
 	if (error)
 		return (error);
 	vp->v_vflag |= VV_ROOT;

Modified: head/sys/fs/devfs/devfs_vnops.c
==============================================================================
--- head/sys/fs/devfs/devfs_vnops.c	Fri Aug  6 09:21:07 2010	(r210920)
+++ head/sys/fs/devfs/devfs_vnops.c	Fri Aug  6 09:23:47 2010	(r210921)
@@ -331,7 +331,8 @@ devfs_insmntque_dtr(struct vnode *vp, vo
  * it on return.
  */
 int
-devfs_allocv(struct devfs_dirent *de, struct mount *mp, struct vnode **vpp)
+devfs_allocv(struct devfs_dirent *de, struct mount *mp, int lockmode,
+    struct vnode **vpp)
 {
 	int error;
 	struct vnode *vp;
@@ -352,7 +353,7 @@ devfs_allocv(struct devfs_dirent *de, st
 		VI_LOCK(vp);
 		mtx_unlock(&devfs_de_interlock);
 		sx_xunlock(&dmp->dm_lock);
-		error = vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, curthread);
+		error = vget(vp, lockmode | LK_INTERLOCK, curthread);
 		sx_xlock(&dmp->dm_lock);
 		if (devfs_allocv_drop_refs(0, dmp, de)) {
 			if (error == 0)
@@ -408,6 +409,7 @@ devfs_allocv(struct devfs_dirent *de, st
 	} else {
 		vp->v_type = VBAD;
 	}
+	VN_LOCK_ASHARE(vp);
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY | LK_NOWITNESS);
 	mtx_lock(&devfs_de_interlock);
 	vp->v_data = de;
@@ -758,7 +760,7 @@ devfs_lookupx(struct vop_lookup_args *ap
 	struct devfs_dirent **dde;
 	struct devfs_mount *dmp;
 	struct cdev *cdev;
-	int error, flags, nameiop;
+	int error, flags, nameiop, dvplocked;
 	char specname[SPECNAMELEN + 1], *pname;
 
 	cnp = ap->a_cnp;
@@ -799,10 +801,12 @@ devfs_lookupx(struct vop_lookup_args *ap
 		de = devfs_parent_dirent(dd);
 		if (de == NULL)
 			return (ENOENT);
+		dvplocked = VOP_ISLOCKED(dvp);
 		VOP_UNLOCK(dvp, 0);
-		error = devfs_allocv(de, dvp->v_mount, vpp);
+		error = devfs_allocv(de, dvp->v_mount,
+		    cnp->cn_lkflags & LK_TYPE_MASK, vpp);
 		*dm_unlock = 0;
-		vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
+		vn_lock(dvp, dvplocked | LK_RETRY);
 		return (error);
 	}
 
@@ -886,7 +890,8 @@ devfs_lookupx(struct vop_lookup_args *ap
 			return (0);
 		}
 	}
-	error = devfs_allocv(de, dvp->v_mount, vpp);
+	error = devfs_allocv(de, dvp->v_mount, cnp->cn_lkflags & LK_TYPE_MASK,
+	    vpp);
 	*dm_unlock = 0;
 	return (error);
 }
@@ -944,7 +949,7 @@ devfs_mknod(struct vop_mknod_args *ap)
 	if (de == NULL)
 		goto notfound;
 	de->de_flags &= ~DE_WHITEOUT;
-	error = devfs_allocv(de, dvp->v_mount, vpp);
+	error = devfs_allocv(de, dvp->v_mount, LK_EXCLUSIVE, vpp);
 	return (error);
 notfound:
 	sx_xunlock(&dmp->dm_lock);
@@ -959,7 +964,7 @@ devfs_open(struct vop_open_args *ap)
 	struct vnode *vp = ap->a_vp;
 	struct cdev *dev = vp->v_rdev;
 	struct file *fp = ap->a_fp;
-	int error;
+	int error, vlocked;
 	struct cdevsw *dsw;
 	struct file *fpop;
 
@@ -977,6 +982,7 @@ devfs_open(struct vop_open_args *ap)
 	if (dsw == NULL)
 		return (ENXIO);
 
+	vlocked = VOP_ISLOCKED(vp);
 	VOP_UNLOCK(vp, 0);
 
 	fpop = td->td_fpop;
@@ -991,18 +997,15 @@ devfs_open(struct vop_open_args *ap)
 		error = dsw->d_open(dev, ap->a_mode, S_IFCHR, td);
 	td->td_fpop = fpop;
 
-	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
-
+	vn_lock(vp, vlocked | LK_RETRY);
 	dev_relthread(dev);
-
 	if (error)
 		return (error);
 
 #if 0	/* /dev/console */
-	KASSERT(fp != NULL,
-	     ("Could not vnode bypass device on NULL fp"));
+	KASSERT(fp != NULL, ("Could not vnode bypass device on NULL fp"));
 #else
-	if(fp == NULL)
+	if (fp == NULL)
 		return (error);
 #endif
 	if (fp->f_ops == &badfileops)
@@ -1495,7 +1498,7 @@ devfs_symlink(struct vop_symlink_args *a
 	mac_devfs_create_symlink(ap->a_cnp->cn_cred, dmp->dm_mount, dd, de);
 #endif
 	TAILQ_INSERT_TAIL(&dd->de_dlist, de, de_list);
-	return (devfs_allocv(de, ap->a_dvp->v_mount, ap->a_vpp));
+	return (devfs_allocv(de, ap->a_dvp->v_mount, LK_EXCLUSIVE, ap->a_vpp));
 }
 
 static int

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 09:25:42 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E2852106567A;
	Fri,  6 Aug 2010 09:25:42 +0000 (UTC)
	(envelope-from jchandra@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D106F8FC18;
	Fri,  6 Aug 2010 09:25:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o769PggW071505;
	Fri, 6 Aug 2010 09:25:42 GMT (envelope-from jchandra@svn.freebsd.org)
Received: (from jchandra@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o769PgKB071503;
	Fri, 6 Aug 2010 09:25:42 GMT (envelope-from jchandra@svn.freebsd.org)
Message-Id: <201008060925.o769PgKB071503@svn.freebsd.org>
From: "Jayachandran C." 
Date: Fri, 6 Aug 2010 09:25:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210922 - head/sys/mips/mips
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 09:25:43 -0000

Author: jchandra
Date: Fri Aug  6 09:25:42 2010
New Revision: 210922
URL: http://svn.freebsd.org/changeset/base/210922

Log:
  Fix issue reported by alc :
  
   MIPS doesn't really need to use atomic_cmpset_int() in situations like
   this because the software dirty bit emulation in trap.c acquires
   the pmap lock.  Atomics like this appear to be a carryover from i386
   where the hardware-managed TLB might concurrently set the modified bit.
  
  Reviewed by:	alc

Modified:
  head/sys/mips/mips/pmap.c

Modified: head/sys/mips/mips/pmap.c
==============================================================================
--- head/sys/mips/mips/pmap.c	Fri Aug  6 09:23:47 2010	(r210921)
+++ head/sys/mips/mips/pmap.c	Fri Aug  6 09:25:42 2010	(r210922)
@@ -1716,7 +1716,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sv
 	vm_page_lock_queues();
 	PMAP_LOCK(pmap);
 	for (; sva < eva; sva = va_next) {
-		pt_entry_t pbits, obits;
+		pt_entry_t pbits;
 		vm_page_t m;
 		vm_paddr_t pa;
 
@@ -1745,8 +1745,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sv
 			/* Skip invalid PTEs */
 			if (!pte_test(pte, PTE_V))
 				continue;
-retry:
-			obits = pbits = *pte;
+			pbits = *pte;
 			pa = TLBLO_PTE_TO_PA(pbits);
 			if (page_is_managed(pa) && pte_test(&pbits, PTE_D)) {
 				m = PHYS_TO_VM_PAGE(pa);
@@ -1757,8 +1756,7 @@ retry:
 			pte_set(&pbits, PTE_RO);
 			
 			if (pbits != *pte) {
-				if (!atomic_cmpset_int((u_int *)pte, obits, pbits))
-					goto retry;
+				*pte = pbits;
 				pmap_update_page(pmap, sva, pbits);
 			}
 		}

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 09:42:15 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AC7D41065674;
	Fri,  6 Aug 2010 09:42: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 9988C8FC0A;
	Fri,  6 Aug 2010 09:42:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o769gFpw075276;
	Fri, 6 Aug 2010 09:42:15 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o769gFm2075268;
	Fri, 6 Aug 2010 09:42:15 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201008060942.o769gFm2075268@svn.freebsd.org>
From: Konstantin Belousov 
Date: Fri, 6 Aug 2010 09:42:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210923 - in head/sys: fs/devfs kern sys vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 09:42:15 -0000

Author: kib
Date: Fri Aug  6 09:42:15 2010
New Revision: 210923
URL: http://svn.freebsd.org/changeset/base/210923

Log:
  Add new make_dev_p(9) flag MAKEDEV_ETERNAL to inform devfs that created
  cdev will never be destroyed. Propagate the flag to devfs vnodes as
  VV_ETERNVALDEV. Use the flags to avoid acquiring devmtx and taking a
  thread reference on such nodes.
  
  In collaboration with:	pho
  MFC after:	1 month

Modified:
  head/sys/fs/devfs/devfs_rule.c
  head/sys/fs/devfs/devfs_vnops.c
  head/sys/kern/kern_conf.c
  head/sys/kern/tty.c
  head/sys/kern/vfs_bio.c
  head/sys/sys/conf.h
  head/sys/sys/vnode.h
  head/sys/vm/device_pager.c
  head/sys/vm/vm_mmap.c

Modified: head/sys/fs/devfs/devfs_rule.c
==============================================================================
--- head/sys/fs/devfs/devfs_rule.c	Fri Aug  6 09:25:42 2010	(r210922)
+++ head/sys/fs/devfs/devfs_rule.c	Fri Aug  6 09:42:15 2010	(r210923)
@@ -528,6 +528,7 @@ devfs_rule_match(struct devfs_krule *dk,
 	struct devfs_rule *dr = &dk->dk_rule;
 	struct cdev *dev;
 	struct cdevsw *dsw;
+	int ref;
 
 	dev = devfs_rule_getdev(de);
 	/*
@@ -545,14 +546,14 @@ devfs_rule_match(struct devfs_krule *dk,
 	if (dr->dr_icond & DRC_DSWFLAGS) {
 		if (dev == NULL)
 			return (0);
-		dsw = dev_refthread(dev);
+		dsw = dev_refthread(dev, &ref);
 		if (dsw == NULL)
 			return (0);
 		if ((dsw->d_flags & dr->dr_dswflags) == 0) {
-			dev_relthread(dev);
+			dev_relthread(dev, ref);
 			return (0);
 		}
-		dev_relthread(dev);
+		dev_relthread(dev, ref);
 	}
 	if (dr->dr_icond & DRC_PATHPTRN)
 		if (!devfs_rule_matchpath(dk, de))

Modified: head/sys/fs/devfs/devfs_vnops.c
==============================================================================
--- head/sys/fs/devfs/devfs_vnops.c	Fri Aug  6 09:25:42 2010	(r210922)
+++ head/sys/fs/devfs/devfs_vnops.c	Fri Aug  6 09:42:15 2010	(r210923)
@@ -82,13 +82,14 @@ struct mtx	cdevpriv_mtx;
 MTX_SYSINIT(cdevpriv_mtx, &cdevpriv_mtx, "cdevpriv lock", MTX_DEF);
 
 static int
-devfs_fp_check(struct file *fp, struct cdev **devp, struct cdevsw **dswp)
+devfs_fp_check(struct file *fp, struct cdev **devp, struct cdevsw **dswp,
+    int *ref)
 {
 
-	*dswp = devvn_refthread(fp->f_vnode, devp);
+	*dswp = devvn_refthread(fp->f_vnode, devp, ref);
 	if (*devp != fp->f_data) {
 		if (*dswp != NULL)
-			dev_relthread(*devp);
+			dev_relthread(*devp, *ref);
 		return (ENXIO);
 	}
 	KASSERT((*devp)->si_refcount > 0,
@@ -401,6 +402,8 @@ devfs_allocv(struct devfs_dirent *de, st
 			vp->v_vflag |= VV_ISTTY;
 		dev_unlock();
 		VI_UNLOCK(vp);
+		if ((dev->si_flags & SI_ETERNAL) != 0)
+			vp->v_vflag |= VV_ETERNALDEV;
 		vp->v_op = &devfs_specops;
 	} else if (de->de_dirent->d_type == DT_DIR) {
 		vp->v_type = VDIR;
@@ -465,7 +468,7 @@ devfs_close(struct vop_close_args *ap)
 	struct thread *td = ap->a_td;
 	struct cdev *dev = vp->v_rdev;
 	struct cdevsw *dsw;
-	int vp_locked, error;
+	int vp_locked, error, ref;
 
 	/*
 	 * XXX: Don't call d_close() if we were called because of
@@ -508,7 +511,7 @@ devfs_close(struct vop_close_args *ap)
 	 * sum of the reference counts on all the aliased
 	 * vnodes descends to one, we are on last close.
 	 */
-	dsw = dev_refthread(dev);
+	dsw = dev_refthread(dev, &ref);
 	if (dsw == NULL)
 		return (ENXIO);
 	VI_LOCK(vp);
@@ -518,7 +521,7 @@ devfs_close(struct vop_close_args *ap)
 		/* Keep device updated on status. */
 	} else if (count_dev(dev) > 1) {
 		VI_UNLOCK(vp);
-		dev_relthread(dev);
+		dev_relthread(dev, ref);
 		return (0);
 	}
 	vholdl(vp);
@@ -528,7 +531,7 @@ devfs_close(struct vop_close_args *ap)
 	KASSERT(dev->si_refcount > 0,
 	    ("devfs_close() on un-referenced struct cdev *(%s)", devtoname(dev)));
 	error = dsw->d_close(dev, ap->a_fflag, S_IFCHR, td);
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 	vn_lock(vp, vp_locked | LK_RETRY);
 	vdrop(vp);
 	return (error);
@@ -646,20 +649,20 @@ devfs_ioctl_f(struct file *fp, u_long co
 	struct cdevsw *dsw;
 	struct vnode *vp;
 	struct vnode *vpold;
-	int error, i;
+	int error, i, ref;
 	const char *p;
 	struct fiodgname_arg *fgn;
 	struct file *fpop;
 
 	fpop = td->td_fpop;
-	error = devfs_fp_check(fp, &dev, &dsw);
+	error = devfs_fp_check(fp, &dev, &dsw, &ref);
 	if (error)
 		return (error);
 
 	if (com == FIODTYPE) {
 		*(int *)data = dsw->d_flags & D_TYPEMASK;
 		td->td_fpop = fpop;
-		dev_relthread(dev);
+		dev_relthread(dev, ref);
 		return (0);
 	} else if (com == FIODGNAME) {
 		fgn = data;
@@ -670,12 +673,12 @@ devfs_ioctl_f(struct file *fp, u_long co
 		else
 			error = copyout(p, fgn->buf, i);
 		td->td_fpop = fpop;
-		dev_relthread(dev);
+		dev_relthread(dev, ref);
 		return (error);
 	}
 	error = dsw->d_ioctl(dev, com, data, fp->f_flag, td);
 	td->td_fpop = NULL;
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 	if (error == ENOIOCTL)
 		error = ENOTTY;
 	if (error == 0 && com == TIOCSCTTY) {
@@ -710,18 +713,18 @@ devfs_kqfilter_f(struct file *fp, struct
 {
 	struct cdev *dev;
 	struct cdevsw *dsw;
-	int error;
+	int error, ref;
 	struct file *fpop;
 	struct thread *td;
 
 	td = curthread;
 	fpop = td->td_fpop;
-	error = devfs_fp_check(fp, &dev, &dsw);
+	error = devfs_fp_check(fp, &dev, &dsw, &ref);
 	if (error)
 		return (error);
 	error = dsw->d_kqfilter(dev, kn);
 	td->td_fpop = fpop;
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 	return (error);
 }
 
@@ -964,7 +967,7 @@ devfs_open(struct vop_open_args *ap)
 	struct vnode *vp = ap->a_vp;
 	struct cdev *dev = vp->v_rdev;
 	struct file *fp = ap->a_fp;
-	int error, vlocked;
+	int error, ref, vlocked;
 	struct cdevsw *dsw;
 	struct file *fpop;
 
@@ -978,7 +981,7 @@ devfs_open(struct vop_open_args *ap)
 	if (dev->si_iosize_max == 0)
 		dev->si_iosize_max = DFLTPHYS;
 
-	dsw = dev_refthread(dev);
+	dsw = dev_refthread(dev, &ref);
 	if (dsw == NULL)
 		return (ENXIO);
 
@@ -998,7 +1001,7 @@ devfs_open(struct vop_open_args *ap)
 	td->td_fpop = fpop;
 
 	vn_lock(vp, vlocked | LK_RETRY);
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 	if (error)
 		return (error);
 
@@ -1041,16 +1044,16 @@ devfs_poll_f(struct file *fp, int events
 {
 	struct cdev *dev;
 	struct cdevsw *dsw;
-	int error;
+	int error, ref;
 	struct file *fpop;
 
 	fpop = td->td_fpop;
-	error = devfs_fp_check(fp, &dev, &dsw);
+	error = devfs_fp_check(fp, &dev, &dsw, &ref);
 	if (error)
 		return (poll_no_poll(events));
 	error = dsw->d_poll(dev, events, td);
 	td->td_fpop = fpop;
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 	return(error);
 }
 
@@ -1070,12 +1073,12 @@ static int
 devfs_read_f(struct file *fp, struct uio *uio, struct ucred *cred, int flags, struct thread *td)
 {
 	struct cdev *dev;
-	int ioflag, error, resid;
+	int ioflag, error, ref, resid;
 	struct cdevsw *dsw;
 	struct file *fpop;
 
 	fpop = td->td_fpop;
-	error = devfs_fp_check(fp, &dev, &dsw);
+	error = devfs_fp_check(fp, &dev, &dsw, &ref);
 	if (error)
 		return (error);
 	resid = uio->uio_resid;
@@ -1090,7 +1093,7 @@ devfs_read_f(struct file *fp, struct uio
 	if (uio->uio_resid != resid || (error == 0 && resid != 0))
 		vfs_timestamp(&dev->si_atime);
 	td->td_fpop = fpop;
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 
 	if ((flags & FOF_OFFSET) == 0)
 		fp->f_offset = uio->uio_offset;
@@ -1513,12 +1516,12 @@ static int
 devfs_write_f(struct file *fp, struct uio *uio, struct ucred *cred, int flags, struct thread *td)
 {
 	struct cdev *dev;
-	int error, ioflag, resid;
+	int error, ioflag, ref, resid;
 	struct cdevsw *dsw;
 	struct file *fpop;
 
 	fpop = td->td_fpop;
-	error = devfs_fp_check(fp, &dev, &dsw);
+	error = devfs_fp_check(fp, &dev, &dsw, &ref);
 	if (error)
 		return (error);
 	KASSERT(uio->uio_td == td, ("uio_td %p is not td %p", uio->uio_td, td));
@@ -1536,7 +1539,7 @@ devfs_write_f(struct file *fp, struct ui
 		dev->si_mtime = dev->si_ctime;
 	}
 	td->td_fpop = fpop;
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 
 	if ((flags & FOF_OFFSET) == 0)
 		fp->f_offset = uio->uio_offset;

Modified: head/sys/kern/kern_conf.c
==============================================================================
--- head/sys/kern/kern_conf.c	Fri Aug  6 09:25:42 2010	(r210922)
+++ head/sys/kern/kern_conf.c	Fri Aug  6 09:42:15 2010	(r210923)
@@ -177,12 +177,16 @@ dev_rel(struct cdev *dev)
 }
 
 struct cdevsw *
-dev_refthread(struct cdev *dev)
+dev_refthread(struct cdev *dev, int *ref)
 {
 	struct cdevsw *csw;
 	struct cdev_priv *cdp;
 
 	mtx_assert(&devmtx, MA_NOTOWNED);
+	if ((dev->si_flags & SI_ETERNAL) != 0) {
+		*ref = 0;
+		return (dev->si_devsw);
+	}
 	dev_lock();
 	csw = dev->si_devsw;
 	if (csw != NULL) {
@@ -193,36 +197,59 @@ dev_refthread(struct cdev *dev)
 			csw = NULL;
 	}
 	dev_unlock();
+	*ref = 1;
 	return (csw);
 }
 
 struct cdevsw *
-devvn_refthread(struct vnode *vp, struct cdev **devp)
+devvn_refthread(struct vnode *vp, struct cdev **devp, int *ref)
 {
 	struct cdevsw *csw;
 	struct cdev_priv *cdp;
+	struct cdev *dev;
 
 	mtx_assert(&devmtx, MA_NOTOWNED);
+	if ((vp->v_vflag & VV_ETERNALDEV) != 0) {
+		dev = vp->v_rdev;
+		if (dev == NULL)
+			return (NULL);
+		KASSERT((dev->si_flags & SI_ETERNAL) != 0,
+		    ("Not eternal cdev"));
+		*ref = 0;
+		csw = dev->si_devsw;
+		KASSERT(csw != NULL, ("Eternal cdev is destroyed"));
+		*devp = dev;
+		return (csw);
+	}
+
 	csw = NULL;
 	dev_lock();
-	*devp = vp->v_rdev;
-	if (*devp != NULL) {
-		cdp = cdev2priv(*devp);
-		if ((cdp->cdp_flags & CDP_SCHED_DTR) == 0) {
-			csw = (*devp)->si_devsw;
-			if (csw != NULL)
-				(*devp)->si_threadcount++;
-		}
+	dev = vp->v_rdev;
+	if (dev == NULL) {
+		dev_unlock();
+		return (NULL);
+	}
+	cdp = cdev2priv(dev);
+	if ((cdp->cdp_flags & CDP_SCHED_DTR) == 0) {
+		csw = dev->si_devsw;
+		if (csw != NULL)
+			dev->si_threadcount++;
 	}
 	dev_unlock();
+	if (csw != NULL) {
+		*devp = dev;
+		*ref = 1;
+	}
 	return (csw);
 }
 
 void	
-dev_relthread(struct cdev *dev)
+dev_relthread(struct cdev *dev, int ref)
 {
 
 	mtx_assert(&devmtx, MA_NOTOWNED);
+	if (!ref)
+		return;
 	dev_lock();
 	KASSERT(dev->si_threadcount > 0,
 	    ("%s threadcount is wrong", dev->si_name));
@@ -325,15 +352,15 @@ static int
 giant_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
 {
 	struct cdevsw *dsw;
-	int retval;
+	int ref, retval;
 
-	dsw = dev_refthread(dev);
+	dsw = dev_refthread(dev, &ref);
 	if (dsw == NULL)
 		return (ENXIO);
 	mtx_lock(&Giant);
 	retval = dsw->d_gianttrick->d_open(dev, oflags, devtype, td);
 	mtx_unlock(&Giant);
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 	return (retval);
 }
 
@@ -341,15 +368,15 @@ static int
 giant_fdopen(struct cdev *dev, int oflags, struct thread *td, struct file *fp)
 {
 	struct cdevsw *dsw;
-	int retval;
+	int ref, retval;
 
-	dsw = dev_refthread(dev);
+	dsw = dev_refthread(dev, &ref);
 	if (dsw == NULL)
 		return (ENXIO);
 	mtx_lock(&Giant);
 	retval = dsw->d_gianttrick->d_fdopen(dev, oflags, td, fp);
 	mtx_unlock(&Giant);
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 	return (retval);
 }
 
@@ -357,15 +384,15 @@ static int
 giant_close(struct cdev *dev, int fflag, int devtype, struct thread *td)
 {
 	struct cdevsw *dsw;
-	int retval;
+	int ref, retval;
 
-	dsw = dev_refthread(dev);
+	dsw = dev_refthread(dev, &ref);
 	if (dsw == NULL)
 		return (ENXIO);
 	mtx_lock(&Giant);
 	retval = dsw->d_gianttrick->d_close(dev, fflag, devtype, td);
 	mtx_unlock(&Giant);
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 	return (retval);
 }
 
@@ -374,9 +401,10 @@ giant_strategy(struct bio *bp)
 {
 	struct cdevsw *dsw;
 	struct cdev *dev;
+	int ref;
 
 	dev = bp->bio_dev;
-	dsw = dev_refthread(dev);
+	dsw = dev_refthread(dev, &ref);
 	if (dsw == NULL) {
 		biofinish(bp, NULL, ENXIO);
 		return;
@@ -384,22 +412,22 @@ giant_strategy(struct bio *bp)
 	mtx_lock(&Giant);
 	dsw->d_gianttrick->d_strategy(bp);
 	mtx_unlock(&Giant);
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 }
 
 static int
 giant_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
 {
 	struct cdevsw *dsw;
-	int retval;
+	int ref, retval;
 
-	dsw = dev_refthread(dev);
+	dsw = dev_refthread(dev, &ref);
 	if (dsw == NULL)
 		return (ENXIO);
 	mtx_lock(&Giant);
 	retval = dsw->d_gianttrick->d_ioctl(dev, cmd, data, fflag, td);
 	mtx_unlock(&Giant);
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 	return (retval);
 }
   
@@ -407,15 +435,15 @@ static int
 giant_read(struct cdev *dev, struct uio *uio, int ioflag)
 {
 	struct cdevsw *dsw;
-	int retval;
+	int ref, retval;
 
-	dsw = dev_refthread(dev);
+	dsw = dev_refthread(dev, &ref);
 	if (dsw == NULL)
 		return (ENXIO);
 	mtx_lock(&Giant);
 	retval = dsw->d_gianttrick->d_read(dev, uio, ioflag);
 	mtx_unlock(&Giant);
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 	return (retval);
 }
 
@@ -423,15 +451,15 @@ static int
 giant_write(struct cdev *dev, struct uio *uio, int ioflag)
 {
 	struct cdevsw *dsw;
-	int retval;
+	int ref, retval;
 
-	dsw = dev_refthread(dev);
+	dsw = dev_refthread(dev, &ref);
 	if (dsw == NULL)
 		return (ENXIO);
 	mtx_lock(&Giant);
 	retval = dsw->d_gianttrick->d_write(dev, uio, ioflag);
 	mtx_unlock(&Giant);
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 	return (retval);
 }
 
@@ -439,15 +467,15 @@ static int
 giant_poll(struct cdev *dev, int events, struct thread *td)
 {
 	struct cdevsw *dsw;
-	int retval;
+	int ref, retval;
 
-	dsw = dev_refthread(dev);
+	dsw = dev_refthread(dev, &ref);
 	if (dsw == NULL)
 		return (ENXIO);
 	mtx_lock(&Giant);
 	retval = dsw->d_gianttrick->d_poll(dev, events, td);
 	mtx_unlock(&Giant);
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 	return (retval);
 }
 
@@ -455,15 +483,15 @@ static int
 giant_kqfilter(struct cdev *dev, struct knote *kn)
 {
 	struct cdevsw *dsw;
-	int retval;
+	int ref, retval;
 
-	dsw = dev_refthread(dev);
+	dsw = dev_refthread(dev, &ref);
 	if (dsw == NULL)
 		return (ENXIO);
 	mtx_lock(&Giant);
 	retval = dsw->d_gianttrick->d_kqfilter(dev, kn);
 	mtx_unlock(&Giant);
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 	return (retval);
 }
 
@@ -472,16 +500,16 @@ giant_mmap(struct cdev *dev, vm_ooffset_
     vm_memattr_t *memattr)
 {
 	struct cdevsw *dsw;
-	int retval;
+	int ref, retval;
 
-	dsw = dev_refthread(dev);
+	dsw = dev_refthread(dev, &ref);
 	if (dsw == NULL)
 		return (ENXIO);
 	mtx_lock(&Giant);
 	retval = dsw->d_gianttrick->d_mmap(dev, offset, paddr, nprot,
 	    memattr);
 	mtx_unlock(&Giant);
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 	return (retval);
 }
 
@@ -490,16 +518,16 @@ giant_mmap_single(struct cdev *dev, vm_o
     vm_object_t *object, int nprot)
 {
 	struct cdevsw *dsw;
-	int retval;
+	int ref, retval;
 
-	dsw = dev_refthread(dev);
+	dsw = dev_refthread(dev, &ref);
 	if (dsw == NULL)
 		return (ENXIO);
 	mtx_lock(&Giant);
 	retval = dsw->d_gianttrick->d_mmap_single(dev, offset, size, object,
 	    nprot);
 	mtx_unlock(&Giant);
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 	return (retval);
 }
 
@@ -676,6 +704,8 @@ make_dev_credv(int flags, struct cdev **
 	dev = newdev(devsw, unit, dev);
 	if (flags & MAKEDEV_REF)
 		dev_refl(dev);
+	if (flags & MAKEDEV_ETERNAL)
+		dev->si_flags |= SI_ETERNAL;
 	if (dev->si_flags & SI_CHEAPCLONE &&
 	    dev->si_flags & SI_NAMED) {
 		/*
@@ -840,6 +870,9 @@ destroy_devl(struct cdev *dev)
 	mtx_assert(&devmtx, MA_OWNED);
 	KASSERT(dev->si_flags & SI_NAMED,
 	    ("WARNING: Driver mistake: destroy_dev on %d\n", dev2unit(dev)));
+	KASSERT((dev->si_flags & SI_ETERNAL) == 0,
+	    ("WARNING: Driver mistake: destroy_dev on eternal %d\n",
+	     dev2unit(dev)));
 
 	devfs_destroy(dev);
 

Modified: head/sys/kern/tty.c
==============================================================================
--- head/sys/kern/tty.c	Fri Aug  6 09:25:42 2010	(r210922)
+++ head/sys/kern/tty.c	Fri Aug  6 09:42:15 2010	(r210923)
@@ -1797,7 +1797,7 @@ ttyhook_register(struct tty **rtp, struc
 	struct cdev *dev;
 	struct cdevsw *cdp;
 	struct filedesc *fdp;
-	int error;
+	int error, ref;
 
 	/* Validate the file descriptor. */
 	if ((fdp = p->p_fd) == NULL)
@@ -1823,7 +1823,7 @@ ttyhook_register(struct tty **rtp, struc
 	}
 
 	/* Make sure it is a TTY. */
-	cdp = devvn_refthread(fp->f_vnode, &dev);
+	cdp = devvn_refthread(fp->f_vnode, &dev, &ref);
 	if (cdp == NULL) {
 		error = ENXIO;
 		goto done1;
@@ -1859,7 +1859,7 @@ ttyhook_register(struct tty **rtp, struc
 		th->th_rint = ttyhook_defrint;
 
 done3:	tty_unlock(tp);
-done2:	dev_relthread(dev);
+done2:	dev_relthread(dev, ref);
 done1:	fdrop(fp, curthread);
 	return (error);
 }

Modified: head/sys/kern/vfs_bio.c
==============================================================================
--- head/sys/kern/vfs_bio.c	Fri Aug  6 09:25:42 2010	(r210922)
+++ head/sys/kern/vfs_bio.c	Fri Aug  6 09:42:15 2010	(r210923)
@@ -3203,6 +3203,7 @@ dev_strategy(struct cdev *dev, struct bu
 {
 	struct cdevsw *csw;
 	struct bio *bip;
+	int ref;
 
 	if ((!bp->b_iocmd) || (bp->b_iocmd & (bp->b_iocmd - 1)))
 		panic("b_iocmd botch");
@@ -3224,7 +3225,7 @@ dev_strategy(struct cdev *dev, struct bu
 	KASSERT(dev->si_refcount > 0,
 	    ("dev_strategy on un-referenced struct cdev *(%s)",
 	    devtoname(dev)));
-	csw = dev_refthread(dev);
+	csw = dev_refthread(dev, &ref);
 	if (csw == NULL) {
 		g_destroy_bio(bip);
 		bp->b_error = ENXIO;
@@ -3233,7 +3234,7 @@ dev_strategy(struct cdev *dev, struct bu
 		return;
 	}
 	(*csw->d_strategy)(bip);
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 }
 
 /*

Modified: head/sys/sys/conf.h
==============================================================================
--- head/sys/sys/conf.h	Fri Aug  6 09:25:42 2010	(r210922)
+++ head/sys/sys/conf.h	Fri Aug  6 09:42:15 2010	(r210923)
@@ -54,6 +54,7 @@ struct file;
 struct cdev {
 	void		*__si_reserved;
 	u_int		si_flags;
+#define	SI_ETERNAL	0x0001	/* never destroyed */
 #define SI_ALIAS	0x0002	/* carrier of alias name */
 #define SI_NAMED	0x0004	/* make_dev{_alias} has been called */
 #define SI_CHEAPCLONE	0x0008	/* can be removed_dev'ed when vnode reclaims */
@@ -249,9 +250,9 @@ int	destroy_dev_sched(struct cdev *dev);
 int	destroy_dev_sched_cb(struct cdev *dev, void (*cb)(void *), void *arg);
 void	destroy_dev_drain(struct cdevsw *csw);
 void	drain_dev_clone_events(void);
-struct cdevsw *dev_refthread(struct cdev *_dev);
-struct cdevsw *devvn_refthread(struct vnode *vp, struct cdev **devp);
-void	dev_relthread(struct cdev *_dev);
+struct cdevsw *dev_refthread(struct cdev *_dev, int *_ref);
+struct cdevsw *devvn_refthread(struct vnode *vp, struct cdev **devp, int *_ref);
+void	dev_relthread(struct cdev *_dev, int _ref);
 void	dev_depends(struct cdev *_pdev, struct cdev *_cdev);
 void	dev_ref(struct cdev *dev);
 void	dev_refl(struct cdev *dev);
@@ -262,10 +263,11 @@ struct cdev *make_dev(struct cdevsw *_de
 struct cdev *make_dev_cred(struct cdevsw *_devsw, int _unit,
 		struct ucred *_cr, uid_t _uid, gid_t _gid, int _perms,
 		const char *_fmt, ...) __printflike(7, 8);
-#define	MAKEDEV_REF     0x1
-#define	MAKEDEV_WHTOUT	0x2
-#define	MAKEDEV_NOWAIT	0x4
-#define	MAKEDEV_WAITOK	0x8
+#define	MAKEDEV_REF     0x01
+#define	MAKEDEV_WHTOUT	0x02
+#define	MAKEDEV_NOWAIT	0x04
+#define	MAKEDEV_WAITOK	0x08
+#define	MAKEDEV_ETERNAL	0x10
 struct cdev *make_dev_credf(int _flags,
 		struct cdevsw *_devsw, int _unit,
 		struct ucred *_cr, uid_t _uid, gid_t _gid, int _mode,
@@ -279,6 +281,12 @@ void	dev_lock(void);
 void	dev_unlock(void);
 void	setconf(void);
 
+#ifdef KLD_MODULE
+#define	MAKEDEV_ETERNAL_KLD	0
+#else
+#define	MAKEDEV_ETERNAL_KLD	MAKEDEV_ETERNAL
+#endif
+
 #define	dev2unit(d)	((d)->si_drv0)
 
 typedef	void (*cdevpriv_dtr_t)(void *data);

Modified: head/sys/sys/vnode.h
==============================================================================
--- head/sys/sys/vnode.h	Fri Aug  6 09:25:42 2010	(r210922)
+++ head/sys/sys/vnode.h	Fri Aug  6 09:42:15 2010	(r210923)
@@ -243,6 +243,7 @@ struct xvnode {
 #define	VV_ROOT		0x0001	/* root of its filesystem */
 #define	VV_ISTTY	0x0002	/* vnode represents a tty */
 #define	VV_NOSYNC	0x0004	/* unlinked, stop syncing */
+#define	VV_ETERNALDEV	0x0008	/* device that is never destroyed */
 #define	VV_CACHEDLABEL	0x0010	/* Vnode has valid cached MAC label */
 #define	VV_TEXT		0x0020	/* vnode is a pure text prototype */
 #define	VV_COPYONWRITE	0x0040	/* vnode is doing copy-on-write */

Modified: head/sys/vm/device_pager.c
==============================================================================
--- head/sys/vm/device_pager.c	Fri Aug  6 09:25:42 2010	(r210922)
+++ head/sys/vm/device_pager.c	Fri Aug  6 09:42:15 2010	(r210923)
@@ -108,6 +108,7 @@ dev_pager_alloc(void *handle, vm_ooffset
 	vm_ooffset_t off;
 	vm_memattr_t dummy;
 	struct cdevsw *csw;
+	int ref;
 
 	/*
 	 * Offset should be page aligned.
@@ -122,7 +123,7 @@ dev_pager_alloc(void *handle, vm_ooffset
 	 * Make sure this device can be mapped.
 	 */
 	dev = handle;
-	csw = dev_refthread(dev);
+	csw = dev_refthread(dev, &ref);
 	if (csw == NULL)
 		return (NULL);
 
@@ -135,7 +136,7 @@ dev_pager_alloc(void *handle, vm_ooffset
 	npages = OFF_TO_IDX(size);
 	for (off = foff; npages--; off += PAGE_SIZE)
 		if (csw->d_mmap(dev, off, &paddr, (int)prot, &dummy) != 0) {
-			dev_relthread(dev);
+			dev_relthread(dev, ref);
 			return (NULL);
 		}
 
@@ -177,7 +178,7 @@ dev_pager_alloc(void *handle, vm_ooffset
 			object->size = pindex;
 	}
 	mtx_unlock(&dev_pager_mtx);
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 	vm_object_deallocate(object1);
 	return (object);
 }
@@ -214,7 +215,7 @@ dev_pager_getpages(object, m, count, req
 	vm_page_t m_paddr, page;
 	vm_memattr_t memattr;
 	struct cdev *dev;
-	int i, ret;
+	int i, ref, ret;
 	struct cdevsw *csw;
 	struct thread *td;
 	struct file *fpop;
@@ -225,7 +226,7 @@ dev_pager_getpages(object, m, count, req
 	offset = page->pindex;
 	memattr = object->memattr;
 	VM_OBJECT_UNLOCK(object);
-	csw = dev_refthread(dev);
+	csw = dev_refthread(dev, &ref);
 	if (csw == NULL)
 		panic("dev_pager_getpage: no cdevsw");
 	td = curthread;
@@ -235,7 +236,7 @@ dev_pager_getpages(object, m, count, req
 	    PROT_READ, &memattr);
 	KASSERT(ret == 0, ("dev_pager_getpage: map function returns error"));
 	td->td_fpop = fpop;
-	dev_relthread(dev);
+	dev_relthread(dev, ref);
 	/* If "paddr" is a real page, perform a sanity check on "memattr". */
 	if ((m_paddr = vm_phys_paddr_to_vm_page(paddr)) != NULL &&
 	    pmap_page_get_memattr(m_paddr) != memattr) {

Modified: head/sys/vm/vm_mmap.c
==============================================================================
--- head/sys/vm/vm_mmap.c	Fri Aug  6 09:25:42 2010	(r210922)
+++ head/sys/vm/vm_mmap.c	Fri Aug  6 09:42:15 2010	(r210923)
@@ -1292,15 +1292,15 @@ vm_mmap_cdev(struct thread *td, vm_size_
 {
 	vm_object_t obj;
 	struct cdevsw *dsw;
-	int error, flags;
+	int error, flags, ref;
 
 	flags = *flagsp;
 
-	dsw = dev_refthread(cdev);
+	dsw = dev_refthread(cdev, &ref);
 	if (dsw == NULL)
 		return (ENXIO);
 	if (dsw->d_flags & D_MMAP_ANON) {
-		dev_relthread(cdev);
+		dev_relthread(cdev, ref);
 		*maxprotp = VM_PROT_ALL;
 		*flagsp |= MAP_ANON;
 		return (0);
@@ -1310,11 +1310,11 @@ vm_mmap_cdev(struct thread *td, vm_size_
 	 */
 	if ((*maxprotp & VM_PROT_WRITE) == 0 &&
 	    (prot & PROT_WRITE) != 0) {
-		dev_relthread(cdev);
+		dev_relthread(cdev, ref);
 		return (EACCES);
 	}
 	if (flags & (MAP_PRIVATE|MAP_COPY)) {
-		dev_relthread(cdev);
+		dev_relthread(cdev, ref);
 		return (EINVAL);
 	}
 	/*
@@ -1324,7 +1324,7 @@ vm_mmap_cdev(struct thread *td, vm_size_
 #ifdef MAC_XXX
 	error = mac_cdev_check_mmap(td->td_ucred, cdev, prot);
 	if (error != 0) {
-		dev_relthread(cdev);
+		dev_relthread(cdev, ref);
 		return (error);
 	}
 #endif
@@ -1338,7 +1338,7 @@ vm_mmap_cdev(struct thread *td, vm_size_
 	 * XXX assumes VM_PROT_* == PROT_*
 	 */
 	error = dsw->d_mmap_single(cdev, foff, objsize, objp, (int)prot);
-	dev_relthread(cdev);
+	dev_relthread(cdev, ref);
 	if (error != ENODEV)
 		return (error);
 	obj = vm_pager_allocate(OBJT_DEVICE, cdev, objsize, prot, *foff,

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 09:44:01 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BA9611065673;
	Fri,  6 Aug 2010 09:44:01 +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 8EB7C8FC08;
	Fri,  6 Aug 2010 09:44:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o769i10p075719;
	Fri, 6 Aug 2010 09:44:01 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o769i18T075717;
	Fri, 6 Aug 2010 09:44:01 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201008060944.o769i18T075717@svn.freebsd.org>
From: Konstantin Belousov 
Date: Fri, 6 Aug 2010 09:44:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210924 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 09:44:01 -0000

Author: kib
Date: Fri Aug  6 09:44:01 2010
New Revision: 210924
URL: http://svn.freebsd.org/changeset/base/210924

Log:
  Add "show cdev" ddb command.
  
  In collaboration with:	pho
  MFC after:	1 month

Modified:
  head/sys/kern/kern_conf.c

Modified: head/sys/kern/kern_conf.c
==============================================================================
--- head/sys/kern/kern_conf.c	Fri Aug  6 09:42:15 2010	(r210923)
+++ head/sys/kern/kern_conf.c	Fri Aug  6 09:44:01 2010	(r210924)
@@ -1229,3 +1229,71 @@ devdtr_init(void *dummy __unused)
 }
 
 SYSINIT(devdtr, SI_SUB_DEVFS, SI_ORDER_SECOND, devdtr_init, NULL);
+
+#include "opt_ddb.h"
+#ifdef DDB
+#include 
+
+#include 
+
+DB_SHOW_COMMAND(cdev, db_show_cdev)
+{
+	struct cdev_priv *cdp;
+	struct cdev *dev;
+	u_int flags;
+	char buf[512];
+
+	if (!have_addr) {
+		TAILQ_FOREACH(cdp, &cdevp_list, cdp_list) {
+			dev = &cdp->cdp_c;
+			db_printf("%s %p\n", dev->si_name, dev);
+			if (db_pager_quit)
+				break;
+		}
+		return;
+	}
+
+	dev = (struct cdev *)addr;
+	cdp = cdev2priv(dev);
+	db_printf("dev %s ref %d use %ld thr %ld inuse %u fdpriv %p\n",
+	    dev->si_name, dev->si_refcount, dev->si_usecount,
+	    dev->si_threadcount, cdp->cdp_inuse, cdp->cdp_fdpriv.lh_first);
+	db_printf("devsw %p si_drv0 %d si_drv1 %p si_drv2 %p\n",
+	    dev->si_devsw, dev->si_drv0, dev->si_drv1, dev->si_drv2);
+	flags = dev->si_flags;
+#define	SI_FLAG(flag)	do {						\
+	if (flags & (flag)) {						\
+		if (buf[0] != '\0')					\
+			strlcat(buf, ", ", sizeof(buf));		\
+		strlcat(buf, (#flag) + 3, sizeof(buf));			\
+		flags &= ~(flag);					\
+	}								\
+} while (0)
+	buf[0] = '\0';
+	SI_FLAG(SI_ETERNAL);
+	SI_FLAG(SI_ALIAS);
+	SI_FLAG(SI_NAMED);
+	SI_FLAG(SI_CHEAPCLONE);
+	SI_FLAG(SI_CHILD);
+	SI_FLAG(SI_DEVOPEN);
+	SI_FLAG(SI_CONSOPEN);
+	SI_FLAG(SI_DUMPDEV);
+	SI_FLAG(SI_CANDELETE);
+	SI_FLAG(SI_CLONELIST);
+	db_printf("si_flags %s\n", buf);
+
+	flags = cdp->cdp_flags;
+#define	CDP_FLAG(flag)	do {						\
+	if (flags & (flag)) {						\
+		if (buf[0] != '\0')					\
+			strlcat(buf, ", ", sizeof(buf));		\
+		strlcat(buf, (#flag) + 4, sizeof(buf));			\
+		flags &= ~(flag);					\
+	}								\
+} while (0)
+	buf[0] = '\0';
+	CDP_FLAG(CDP_ACTIVE);
+	CDP_FLAG(CDP_SCHED_DTR);
+	db_printf("cdp_flags %s\n", buf);
+}
+#endif

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 09:46:53 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D38CB1065672;
	Fri,  6 Aug 2010 09:46:53 +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 C28C58FC19;
	Fri,  6 Aug 2010 09:46:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o769krJ7076386;
	Fri, 6 Aug 2010 09:46:53 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o769krpm076384;
	Fri, 6 Aug 2010 09:46:53 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201008060946.o769krpm076384@svn.freebsd.org>
From: Konstantin Belousov 
Date: Fri, 6 Aug 2010 09:46:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210925 - head/sys/fs/devfs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 09:46:53 -0000

Author: kib
Date: Fri Aug  6 09:46:53 2010
New Revision: 210925
URL: http://svn.freebsd.org/changeset/base/210925

Log:
  Enable shared lookups and externed shared ops for devfs.
  
  In collaboration with:	pho
  MFC after:	1 month

Modified:
  head/sys/fs/devfs/devfs_vfsops.c

Modified: head/sys/fs/devfs/devfs_vfsops.c
==============================================================================
--- head/sys/fs/devfs/devfs_vfsops.c	Fri Aug  6 09:44:01 2010	(r210924)
+++ head/sys/fs/devfs/devfs_vfsops.c	Fri Aug  6 09:46:53 2010	(r210925)
@@ -81,7 +81,8 @@ devfs_mount(struct mount *mp)
 
 	MNT_ILOCK(mp);
 	mp->mnt_flag |= MNT_LOCAL;
-	mp->mnt_kern_flag |= MNTK_MPSAFE;
+	mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED |
+	    MNTK_EXTENDED_SHARED;
 #ifdef MAC
 	mp->mnt_flag |= MNT_MULTILABEL;
 #endif

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 09:47:48 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 647D31065687;
	Fri,  6 Aug 2010 09:47:48 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 533468FC28;
	Fri,  6 Aug 2010 09:47:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o769lmre076631;
	Fri, 6 Aug 2010 09:47:48 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o769lmjn076629;
	Fri, 6 Aug 2010 09:47:48 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201008060947.o769lmjn076629@svn.freebsd.org>
From: Konstantin Belousov 
Date: Fri, 6 Aug 2010 09:47:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210926 - head/sys/dev/null
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 09:47:48 -0000

Author: kib
Date: Fri Aug  6 09:47:48 2010
New Revision: 210926
URL: http://svn.freebsd.org/changeset/base/210926

Log:
  Mark /dev/zero and /dev/null as eternal.
  
  In collaboration with:	pho
  MFC after:	1 month

Modified:
  head/sys/dev/null/null.c

Modified: head/sys/dev/null/null.c
==============================================================================
--- head/sys/dev/null/null.c	Fri Aug  6 09:46:53 2010	(r210925)
+++ head/sys/dev/null/null.c	Fri Aug  6 09:47:48 2010	(r210926)
@@ -112,10 +112,10 @@ null_modevent(module_t mod __unused, int
 		if (bootverbose)
 			printf("null: \n");
 		zbuf = (void *)malloc(PAGE_SIZE, M_TEMP, M_WAITOK | M_ZERO);
-		null_dev = make_dev(&null_cdevsw, 0, UID_ROOT, GID_WHEEL,
-			0666, "null");
-		zero_dev = make_dev(&zero_cdevsw, 0, UID_ROOT, GID_WHEEL,
-			0666, "zero");
+		null_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &null_cdevsw, 0,
+		    NULL, UID_ROOT, GID_WHEEL, 0666, "null");
+		zero_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &zero_cdevsw, 0,
+		    NULL, UID_ROOT, GID_WHEEL, 0666, "zero");
 		break;
 
 	case MOD_UNLOAD:

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 10:34:49 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 58FB81065676;
	Fri,  6 Aug 2010 10:34:49 +0000 (UTC)
	(envelope-from gabor@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 472E48FC12;
	Fri,  6 Aug 2010 10:34:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76AYnJ1088545;
	Fri, 6 Aug 2010 10:34:49 GMT (envelope-from gabor@svn.freebsd.org)
Received: (from gabor@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76AYnEi088543;
	Fri, 6 Aug 2010 10:34:49 GMT (envelope-from gabor@svn.freebsd.org)
Message-Id: <201008061034.o76AYnEi088543@svn.freebsd.org>
From: Gabor Kovesdan 
Date: Fri, 6 Aug 2010 10:34:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210927 - head/usr.bin/grep/nls
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 10:34:49 -0000

Author: gabor
Date: Fri Aug  6 10:34:48 2010
New Revision: 210927
URL: http://svn.freebsd.org/changeset/base/210927

Log:
  - Some fixes to Ukranian catalog
  
  Submitted by:	avg, Alex Kozlov 

Modified:
  head/usr.bin/grep/nls/uk_UA.UTF-8.msg

Modified: head/usr.bin/grep/nls/uk_UA.UTF-8.msg
==============================================================================
--- head/usr.bin/grep/nls/uk_UA.UTF-8.msg	Fri Aug  6 09:47:48 2010	(r210926)
+++ head/usr.bin/grep/nls/uk_UA.UTF-8.msg	Fri Aug  6 10:34:48 2010	(r210927)
@@ -1,8 +1,8 @@
 $ $FreeBSD$
 $set 1
 $quote "
-1 "(Ñтандартний ввод)"
-2 "не можу прочитати ÑтиÑлий bzip2 файл"
+1 "(Ñтандартний ввід)"
+2 "не можу прочитати ÑтиÑнутий bzip2 файл"
 3 "невiдома Ð¾Ð¿Ñ†Ñ–Ñ %s"
 4 "викориÑтаннÑ: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A чиÑ] [-B чиÑ] [-C[чиÑ]]\n"
 5 "\t[-e шаблон] [-f файл] [--binary-files=значеннÑ] [--color=коли]\n"

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 11:20:49 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3F8461065677
	for ; Fri,  6 Aug 2010 11:20:49 +0000 (UTC)
	(envelope-from pho@holm.cc)
Received: from relay03.pair.com (relay03.pair.com [209.68.5.17])
	by mx1.freebsd.org (Postfix) with SMTP id F32EA8FC28
	for ; Fri,  6 Aug 2010 11:20:48 +0000 (UTC)
Received: (qmail 1000 invoked from network); 6 Aug 2010 10:54:06 -0000
Received: from 93.166.52.54 (HELO x2.osted.lan) (93.166.52.54)
	by relay03.pair.com with SMTP; 6 Aug 2010 10:54:06 -0000
X-pair-Authenticated: 93.166.52.54
Received: from x2.osted.lan (localhost [127.0.0.1])
	by x2.osted.lan (8.14.3/8.14.3) with ESMTP id o76As6Yh023040;
	Fri, 6 Aug 2010 12:54:06 +0200 (CEST)
	(envelope-from pho@x2.osted.lan)
Received: (from pho@localhost)
	by x2.osted.lan (8.14.3/8.14.3/Submit) id o76As61w023039;
	Fri, 6 Aug 2010 12:54:06 +0200 (CEST) (envelope-from pho)
Date: Fri, 6 Aug 2010 12:54:05 +0200
From: Peter Holm 
To: Konstantin Belousov 
Message-ID: <20100806105405.GA22879@x2.osted.lan>
References: <201008060947.o769lmjn076629@svn.freebsd.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201008060947.o769lmjn076629@svn.freebsd.org>
User-Agent: Mutt/1.4.2.3i
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r210926 - head/sys/dev/null
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 11:20:49 -0000

On Fri, Aug 06, 2010 at 09:47:48AM +0000, Konstantin Belousov wrote:
> Author: kib
> Date: Fri Aug  6 09:47:48 2010
> New Revision: 210926
> URL: http://svn.freebsd.org/changeset/base/210926
> 
> Log:
>   Mark /dev/zero and /dev/null as eternal.
>   
>   In collaboration with:	pho
>   MFC after:	1 month
> 
> Modified:
>   head/sys/dev/null/null.c
> 
> Modified: head/sys/dev/null/null.c
> ==============================================================================
> --- head/sys/dev/null/null.c	Fri Aug  6 09:46:53 2010	(r210925)
> +++ head/sys/dev/null/null.c	Fri Aug  6 09:47:48 2010	(r210926)
> @@ -112,10 +112,10 @@ null_modevent(module_t mod __unused, int
>  		if (bootverbose)
>  			printf("null: \n");
>  		zbuf = (void *)malloc(PAGE_SIZE, M_TEMP, M_WAITOK | M_ZERO);
> -		null_dev = make_dev(&null_cdevsw, 0, UID_ROOT, GID_WHEEL,
> -			0666, "null");
> -		zero_dev = make_dev(&zero_cdevsw, 0, UID_ROOT, GID_WHEEL,
> -			0666, "zero");
> +		null_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &null_cdevsw, 0,
> +		    NULL, UID_ROOT, GID_WHEEL, 0666, "null");
> +		zero_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &zero_cdevsw, 0,
> +		    NULL, UID_ROOT, GID_WHEEL, 0666, "zero");
>  		break;
>  
>  	case MOD_UNLOAD:

The micro-benchmarks for this was was:

1: open/read/close and open/write/close in a loop
2: read and write in a loop
3: open/read/close in a loop


Profileng of scenario #1 shows this:
$ ministat -w 72 devmtx1.r210851.20100805092611.log devmtx1.r210851M.20100805103753.log
x devmtx1.r210851.20100805092611.log
+ devmtx1.r210851M.20100805103753.log
+------------------------------------------------------------------------+
|    +                                                                x  |
|+  ++ +                                                             xxxx|
| |_AM_|                                                             |MA||
+------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x   5         74.54         75.22         74.89        74.926    0.25938389
+   5         60.93         62.15         61.73          61.6     0.4501111
Difference at 95.0% confidence
        -13.326 +/- 0.535747
        -17.7855% +/- 0.715035%
        (Student's t, pooled s = 0.367342)

Profileng of scenario #2 shows this:
$ ministat -w 72 devmtx2.r210851.20100805092611.log devmtx2.r210851M.20100805103753.log
x devmtx2.r210851.20100805092611.log
+ devmtx2.r210851M.20100805103753.log
+------------------------------------------------------------------------+
|+                                                                      x|
|+                                                                      x|
|+                                                                      x|
|+                                                                      x|
|+                                                                      x|
|A                                                                      A|
+------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x   5         64.97         65.31         65.01        65.062    0.14131525
+   5          9.75          9.97          9.82          9.84   0.087464278
Difference at 95.0% confidence
        -55.222 +/- 0.17139
        -84.876% +/- 0.263426%
        (Student's t, pooled s = 0.117516)

Profileng of scenario #3 shows this:
$ ministat -w 72 devmtx3.r210851.20100805092611.log devmtx3.r210851M.20100805103753.log
x devmtx3.r210851.20100805092611.log
+ devmtx3.r210851M.20100805103753.log
+------------------------------------------------------------------------+
|+ +                                                              x      |
|+ +  +                                                           x  xx x|
||_A_|                                                            |__A_| |
+------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x   5         73.27         75.57          74.5         74.32     0.9681942
+   5         49.19         51.03         49.82        49.816    0.75145193
Difference at 95.0% confidence
        -24.504 +/- 1.26392
        -32.9709% +/- 1.70065%
        (Student's t, pooled s = 0.866626)
$

Details at http://people.freebsd.org/~pho/devmtx/

- Peter

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 11:49:52 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 98682106566B;
	Fri,  6 Aug 2010 11:49:52 +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 6BDB48FC17;
	Fri,  6 Aug 2010 11:49:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76BnqhK005589;
	Fri, 6 Aug 2010 11:49:52 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76Bnqcr005586;
	Fri, 6 Aug 2010 11:49:52 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201008061149.o76Bnqcr005586@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Fri, 6 Aug 2010 11:49: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: r210928 - in stable/8/sys: netinet netinet6
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 11:49:52 -0000

Author: bz
Date: Fri Aug  6 11:49:52 2010
New Revision: 210928
URL: http://svn.freebsd.org/changeset/base/210928

Log:
  MFC r210703:
  
    Document the mandatory argument to the arptimer() and
    nd6_llinfo_timer() functions with a KASSERT().
    Note: there is no need to return after panic.
  
    In the legacy IP case, only assign the arg after the check,
    in the IPv6 case, remove the extra checks for the table and
    interface as they have to be there unless we freed and forgot
    to cancel the timer.  It doesn't matter anyway as we would
    panic on the NULL pointer deref immediately and the bug is
    elsewhere.
    This unifies the code of both address families to some extend.
  
    Reviewed by:  rwatson

Modified:
  stable/8/sys/netinet/if_ether.c
  stable/8/sys/netinet6/nd6.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/netinet/if_ether.c
==============================================================================
--- stable/8/sys/netinet/if_ether.c	Fri Aug  6 10:34:48 2010	(r210927)
+++ stable/8/sys/netinet/if_ether.c	Fri Aug  6 11:49:52 2010	(r210928)
@@ -163,12 +163,10 @@ static void
 arptimer(void *arg)
 {
 	struct ifnet *ifp;
-	struct llentry   *lle = (struct llentry *)arg;
+	struct llentry   *lle;
 
-	if (lle == NULL) {
-		panic("%s: NULL entry!\n", __func__);
-		return;
-	}
+	KASSERT(arg != NULL, ("%s: arg NULL", __func__));
+	lle = (struct llentry *)arg;
 	ifp = lle->lle_tbl->llt_ifp;
 	CURVNET_SET(ifp->if_vnet);
 	IF_AFDATA_LOCK(ifp);

Modified: stable/8/sys/netinet6/nd6.c
==============================================================================
--- stable/8/sys/netinet6/nd6.c	Fri Aug  6 10:34:48 2010	(r210927)
+++ stable/8/sys/netinet6/nd6.c	Fri Aug  6 11:49:52 2010	(r210928)
@@ -441,14 +441,9 @@ nd6_llinfo_timer(void *arg)
 	struct ifnet *ifp;
 	struct nd_ifinfo *ndi = NULL;
 
+	KASSERT(arg != NULL, ("%s: arg NULL", __func__));
 	ln = (struct llentry *)arg;
-	if (ln == NULL) {
-		panic("%s: NULL entry!\n", __func__);
-		return;
-	}
-
-	if ((ifp = ((ln->lle_tbl != NULL) ? ln->lle_tbl->llt_ifp : NULL)) == NULL)
-		panic("ln ifp == NULL");
+	ifp = ln->lle_tbl->llt_ifp;
 
 	CURVNET_SET(ifp->if_vnet);
 

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 11:58:27 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AE50E1065678;
	Fri,  6 Aug 2010 11:58: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 81C018FC1A;
	Fri,  6 Aug 2010 11:58:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76BwRM6007632;
	Fri, 6 Aug 2010 11:58:27 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76BwRVl007630;
	Fri, 6 Aug 2010 11:58:27 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201008061158.o76BwRVl007630@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Fri, 6 Aug 2010 11:58: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: r210929 - stable/8/sys/netinet6
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 11:58:27 -0000

Author: bz
Date: Fri Aug  6 11:58:27 2010
New Revision: 210929
URL: http://svn.freebsd.org/changeset/base/210929

Log:
  MFC r210350:
  
    Since r186119 IP6 input counters for octets and packets were not
    working anymore.  In addition more checks and operations were missing.
  
    In case lla_lookup results in a match, get the ifaddr to update the
    statistics counters, and check that the address is neither tentative,
    duplicate or otherwise invalid before accepting the packet.  If ok,
    record the address information in the mbuf.  [ as is done in case
    lla_lookup does not return a result and we go through the FIB ].
  
    Reported by:  remko
    Tested by:    remko

Modified:
  stable/8/sys/netinet6/ip6_input.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/netinet6/ip6_input.c
==============================================================================
--- stable/8/sys/netinet6/ip6_input.c	Fri Aug  6 11:49:52 2010	(r210928)
+++ stable/8/sys/netinet6/ip6_input.c	Fri Aug  6 11:58:27 2010	(r210929)
@@ -489,10 +489,54 @@ passin:
 	     (struct sockaddr *)&dst6);
 	IF_AFDATA_UNLOCK(ifp);
 	if ((lle != NULL) && (lle->la_flags & LLE_IFADDR)) {
-		ours = 1;
-		deliverifp = ifp;
+		struct ifaddr *ifa;
+		struct in6_ifaddr *ia6;
+		int bad;
+
+		bad = 1;
+#define	sa_equal(a1, a2)						\
+	(bcmp((a1), (a2), ((a1))->sin6_len) == 0)
+		IF_ADDR_LOCK(ifp);
+		TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
+			if (ifa->ifa_addr->sa_family != dst6.sin6_family)
+				continue;
+			if (sa_equal(&dst6, ifa->ifa_addr))
+				break;
+		}
+		KASSERT(ifa != NULL, ("%s: ifa not found for lle %p",
+		    __func__, lle));
+#undef sa_equal
+
+		ia6 = (struct in6_ifaddr *)ifa;
+		if (!(ia6->ia6_flags & IN6_IFF_NOTREADY)) {
+			/* Count the packet in the ip address stats */
+			ia6->ia_ifa.if_ipackets++;
+			ia6->ia_ifa.if_ibytes += m->m_pkthdr.len;
+
+			/*
+			 * record address information into m_tag.
+			 */
+			(void)ip6_setdstifaddr(m, ia6);
+
+			bad = 0;
+		} else {
+			char ip6bufs[INET6_ADDRSTRLEN];
+			char ip6bufd[INET6_ADDRSTRLEN];
+			/* address is not ready, so discard the packet. */
+			nd6log((LOG_INFO,
+			    "ip6_input: packet to an unready address %s->%s\n",
+			    ip6_sprintf(ip6bufs, &ip6->ip6_src),
+			    ip6_sprintf(ip6bufd, &ip6->ip6_dst)));
+		}
+		IF_ADDR_UNLOCK(ifp);
 		LLE_RUNLOCK(lle);
-		goto hbhcheck;
+		if (bad)
+			goto bad;
+		else {
+			ours = 1;
+			deliverifp = ifp;
+			goto hbhcheck;
+		}
 	}
 	if (lle != NULL)
 		LLE_RUNLOCK(lle);

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 12:38:30 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C25BA1065670;
	Fri,  6 Aug 2010 12:38:30 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 96AD28FC2A;
	Fri,  6 Aug 2010 12:38:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76CcUV9016562;
	Fri, 6 Aug 2010 12:38:30 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76CcUPB016561;
	Fri, 6 Aug 2010 12:38:30 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008061238.o76CcUPB016561@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Fri, 6 Aug 2010 12:38:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210930 - head/usr.sbin/fifolog/lib
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 12:38:31 -0000

Author: uqs
Date: Fri Aug  6 12:38:30 2010
New Revision: 210930
URL: http://svn.freebsd.org/changeset/base/210930

Log:
  Typo fixes
  
  PR:		docs/149314
  Submitted by:	olgeni
  MFC after:	3 days

Modified:
  head/usr.sbin/fifolog/lib/fifolog.h

Modified: head/usr.sbin/fifolog/lib/fifolog.h
==============================================================================
--- head/usr.sbin/fifolog/lib/fifolog.h	Fri Aug  6 11:58:27 2010	(r210929)
+++ head/usr.sbin/fifolog/lib/fifolog.h	Fri Aug  6 12:38:30 2010	(r210930)
@@ -33,15 +33,15 @@
  * Definitions for fifolog "protocol": the on-media layout.
  *
  * The fifolog on-media record has three layers:
- *   The outher timestamping and synchronization layer.
- *   The zlib implemented data compression
+ *   The outer timestamping and synchronization layer.
+ *   The zlib implemented data compression.
  *   The inner sequencing and identification layer.
  *
- * All three layers are synchronized at a subset of the outher layer
+ * All three layers are synchronized at a subset of the outer layer
  * record boundaries, from where reading can be initiated.
  *
  *
- * The outher layer:
+ * The outer layer:
  * -----------------
  * The first record in a fifolog contains a magic string and version
  * information along with a 32be encoded recordsize for all records
@@ -55,7 +55,7 @@
  *	0	32be	sequence_number
  *			The sequence number is randomly chosen for the
  *			fifolog and increments once for each record written.
- *			It's precense allow quick identification of the next
+ *			It's presence allow quick identification of the next
  *			record to be written using a binary search for the
  *			first place where a discontinuity in the sequence
  *			numbers occur.
@@ -89,14 +89,14 @@
  * In most cases, the timer will expire before zlib has filled an entire
  * record in which case Z_SYNC_FLUSH will be used to force as much as
  * possible into the buffer before it is written.  This is not marked
- * in outher layer (apart from a natural correlation with padding) since
+ * in outer layer (apart from a natural correlation with padding) since
  * zlibs data stream handles this without help.
  *
  *
  * The inner layer:
  * ----------------
- * The inner layer contains data indentification and to the second 
- * timestamping (the timestamp in the outherlayer only marks the 
+ * The inner layer contains data identification and to the second 
+ * timestamping (the timestamp in the outer layer only marks the 
  * first possible timestamp for content in the SYNC record).
  * 
  *	offset	type	contents
@@ -113,7 +113,7 @@
  *	4	32be	time_t containing POSIX's understanding of UTC.
  *
  * Then follows the content, either as a NUL terminated string or as
- * a lenght encoded binary sequence:
+ * a length encoded binary sequence:
  *
  * If (ident & FIFOLOG_LENGTH) the record is prefixed by:
  *	{0|4}	8	length of binary data

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 12:39:55 2010
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B6011106566C;
	Fri,  6 Aug 2010 12:39:55 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2001:470:9a47::1])
	by mx1.freebsd.org (Postfix) with ESMTP id 526808FC13;
	Fri,  6 Aug 2010 12:39:55 +0000 (UTC)
Received: from acme.spoerlein.net (localhost.spoerlein.net [IPv6:::1])
	by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id o76CdsQ2015407
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 6 Aug 2010 14:39:54 +0200 (CEST) (envelope-from uqs@FreeBSD.org)
Received: (from uqs@localhost)
	by acme.spoerlein.net (8.14.4/8.14.4/Submit) id o76CdsIk015406;
	Fri, 6 Aug 2010 14:39:54 +0200 (CEST) (envelope-from uqs@FreeBSD.org)
Date: Fri, 6 Aug 2010 14:39:54 +0200
From: Ulrich Spoerlein 
To: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org,
	svn-src-head@FreeBSD.org
Message-ID: <20100806123954.GM80306@acme.spoerlein.net>
Mail-Followup-To: Ulrich Spoerlein ,
	src-committers@FreeBSD.org, svn-src-all@FreeBSD.org,
	svn-src-head@FreeBSD.org
References: <201008061238.o76CcUPB016561@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <201008061238.o76CcUPB016561@svn.freebsd.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: 
Subject: Re: svn commit: r210930 - head/usr.sbin/fifolog/lib
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 12:39:55 -0000

On Fri, 06.08.2010 at 12:38:30 +0000, Ulrich Spörlein wrote:
> Author: uqs
> Date: Fri Aug  6 12:38:30 2010
> New Revision: 210930
> URL: http://svn.freebsd.org/changeset/base/210930
> 
> Log:
>   Typo fixes
>   
>   PR:		docs/149314
>  Submitted by:	olgeni
>   MFC after:	3 days

Forgot to add:

Approved by:    phk

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 13:45:16 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CB57B106567B;
	Fri,  6 Aug 2010 13:45:16 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BA2148FC25;
	Fri,  6 Aug 2010 13:45:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76DjG2E031363;
	Fri, 6 Aug 2010 13:45:16 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76DjGHB031361;
	Fri, 6 Aug 2010 13:45:16 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201008061345.o76DjGHB031361@svn.freebsd.org>
From: Konstantin Belousov 
Date: Fri, 6 Aug 2010 13:45:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210931 - head/sys/dev/usb/quirk
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 13:45:16 -0000

Author: kib
Date: Fri Aug  6 13:45:16 2010
New Revision: 210931
URL: http://svn.freebsd.org/changeset/base/210931

Log:
  Disable sync cache for the Transcend Jetflash V90. It is more specific
  quirk over the general one for transcend sticks.
  
  Submitted by:	Mykola Dzham 
  MFC after:	1 week

Modified:
  head/sys/dev/usb/quirk/usb_quirk.c

Modified: head/sys/dev/usb/quirk/usb_quirk.c
==============================================================================
--- head/sys/dev/usb/quirk/usb_quirk.c	Fri Aug  6 12:38:30 2010	(r210930)
+++ head/sys/dev/usb/quirk/usb_quirk.c	Fri Aug  6 13:45:16 2010	(r210931)
@@ -159,6 +159,8 @@ static struct usb_quirk_entry usb_quirks
 	USB_QUIRK(ALCOR, AU6390, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
 	USB_QUIRK(ALCOR, UMCR_9361, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
 	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
+	USB_QUIRK(ALCOR, TRANSCEND, 0x0142, 0x0142, UQ_MSC_FORCE_WIRE_BBB,
+	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_SYNC_CACHE),
 	USB_QUIRK(ALCOR, TRANSCEND, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
 	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
 	USB_QUIRK(APACER, HT202, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY,

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 14:18:37 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 839831065675;
	Fri,  6 Aug 2010 14:18:37 +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 573AD8FC18;
	Fri,  6 Aug 2010 14:18:37 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76EIbFI038829;
	Fri, 6 Aug 2010 14:18:37 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76EIbj0038826;
	Fri, 6 Aug 2010 14:18:37 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008061418.o76EIbj0038826@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 6 Aug 2010 14:18:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210932 - in stable/6/sys: amd64/amd64 i386/i386
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 14:18:37 -0000

Author: jhb
Date: Fri Aug  6 14:18:37 2010
New Revision: 210932
URL: http://svn.freebsd.org/changeset/base/210932

Log:
  MFC 170866,176206:
  If busdma is being used to realign dynamic buffers and the alignment is set to
  PAGE_SIZE or less, the bounce page counting logic was flawed and wouldn't
  reserve any pages.  Adjust to be correct.

Modified:
  stable/6/sys/amd64/amd64/busdma_machdep.c
  stable/6/sys/i386/i386/busdma_machdep.c
Directory Properties:
  stable/6/sys/   (props changed)
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)

Modified: stable/6/sys/amd64/amd64/busdma_machdep.c
==============================================================================
--- stable/6/sys/amd64/amd64/busdma_machdep.c	Fri Aug  6 13:45:16 2010	(r210931)
+++ stable/6/sys/amd64/amd64/busdma_machdep.c	Fri Aug  6 14:18:37 2010	(r210932)
@@ -594,14 +594,14 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm
 		 * Count the number of bounce pages
 		 * needed in order to complete this transfer
 		 */
-		vaddr = trunc_page((vm_offset_t)buf);
+		vaddr = (vm_offset_t)buf;
 		vendaddr = (vm_offset_t)buf + buflen;
 
 		while (vaddr < vendaddr) {
 			paddr = pmap_kextract(vaddr);
 			if (run_filter(dmat, paddr) != 0)
 				map->pagesneeded++;
-			vaddr += PAGE_SIZE;
+			vaddr += (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK));
 		}
 		CTR1(KTR_BUSDMA, "pagesneeded= %d\n", map->pagesneeded);
 	}
@@ -832,7 +832,7 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, 
 		    bus_dmamap_callback2_t *callback, void *callback_arg,
 		    int flags)
 {
-	bus_addr_t lastaddr;
+	bus_addr_t lastaddr = 0;
 	int nsegs, error, first, i;
 	bus_size_t resid;
 	struct iovec *iov;

Modified: stable/6/sys/i386/i386/busdma_machdep.c
==============================================================================
--- stable/6/sys/i386/i386/busdma_machdep.c	Fri Aug  6 13:45:16 2010	(r210931)
+++ stable/6/sys/i386/i386/busdma_machdep.c	Fri Aug  6 14:18:37 2010	(r210932)
@@ -597,14 +597,14 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm
 		 * Count the number of bounce pages
 		 * needed in order to complete this transfer
 		 */
-		vaddr = trunc_page((vm_offset_t)buf);
+		vaddr = (vm_offset_t)buf;
 		vendaddr = (vm_offset_t)buf + buflen;
 
 		while (vaddr < vendaddr) {
 			paddr = pmap_kextract(vaddr);
 			if (run_filter(dmat, paddr) != 0)
 				map->pagesneeded++;
-			vaddr += PAGE_SIZE;
+			vaddr += (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK));
 		}
 		CTR1(KTR_BUSDMA, "pagesneeded= %d\n", map->pagesneeded);
 	}

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 14:21:49 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 399581065674;
	Fri,  6 Aug 2010 14:21:49 +0000 (UTC) (envelope-from ed@hoeg.nl)
Received: from mx0.hoeg.nl (unknown [IPv6:2a01:4f8:101:5343::aa])
	by mx1.freebsd.org (Postfix) with ESMTP id F16858FC0C;
	Fri,  6 Aug 2010 14:21:48 +0000 (UTC)
Received: by mx0.hoeg.nl (Postfix, from userid 1000)
	id 63C322A28CCA; Fri,  6 Aug 2010 16:21:48 +0200 (CEST)
Date: Fri, 6 Aug 2010 16:21:48 +0200
From: Ed Schouten 
To: Konstantin Belousov 
Message-ID: <20100806142148.GB76386@hoeg.nl>
References: <201008060947.o769lmjn076629@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="xXmbgvnjoT4axfJE"
Content-Disposition: inline
In-Reply-To: <201008060947.o769lmjn076629@svn.freebsd.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r210926 - head/sys/dev/null
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 14:21:49 -0000


--xXmbgvnjoT4axfJE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Konstantin Belousov  wrote:
> Log:
>   Mark /dev/zero and /dev/null as eternal.

So `eternal' means that these device nodes can never ever disappear?
Maybe we can also mark /dev/ctty (tty_tty.c) like this as well?

Greetings,
--=20
 Ed Schouten 
 WWW: http://80386.nl/

--xXmbgvnjoT4axfJE
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)

iEYEARECAAYFAkxcGnwACgkQ52SDGA2eCwWt/gCfWCDJ+17iPyBpNJ0pp0FBK/6o
5LIAnjItJdyZJb5/kf5JglchjhLtaKKO
=IRn1
-----END PGP SIGNATURE-----

--xXmbgvnjoT4axfJE--

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 14:24:00 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 274251065674;
	Fri,  6 Aug 2010 14:24:00 +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 945AA8FC1E;
	Fri,  6 Aug 2010 14:23:59 +0000 (UTC)
Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua
	[10.1.1.148])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o76ENp4k030327
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 6 Aug 2010 17:23:51 +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.4/8.14.4) with ESMTP id
	o76ENpVq038095; Fri, 6 Aug 2010 17:23:51 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o76ENpfs038094; 
	Fri, 6 Aug 2010 17:23:51 +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: Fri, 6 Aug 2010 17:23:51 +0300
From: Kostik Belousov 
To: Ed Schouten 
Message-ID: <20100806142351.GQ22295@deviant.kiev.zoral.com.ua>
References: <201008060947.o769lmjn076629@svn.freebsd.org>
	<20100806142148.GB76386@hoeg.nl>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="pe0+q/hmC7bdmHte"
Content-Disposition: inline
In-Reply-To: <20100806142148.GB76386@hoeg.nl>
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=-2.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50,
	DNS_FROM_OPENWHOIS autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r210926 - head/sys/dev/null
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 14:24:00 -0000


--pe0+q/hmC7bdmHte
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Aug 06, 2010 at 04:21:48PM +0200, Ed Schouten wrote:
> * Konstantin Belousov  wrote:
> > Log:
> >   Mark /dev/zero and /dev/null as eternal.
>=20
> So `eternal' means that these device nodes can never ever disappear?
> Maybe we can also mark /dev/ctty (tty_tty.c) like this as well?
Yes, the plan is to mark all eligible devices eventually. But I want to
wait some time, before making the sweep over the drivers, to make sure
that I did not missed something serious in the design. This is why
only /dev/null and /dev/zero are converted for now.

--pe0+q/hmC7bdmHte
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkxcGvcACgkQC3+MBN1Mb4jpfACg4blcMZ7WlVE3Aue0f3yy82ej
yLkAoKf/61UoUFAgWj/9/fGcaG1G5db0
=aacF
-----END PGP SIGNATURE-----

--pe0+q/hmC7bdmHte--

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 14:33:43 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7438F1065673;
	Fri,  6 Aug 2010 14:33:43 +0000 (UTC)
	(envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5F4518FC1D;
	Fri,  6 Aug 2010 14:33:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76EXhl6042336;
	Fri, 6 Aug 2010 14:33:43 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76EXgYL042290;
	Fri, 6 Aug 2010 14:33:42 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201008061433.o76EXgYL042290@svn.freebsd.org>
From: Joel Dahl 
Date: Fri, 6 Aug 2010 14:33:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210933 - in head: lib/libc/net lib/libc/stdlib
	lib/libc/sys lib/libcam lib/libgpib lib/libpmc lib/libusb
	lib/libutil libexec/ypxfr sbin/fsck sbin/fsck_ffs
	sbin/geom/class/part sbin/geo...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 14:33:43 -0000

Author: joel (doc committer)
Date: Fri Aug  6 14:33:42 2010
New Revision: 210933
URL: http://svn.freebsd.org/changeset/base/210933

Log:
  Fix typos and spelling mistakes.

Modified:
  head/lib/libc/net/sctp_recvmsg.3
  head/lib/libc/net/sctp_sendmsg.3
  head/lib/libc/stdlib/malloc.3
  head/lib/libc/sys/kqueue.2
  head/lib/libc/sys/ptrace.2
  head/lib/libcam/cam.3
  head/lib/libgpib/gpib.3
  head/lib/libpmc/pmc.corei7.3
  head/lib/libpmc/pmc.mips.3
  head/lib/libpmc/pmc.westmere.3
  head/lib/libpmc/pmc.westmereuc.3
  head/lib/libusb/libusb.3
  head/lib/libutil/property.3
  head/libexec/ypxfr/ypxfr.8
  head/sbin/fsck/fsck.8
  head/sbin/fsck_ffs/fsck_ffs.8
  head/sbin/geom/class/part/gpart.8
  head/sbin/geom/core/geom.8
  head/sbin/ifconfig/ifconfig.8
  head/sbin/ping6/ping6.8
  head/sbin/sunlabel/sunlabel.8
  head/share/man/man4/cmx.4
  head/share/man/man4/dc.4
  head/share/man/man4/gre.4
  head/share/man/man4/meteor.4
  head/share/man/man4/net80211.4
  head/share/man/man4/ng_car.4
  head/share/man/man4/pcii.4
  head/share/man/man4/pcm.4
  head/share/man/man4/sctp.4
  head/share/man/man9/BUS_NEW_PASS.9
  head/share/man/man9/ieee80211_vap.9
  head/share/man/man9/rman.9
  head/usr.bin/du/du.1
  head/usr.bin/fstat/fstat.1
  head/usr.bin/rwall/rwall.1
  head/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3
  head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3
  head/usr.sbin/lpr/lpr/printcap.5
  head/usr.sbin/makefs/makefs.8
  head/usr.sbin/mfiutil/mfiutil.8
  head/usr.sbin/nfsd/stablerestart.5
  head/usr.sbin/nfsuserd/nfsuserd.8
  head/usr.sbin/ntp/doc/ntp.conf.5
  head/usr.sbin/ntp/doc/ntpq.8

Modified: head/lib/libc/net/sctp_recvmsg.3
==============================================================================
--- head/lib/libc/net/sctp_recvmsg.3	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/lib/libc/net/sctp_recvmsg.3	Fri Aug  6 14:33:42 2010	(r210933)
@@ -88,7 +88,7 @@ will hold the address of the peer and
 .Fa fromlen
 will hold the length of that address.
 Note that
-the address is bounded by the inital value of 
+the address is bounded by the initial value of 
 .Fa fromlen
 which is used as an in/out variable.
 .Pp

Modified: head/lib/libc/net/sctp_sendmsg.3
==============================================================================
--- head/lib/libc/net/sctp_sendmsg.3	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/lib/libc/net/sctp_sendmsg.3	Fri Aug  6 14:33:42 2010	(r210933)
@@ -72,7 +72,7 @@ Data sent in such an instance will resul
 the data being sent on the third leg of the SCTP four-way handshake.
 Note that if
 the socket is a one-to-one type (SOCK_STREAM) socket then an association must
-be in existance (by use of the 
+be in existence (by use of the 
 .Xr connect 2
 system call).
 Calling 

Modified: head/lib/libc/stdlib/malloc.3
==============================================================================
--- head/lib/libc/stdlib/malloc.3	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/lib/libc/stdlib/malloc.3	Fri Aug  6 14:33:42 2010	(r210933)
@@ -415,7 +415,7 @@ Allocation requests that are more than h
 minimum cacheline-multiple size class (see the
 .Dq Q
 option) are rounded up to the nearest multiple of the quantum.
-Allocation requests that are more than the minumum cacheline-multiple size
+Allocation requests that are more than the minimum cacheline-multiple size
 class, but no more than the minimum subpage-multiple size class (see the
 .Dq C
 option) are rounded up to the nearest multiple of the cacheline size (64).

Modified: head/lib/libc/sys/kqueue.2
==============================================================================
--- head/lib/libc/sys/kqueue.2	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/lib/libc/sys/kqueue.2	Fri Aug  6 14:33:42 2010	(r210933)
@@ -445,7 +445,7 @@ contains the events which triggered the 
 .It Dv EVFILT_USER
 Establishes a user event identified by
 .Va ident
-which is not assosicated with any kernel mechanism but is triggered by
+which is not associated with any kernel mechanism but is triggered by
 user level code.
 The lower 24 bits of the 
 .Va fflags

Modified: head/lib/libc/sys/ptrace.2
==============================================================================
--- head/lib/libc/sys/ptrace.2	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/lib/libc/sys/ptrace.2	Fri Aug  6 14:33:42 2010	(r210933)
@@ -335,7 +335,7 @@ and/or memory.
 When
 .Dv PL_FLAG_SCX
 is set, this flag may be additionally specified to inform that the
-program being executed by debuggee process has been changed by succesful
+program being executed by debuggee process has been changed by successful
 execution of a system call from the
 .Fn execve 2
 family.

Modified: head/lib/libcam/cam.3
==============================================================================
--- head/lib/libcam/cam.3	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/lib/libcam/cam.3	Fri Aug  6 14:33:42 2010	(r210933)
@@ -382,7 +382,7 @@ returns an allocated and partially initi
 of the CCB failed.
 .Pp
 .Fn cam_send_ccb
-returns a value of -1 if an error occured, and
+returns a value of -1 if an error occurred, and
 .Va errno
 is set to indicate the error.
 .Pp

Modified: head/lib/libgpib/gpib.3
==============================================================================
--- head/lib/libgpib/gpib.3	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/lib/libgpib/gpib.3	Fri Aug  6 14:33:42 2010	(r210933)
@@ -258,7 +258,7 @@ Device requests service
 .It SPOLL
 Serial Poll
 .It EVENT
-Event occured
+Event occurred
 .It CMPL
 I/O complete
 .It LOK

Modified: head/lib/libpmc/pmc.corei7.3
==============================================================================
--- head/lib/libpmc/pmc.corei7.3	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/lib/libpmc/pmc.corei7.3	Fri Aug  6 14:33:42 2010	(r210933)
@@ -833,7 +833,7 @@ Counts mispredicted indirect branches th
 Counts mispredicted non-indirect near calls executed, (should always be 0).
 .It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL
 .Pq Event 89H , Umask 20H
-Counts mispredicted indirect near calls exeucted, including both register
+Counts mispredicted indirect near calls executed, including both register
 and memory indirect.
 .It Li BR_MISP_EXEC.NEAR_CALLS
 .Pq Event 89H , Umask 30H

Modified: head/lib/libpmc/pmc.mips.3
==============================================================================
--- head/lib/libpmc/pmc.mips.3	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/lib/libpmc/pmc.mips.3	Fri Aug  6 14:33:42 2010	(r210933)
@@ -153,7 +153,7 @@ Floating point instructions completed.
 Integer and co-processor loads completed.
 .It Li STORE_COMPLETED
 .Pq Event 15, Counter 1
-Integer and co-porocessor stores completed.
+Integer and co-processor stores completed.
 .It Li BARRIER_COMPLETED
 .Pq Event 16, Counter 0
 Direct jump (and link) instructions completed.
@@ -225,10 +225,10 @@ valid instruction to the ALU.
 Counts the number of cycles where the ALU pipeline cannot advance.
 .It Li UNCACHED_LOAD
 .Pq Event 33, Counter 0
-Counts uncached and uncached acclerated loads.
+Counts uncached and uncached accelerated loads.
 .It Li UNCACHED_STORE
 .Pq Event 33, Counter 1
-Counts uncached and uncached acclerated stores.
+Counts uncached and uncached accelerated stores.
 .It Li CP2_REG_TO_REG_COMPLETED
 .Pq Event 35, Counter 0
 Co-processor 2 register to register instructions completed.

Modified: head/lib/libpmc/pmc.westmere.3
==============================================================================
--- head/lib/libpmc/pmc.westmere.3	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/lib/libpmc/pmc.westmere.3	Fri Aug  6 14:33:42 2010	(r210933)
@@ -775,7 +775,7 @@ Counts mispredicted indirect branches th
 Counts mispredicted non-indirect near calls executed, (should always be 0).
 .It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL
 .Pq Event 89H , Umask 20H
-Counts mispredicted indirect near calls exeucted, including both register
+Counts mispredicted indirect near calls executed, including both register
 and memory indirect.
 .It Li BR_MISP_EXEC.NEAR_CALLS
 .Pq Event 89H , Umask 30H

Modified: head/lib/libpmc/pmc.westmereuc.3
==============================================================================
--- head/lib/libpmc/pmc.westmereuc.3	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/lib/libpmc/pmc.westmereuc.3	Fri Aug  6 14:33:42 2010	(r210933)
@@ -715,7 +715,7 @@ qualified by mask value written to MSR 3
 supported:
 0: NONE 40000000_00000000H:RSPFWDI 40001A00_00000000H:RSPFWDS
 40001D00_00000000H:RSPIWB
-Match opcode/addres s by writing MSR 396H with mask supported mask value
+Match opcode/address by writing MSR 396H with mask supported mask value
 .It Li ADDR_OPCODE_MATCH.REMOTE
 .Pq Event 35H , Umask 02H
 Counts number of requests from the remote socket, address/opcode of request
@@ -723,7 +723,7 @@ is qualified by mask value written to MS
 are supported:
 0: NONE 40000000_00000000H:RSPFWDI 40001A00_00000000H:RSPFWDS
 40001D00_00000000H:RSPIWB
-Match opcode/addres s by writing MSR 396H with mask supported mask value
+Match opcode/address by writing MSR 396H with mask supported mask value
 .It Li ADDR_OPCODE_MATCH.LOCAL
 .Pq Event 35H , Umask 04H
 Counts number of requests from the local socket, address/opcode of request
@@ -731,7 +731,7 @@ is qualified by mask value written to MS
 are supported:
 0: NONE 40000000_00000000H:RSPFWDI 40001A00_00000000H:RSPFWDS
 40001D00_00000000H:RSPIWB
-Match opcode/addres s by writing MSR 396H with mask supported mask value
+Match opcode/address by writing MSR 396H with mask supported mask value
 .It Li QPI_TX_STALLED_SINGLE_FLIT.HOME.LINK_0
 .Pq Event 40H , Umask 01H
 Counts cycles the Quickpath outbound link 0 HOME virtual channel is stalled

Modified: head/lib/libusb/libusb.3
==============================================================================
--- head/lib/libusb/libusb.3	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/lib/libusb/libusb.3	Fri Aug  6 14:33:42 2010	(r210933)
@@ -144,7 +144,7 @@ disconnected and a LIBUSB_ERROR code on 
 .
 .Ft libusb_device_handle *
 .Fn libusb_open_device_with_vid_pid "libusb_context *ctx" "uint16_t vid" "uint16_t pid"
-Conveniance function to open a device with is 
+Convenience function to open a device with is 
 .Fa vid 
 and 
 .Fa pid.

Modified: head/lib/libutil/property.3
==============================================================================
--- head/lib/libutil/property.3	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/lib/libutil/property.3	Fri Aug  6 14:33:42 2010	(r210933)
@@ -85,7 +85,7 @@ where
 is an alphanumeric string (and any punctuation not including the `=' character)
 and
 .Fa value
-is an arbitary string of text terminated by a newline character.
+is an arbitrary string of text terminated by a newline character.
 If newlines
 are desired, the entire value should be enclosed in { } (curly-bracket)
 characters.

Modified: head/libexec/ypxfr/ypxfr.8
==============================================================================
--- head/libexec/ypxfr/ypxfr.8	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/libexec/ypxfr/ypxfr.8	Fri Aug  6 14:33:42 2010	(r210933)
@@ -90,7 +90,7 @@ and fills it with the contents of
 .Ar mapname
 as supplied by the specified
 .Ar source host .
-When the entire map has been transfered,
+When the entire map has been transferred,
 .Nm
 deletes the original copy of
 .Ar mapname

Modified: head/sbin/fsck/fsck.8
==============================================================================
--- head/sbin/fsck/fsck.8	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/sbin/fsck/fsck.8	Fri Aug  6 14:33:42 2010	(r210933)
@@ -171,7 +171,7 @@ When running in background mode,
 only one file system at a time will be checked.
 Note that background
 .Nm
-is limited to checking for only the most commonly occuring
+is limited to checking for only the most commonly occurring
 file system abnormalities.
 Under certain circumstances,
 some errors can escape background

Modified: head/sbin/fsck_ffs/fsck_ffs.8
==============================================================================
--- head/sbin/fsck_ffs/fsck_ffs.8	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/sbin/fsck_ffs/fsck_ffs.8	Fri Aug  6 14:33:42 2010	(r210933)
@@ -176,7 +176,7 @@ the super block for the file system.
 An alternate super block is usually located at block 32 for UFS1,
 and block 160 for UFS2.
 .It Fl C
-Check if file system was dismouted cleanly.
+Check if file system was dismounted cleanly.
 If so, skip file system checks (like "preen").
 However, if the file system was not cleanly dismounted, do full checks,
 is if

Modified: head/sbin/geom/class/part/gpart.8
==============================================================================
--- head/sbin/geom/class/part/gpart.8	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/sbin/geom/class/part/gpart.8	Fri Aug  6 14:33:42 2010	(r210933)
@@ -177,7 +177,7 @@ option. SI unit suffixes are allowed. On
 .Fl b
 and
 .Fl s
-options can be ommitted. If so they are automatically calculated.
+options can be omitted. If so they are automatically calculated.
 The type of the partition is given by the
 .Fl t Ar type
 option.

Modified: head/sbin/geom/core/geom.8
==============================================================================
--- head/sbin/geom/core/geom.8	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/sbin/geom/core/geom.8	Fri Aug  6 14:33:42 2010	(r210933)
@@ -57,7 +57,7 @@ The
 utility is used to control various GEOM classes.
 A class has to be aware of
 .Xr geom 8
-comunication methods, but there are also some standard commands
+communication methods, but there are also some standard commands
 which can be used for existing
 .Xr geom 8
 unaware classes.

Modified: head/sbin/ifconfig/ifconfig.8
==============================================================================
--- head/sbin/ifconfig/ifconfig.8	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/sbin/ifconfig/ifconfig.8	Fri Aug  6 14:33:42 2010	(r210933)
@@ -604,7 +604,7 @@ If the interface was reset when previous
 the hardware will be re-initialized.
 .El
 .Pp
-The following parameters are for ICMPv6 Neightbor Discovery Protocol.
+The following parameters are for ICMPv6 Neighbor Discovery Protocol.
 Note that the address family keyword
 .Dq Li inet6
 is needed for them:
@@ -645,7 +645,7 @@ Set a flag to enable Neighbor Unreachabi
 Clear a flag
 .Cm nud .
 .It Cm prefer_source
-Set a flag to prefer addesses on the interface as candidates of the
+Set a flag to prefer addresses on the interface as candidates of the
 source address for outgoing packets.
 .It Cm -prefer_source
 Clear a flag

Modified: head/sbin/ping6/ping6.8
==============================================================================
--- head/sbin/ping6/ping6.8	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/sbin/ping6/ping6.8	Fri Aug  6 14:33:42 2010	(r210933)
@@ -429,7 +429,7 @@ The
 utility returns 0 on success (the host is alive),
 2 if the transmission was successful but no responses were received,
 any other non-zero value if the arguments are incorrect or                                                            
-another error has occured.                                                                                            
+another error has occurred.                                                                                            
 .Sh EXAMPLES
 Normally,
 .Nm

Modified: head/sbin/sunlabel/sunlabel.8
==============================================================================
--- head/sbin/sunlabel/sunlabel.8	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/sbin/sunlabel/sunlabel.8	Fri Aug  6 14:33:42 2010	(r210933)
@@ -346,7 +346,7 @@ The following VTOC flags are known:
 Optionally, both the tag and/or the flag name may be specified
 numerically, using standard
 .Ql C
-numerial notation (prefix
+numerical notation (prefix
 .Ql 0x
 for hexadecimal numbers,
 .Ql 0

Modified: head/share/man/man4/cmx.4
==============================================================================
--- head/share/man/man4/cmx.4	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/share/man/man4/cmx.4	Fri Aug  6 14:33:42 2010	(r210933)
@@ -43,10 +43,10 @@ smartcard reader.
 The driver provides a character device special file based
 .Em Chip/Smart Card Interface Devices (CCID)
 interface.  The driver implements what the vendor calls the
-.Em Synchronious API
+.Em Synchronous API
 onto the smartcard reader device.
 .Pp
-Reading and writing is synchronious, meaning that a call to
+Reading and writing is synchronous, meaning that a call to
 .Xr write 2
 directly corresponds to a complete CCID command sent to the
 device, while the following

Modified: head/share/man/man4/dc.4
==============================================================================
--- head/share/man/man4/dc.4	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/share/man/man4/dc.4	Fri Aug  6 14:33:42 2010	(r210933)
@@ -315,7 +315,7 @@ possible transmit start threshold settin
 driver programmed the chip for store and forward mode.
 In this mode,
 the NIC will not begin transmission until the entire packet has been
-transfered into its FIFO memory.
+transferred into its FIFO memory.
 .It "dc%d: chip is in D3 power state -- setting to D0"
 This message applies only to adapters which support power
 management.
@@ -434,7 +434,7 @@ can result in the receive filter being i
 The
 .Nm
 driver will watch for this condition and requeue the setup frame until
-it is transfered successfully.
+it is transferred successfully.
 .Pp
 The ADMtek AL981 chip (and possibly the AN985 as well) has been observed
 to sometimes wedge on transmit: this appears to happen when the driver

Modified: head/share/man/man4/gre.4
==============================================================================
--- head/share/man/man4/gre.4	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/share/man/man4/gre.4	Fri Aug  6 14:33:42 2010	(r210933)
@@ -333,7 +333,7 @@ over the
 interface itself.
 .Pp
 The current implementation uses the key only for outgoing packets.
-Incomming packets with a different key or without a key will be treated as if they
+Incoming packets with a different key or without a key will be treated as if they
 would belong to this interface.
 .Pp
 RFC1701 is not fully supported, however all unsupported features have been

Modified: head/share/man/man4/meteor.4
==============================================================================
--- head/share/man/man4/meteor.4	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/share/man/man4/meteor.4	Fri Aug  6 14:33:42 2010	(r210933)
@@ -652,7 +652,7 @@ continuous capture.
 The single frame capture
 .Xr ioctl 2
 request will return only after a
-frame has been captured and transfered to the frame buffer.
+frame has been captured and transferred to the frame buffer.
 .Pp
 The unsynchronized continuous capture will return immediately and
 data is directly deposited into the buffer when it is available.

Modified: head/share/man/man4/net80211.4
==============================================================================
--- head/share/man/man4/net80211.4	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/share/man/man4/net80211.4	Fri Aug  6 14:33:42 2010	(r210933)
@@ -283,7 +283,7 @@ according to a least-congested criteria.
 DFS support is mandatory for some 5Ghz frequencies in certain
 locales (e.g. ETSI).
 By default DFS is enabled according to the regulatory definitions
-and the curent country code, regdomain, and channel.
+and the current country code, regdomain, and channel.
 .It Dv IEEE80211_IOC_DOTD
 Return whether or not 802.11d support is enabled in
 .Va i_val .

Modified: head/share/man/man4/ng_car.4
==============================================================================
--- head/share/man/man4/ng_car.4	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/share/man/man4/ng_car.4	Fri Aug  6 14:33:42 2010	(r210933)
@@ -30,7 +30,7 @@
 .Os
 .Sh NAME
 .Nm ng_car
-.Nd Commited Access Rate netgraph node type
+.Nd Committed Access Rate netgraph node type
 .Sh SYNOPSIS
 .In netgraph/ng_car.h
 .Sh DESCRIPTION

Modified: head/share/man/man4/pcii.4
==============================================================================
--- head/share/man/man4/pcii.4	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/share/man/man4/pcii.4	Fri Aug  6 14:33:42 2010	(r210933)
@@ -46,7 +46,7 @@ driver provides support for driving an I
 IEC-625 (or just "IEC bus"), or HP-IB (Hewlett Packard Instrument
 Bus), or GPIB (General Purpose Instrument Bus).
 The driver supports National Instruments PCIIA cards (sometimes
-also refered to as PC2A) and compatibles.
+also referred to as PC2A) and compatibles.
 These cards use a NEC \(mcPD7210 controller IC as the main
 interface between the host computer and the instrument bus.
 .Ss IO memory space layout

Modified: head/share/man/man4/pcm.4
==============================================================================
--- head/share/man/man4/pcm.4	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/share/man/man4/pcm.4	Fri Aug  6 14:33:42 2010	(r210933)
@@ -167,7 +167,7 @@ There were no single standard, so much c
 to satisfy each possible scenario, despite the fact that each
 application has its own conflicting standard.
 .Ss EQ
-The Parametric Software Equlizer (EQ) enables the use of
+The Parametric Software Equalizer (EQ) enables the use of
 .Dq tone
 controls (bass and treble).
 Commonly used for ear-candy or frequency compensation due to the vast
@@ -237,7 +237,7 @@ are device specific.
 .It Va hw.snd.compat_linux_mmap
 Linux
 .Xr mmap 2
-compatability.
+compatibility.
 The following values are supported (default is 0):
 .Bl -tag -width 2n
 .It -1

Modified: head/share/man/man4/sctp.4
==============================================================================
--- head/share/man/man4/sctp.4	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/share/man/man4/sctp.4	Fri Aug  6 14:33:42 2010	(r210933)
@@ -386,7 +386,7 @@ special flag
 .Dv SCTP_EOR
 passed in the sctp_sndrcvinfo flags field.
 This effectively makes all sends part of the same message
-until the user specifices differently.
+until the user specifies differently.
 This means that a caller must NOT change the stream number until
 after the
 .Dv SCTP_EOR

Modified: head/share/man/man9/BUS_NEW_PASS.9
==============================================================================
--- head/share/man/man9/BUS_NEW_PASS.9	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/share/man/man9/BUS_NEW_PASS.9	Fri Aug  6 14:33:42 2010	(r210933)
@@ -45,7 +45,7 @@ method is called on each bus device to r
 level has been changed.
 This method is responsible for invoking
 .Xr BUS_NEW_PASS 9
-on child bus devices to propogate the rescan to child devices.
+on child bus devices to propagate the rescan to child devices.
 It is also responsible for reprobing any unattached child devices and
 allowing drivers for the current pass to identify new children.
 A default implementation is provided by

Modified: head/share/man/man9/ieee80211_vap.9
==============================================================================
--- head/share/man/man9/ieee80211_vap.9	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/share/man/man9/ieee80211_vap.9	Fri Aug  6 14:33:42 2010	(r210933)
@@ -117,7 +117,7 @@ to deactivate the vap and isolate it fro
 from user applications.
 The driver can then reclaim resources held by the vap and re-enable
 device operation.
-The exact procedure for quiesceing a device is unspecified but typically
+The exact procedure for quiescing a device is unspecified but typically
 it involves blocking interrupts and stopping transmit and receive
 processing.
 .Sh MULTI-VAP OPERATION

Modified: head/share/man/man9/rman.9
==============================================================================
--- head/share/man/man9/rman.9	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/share/man/man9/rman.9	Fri Aug  6 14:33:42 2010	(r210933)
@@ -157,10 +157,10 @@ shall be set to a string that describes 
 It also initializes any mutexes associated with the structure.
 If
 .Fn rman_init
-fails to initalize the mutex, it will return
+fails to initialize the mutex, it will return
 .Er ENOMEM ; otherwise it will return 0 and
 .Fa rm
-will be initalized.
+will be initialized.
 .Pp
 The
 .Fn rman_fini

Modified: head/usr.bin/du/du.1
==============================================================================
--- head/usr.bin/du/du.1	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/usr.bin/du/du.1	Fri Aug  6 14:33:42 2010	(r210933)
@@ -72,7 +72,7 @@ This is different from the
 .Fl k, m
 options or setting
 .Ev BLOCKSIZE
-and gives an estimate of how much space the examined file hierachy would
+and gives an estimate of how much space the examined file hierarchy would
 require on a filesystem with the given
 .Ar blocksize .
 Unless in

Modified: head/usr.bin/fstat/fstat.1
==============================================================================
--- head/usr.bin/fstat/fstat.1	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/usr.bin/fstat/fstat.1	Fri Aug  6 14:33:42 2010	(r210933)
@@ -192,7 +192,7 @@ the name printed may not be the actual
 name that the process originally used to open that file.
 .El
 .Sh SOCKETS
-The formating of open sockets depends on the protocol domain.
+The formatting of open sockets depends on the protocol domain.
 In all cases the first field is the domain name, the second field
 is the socket type (stream, dgram, etc), and the third is the socket
 flags field (in hex).

Modified: head/usr.bin/rwall/rwall.1
==============================================================================
--- head/usr.bin/rwall/rwall.1	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/usr.bin/rwall/rwall.1	Fri Aug  6 14:33:42 2010	(r210933)
@@ -66,7 +66,7 @@ daemon has terminated on the remote host
 .It rwall: RPC: Port mapper failure - RPC: Timed out
 The remote host is not running the portmapper (see
 .Xr rpcbind 8 ) ,
-and cannot accomodate any RPC-based services.
+and cannot accommodate any RPC-based services.
 The host may be down.
 .El
 .Sh SEE ALSO

Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3
==============================================================================
--- head/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3	Fri Aug  6 14:33:42 2010	(r210933)
@@ -66,7 +66,7 @@ index and set the status of the interfac
 will attempt to destroy the bridge interface.
 .El
 .It Va begemotBridgeBaseSpanEnabled
-A SNMP SET operation on this object is only successfull if the corresponding
+A SNMP SET operation on this object is only successful if the corresponding
 port has not been added as member of the bridge interface on the system.
 .It Va begemotBridgeBasePortStatus
 SNMP SET operations with the following values are allowed:

Modified: head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3
==============================================================================
--- head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3	Fri Aug  6 14:33:42 2010	(r210933)
@@ -77,7 +77,7 @@ column should be executed.
 The table contains information about the hardware capabilities of the parent of
 a wireless interface.
 .It Va wlanIfaceConfigTable
-The table is used to get or set various configuration paremeters for a virtual
+The table is used to get or set various configuration parameters for a virtual
 wireless interface. Depending on the operating mode of the interface and the
 hardware capabilities of the underlying hardware interface, not all parameters
 and values may be supported.
@@ -104,7 +104,7 @@ WEP configuration for the wireless inter
 Access Control configuration for wireless interfaces operating as access points.
 .It Va wlanMACAccessControlMACTable
 The table with Access Control MAC entries for which the configured Access
-Control POlicy on wireless interfaces operating in Host AP mode is applied.
+Control Policy on wireless interfaces operating in Host AP mode is applied.
 .Va wlanMACAccessControlMACStatus
 column is used to add or delete MAC ACL entries. A set with value createAndGo(4)
 will add new entry, while with value destroy(6) will delete an existing one.

Modified: head/usr.sbin/lpr/lpr/printcap.5
==============================================================================
--- head/usr.sbin/lpr/lpr/printcap.5	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/usr.sbin/lpr/lpr/printcap.5	Fri Aug  6 14:33:42 2010	(r210933)
@@ -367,7 +367,7 @@ is not in use), print data will be sent 
 on the given
 .Em machine .
 .Sh TRANSFER STATISTICS
-When a print job is transfered to a remote machine (which might be
+When a print job is transferred to a remote machine (which might be
 another unix box, or may be a network printer), it may be useful
 to keep statistics on each transfer.
 The

Modified: head/usr.sbin/makefs/makefs.8
==============================================================================
--- head/usr.sbin/makefs/makefs.8	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/usr.sbin/makefs/makefs.8	Fri Aug  6 14:33:42 2010	(r210933)
@@ -204,7 +204,7 @@ If
 isn't provided, the current file flags will be used.
 Missing regular file entries will be created as zero-length files.
 .It Fl x
-Exclude file system nodes not explcitly listed in the specfile.
+Exclude file system nodes not explicitly listed in the specfile.
 .It Fl N Ar dbdir
 Use the user database text file
 .Pa master.passwd

Modified: head/usr.sbin/mfiutil/mfiutil.8
==============================================================================
--- head/usr.sbin/mfiutil/mfiutil.8	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/usr.sbin/mfiutil/mfiutil.8	Fri Aug  6 14:33:42 2010	(r210933)
@@ -254,7 +254,7 @@ The default locale is
 The available locales are
 .Dq volume ,
 .Dq drive ,
-.Dq enclousure ,
+.Dq enclosure ,
 .Dq battery ,
 .Dq sas ,
 .Dq controller ,

Modified: head/usr.sbin/nfsd/stablerestart.5
==============================================================================
--- head/usr.sbin/nfsd/stablerestart.5	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/usr.sbin/nfsd/stablerestart.5	Fri Aug  6 14:33:42 2010	(r210933)
@@ -58,7 +58,7 @@ end of the grace period.
 The rest of the file are appended records, as defined by
 struct nfst_rec in /usr/include/fs/nfs/nfsrvstate.h and are used
 represent one of two things. There are records which indicate that a
-client successfully aquired state and records that indicate a client's state was revoked.
+client successfully acquired state and records that indicate a client's state was revoked.
 State revoke records indicate that state information
 for a client was discarded, due to lease expiry and an otherwise
 conflicting open or lock request being made by a different client.

Modified: head/usr.sbin/nfsuserd/nfsuserd.8
==============================================================================
--- head/usr.sbin/nfsuserd/nfsuserd.8	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/usr.sbin/nfsuserd/nfsuserd.8	Fri Aug  6 14:33:42 2010	(r210933)
@@ -57,7 +57,7 @@ The following options are available:
 .It Fl domain Ar domain_name
 This option allows you to override the default DNS domain name, which
 is acquired by taking either the suffix on the machine's hostname or,
-if that name is not a fully qualified host name, the cannonical name as
+if that name is not a fully qualified host name, the canonical name as
 reported by
 .Xr getaddrinfo 3 .
 .It Fl usertimeout Ar minutes

Modified: head/usr.sbin/ntp/doc/ntp.conf.5
==============================================================================
--- head/usr.sbin/ntp/doc/ntp.conf.5	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/usr.sbin/ntp/doc/ntp.conf.5	Fri Aug  6 14:33:42 2010	(r210933)
@@ -317,7 +317,7 @@ the
 option to a lower limit of 4 (16 s).
 .It Cm noselect
 Marks the server as unused, except for display purposes.
-The server is discarded by the selection algroithm.
+The server is discarded by the selection algorithm.
 .It Cm prefer
 Marks the server as preferred.
 All other things being equal,
@@ -1405,9 +1405,9 @@ at abusive rates.
 Some violations cause denied service
 only for the offending packet, others cause denied service
 for a timed period and others cause the denied service for
-an indefinate period.
+an indefinite period.
 When a client or network is denied access
-for an indefinate period, the only way at present to remove
+for an indefinite period, the only way at present to remove
 the restrictions is by restarting the server.
 .Ss The Kiss-of-Death Packet
 Ordinarily, packets denied service are simply dropped with no

Modified: head/usr.sbin/ntp/doc/ntpq.8
==============================================================================
--- head/usr.sbin/ntp/doc/ntpq.8	Fri Aug  6 14:18:37 2010	(r210932)
+++ head/usr.sbin/ntp/doc/ntpq.8	Fri Aug  6 14:33:42 2010	(r210933)
@@ -269,7 +269,7 @@ Exit
 .It Ic raw
 Causes all output from query commands is printed as received
 from the remote server.
-The only formating/interpretation done on
+The only formatting/interpretation done on
 the data is to transform nonascii data into a printable (but barely
 understandable) form.
 .It Ic timeout Ar milliseconds

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 15:04:02 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 195DB10656E8;
	Fri,  6 Aug 2010 15:04:02 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 083408FC1B;
	Fri,  6 Aug 2010 15:04:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76F41P3049142;
	Fri, 6 Aug 2010 15:04:01 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76F41No049140;
	Fri, 6 Aug 2010 15:04:01 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008061504.o76F41No049140@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 6 Aug 2010 15:04:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210934 - head/sys/compat/x86bios
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 15:04:02 -0000

Author: jkim
Date: Fri Aug  6 15:04:01 2010
New Revision: 210934
URL: http://svn.freebsd.org/changeset/base/210934

Log:
  Fix allocation of multiple pages, which forgot to increase page number.
  Particularly, it caused "vm86_addpage: overlap" panics under VirtualBox.
  Add a safety check before freeing memory while I am here.

Modified:
  head/sys/compat/x86bios/x86bios.c

Modified: head/sys/compat/x86bios/x86bios.c
==============================================================================
--- head/sys/compat/x86bios/x86bios.c	Fri Aug  6 14:33:42 2010	(r210933)
+++ head/sys/compat/x86bios/x86bios.c	Fri Aug  6 15:04:01 2010	(r210934)
@@ -121,7 +121,7 @@ x86bios_alloc(uint32_t *offset, size_t s
 		*offset = vtophys(addr);
 		mtx_lock(&x86bios_lock);
 		for (i = 0; i < howmany(size, PAGE_SIZE); i++)
-			vm86_addpage(&x86bios_vmc, atop(*offset),
+			vm86_addpage(&x86bios_vmc, atop(*offset) + i,
 			    addr + i * PAGE_SIZE);
 		mtx_unlock(&x86bios_lock);
 	}
@@ -142,6 +142,10 @@ x86bios_free(void *addr, size_t size)
 			    sizeof(x86bios_vmc.pmap[i]));
 			last = i;
 		}
+	if (last < 0) {
+		mtx_unlock(&x86bios_lock);
+		return;
+	}
 	if (last == x86bios_vmc.npages - 1) {
 		x86bios_vmc.npages -= howmany(size, PAGE_SIZE);
 		for (i = x86bios_vmc.npages - 1;

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 15:04:40 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9BBA3106566B;
	Fri,  6 Aug 2010 15:04:40 +0000 (UTC)
	(envelope-from csjp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8AAF48FC15;
	Fri,  6 Aug 2010 15:04:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76F4eIR049357;
	Fri, 6 Aug 2010 15:04:40 GMT (envelope-from csjp@svn.freebsd.org)
Received: (from csjp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76F4eNZ049355;
	Fri, 6 Aug 2010 15:04:40 GMT (envelope-from csjp@svn.freebsd.org)
Message-Id: <201008061504.o76F4eNZ049355@svn.freebsd.org>
From: "Christian S.J. Peron" 
Date: Fri, 6 Aug 2010 15:04:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210935 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 15:04:40 -0000

Author: csjp
Date: Fri Aug  6 15:04:40 2010
New Revision: 210935
URL: http://svn.freebsd.org/changeset/base/210935

Log:
  Add Xen to the list of virtual vendors.  In the non PV (HVM) case this fixes
  the virtualization detection successfully disabling the clflush instruction.
  This fixes insta-panics for XEN hvm users when the hw.clflush_disable
  tunable is -1 or 0 (-1 by default).
  
  Discussed with:	jhb

Modified:
  head/sys/kern/subr_param.c

Modified: head/sys/kern/subr_param.c
==============================================================================
--- head/sys/kern/subr_param.c	Fri Aug  6 15:04:01 2010	(r210934)
+++ head/sys/kern/subr_param.c	Fri Aug  6 15:04:40 2010	(r210935)
@@ -149,6 +149,7 @@ static const char *const vm_bnames[] = {
 	"QEMU",				/* QEMU */
 	"Plex86",			/* Plex86 */
 	"Bochs",			/* Bochs */
+	"Xen",				/* Xen */
 	NULL
 };
 

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 15:09:21 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 89D141065674;
	Fri,  6 Aug 2010 15:09:21 +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 77EFF8FC27;
	Fri,  6 Aug 2010 15:09:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76F9Lov050469;
	Fri, 6 Aug 2010 15:09:21 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76F9LWE050463;
	Fri, 6 Aug 2010 15:09:21 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008061509.o76F9LWE050463@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 6 Aug 2010 15:09:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210936 - in head: contrib/bsnmp/snmp_mibII
	sbin/ifconfig usr.sbin/ndp usr.sbin/ppp
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 15:09:21 -0000

Author: jhb
Date: Fri Aug  6 15:09:21 2010
New Revision: 210936
URL: http://svn.freebsd.org/changeset/base/210936

Log:
  Ethernet vlan(4) interfaces have valid Ethernet link layer addresses but
  use a different interface type (IFT_L2VLAN vs IFT_ETHER).  Treat IFT_L2VLAN
  interfaces like IFT_ETHER interfaces when handling link layer addresses.
  
  Reviewed by:	syrinx (bsnmpd)
  MFC after:	1 week

Modified:
  head/contrib/bsnmp/snmp_mibII/mibII.c
  head/sbin/ifconfig/af_link.c
  head/sbin/ifconfig/ifconfig.c
  head/usr.sbin/ndp/ndp.c
  head/usr.sbin/ppp/ipv6cp.c

Modified: head/contrib/bsnmp/snmp_mibII/mibII.c
==============================================================================
--- head/contrib/bsnmp/snmp_mibII/mibII.c	Fri Aug  6 15:04:40 2010	(r210935)
+++ head/contrib/bsnmp/snmp_mibII/mibII.c	Fri Aug  6 15:09:21 2010	(r210936)
@@ -843,6 +843,7 @@ check_llbcast(struct mibif *ifp)
 	  case IFT_ETHER:
 	  case IFT_FDDI:
 	  case IFT_ISO88025:
+	  case IFI_L2VLAN:
 		if (mib_find_rcvaddr(ifp->index, ether_bcast, 6) == NULL &&
 		    (rcv = mib_rcvaddr_create(ifp, ether_bcast, 6)) != NULL)
 			rcv->flags |= MIBRCVADDR_BCAST;

Modified: head/sbin/ifconfig/af_link.c
==============================================================================
--- head/sbin/ifconfig/af_link.c	Fri Aug  6 15:04:40 2010	(r210935)
+++ head/sbin/ifconfig/af_link.c	Fri Aug  6 15:09:21 2010	(r210936)
@@ -58,7 +58,9 @@ link_status(int s __unused, const struct
 	struct sockaddr_dl *sdl = (struct sockaddr_dl *) ifa->ifa_addr;
 
 	if (sdl != NULL && sdl->sdl_alen > 0) {
-		if (sdl->sdl_type == IFT_ETHER &&
+		if ((sdl->sdl_type == IFT_ETHER ||
+		    sdl->sdl_type == IFT_L2VLAN ||
+		    sdl->sdl_type == IFT_BRIDGE) &&
 		    sdl->sdl_alen == ETHER_ADDR_LEN)
 			printf("\tether %s\n",
 			    ether_ntoa((struct ether_addr *)LLADDR(sdl)));

Modified: head/sbin/ifconfig/ifconfig.c
==============================================================================
--- head/sbin/ifconfig/ifconfig.c	Fri Aug  6 15:04:40 2010	(r210935)
+++ head/sbin/ifconfig/ifconfig.c	Fri Aug  6 15:09:21 2010	(r210936)
@@ -319,7 +319,9 @@ main(int argc, char *argv[])
 				/* special case for "ether" address family */
 				if (!strcmp(afp->af_name, "ether")) {
 					if (sdl == NULL ||
-					    sdl->sdl_type != IFT_ETHER ||
+					    (sdl->sdl_type != IFT_ETHER &&
+					    sdl->sdl_type != IFT_L2VLAN &&
+					    sdl->sdl_type != IFT_BRIDGE) ||
 					    sdl->sdl_alen != ETHER_ADDR_LEN)
 						continue;
 				} else {

Modified: head/usr.sbin/ndp/ndp.c
==============================================================================
--- head/usr.sbin/ndp/ndp.c	Fri Aug  6 15:04:40 2010	(r210935)
+++ head/usr.sbin/ndp/ndp.c	Fri Aug  6 15:09:21 2010	(r210936)
@@ -437,6 +437,7 @@ set(argc, argv)
 			switch (sdl->sdl_type) {
 			case IFT_ETHER: case IFT_FDDI: case IFT_ISO88023:
 			case IFT_ISO88024: case IFT_ISO88025:
+			case IFT_L2VLAN: case IFT_BRIDGE:
 				goto overwrite;
 			}
 		}

Modified: head/usr.sbin/ppp/ipv6cp.c
==============================================================================
--- head/usr.sbin/ppp/ipv6cp.c	Fri Aug  6 15:04:40 2010	(r210935)
+++ head/usr.sbin/ppp/ipv6cp.c	Fri Aug  6 15:09:21 2010	(r210936)
@@ -148,6 +148,7 @@ SetInterfaceID(u_char *ifid, int userand
     switch(sdl->sdl_type) {
     case IFT_ETHER:
     case IFT_FDDI:
+    case IFT_L2VLAN:
       /* XXX need more cases? */
       break;
     default:

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 15:15:27 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2A2751065670;
	Fri,  6 Aug 2010 15:15:27 +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 196D88FC1F;
	Fri,  6 Aug 2010 15:15:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76FFQXL051935;
	Fri, 6 Aug 2010 15:15:26 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76FFQpa051933;
	Fri, 6 Aug 2010 15:15:26 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008061515.o76FFQpa051933@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 6 Aug 2010 15:15:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210937 - head/sys/net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 15:15:27 -0000

Author: jhb
Date: Fri Aug  6 15:15:26 2010
New Revision: 210937
URL: http://svn.freebsd.org/changeset/base/210937

Log:
  Adjust the interface type in the link layer socket address for vlan(4)
  interfaces to be a vlan (IFT_L2VLAN) rather than an Ethernet interface
  (IFT_ETHER).  The code already fixed if_type in the ifnet causing some
  places to report the interface as a vlan (e.g. arp -a output) and other
  places to report the interface as Ethernet (getifaddrs(3)).  Now they
  should all report IFT_L2VLAN.
  
  Reviewed by:	brooks
  MFC after:	1 month

Modified:
  head/sys/net/if_vlan.c

Modified: head/sys/net/if_vlan.c
==============================================================================
--- head/sys/net/if_vlan.c	Fri Aug  6 15:09:21 2010	(r210936)
+++ head/sys/net/if_vlan.c	Fri Aug  6 15:15:26 2010	(r210937)
@@ -688,6 +688,8 @@ vlan_clone_create(struct if_clone *ifc, 
 	struct ifvlan *ifv;
 	struct ifnet *ifp;
 	struct ifnet *p;
+	struct ifaddr *ifa;
+	struct sockaddr_dl *sdl;
 	struct vlanreq vlr;
 	static const u_char eaddr[ETHER_ADDR_LEN];	/* 00:00:00:00:00:00 */
 
@@ -786,6 +788,9 @@ vlan_clone_create(struct if_clone *ifc, 
 	ifp->if_baudrate = 0;
 	ifp->if_type = IFT_L2VLAN;
 	ifp->if_hdrlen = ETHER_VLAN_ENCAP_LEN;
+	ifa = ifp->if_addr;
+	sdl = (struct sockaddr_dl *)ifa->ifa_addr;
+	sdl->sdl_type = IFT_L2VLAN;
 
 	if (ethertag) {
 		error = vlan_config(ifv, p, tag);

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 15:24:37 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 96218106577E;
	Fri,  6 Aug 2010 15:24:37 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 852928FC21;
	Fri,  6 Aug 2010 15:24:37 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76FOb1E054004;
	Fri, 6 Aug 2010 15:24:37 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76FObED054002;
	Fri, 6 Aug 2010 15:24:37 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008061524.o76FObED054002@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 6 Aug 2010 15:24:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210938 - head/sys/compat/x86bios
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 15:24:37 -0000

Author: jkim
Date: Fri Aug  6 15:24:37 2010
New Revision: 210938
URL: http://svn.freebsd.org/changeset/base/210938

Log:
  Consistently use architecture specific macros.

Modified:
  head/sys/compat/x86bios/x86bios.c

Modified: head/sys/compat/x86bios/x86bios.c
==============================================================================
--- head/sys/compat/x86bios/x86bios.c	Fri Aug  6 15:15:26 2010	(r210937)
+++ head/sys/compat/x86bios/x86bios.c	Fri Aug  6 15:24:37 2010	(r210938)
@@ -120,9 +120,9 @@ x86bios_alloc(uint32_t *offset, size_t s
 	if (addr != 0) {
 		*offset = vtophys(addr);
 		mtx_lock(&x86bios_lock);
-		for (i = 0; i < howmany(size, PAGE_SIZE); i++)
+		for (i = 0; i < atop(round_page(size)); i++)
 			vm86_addpage(&x86bios_vmc, atop(*offset) + i,
-			    addr + i * PAGE_SIZE);
+			    addr + ptoa(i));
 		mtx_unlock(&x86bios_lock);
 	}
 
@@ -147,7 +147,7 @@ x86bios_free(void *addr, size_t size)
 		return;
 	}
 	if (last == x86bios_vmc.npages - 1) {
-		x86bios_vmc.npages -= howmany(size, PAGE_SIZE);
+		x86bios_vmc.npages -= atop(round_page(size));
 		for (i = x86bios_vmc.npages - 1;
 		    i >= 0 && x86bios_vmc.pmap[i].kva == 0; i--)
 			x86bios_vmc.npages--;

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 15:37:00 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 67F371065670;
	Fri,  6 Aug 2010 15:37: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 534098FC1C;
	Fri,  6 Aug 2010 15:37:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76Fb0LP056860;
	Fri, 6 Aug 2010 15:37:00 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76Fb01A056843;
	Fri, 6 Aug 2010 15:37:00 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008061537.o76Fb01A056843@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 6 Aug 2010 15:37:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210939 - in head/sys: amd64/amd64 amd64/include
	i386/i386 i386/include i386/xen ia64/ia64 ia64/include kern
	mips/include mips/mips powerpc/include powerpc/powerpc
	sparc64/include sun4v...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 15:37:00 -0000

Author: jhb
Date: Fri Aug  6 15:36:59 2010
New Revision: 210939
URL: http://svn.freebsd.org/changeset/base/210939

Log:
  Add a new ipi_cpu() function to the MI IPI API that can be used to send an
  IPI to a specific CPU by its cpuid.  Replace calls to ipi_selected() that
  constructed a mask for a single CPU with calls to ipi_cpu() instead.  This
  will matter more in the future when we transition from cpumask_t to
  cpuset_t for CPU masks in which case building a CPU mask is more expensive.
  
  Submitted by:	peter, sbruno
  Reviewed by:	rookie
  Obtained from:	Yahoo! (x86)
  MFC after:	1 month

Modified:
  head/sys/amd64/amd64/mp_machdep.c
  head/sys/amd64/include/smp.h
  head/sys/i386/i386/mp_machdep.c
  head/sys/i386/include/smp.h
  head/sys/i386/xen/mp_machdep.c
  head/sys/ia64/ia64/mp_machdep.c
  head/sys/ia64/include/smp.h
  head/sys/kern/sched_4bsd.c
  head/sys/kern/sched_ule.c
  head/sys/kern/subr_smp.c
  head/sys/mips/include/smp.h
  head/sys/mips/mips/mp_machdep.c
  head/sys/powerpc/include/smp.h
  head/sys/powerpc/powerpc/mp_machdep.c
  head/sys/sparc64/include/smp.h
  head/sys/sun4v/include/smp.h
  head/sys/sun4v/sun4v/mp_machdep.c

Modified: head/sys/amd64/amd64/mp_machdep.c
==============================================================================
--- head/sys/amd64/amd64/mp_machdep.c	Fri Aug  6 15:24:37 2010	(r210938)
+++ head/sys/amd64/amd64/mp_machdep.c	Fri Aug  6 15:36:59 2010	(r210939)
@@ -1239,15 +1239,51 @@ ipi_selected(cpumask_t cpus, u_int ipi)
 			do {
 				old_pending = cpu_ipi_pending[cpu];
 				new_pending = old_pending | bitmap;
-			} while  (!atomic_cmpset_int(&cpu_ipi_pending[cpu],old_pending, new_pending));	
-
+			} while  (!atomic_cmpset_int(&cpu_ipi_pending[cpu],
+			    old_pending, new_pending));	
 			if (old_pending)
 				continue;
 		}
-
 		lapic_ipi_vectored(ipi, cpu_apic_ids[cpu]);
 	}
+}
+
+/*
+ * send an IPI to a specific CPU.
+ */
+void
+ipi_cpu(int cpu, u_int ipi)
+{
+	u_int bitmap = 0;
+	u_int old_pending;
+	u_int new_pending;
+
+	if (IPI_IS_BITMAPED(ipi)) { 
+		bitmap = 1 << ipi;
+		ipi = IPI_BITMAP_VECTOR;
+	}
 
+	/*
+	 * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit
+	 * of help in order to understand what is the source.
+	 * Set the mask of receiving CPUs for this purpose.
+	 */
+	if (ipi == IPI_STOP_HARD)
+		atomic_set_int(&ipi_nmi_pending, 1 << cpu);
+
+	CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu, ipi);
+	KASSERT(cpu_apic_ids[cpu] != -1, ("IPI to non-existent CPU %d", cpu));
+
+	if (bitmap) {
+		do {
+			old_pending = cpu_ipi_pending[cpu];
+			new_pending = old_pending | bitmap;
+		} while  (!atomic_cmpset_int(&cpu_ipi_pending[cpu],
+		    old_pending, new_pending));	
+		if (old_pending)
+			return;
+	}
+	lapic_ipi_vectored(ipi, cpu_apic_ids[cpu]);
 }
 
 /*

Modified: head/sys/amd64/include/smp.h
==============================================================================
--- head/sys/amd64/include/smp.h	Fri Aug  6 15:24:37 2010	(r210938)
+++ head/sys/amd64/include/smp.h	Fri Aug  6 15:36:59 2010	(r210939)
@@ -60,10 +60,11 @@ void	cpu_add(u_int apic_id, char boot_cp
 void	cpustop_handler(void);
 void	cpususpend_handler(void);
 void	init_secondary(void);
-int	ipi_nmi_handler(void);
-void	ipi_selected(cpumask_t cpus, u_int ipi);
 void	ipi_all_but_self(u_int ipi);
 void 	ipi_bitmap_handler(struct trapframe frame);
+void	ipi_cpu(int cpu, u_int ipi);
+int	ipi_nmi_handler(void);
+void	ipi_selected(cpumask_t cpus, u_int ipi);
 u_int	mp_bootaddress(u_int);
 int	mp_grab_cpu_hlt(void);
 void	smp_cache_flush(void);

Modified: head/sys/i386/i386/mp_machdep.c
==============================================================================
--- head/sys/i386/i386/mp_machdep.c	Fri Aug  6 15:24:37 2010	(r210938)
+++ head/sys/i386/i386/mp_machdep.c	Fri Aug  6 15:36:59 2010	(r210939)
@@ -1327,15 +1327,51 @@ ipi_selected(cpumask_t cpus, u_int ipi)
 			do {
 				old_pending = cpu_ipi_pending[cpu];
 				new_pending = old_pending | bitmap;
-			} while  (!atomic_cmpset_int(&cpu_ipi_pending[cpu],old_pending, new_pending));	
-
+			} while  (!atomic_cmpset_int(&cpu_ipi_pending[cpu],
+			    old_pending, new_pending));	
 			if (old_pending)
 				continue;
 		}
-
 		lapic_ipi_vectored(ipi, cpu_apic_ids[cpu]);
 	}
+}
+
+/*
+ * send an IPI to a specific CPU.
+ */
+void
+ipi_cpu(int cpu, u_int ipi)
+{
+	u_int bitmap = 0;
+	u_int old_pending;
+	u_int new_pending;
+
+	if (IPI_IS_BITMAPED(ipi)) { 
+		bitmap = 1 << ipi;
+		ipi = IPI_BITMAP_VECTOR;
+	}
 
+	/*
+	 * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit
+	 * of help in order to understand what is the source.
+	 * Set the mask of receiving CPUs for this purpose.
+	 */
+	if (ipi == IPI_STOP_HARD)
+		atomic_set_int(&ipi_nmi_pending, 1 << cpu);
+
+	CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu, ipi);
+	KASSERT(cpu_apic_ids[cpu] != -1, ("IPI to non-existent CPU %d", cpu));
+
+	if (bitmap) {
+		do {
+			old_pending = cpu_ipi_pending[cpu];
+			new_pending = old_pending | bitmap;
+		} while  (!atomic_cmpset_int(&cpu_ipi_pending[cpu],
+		    old_pending, new_pending));	
+		if (old_pending)
+			return;
+	}
+	lapic_ipi_vectored(ipi, cpu_apic_ids[cpu]);
 }
 
 /*

Modified: head/sys/i386/include/smp.h
==============================================================================
--- head/sys/i386/include/smp.h	Fri Aug  6 15:24:37 2010	(r210938)
+++ head/sys/i386/include/smp.h	Fri Aug  6 15:36:59 2010	(r210939)
@@ -60,12 +60,13 @@ inthand_t
 void	cpu_add(u_int apic_id, char boot_cpu);
 void	cpustop_handler(void);
 void	init_secondary(void);
-int	ipi_nmi_handler(void);
-void	ipi_selected(cpumask_t cpus, u_int ipi);
 void	ipi_all_but_self(u_int ipi);
 #ifndef XEN
 void 	ipi_bitmap_handler(struct trapframe frame);
 #endif
+void	ipi_cpu(int cpu, u_int ipi);
+int	ipi_nmi_handler(void);
+void	ipi_selected(cpumask_t cpus, u_int ipi);
 u_int	mp_bootaddress(u_int);
 int	mp_grab_cpu_hlt(void);
 void	smp_cache_flush(void);

Modified: head/sys/i386/xen/mp_machdep.c
==============================================================================
--- head/sys/i386/xen/mp_machdep.c	Fri Aug  6 15:24:37 2010	(r210938)
+++ head/sys/i386/xen/mp_machdep.c	Fri Aug  6 15:36:59 2010	(r210939)
@@ -1121,19 +1121,14 @@ ipi_selected(cpumask_t cpus, u_int ipi)
 		cpu--;
 		cpus &= ~(1 << cpu);
 
-		KASSERT(cpu_apic_ids[cpu] != -1,
-		    ("IPI to non-existent CPU %d", cpu));
-
 		if (bitmap) {
 			do {
 				old_pending = cpu_ipi_pending[cpu];
 				new_pending = old_pending | bitmap;
-			} while  (!atomic_cmpset_int(&cpu_ipi_pending[cpu],old_pending, new_pending));	
-
+			} while  (!atomic_cmpset_int(&cpu_ipi_pending[cpu],
+			    old_pending, new_pending));	
 			if (!old_pending)
 				ipi_pcpu(cpu, RESCHEDULE_VECTOR);
-			continue;
-			
 		} else {
 			KASSERT(call_data != NULL, ("call_data not set"));
 			ipi_pcpu(cpu, CALL_FUNCTION_VECTOR);
@@ -1142,6 +1137,45 @@ ipi_selected(cpumask_t cpus, u_int ipi)
 }
 
 /*
+ * send an IPI to a specific CPU.
+ */
+void
+ipi_cpu(int cpu, u_int ipi)
+{
+	u_int bitmap = 0;
+	u_int old_pending;
+	u_int new_pending;
+	
+	if (IPI_IS_BITMAPED(ipi)) { 
+		bitmap = 1 << ipi;
+		ipi = IPI_BITMAP_VECTOR;
+	} 
+
+	/*
+	 * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit
+	 * of help in order to understand what is the source.
+	 * Set the mask of receiving CPUs for this purpose.
+	 */
+	if (ipi == IPI_STOP_HARD)
+		atomic_set_int(&ipi_nmi_pending, 1 << cpu);
+
+	CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu, ipi);
+
+	if (bitmap) {
+		do {
+			old_pending = cpu_ipi_pending[cpu];
+			new_pending = old_pending | bitmap;
+		} while  (!atomic_cmpset_int(&cpu_ipi_pending[cpu],
+		    old_pending, new_pending));	
+		if (!old_pending)
+			ipi_pcpu(cpu, RESCHEDULE_VECTOR);
+	} else {
+		KASSERT(call_data != NULL, ("call_data not set"));
+		ipi_pcpu(cpu, CALL_FUNCTION_VECTOR);
+	}
+}
+
+/*
  * send an IPI to all CPUs EXCEPT myself
  */
 void

Modified: head/sys/ia64/ia64/mp_machdep.c
==============================================================================
--- head/sys/ia64/ia64/mp_machdep.c	Fri Aug  6 15:24:37 2010	(r210938)
+++ head/sys/ia64/ia64/mp_machdep.c	Fri Aug  6 15:36:59 2010	(r210939)
@@ -408,6 +408,16 @@ ipi_selected(cpumask_t cpus, int ipi)
 }
 
 /*
+ * send an IPI to a specific CPU.
+ */
+void
+ipi_cpu(int cpu, u_int ipi)
+{
+
+	ipi_send(cpuid_to_pcpu[cpu], ipi);
+}
+
+/*
  * send an IPI to all CPUs EXCEPT myself.
  */
 void

Modified: head/sys/ia64/include/smp.h
==============================================================================
--- head/sys/ia64/include/smp.h	Fri Aug  6 15:24:37 2010	(r210938)
+++ head/sys/ia64/include/smp.h	Fri Aug  6 15:36:59 2010	(r210939)
@@ -25,6 +25,7 @@ extern int ia64_ipi_stop;
 extern int ia64_ipi_wakeup;
 
 void	ipi_all_but_self(int ipi);
+void	ipi_cpu(int cpu, u_int ipi);
 void	ipi_selected(cpumask_t cpus, int ipi);
 void	ipi_send(struct pcpu *, int ipi);
 

Modified: head/sys/kern/sched_4bsd.c
==============================================================================
--- head/sys/kern/sched_4bsd.c	Fri Aug  6 15:24:37 2010	(r210938)
+++ head/sys/kern/sched_4bsd.c	Fri Aug  6 15:36:59 2010	(r210939)
@@ -1154,7 +1154,7 @@ kick_other_cpu(int pri, int cpuid)
 	pcpu = pcpu_find(cpuid);
 	if (idle_cpus_mask & pcpu->pc_cpumask) {
 		forward_wakeups_delivered++;
-		ipi_selected(pcpu->pc_cpumask, IPI_AST);
+		ipi_cpu(cpuid, IPI_AST);
 		return;
 	}
 
@@ -1167,13 +1167,13 @@ kick_other_cpu(int pri, int cpuid)
 	if (pri <= PRI_MAX_ITHD)
 #endif /* ! FULL_PREEMPTION */
 	{
-		ipi_selected(pcpu->pc_cpumask, IPI_PREEMPT);
+		ipi_cpu(cpuid, IPI_PREEMPT);
 		return;
 	}
 #endif /* defined(IPI_PREEMPTION) && defined(PREEMPTION) */
 
 	pcpu->pc_curthread->td_flags |= TDF_NEEDRESCHED;
-	ipi_selected(pcpu->pc_cpumask, IPI_AST);
+	ipi_cpu(cpuid, IPI_AST);
 	return;
 }
 #endif /* SMP */
@@ -1666,7 +1666,7 @@ sched_affinity(struct thread *td)
 
 		td->td_flags |= TDF_NEEDRESCHED;
 		if (td != curthread)
-			ipi_selected(1 << cpu, IPI_AST);
+			ipi_cpu(cpu, IPI_AST);
 		break;
 	default:
 		break;

Modified: head/sys/kern/sched_ule.c
==============================================================================
--- head/sys/kern/sched_ule.c	Fri Aug  6 15:24:37 2010	(r210938)
+++ head/sys/kern/sched_ule.c	Fri Aug  6 15:36:59 2010	(r210939)
@@ -851,7 +851,7 @@ sched_balance_pair(struct tdq *high, str
 		 * IPI the target cpu to force it to reschedule with the new
 		 * workload.
 		 */
-		ipi_selected(1 << TDQ_ID(low), IPI_PREEMPT);
+		ipi_cpu(TDQ_ID(low), IPI_PREEMPT);
 	}
 	tdq_unlock_pair(high, low);
 	return (moved);
@@ -974,7 +974,7 @@ tdq_notify(struct tdq *tdq, struct threa
 			return;
 	}
 	tdq->tdq_ipipending = 1;
-	ipi_selected(1 << cpu, IPI_PREEMPT);
+	ipi_cpu(cpu, IPI_PREEMPT);
 }
 
 /*
@@ -2411,7 +2411,7 @@ sched_affinity(struct thread *td)
 	cpu = ts->ts_cpu;
 	ts->ts_cpu = sched_pickcpu(td, 0);
 	if (cpu != PCPU_GET(cpuid))
-		ipi_selected(1 << cpu, IPI_PREEMPT);
+		ipi_cpu(cpu, IPI_PREEMPT);
 #endif
 }
 

Modified: head/sys/kern/subr_smp.c
==============================================================================
--- head/sys/kern/subr_smp.c	Fri Aug  6 15:24:37 2010	(r210938)
+++ head/sys/kern/subr_smp.c	Fri Aug  6 15:36:59 2010	(r210939)
@@ -181,7 +181,7 @@ forward_signal(struct thread *td)
 	id = td->td_oncpu;
 	if (id == NOCPU)
 		return;
-	ipi_selected(1 << id, IPI_AST);
+	ipi_cpu(id, IPI_AST);
 }
 
 /*

Modified: head/sys/mips/include/smp.h
==============================================================================
--- head/sys/mips/include/smp.h	Fri Aug  6 15:24:37 2010	(r210938)
+++ head/sys/mips/include/smp.h	Fri Aug  6 15:36:59 2010	(r210939)
@@ -33,6 +33,7 @@
 #ifndef LOCORE
 
 void	ipi_all_but_self(int ipi);
+void	ipi_cpu(int cpu, u_int ipi);
 void	ipi_selected(cpumask_t cpus, int ipi);
 void	smp_init_secondary(u_int32_t cpuid);
 void	mpentry(void);

Modified: head/sys/mips/mips/mp_machdep.c
==============================================================================
--- head/sys/mips/mips/mp_machdep.c	Fri Aug  6 15:24:37 2010	(r210938)
+++ head/sys/mips/mips/mp_machdep.c	Fri Aug  6 15:36:59 2010	(r210939)
@@ -92,6 +92,15 @@ ipi_selected(cpumask_t cpus, int ipi)
 	}
 }
 
+/* Send an IPI to a specific CPU. */
+void
+ipi_cpu(int cpu, u_int ipi)
+{
+
+	CTR3(KTR_SMP, "%s: cpu: %d, ipi: %x\n", __func__, cpu, ipi);
+	ipi_send(cpuid_to_pcpu[cpu], ipi);
+}
+
 /*
  * Handle an IPI sent to this processor.
  */

Modified: head/sys/powerpc/include/smp.h
==============================================================================
--- head/sys/powerpc/include/smp.h	Fri Aug  6 15:24:37 2010	(r210938)
+++ head/sys/powerpc/include/smp.h	Fri Aug  6 15:36:59 2010	(r210939)
@@ -40,6 +40,7 @@
 #ifndef LOCORE
 
 void	ipi_all_but_self(int ipi);
+void	ipi_cpu(int cpu, u_int ipi);
 void	ipi_selected(cpumask_t cpus, int ipi);
 
 struct cpuref {

Modified: head/sys/powerpc/powerpc/mp_machdep.c
==============================================================================
--- head/sys/powerpc/powerpc/mp_machdep.c	Fri Aug  6 15:24:37 2010	(r210938)
+++ head/sys/powerpc/powerpc/mp_machdep.c	Fri Aug  6 15:36:59 2010	(r210939)
@@ -336,6 +336,14 @@ ipi_selected(cpumask_t cpus, int ipi)
 	}
 }
 
+/* Send an IPI to a specific CPU. */
+void
+ipi_cpu(int cpu, u_int ipi)
+{
+
+	ipi_send(cpuid_to_pcpu[cpu], ipi);
+}
+
 /* Send an IPI to all CPUs EXCEPT myself. */
 void
 ipi_all_but_self(int ipi)

Modified: head/sys/sparc64/include/smp.h
==============================================================================
--- head/sys/sparc64/include/smp.h	Fri Aug  6 15:24:37 2010	(r210938)
+++ head/sys/sparc64/include/smp.h	Fri Aug  6 15:36:59 2010	(r210939)
@@ -135,6 +135,17 @@ ipi_selected(u_int cpus, u_int ipi)
 	cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_level, ipi);
 }
 
+static __inline void
+ipi_cpu(int cpu, u_int ipi)
+{
+
+	/*
+	 * XXX: Not ideal, but would require more work to add a cpu_ipi_cpu
+	 * function pointer.
+	 */
+	cpu_ipi_selected(1 << cpu, 0, (u_long)tl_ipi_level, ipi);
+}
+
 #if defined(_MACHINE_PMAP_H_) && defined(_SYS_MUTEX_H_)
 
 static __inline void *

Modified: head/sys/sun4v/include/smp.h
==============================================================================
--- head/sys/sun4v/include/smp.h	Fri Aug  6 15:24:37 2010	(r210938)
+++ head/sys/sun4v/include/smp.h	Fri Aug  6 15:36:59 2010	(r210939)
@@ -85,8 +85,9 @@ void cpu_ipi_preempt(struct trapframe *t
 void cpu_ipi_hardclock(struct trapframe *tf);
 void cpu_ipi_statclock(struct trapframe *tf);
 
-void	ipi_selected(u_int cpus, u_int ipi);
 void	ipi_all_but_self(u_int ipi);
+void	ipi_cpu(int cpu, u_int ipi);
+void	ipi_selected(u_int cpus, u_int ipi);
 
 vm_offset_t mp_tramp_alloc(void);
 void        mp_set_tsb_desc_ra(vm_paddr_t);

Modified: head/sys/sun4v/sun4v/mp_machdep.c
==============================================================================
--- head/sys/sun4v/sun4v/mp_machdep.c	Fri Aug  6 15:24:37 2010	(r210938)
+++ head/sys/sun4v/sun4v/mp_machdep.c	Fri Aug  6 15:36:59 2010	(r210939)
@@ -535,7 +535,6 @@ retry:
 	}
 }
 
-
 void
 ipi_selected(u_int icpus, u_int ipi)
 {
@@ -550,7 +549,6 @@ ipi_selected(u_int icpus, u_int ipi)
 	 * 4) handling 4-way threading vs 2-way threading should happen here
 	 *    and not in forward wakeup
 	 */
-	
 	cpulist = PCPU_GET(cpulist);
 	cpus = (icpus & ~PCPU_GET(cpumask));
 	
@@ -562,8 +560,32 @@ ipi_selected(u_int icpus, u_int ipi)
 		cpu_count++;
 	}
 
-	cpu_ipi_selected(cpu_count, cpulist, (u_long)tl_ipi_level, ipi, 0, &ackmask);
-	
+	cpu_ipi_selected(cpu_count, cpulist, (u_long)tl_ipi_level, ipi, 0,
+	    &ackmask);
+}
+
+void
+ipi_cpu(int cpu, u_int ipi)
+{
+	int cpu_count;
+	uint16_t *cpulist;
+	uint64_t ackmask;
+
+	/* 
+	 * 
+	 * 3) forward_wakeup appears to abuse ASTs
+	 * 4) handling 4-way threading vs 2-way threading should happen here
+	 *    and not in forward wakeup
+	 */
+	cpulist = PCPU_GET(cpulist);
+	if (PCPU_GET(cpumask) & (1 << cpu))
+		cpu_count = 0;
+	else {
+		cpulist[0] = (uint16_t)cpu;
+		cpu_count = 1;
+	}
+	cpu_ipi_selected(cpu_count, cpulist, (u_long)tl_ipi_level, ipi, 0,
+	    &ackmask);
 }
 
 void

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 15:57:40 2010
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4D7D51065678;
	Fri,  6 Aug 2010 15:57:40 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from gse-mta-27.emailfiltering.com (gse-mta-27-tx.emailfiltering.com
	[194.116.198.158])
	by mx1.freebsd.org (Postfix) with ESMTP id 3BDC18FC0C;
	Fri,  6 Aug 2010 15:57:38 +0000 (UTC)
Received: from mail-gw14.york.ac.uk ([144.32.129.164])
	by gse-mta-27.emailfiltering.com with emfmta (version 4.5.0.261) by TLS
	id 701170056
	for kib@FreeBSD.org;c246ae8a90764415; Fri, 06 Aug 2010 16:39:37 +0100
Received: from buffy-128.york.ac.uk ([144.32.128.160]:44428
	helo=buffy.york.ac.uk) by mail-gw14.york.ac.uk with esmtps
	(TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71)
	(envelope-from )
	id 1OhP1E-0007mc-VQ; Fri, 06 Aug 2010 16:39:36 +0100
Received: from buffy.york.ac.uk (localhost [127.0.0.1])
	by buffy.york.ac.uk (8.14.4/8.14.4) with ESMTP id o76FdaVx071984;
	Fri, 6 Aug 2010 16:39:36 +0100 (BST)
	(envelope-from gavin@FreeBSD.org)
Received: (from ga9@localhost)
	by buffy.york.ac.uk (8.14.4/8.14.4/Submit) id o76Fdajh071983;
	Fri, 6 Aug 2010 16:39:36 +0100 (BST)
	(envelope-from gavin@FreeBSD.org)
X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to
	gavin@FreeBSD.org using -f
From: Gavin Atkinson 
To: Konstantin Belousov 
In-Reply-To: <201008060942.o769gFm2075268@svn.freebsd.org>
References: <201008060942.o769gFm2075268@svn.freebsd.org>
Content-Type: text/plain; charset="ASCII"
Content-Transfer-Encoding: quoted-printable
Date: Fri, 06 Aug 2010 16:39:36 +0100
Message-ID: <1281109176.68747.2.camel@buffy.york.ac.uk>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.1.2 FreeBSD GNOME Team Port 
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r210923 - in head/sys: fs/devfs kern sys vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 15:57:40 -0000

On Fri, 2010-08-06 at 09:42 +0000, Konstantin Belousov wrote:
> Author: kib
> Date: Fri Aug  6 09:42:15 2010
> New Revision: 210923
> URL: http://svn.freebsd.org/changeset/base/210923
>=20
> Log:
>   Add new make_dev_p(9) flag MAKEDEV_ETERNAL to inform devfs that created
>   cdev will never be destroyed. Propagate the flag to devfs vnodes as
>   VV_ETERNVALDEV. Use the flags to avoid acquiring devmtx and taking a
>   thread reference on such nodes.

Does this flag have any effect on unmounting a devfs mount?

Thanks,

Gavin
--=20
Gavin Atkinson
FreeBSD committer and bugmeister

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 15:59:00 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A8FB61065678;
	Fri,  6 Aug 2010 15:59:00 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 97FC38FC18;
	Fri,  6 Aug 2010 15:59:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76Fx0L9061785;
	Fri, 6 Aug 2010 15:59:00 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76Fx02p061783;
	Fri, 6 Aug 2010 15:59:00 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008061559.o76Fx02p061783@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 6 Aug 2010 15:59:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210940 - head/sys/amd64/acpica
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 15:59:00 -0000

Author: jkim
Date: Fri Aug  6 15:59:00 2010
New Revision: 210940
URL: http://svn.freebsd.org/changeset/base/210940

Log:
  Correct argument order of acpi_restorecpu(), which was forgotten in r210804.

Modified:
  head/sys/amd64/acpica/acpi_wakeup.c

Modified: head/sys/amd64/acpica/acpi_wakeup.c
==============================================================================
--- head/sys/amd64/acpica/acpi_wakeup.c	Fri Aug  6 15:36:59 2010	(r210939)
+++ head/sys/amd64/acpica/acpi_wakeup.c	Fri Aug  6 15:59:00 2010	(r210940)
@@ -71,7 +71,7 @@ extern struct pcb	**susppcbs;
 static struct pcb	**susppcbs;
 #endif
 
-int			acpi_restorecpu(struct pcb *, vm_offset_t);
+int			acpi_restorecpu(vm_offset_t, struct pcb *);
 
 static void		*acpi_alloc_wakeup_handler(void);
 static void		acpi_stop_beep(void *);

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 16:50:49 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4FFCD1065674;
	Fri,  6 Aug 2010 16:50:49 +0000 (UTC)
	(envelope-from stefanf@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3E9CE8FC16;
	Fri,  6 Aug 2010 16:50:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76GonUg073343;
	Fri, 6 Aug 2010 16:50:49 GMT (envelope-from stefanf@svn.freebsd.org)
Received: (from stefanf@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76Gon14073341;
	Fri, 6 Aug 2010 16:50:49 GMT (envelope-from stefanf@svn.freebsd.org)
Message-Id: <201008061650.o76Gon14073341@svn.freebsd.org>
From: Stefan Farfeleder 
Date: Fri, 6 Aug 2010 16:50:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210941 - head/share/man/man9
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 16:50:49 -0000

Author: stefanf
Date: Fri Aug  6 16:50:48 2010
New Revision: 210941
URL: http://svn.freebsd.org/changeset/base/210941

Log:
  Add links for destroy_dev_drain, destroy_dev_sched, destroy_dev_sched_cb,
  make_dev_cred and make_dev_credf.

Modified:
  head/share/man/man9/Makefile

Modified: head/share/man/man9/Makefile
==============================================================================
--- head/share/man/man9/Makefile	Fri Aug  6 15:59:00 2010	(r210940)
+++ head/share/man/man9/Makefile	Fri Aug  6 16:50:48 2010	(r210941)
@@ -769,8 +769,13 @@ MLINKS+=lock.9 lockdestroy.9 \
 	lock.9 lockstatus.9
 MLINKS+=LOCK_PROFILING.9 MUTEX_PROFILING.9
 MLINKS+=make_dev.9 destroy_dev.9 \
+	make_dev.9 destroy_dev_drain.9 \
+	make_dev.9 destroy_dev_sched.9 \
+	make_dev.9 destroy_dev_sched_cb.9 \
 	make_dev.9 dev_depends.9 \
-	make_dev.9 make_dev_alias.9
+	make_dev.9 make_dev_alias.9 \
+	make_dev.9 make_dev_cred.9 \
+	make_dev.9 make_dev_credf.9
 MLINKS+=malloc.9 free.9 \
 	malloc.9 MALLOC_DECLARE.9 \
 	malloc.9 MALLOC_DEFINE.9 \

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 17:21:32 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9C9AE106566B;
	Fri,  6 Aug 2010 17:21:32 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8B67E8FC23;
	Fri,  6 Aug 2010 17:21:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76HLWHB080181;
	Fri, 6 Aug 2010 17:21:32 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76HLWbs080179;
	Fri, 6 Aug 2010 17:21:32 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008061721.o76HLWbs080179@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 6 Aug 2010 17:21:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210942 - head/sys/amd64/acpica
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 17:21:32 -0000

Author: jkim
Date: Fri Aug  6 17:21:32 2010
New Revision: 210942
URL: http://svn.freebsd.org/changeset/base/210942

Log:
  Remove unnecessary casting and simplify code.  We are not there yet. ;-)

Modified:
  head/sys/amd64/acpica/acpi_wakeup.c

Modified: head/sys/amd64/acpica/acpi_wakeup.c
==============================================================================
--- head/sys/amd64/acpica/acpi_wakeup.c	Fri Aug  6 16:50:48 2010	(r210941)
+++ head/sys/amd64/acpica/acpi_wakeup.c	Fri Aug  6 17:21:32 2010	(r210942)
@@ -176,7 +176,6 @@ static void
 acpi_wakeup_cpus(struct acpi_softc *sc, cpumask_t wakeup_cpus)
 {
 	uint32_t	mpbioswarmvec;
-	cpumask_t	map;
 	int		cpu;
 	u_char		mpbiosreason;
 
@@ -193,8 +192,7 @@ acpi_wakeup_cpus(struct acpi_softc *sc, 
 
 	/* Wake up each AP. */
 	for (cpu = 1; cpu < mp_ncpus; cpu++) {
-		map = 1ul << cpu;
-		if ((wakeup_cpus & map) != map)
+		if ((wakeup_cpus & (1 << cpu)) == 0)
 			continue;
 		if (acpi_wakeup_ap(sc, cpu) == 0) {
 			/* restore the warmstart vector */

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 17:27:00 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C8E51106566C;
	Fri,  6 Aug 2010 17:27:00 +0000 (UTC)
	(envelope-from mjacob@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9D2948FC12;
	Fri,  6 Aug 2010 17:27:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76HR0tM081436;
	Fri, 6 Aug 2010 17:27:00 GMT (envelope-from mjacob@svn.freebsd.org)
Received: (from mjacob@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76HR0Ch081434;
	Fri, 6 Aug 2010 17:27:00 GMT (envelope-from mjacob@svn.freebsd.org)
Message-Id: <201008061727.o76HR0Ch081434@svn.freebsd.org>
From: Matt Jacob 
Date: Fri, 6 Aug 2010 17:27:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210943 - head/sys/dev/mpt
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 17:27:00 -0000

Author: mjacob
Date: Fri Aug  6 17:27:00 2010
New Revision: 210943
URL: http://svn.freebsd.org/changeset/base/210943

Log:
  Figure which is the IO and MEM bars- do not assume that they are in
  a fixed order.
  
  PR:		149220
  Obtained from:	John Baldwin
  MFC after:	1 month

Modified:
  head/sys/dev/mpt/mpt_pci.c

Modified: head/sys/dev/mpt/mpt_pci.c
==============================================================================
--- head/sys/dev/mpt/mpt_pci.c	Fri Aug  6 17:21:32 2010	(r210942)
+++ head/sys/dev/mpt/mpt_pci.c	Fri Aug  6 17:27:00 2010	(r210943)
@@ -194,8 +194,6 @@ __FBSDID("$FreeBSD$");
 #endif
 
 
-#define	MPT_IO_BAR	0
-#define	MPT_MEM_BAR	1
 
 static int mpt_pci_probe(device_t);
 static int mpt_pci_attach(device_t);
@@ -420,6 +418,7 @@ mpt_pci_attach(device_t dev)
 	struct mpt_softc *mpt;
 	int		  iqd;
 	uint32_t	  data, cmd;
+	int		  mpt_io_bar, mpt_mem_bar;
 
 	/* Allocate the softc structure */
 	mpt  = (struct mpt_softc*)device_get_softc(dev);
@@ -505,11 +504,25 @@ mpt_pci_attach(device_t dev)
 	}
 
 	/*
+	 * Figure out which are the I/O and MEM Bars
+	 */
+	data = pci_read_config(dev, PCIR_BAR(0), 4);
+	if (PCI_BAR_IO(data)) {
+		/* BAR0 is IO, BAR1 is memory */
+		mpt_io_bar = 0;
+		mpt_mem_bar = 1;
+	} else {
+		/* BAR0 is memory, BAR1 is IO */
+		mpt_mem_bar = 0;
+		mpt_io_bar = 1;
+	}
+
+	/*
 	 * Set up register access.  PIO mode is required for
 	 * certain reset operations (but must be disabled for
 	 * some cards otherwise).
 	 */
-	mpt->pci_pio_rid = PCIR_BAR(MPT_IO_BAR);
+	mpt->pci_pio_rid = PCIR_BAR(mpt_io_bar);
 	mpt->pci_pio_reg = bus_alloc_resource(dev, SYS_RES_IOPORT,
 			    &mpt->pci_pio_rid, 0, ~0, 0, RF_ACTIVE);
 	if (mpt->pci_pio_reg == NULL) {
@@ -520,7 +533,7 @@ mpt_pci_attach(device_t dev)
 	mpt->pci_pio_sh = rman_get_bushandle(mpt->pci_pio_reg);
 
 	/* Allocate kernel virtual memory for the 9x9's Mem0 region */
-	mpt->pci_mem_rid = PCIR_BAR(MPT_MEM_BAR);
+	mpt->pci_mem_rid = PCIR_BAR(mpt_mem_bar);
 	mpt->pci_reg = bus_alloc_resource(dev, SYS_RES_MEMORY,
 			&mpt->pci_mem_rid, 0, ~0, 0, RF_ACTIVE);
 	if (mpt->pci_reg == NULL) {

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 17:28:41 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 08AE6106566B;
	Fri,  6 Aug 2010 17:28:41 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E79208FC18;
	Fri,  6 Aug 2010 17:28:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76HSejp081850;
	Fri, 6 Aug 2010 17:28:40 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76HSeGa081835;
	Fri, 6 Aug 2010 17:28:40 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008061728.o76HSeGa081835@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 6 Aug 2010 17:28:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor-sys
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210944 - in vendor-sys/acpica/dist: . common compiler
	debugger events executer include os_specific/service_layers
	tools/acpiexec tools/acpisrc tools/acpixtract utilities
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 17:28:41 -0000

Author: jkim
Date: Fri Aug  6 17:28:40 2010
New Revision: 210944
URL: http://svn.freebsd.org/changeset/base/210944

Log:
  Import ACPICA 20100806.

Added:
  vendor-sys/acpica/dist/utilities/utosi.c   (contents, props changed)
Modified:
  vendor-sys/acpica/dist/changes.txt
  vendor-sys/acpica/dist/common/adisasm.c
  vendor-sys/acpica/dist/common/dmextern.c
  vendor-sys/acpica/dist/compiler/Makefile
  vendor-sys/acpica/dist/compiler/aslcompiler.h
  vendor-sys/acpica/dist/compiler/aslglobal.h
  vendor-sys/acpica/dist/compiler/aslmain.c
  vendor-sys/acpica/dist/compiler/aslstartup.c
  vendor-sys/acpica/dist/debugger/dbcmds.c
  vendor-sys/acpica/dist/debugger/dbinput.c
  vendor-sys/acpica/dist/events/evxfevnt.c
  vendor-sys/acpica/dist/executer/exfldio.c
  vendor-sys/acpica/dist/executer/exprep.c
  vendor-sys/acpica/dist/include/acdebug.h
  vendor-sys/acpica/dist/include/acdisasm.h
  vendor-sys/acpica/dist/include/acglobal.h
  vendor-sys/acpica/dist/include/aclocal.h
  vendor-sys/acpica/dist/include/acobject.h
  vendor-sys/acpica/dist/include/acpiosxf.h
  vendor-sys/acpica/dist/include/acpixf.h
  vendor-sys/acpica/dist/include/actypes.h
  vendor-sys/acpica/dist/include/acutils.h
  vendor-sys/acpica/dist/os_specific/service_layers/osunixxf.c
  vendor-sys/acpica/dist/os_specific/service_layers/oswinxf.c
  vendor-sys/acpica/dist/osunixxf.c
  vendor-sys/acpica/dist/tools/acpiexec/Makefile
  vendor-sys/acpica/dist/tools/acpiexec/aeexec.c
  vendor-sys/acpica/dist/tools/acpiexec/aehandlers.c
  vendor-sys/acpica/dist/tools/acpisrc/Makefile
  vendor-sys/acpica/dist/tools/acpisrc/astable.c
  vendor-sys/acpica/dist/tools/acpixtract/Makefile
  vendor-sys/acpica/dist/utilities/uteval.c
  vendor-sys/acpica/dist/utilities/utglobal.c
  vendor-sys/acpica/dist/utilities/utinit.c
  vendor-sys/acpica/dist/utilities/utmutex.c
  vendor-sys/acpica/dist/utilities/utxface.c

Modified: vendor-sys/acpica/dist/changes.txt
==============================================================================
--- vendor-sys/acpica/dist/changes.txt	Fri Aug  6 17:27:00 2010	(r210943)
+++ vendor-sys/acpica/dist/changes.txt	Fri Aug  6 17:28:40 2010	(r210944)
@@ -1,7 +1,68 @@
 ----------------------------------------
-02 July 2010. Summary of changes for version 20100702:
+06 August 2010. Summary of changes for version 20100806:
+
+1) ACPI CA Core Subsystem:
+
+Designed and implemented a new host interface to the _OSI support code. This 
+will allow the host to dynamically add or remove multiple _OSI strings, as 
+well as install an optional handler that is called for each _OSI invocation. 
+Also added a new AML debugger command, 'osi' to display and modify the global 
+_OSI string table, and test support in the AcpiExec utility. See the ACPICA 
+reference manual for full details. Lin Ming, Bob Moore. ACPICA BZ 836.
+New Functions:
+    AcpiInstallInterface - Add an _OSI string.
+    AcpiRemoveInterface - Delete an _OSI string.
+    AcpiInstallInterfaceHandler - Install optional _OSI handler.
+Obsolete Functions:
+    AcpiOsValidateInterface - no longer used.
+New Files:
+    source/components/utilities/utosi.c
+
+Re-introduced the support to enable multi-byte transfers for Embedded 
+Controller (EC) operation regions. A reported problem was found to be a bug 
+in the host OS, not in the multi-byte support. Previously, the maximum data 
+size passed to the EC operation region handler was a single byte. There are 
+often EC Fields larger than one byte that need to be transferred, and it is 
+useful for the EC driver to lock these as a single transaction. This change 
+enables single transfers larger than 8 bits. This effectively changes the 
+access to the EC space from ByteAcc to AnyAcc, and will probably require 
+changes to the host OS Embedded Controller driver to enable 16/32/64/256-bit 
+transfers in addition to 8-bit transfers. Alexey Starikovskiy, Lin Ming.
+
+Fixed a problem with the prototype for AcpiOsReadPciConfiguration. The 
+prototype in acpiosxf.h had the output value pointer as a (void *).
+It should be a (UINT64 *). This may affect some host OSL code.
+
+Fixed a couple problems with the recently modified Linux makefiles for iASL 
+and AcpiExec. These new makefiles place the generated object files in the 
+local directory so that there can be no collisions between the files that are 
+shared between them that are compiled with different options.
+
+Example Code and Data Size: These are the sizes for the OS-independent 
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The 
+debug version of the code includes the debug output trace mechanism and has a 
+much larger code and data size.
+
+  Previous Release:
+    Non-Debug Version:  88.3K Code, 18.8K Data, 107.1K Total
+    Debug Version:     164.0K Code, 51.5K Data, 215.5K Total
+  Current Release:
+    Non-Debug Version:  89.1K Code, 19.0K Data, 108.1K Total
+    Debug Version:     165.1K Code, 51.9K Data, 217.0K Total
 
-This release is available at www.acpica.org/downloads
+2) iASL Compiler/Disassembler and Tools:
+
+iASL/Disassembler: Added a new option (-da, "disassemble all") to load the 
+namespace from and disassemble an entire group of AML files. Useful for 
+loading all of the AML tables for a given machine (DSDT, SSDT1...SSDTn) and 
+disassembling with one simple command. ACPICA BZ 865. Lin Ming.
+
+iASL: Allow multiple invocations of -e option. This change allows multiple 
+uses of -e on the command line: "-e ssdt1.dat -e ssdt2.dat". ACPICA BZ 834. 
+Lin Ming.
+
+----------------------------------------
+02 July 2010. Summary of changes for version 20100702:
 
 1) ACPI CA Core Subsystem:
 
@@ -77,8 +138,6 @@ the #define __APPLE__ to enable this sup
 ----------------------------------------
 28 May 2010. Summary of changes for version 20100528:
 
-This release is available at www.acpica.org/downloads
-
 Note: The ACPI 4.0a specification was released on April 5, 2010 and is 
 available at www.acpi.info. This is primarily an errata release.
 

Modified: vendor-sys/acpica/dist/common/adisasm.c
==============================================================================
--- vendor-sys/acpica/dist/common/adisasm.c	Fri Aug  6 17:27:00 2010	(r210943)
+++ vendor-sys/acpica/dist/common/adisasm.c	Fri Aug  6 17:28:40 2010	(r210944)
@@ -134,7 +134,6 @@
 
 
 extern int                  AslCompilerdebug;
-extern char                 *Gbl_ExternalFilename;
 
 
 ACPI_STATUS
@@ -313,6 +312,7 @@ AdAmlDisassemble (
     ACPI_STATUS             Status;
     char                    *DisasmFilename = NULL;
     char                    *ExternalFilename;
+    ACPI_EXTERNAL_FILE      *ExternalFileList = AcpiGbl_ExternalFileList;
     FILE                    *File = NULL;
     ACPI_TABLE_HEADER       *Table = NULL;
     ACPI_TABLE_HEADER       *ExternalTable;
@@ -335,46 +335,54 @@ AdAmlDisassemble (
          * External filenames separated by commas
          * Example: iasl -e file1,file2,file3 -d xxx.aml
          */
-        if (Gbl_ExternalFilename)
+        while (ExternalFileList)
         {
-            ExternalFilename = strtok (Gbl_ExternalFilename, ",");
+            ExternalFilename = ExternalFileList->Path;
+            if (!ACPI_STRCMP (ExternalFilename, Filename))
+            {
+                /* Next external file */
+
+                ExternalFileList = ExternalFileList->Next;
 
-            while (ExternalFilename)
+                continue;
+            }
+
+            Status = AcpiDbGetTableFromFile (ExternalFilename, &ExternalTable);
+            if (ACPI_FAILURE (Status))
             {
-                Status = AcpiDbGetTableFromFile (ExternalFilename, &ExternalTable);
+                return Status;
+            }
+
+            /* Load external table for symbol resolution */
+
+            if (ExternalTable)
+            {
+                Status = AdParseTable (ExternalTable, &OwnerId, TRUE, TRUE);
                 if (ACPI_FAILURE (Status))
                 {
+                    AcpiOsPrintf ("Could not parse external ACPI tables, %s\n",
+                        AcpiFormatException (Status));
                     return Status;
                 }
 
-                /* Load external table for symbol resolution */
-
-                if (ExternalTable)
-                {
-                    Status = AdParseTable (ExternalTable, &OwnerId, TRUE, TRUE);
-                    if (ACPI_FAILURE (Status))
-                    {
-                        AcpiOsPrintf ("Could not parse external ACPI tables, %s\n",
-                            AcpiFormatException (Status));
-                        return Status;
-                    }
-
-                    /*
-                     * Load namespace from names created within control methods
-                     * Set owner id of nodes in external table
-                     */
-                    AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,
-                        AcpiGbl_RootNode, OwnerId);
-                    AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);
-                }
+                /*
+                 * Load namespace from names created within control methods
+                 * Set owner id of nodes in external table
+                 */
+                AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,
+                    AcpiGbl_RootNode, OwnerId);
+                AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);
+            }
 
-                /* Next external file name */
+            /* Next external file */
 
-                ExternalFilename = strtok (NULL, ",");
-            }
+            ExternalFileList = ExternalFileList->Next;
+        }
 
-            /* Clear external list generated by Scope in external tables */
+        /* Clear external list generated by Scope in external tables */
 
+        if (AcpiGbl_ExternalFileList)
+        {
             AcpiDmClearExternalList ();
         }
     }

Modified: vendor-sys/acpica/dist/common/dmextern.c
==============================================================================
--- vendor-sys/acpica/dist/common/dmextern.c	Fri Aug  6 17:27:00 2010	(r210943)
+++ vendor-sys/acpica/dist/common/dmextern.c	Fri Aug  6 17:28:40 2010	(r210944)
@@ -312,6 +312,95 @@ Cleanup:
 
 /*******************************************************************************
  *
+ * FUNCTION:    AcpiDmAddToExternalFileList
+ *
+ * PARAMETERS:  PathList            - Single path or list separated by comma
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Add external files to global list
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDmAddToExternalFileList (
+    char                    *PathList)
+{
+    ACPI_EXTERNAL_FILE      *ExternalFile;
+    char                    *Path;
+    char                    *TmpPath;
+
+
+    if (!PathList)
+    {
+        return (AE_OK);
+    }
+
+    Path = strtok (PathList, ",");
+
+    while (Path)
+    {
+        TmpPath = ACPI_ALLOCATE_ZEROED (ACPI_STRLEN (Path) + 1);
+        if (!TmpPath)
+        {
+            return (AE_NO_MEMORY);
+        }
+
+        ACPI_STRCPY (TmpPath, Path);
+
+        ExternalFile = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EXTERNAL_FILE));
+        if (!ExternalFile)
+        {
+            ACPI_FREE (TmpPath);
+            return (AE_NO_MEMORY);
+        }
+
+        ExternalFile->Path = TmpPath;
+
+        if (AcpiGbl_ExternalFileList)
+        {
+            ExternalFile->Next = AcpiGbl_ExternalFileList;
+        }
+
+        AcpiGbl_ExternalFileList = ExternalFile;
+        Path = strtok (NULL, ",");
+    }
+
+    return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDmClearExternalFileList
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Clear the external file list
+ *
+ ******************************************************************************/
+
+void
+AcpiDmClearExternalFileList (
+    void)
+{
+    ACPI_EXTERNAL_FILE      *NextExternal;
+
+
+    while (AcpiGbl_ExternalFileList)
+    {
+        NextExternal = AcpiGbl_ExternalFileList->Next;
+        ACPI_FREE (AcpiGbl_ExternalFileList->Path);
+        ACPI_FREE (AcpiGbl_ExternalFileList);
+        AcpiGbl_ExternalFileList = NextExternal;
+    }
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    AcpiDmAddToExternalList
  *
  * PARAMETERS:  Op                  - Current parser Op

Modified: vendor-sys/acpica/dist/compiler/Makefile
==============================================================================
--- vendor-sys/acpica/dist/compiler/Makefile	Fri Aug  6 17:27:00 2010	(r210943)
+++ vendor-sys/acpica/dist/compiler/Makefile	Fri Aug  6 17:28:40 2010	(r210944)
@@ -7,7 +7,7 @@ PROG=	iasl
 ACPICA_SRC =    ..
 ASL_COMPILER =  $(ACPICA_SRC)/compiler
 ACPICA_COMMON = $(ACPICA_SRC)/common
-ACPICA_CORE =   $(ACPICA_SRC)/components
+ACPICA_CORE =   $(ACPICA_SRC)
 ACPICA_TOOLS =  $(ACPICA_SRC)/tools
 ACPICA_OSL =    $(ACPICA_SRC)/os_specific/service_layers
 
@@ -166,7 +166,7 @@ MISC = \
 # Root rule
 #
 $(PROG) : $(INTERMEDIATES) $(OBJS)
-	$(CC) $(LDFLAGS) $(OBJS) -o $(PROG)
+	$(CC) $(OBJS) $(LDFLAGS) -o $(PROG)
 	$(COPYPROG)
 
 

Modified: vendor-sys/acpica/dist/compiler/aslcompiler.h
==============================================================================
--- vendor-sys/acpica/dist/compiler/aslcompiler.h	Fri Aug  6 17:27:00 2010	(r210943)
+++ vendor-sys/acpica/dist/compiler/aslcompiler.h	Fri Aug  6 17:28:40 2010	(r210944)
@@ -195,9 +195,14 @@ void
 AslInitializeGlobals (
     void);
 
+typedef
+ACPI_STATUS (*ASL_PATHNAME_CALLBACK) (
+    char *);
+
 ACPI_STATUS
 AslDoOnePathname (
-    char                    *Pathname);
+    char                    *Pathname,
+    ASL_PATHNAME_CALLBACK   Callback);
 
 ACPI_STATUS
 AslDoOneFile (

Modified: vendor-sys/acpica/dist/compiler/aslglobal.h
==============================================================================
--- vendor-sys/acpica/dist/compiler/aslglobal.h	Fri Aug  6 17:27:00 2010	(r210943)
+++ vendor-sys/acpica/dist/compiler/aslglobal.h	Fri Aug  6 17:28:40 2010	(r210944)
@@ -171,6 +171,7 @@ ASL_EXTERN ASL_ERROR_MSG            ASL_
 
 ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_DoCompile, TRUE);
 ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_DoSignon, TRUE);
+ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_DisassembleAll, FALSE);
 
 ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_Acpi2, FALSE);
 ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_UseDefaultAmlFilename, TRUE);
@@ -214,7 +215,6 @@ ASL_EXTERN BOOLEAN                  ASL_
 ASL_EXTERN ASL_FILE_INFO            Gbl_Files [ASL_NUM_FILES];
 
 ASL_EXTERN char                     *Gbl_DirectoryPath;
-ASL_EXTERN char                     ASL_INIT_GLOBAL (*Gbl_ExternalFilename, NULL);
 ASL_EXTERN char                     ASL_INIT_GLOBAL (*Gbl_IncludeFilename, NULL);
 ASL_EXTERN char                     ASL_INIT_GLOBAL (*Gbl_OutputFilenamePrefix, NULL);
 ASL_EXTERN ASL_INCLUDE_DIR          ASL_INIT_GLOBAL (*Gbl_IncludeDirList, NULL);

Modified: vendor-sys/acpica/dist/compiler/aslmain.c
==============================================================================
--- vendor-sys/acpica/dist/compiler/aslmain.c	Fri Aug  6 17:27:00 2010	(r210943)
+++ vendor-sys/acpica/dist/compiler/aslmain.c	Fri Aug  6 17:28:40 2010	(r210944)
@@ -119,6 +119,7 @@
 
 #include "aslcompiler.h"
 #include "acapps.h"
+#include "acdisasm.h"
 
 #ifdef _DEBUG
 #include 
@@ -224,6 +225,7 @@ Options (
 
     printf ("\nAML Disassembler:\n");
     printf ("  -d  [file]     Disassemble or decode binary ACPI table to file (*.dsl)\n");
+    printf ("  -da [f1,f2]    Disassemble multiple tables from single namespace\n");
     printf ("  -dc [file]     Disassemble AML and immediately compile it\n");
     printf ("                 (Obtain DSDT from current system if no input file)\n");
     printf ("  -e  [f1,f2]    Include ACPI table(s) for external symbol resolution\n");
@@ -534,6 +536,11 @@ AslDoOptions (
             Gbl_DoCompile = FALSE;
             break;
 
+        case 'a':
+            Gbl_DoCompile = FALSE;
+            Gbl_DisassembleAll = TRUE;
+            break;
+
         case 'c':
             break;
 
@@ -547,7 +554,7 @@ AslDoOptions (
 
 
     case 'e':
-        Gbl_ExternalFilename = AcpiGbl_Optarg;
+        AcpiDmAddToExternalFileList (AcpiGbl_Optarg);
         break;
 
 
@@ -952,9 +959,12 @@ main (
     char                    **argv)
 {
     ACPI_STATUS             Status;
-    int                     Index;
+    int                     Index1;
+    int                     Index2;
 
 
+    AcpiGbl_ExternalFileList = NULL;
+
 #ifdef _DEBUG
     _CrtSetDbgFlag (_CRTDBG_CHECK_ALWAYS_DF | _CRTDBG_LEAK_CHECK_DF |
                     _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG));
@@ -963,7 +973,7 @@ main (
     /* Init and command line */
 
     AslInitialize ();
-    Index = AslCommandLine (argc, argv);
+    Index1 = Index2 = AslCommandLine (argc, argv);
 
     /* Options that have no additional parameters or pathnames */
 
@@ -977,17 +987,36 @@ main (
         return (0);
     }
 
+    if (Gbl_DisassembleAll)
+    {
+        while (argv[Index1])
+        {
+            Status = AslDoOnePathname (argv[Index1], AcpiDmAddToExternalFileList);
+            if (ACPI_FAILURE (Status))
+            {
+                return (-1);
+            }
+
+            Index1++;
+        }
+    }
+
     /* Process each pathname/filename in the list, with possible wildcards */
 
-    while (argv[Index])
+    while (argv[Index2])
     {
-        Status = AslDoOnePathname (argv[Index]);
+        Status = AslDoOnePathname (argv[Index2], AslDoOneFile);
         if (ACPI_FAILURE (Status))
         {
             return (-1);
         }
 
-        Index++;
+        Index2++;
+    }
+
+    if (AcpiGbl_ExternalFileList)
+    {
+        AcpiDmClearExternalFileList();
     }
 
     return (0);

Modified: vendor-sys/acpica/dist/compiler/aslstartup.c
==============================================================================
--- vendor-sys/acpica/dist/compiler/aslstartup.c	Fri Aug  6 17:27:00 2010	(r210943)
+++ vendor-sys/acpica/dist/compiler/aslstartup.c	Fri Aug  6 17:28:40 2010	(r210944)
@@ -529,7 +529,8 @@ AslDoOneFile (
 
 ACPI_STATUS
 AslDoOnePathname (
-    char                    *Pathname)
+    char                    *Pathname,
+    ASL_PATHNAME_CALLBACK   PathCallback)
 {
     ACPI_STATUS             Status = AE_OK;
     char                    **FileList;
@@ -569,7 +570,7 @@ AslDoOnePathname (
 
         /* Save status from all compiles */
 
-        Status |= AslDoOneFile (FullPathname);
+        Status |= (*PathCallback) (FullPathname);
 
         ACPI_FREE (FullPathname);
         ACPI_FREE (*FileList);

Modified: vendor-sys/acpica/dist/debugger/dbcmds.c
==============================================================================
--- vendor-sys/acpica/dist/debugger/dbcmds.c	Fri Aug  6 17:27:00 2010	(r210943)
+++ vendor-sys/acpica/dist/debugger/dbcmds.c	Fri Aug  6 17:28:40 2010	(r210944)
@@ -1332,6 +1332,98 @@ AcpiDbDisplayObjects (
 
 /*******************************************************************************
  *
+ * FUNCTION:    AcpiDbDisplayInterfaces
+ *
+ * PARAMETERS:  ActionArg           - Null, "install", or "remove"
+ *              InterfaceNameArg    - Name for install/remove options
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Display or modify the global _OSI interface list
+ *
+ ******************************************************************************/
+
+void
+AcpiDbDisplayInterfaces (
+    char                    *ActionArg,
+    char                    *InterfaceNameArg)
+{
+    ACPI_INTERFACE_INFO     *NextInterface;
+    char                    *SubString;
+    ACPI_STATUS             Status;
+
+
+    /* If no arguments, just display current interface list */
+
+    if (!ActionArg)
+    {
+        (void) AcpiOsAcquireMutex (AcpiGbl_OsiMutex,
+                    ACPI_WAIT_FOREVER);
+
+        NextInterface = AcpiGbl_SupportedInterfaces;
+
+        while (NextInterface)
+        {
+            if (!(NextInterface->Flags & ACPI_OSI_INVALID))
+            {
+                AcpiOsPrintf ("%s\n", NextInterface->Name);
+            }
+            NextInterface = NextInterface->Next;
+        }
+
+        AcpiOsReleaseMutex (AcpiGbl_OsiMutex);
+        return;
+    }
+
+    /* If ActionArg exists, so must InterfaceNameArg */
+
+    if (!InterfaceNameArg)
+    {
+        AcpiOsPrintf ("Missing Interface Name argument\n");
+        return;
+    }
+
+    /* Uppercase the action for match below */
+
+    AcpiUtStrupr (ActionArg);
+
+    /* Install - install an interface */
+
+    SubString = ACPI_STRSTR ("INSTALL", ActionArg);
+    if (SubString)
+    {
+        Status = AcpiInstallInterface (InterfaceNameArg);
+        if (ACPI_FAILURE (Status))
+        {
+            AcpiOsPrintf ("%s, while installing \"%s\"\n",
+                AcpiFormatException (Status), InterfaceNameArg);
+        }
+        return;
+    }
+
+    /* Remove - remove an interface */
+
+    SubString = ACPI_STRSTR ("REMOVE", ActionArg);
+    if (SubString)
+    {
+        Status = AcpiRemoveInterface (InterfaceNameArg);
+        if (ACPI_FAILURE (Status))
+        {
+            AcpiOsPrintf ("%s, while removing \"%s\"\n",
+                AcpiFormatException (Status), InterfaceNameArg);
+        }
+        return;
+    }
+
+    /* Invalid ActionArg */
+
+    AcpiOsPrintf ("Invalid action argument: %s\n", ActionArg);
+    return;
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    AcpiDbWalkAndMatchName
  *
  * PARAMETERS:  Callback from WalkNamespace

Modified: vendor-sys/acpica/dist/debugger/dbinput.c
==============================================================================
--- vendor-sys/acpica/dist/debugger/dbinput.c	Fri Aug  6 17:27:00 2010	(r210943)
+++ vendor-sys/acpica/dist/debugger/dbinput.c	Fri Aug  6 17:28:40 2010	(r210944)
@@ -194,6 +194,7 @@ enum AcpiExDebuggerCommands
     CMD_NOTIFY,
     CMD_OBJECT,
     CMD_OPEN,
+    CMD_OSI,
     CMD_OWNER,
     CMD_PREDEFINED,
     CMD_PREFIX,
@@ -260,6 +261,7 @@ static const COMMAND_INFO       AcpiGbl_
     {"NOTIFY",       2},
     {"OBJECT",       1},
     {"OPEN",         1},
+    {"OSI",          0},
     {"OWNER",        1},
     {"PREDEFINED",   0},
     {"PREFIX",       0},
@@ -333,6 +335,7 @@ AcpiDbDisplayHelp (
         AcpiOsPrintf ("History                             Display command history buffer\n");
         AcpiOsPrintf ("Level [] [console]      Get/Set debug level for file or console\n");
         AcpiOsPrintf ("Locks                               Current status of internal mutexes\n");
+        AcpiOsPrintf ("Osi [Install|Remove ]         Display or modify global _OSI list\n");
         AcpiOsPrintf ("Quit or Exit                        Exit this command\n");
         AcpiOsPrintf ("Stats [Allocations|Memory|Misc\n");
         AcpiOsPrintf ("      |Objects|Sizes|Stack|Tables]  Display namespace and memory statistics\n");
@@ -455,13 +458,30 @@ AcpiDbGetNextToken (
         }
     }
 
-    Start = String;
+    if (*String == '"')
+    {
+        /* This is a quoted string, scan until closing quote */
+
+        String++;
+        Start = String;
 
-    /* Find end of token */
+        /* Find end of token */
 
-    while (*String && (*String != ' '))
+        while (*String && (*String != '"'))
+        {
+            String++;
+        }
+    }
+    else
     {
-        String++;
+        Start = String;
+
+        /* Find end of token */
+
+        while (*String && (*String != ' '))
+        {
+            String++;
+        }
     }
 
     if (!(*String))
@@ -820,6 +840,10 @@ AcpiDbCommandDispatch (
         AcpiDbOpenDebugFile (AcpiGbl_DbArgs[1]);
         break;
 
+    case CMD_OSI:
+        AcpiDbDisplayInterfaces (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
+        break;
+
     case CMD_OWNER:
         AcpiDbDumpNamespaceByOwner (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
         break;

Modified: vendor-sys/acpica/dist/events/evxfevnt.c
==============================================================================
--- vendor-sys/acpica/dist/events/evxfevnt.c	Fri Aug  6 17:27:00 2010	(r210943)
+++ vendor-sys/acpica/dist/events/evxfevnt.c	Fri Aug  6 17:28:40 2010	(r210944)
@@ -305,7 +305,6 @@ AcpiEnableEvent (
 ACPI_EXPORT_SYMBOL (AcpiEnableEvent)
 
 
-
 /*******************************************************************************
  *
  * FUNCTION:    AcpiGpeWakeup

Modified: vendor-sys/acpica/dist/executer/exfldio.c
==============================================================================
--- vendor-sys/acpica/dist/executer/exfldio.c	Fri Aug  6 17:27:00 2010	(r210943)
+++ vendor-sys/acpica/dist/executer/exfldio.c	Fri Aug  6 17:28:40 2010	(r210944)
@@ -202,8 +202,8 @@ AcpiExSetupRegion (
     }
 
     /*
-     * Exit now for SMBus or IPMI address space, it has a non-linear address space
-     * and the request cannot be directly validated
+     * Exit now for SMBus or IPMI address space, it has a non-linear
+     * address space and the request cannot be directly validated
      */
     if (RgnDesc->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
         RgnDesc->Region.SpaceId == ACPI_ADR_SPACE_IPMI)
@@ -233,8 +233,7 @@ AcpiExSetupRegion (
      * (Region length is specified in bytes)
      */
     if (RgnDesc->Region.Length <
-            (ObjDesc->CommonField.BaseByteOffset +
-            FieldDatumByteOffset +
+            (ObjDesc->CommonField.BaseByteOffset + FieldDatumByteOffset +
             ObjDesc->CommonField.AccessByteWidth))
     {
         if (AcpiGbl_EnableInterpreterSlack)
@@ -794,6 +793,7 @@ AcpiExExtractFromField (
     UINT32                  BufferTailBits;
     UINT32                  DatumCount;
     UINT32                  FieldDatumCount;
+    UINT32                  AccessBitWidth;
     UINT32                  i;
 
 
@@ -803,7 +803,7 @@ AcpiExExtractFromField (
     /* Validate target buffer and clear it */
 
     if (BufferLength <
-            ACPI_ROUND_BITS_UP_TO_BYTES (ObjDesc->CommonField.BitLength))
+        ACPI_ROUND_BITS_UP_TO_BYTES (ObjDesc->CommonField.BitLength))
     {
         ACPI_ERROR ((AE_INFO,
             "Field size %u (bits) is too large for buffer (%u)",
@@ -811,17 +811,37 @@ AcpiExExtractFromField (
 
         return_ACPI_STATUS (AE_BUFFER_OVERFLOW);
     }
+
     ACPI_MEMSET (Buffer, 0, BufferLength);
+    AccessBitWidth = ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth);
+
+    /* Handle the simple case here */
+
+    if ((ObjDesc->CommonField.StartFieldBitOffset == 0) &&
+        (ObjDesc->CommonField.BitLength == AccessBitWidth))
+    {
+        Status = AcpiExFieldDatumIo (ObjDesc, 0, Buffer, ACPI_READ);
+        return_ACPI_STATUS (Status);
+    }
+
+/* TBD: Move to common setup code */
+
+    /* Field algorithm is limited to sizeof(UINT64), truncate if needed */
+
+    if (ObjDesc->CommonField.AccessByteWidth > sizeof (UINT64))
+    {
+        ObjDesc->CommonField.AccessByteWidth = sizeof (UINT64);
+        AccessBitWidth = sizeof (UINT64) * 8;
+    }
 
     /* Compute the number of datums (access width data items) */
 
     DatumCount = ACPI_ROUND_UP_TO (
-                        ObjDesc->CommonField.BitLength,
-                        ObjDesc->CommonField.AccessBitWidth);
+        ObjDesc->CommonField.BitLength, AccessBitWidth);
+
     FieldDatumCount = ACPI_ROUND_UP_TO (
-                        ObjDesc->CommonField.BitLength +
-                        ObjDesc->CommonField.StartFieldBitOffset,
-                        ObjDesc->CommonField.AccessBitWidth);
+        ObjDesc->CommonField.BitLength +
+        ObjDesc->CommonField.StartFieldBitOffset, AccessBitWidth);
 
     /* Priming read from the field */
 
@@ -854,12 +874,11 @@ AcpiExExtractFromField (
          * This avoids the differences in behavior between different compilers
          * concerning shift values larger than the target data width.
          */
-        if ((ObjDesc->CommonField.AccessBitWidth -
-            ObjDesc->CommonField.StartFieldBitOffset) < ACPI_INTEGER_BIT_SIZE)
+        if (AccessBitWidth - ObjDesc->CommonField.StartFieldBitOffset <
+            ACPI_INTEGER_BIT_SIZE)
         {
             MergedDatum |= RawDatum <<
-                (ObjDesc->CommonField.AccessBitWidth -
-                    ObjDesc->CommonField.StartFieldBitOffset);
+                (AccessBitWidth - ObjDesc->CommonField.StartFieldBitOffset);
         }
 
         if (i == DatumCount)
@@ -879,8 +898,7 @@ AcpiExExtractFromField (
 
     /* Mask off any extra bits in the last datum */
 
-    BufferTailBits = ObjDesc->CommonField.BitLength %
-                        ObjDesc->CommonField.AccessBitWidth;
+    BufferTailBits = ObjDesc->CommonField.BitLength % AccessBitWidth;
     if (BufferTailBits)
     {
         MergedDatum &= ACPI_MASK_BITS_ABOVE (BufferTailBits);
@@ -916,6 +934,7 @@ AcpiExInsertIntoField (
     void                    *Buffer,
     UINT32                  BufferLength)
 {
+    void                    *NewBuffer;
     ACPI_STATUS             Status;
     UINT64                  Mask;
     UINT64                  WidthMask;
@@ -926,9 +945,9 @@ AcpiExInsertIntoField (
     UINT32                  BufferTailBits;
     UINT32                  DatumCount;
     UINT32                  FieldDatumCount;
-    UINT32                  i;
+    UINT32                  AccessBitWidth;
     UINT32                  RequiredLength;
-    void                    *NewBuffer;
+    UINT32                  i;
 
 
     ACPI_FUNCTION_TRACE (ExInsertIntoField);
@@ -965,31 +984,41 @@ AcpiExInsertIntoField (
         BufferLength = RequiredLength;
     }
 
+/* TBD: Move to common setup code */
+
+    /* Algo is limited to sizeof(UINT64), so cut the AccessByteWidth */
+    if (ObjDesc->CommonField.AccessByteWidth > sizeof (UINT64))
+    {
+        ObjDesc->CommonField.AccessByteWidth = sizeof (UINT64);
+    }
+
+    AccessBitWidth = ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth);
+
     /*
      * Create the bitmasks used for bit insertion.
      * Note: This if/else is used to bypass compiler differences with the
      * shift operator
      */
-    if (ObjDesc->CommonField.AccessBitWidth == ACPI_INTEGER_BIT_SIZE)
+    if (AccessBitWidth == ACPI_INTEGER_BIT_SIZE)
     {
         WidthMask = ACPI_UINT64_MAX;
     }
     else
     {
-        WidthMask = ACPI_MASK_BITS_ABOVE (ObjDesc->CommonField.AccessBitWidth);
+        WidthMask = ACPI_MASK_BITS_ABOVE (AccessBitWidth);
     }
 
     Mask = WidthMask &
-            ACPI_MASK_BITS_BELOW (ObjDesc->CommonField.StartFieldBitOffset);
+        ACPI_MASK_BITS_BELOW (ObjDesc->CommonField.StartFieldBitOffset);
 
     /* Compute the number of datums (access width data items) */
 
     DatumCount = ACPI_ROUND_UP_TO (ObjDesc->CommonField.BitLength,
-                    ObjDesc->CommonField.AccessBitWidth);
+        AccessBitWidth);
 
     FieldDatumCount = ACPI_ROUND_UP_TO (ObjDesc->CommonField.BitLength +
-                        ObjDesc->CommonField.StartFieldBitOffset,
-                        ObjDesc->CommonField.AccessBitWidth);
+        ObjDesc->CommonField.StartFieldBitOffset,
+        AccessBitWidth);
 
     /* Get initial Datum from the input buffer */
 
@@ -1024,12 +1053,11 @@ AcpiExInsertIntoField (
          * This avoids the differences in behavior between different compilers
          * concerning shift values larger than the target data width.
          */
-        if ((ObjDesc->CommonField.AccessBitWidth -
-            ObjDesc->CommonField.StartFieldBitOffset) < ACPI_INTEGER_BIT_SIZE)
+        if ((AccessBitWidth - ObjDesc->CommonField.StartFieldBitOffset) <
+            ACPI_INTEGER_BIT_SIZE)
         {
             MergedDatum = RawDatum >>
-                (ObjDesc->CommonField.AccessBitWidth -
-                    ObjDesc->CommonField.StartFieldBitOffset);
+                (AccessBitWidth - ObjDesc->CommonField.StartFieldBitOffset);
         }
         else
         {
@@ -1048,15 +1076,15 @@ AcpiExInsertIntoField (
         BufferOffset += ObjDesc->CommonField.AccessByteWidth;
         ACPI_MEMCPY (&RawDatum, ((char *) Buffer) + BufferOffset,
             ACPI_MIN(ObjDesc->CommonField.AccessByteWidth,
-                     BufferLength - BufferOffset));
+                 BufferLength - BufferOffset));
+
         MergedDatum |= RawDatum << ObjDesc->CommonField.StartFieldBitOffset;
     }
 
     /* Mask off any extra bits in the last datum */
 
     BufferTailBits = (ObjDesc->CommonField.BitLength +
-            ObjDesc->CommonField.StartFieldBitOffset) %
-                ObjDesc->CommonField.AccessBitWidth;
+        ObjDesc->CommonField.StartFieldBitOffset) % AccessBitWidth;
     if (BufferTailBits)
     {
         Mask &= ACPI_MASK_BITS_ABOVE (BufferTailBits);

Modified: vendor-sys/acpica/dist/executer/exprep.c
==============================================================================
--- vendor-sys/acpica/dist/executer/exprep.c	Fri Aug  6 17:27:00 2010	(r210943)
+++ vendor-sys/acpica/dist/executer/exprep.c	Fri Aug  6 17:28:40 2010	(r210944)
@@ -193,12 +193,12 @@ AcpiExGenerateAccess (
     FieldByteLength    = FieldByteEndOffset - FieldByteOffset;
 
     ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-            "Bit length %u, Bit offset %u\n",
-            FieldBitLength, FieldBitOffset));
+        "Bit length %u, Bit offset %u\n",
+        FieldBitLength, FieldBitOffset));
 
     ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-            "Byte Length %u, Byte Offset %u, End Offset %u\n",
-            FieldByteLength, FieldByteOffset, FieldByteEndOffset));
+        "Byte Length %u, Byte Offset %u, End Offset %u\n",
+        FieldByteLength, FieldByteOffset, FieldByteEndOffset));
 
     /*
      * Iterative search for the maximum access width that is both aligned
@@ -228,11 +228,11 @@ AcpiExGenerateAccess (
             Accesses = FieldEndOffset - FieldStartOffset;
 
             ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-                    "AccessWidth %u end is within region\n", AccessByteWidth));
+                "AccessWidth %u end is within region\n", AccessByteWidth));
 
             ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-                    "Field Start %u, Field End %u -- requires %u accesses\n",
-                    FieldStartOffset, FieldEndOffset, Accesses));
+                "Field Start %u, Field End %u -- requires %u accesses\n",
+                FieldStartOffset, FieldEndOffset, Accesses));
 
             /* Single access is optimal */
 
@@ -261,7 +261,7 @@ AcpiExGenerateAccess (
             if (AccessByteWidth == 1)
             {
                 ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-                        "Field goes beyond end-of-region!\n"));
+                    "Field goes beyond end-of-region!\n"));
 
                 /* Field does not fit in the region at all */
 
@@ -273,8 +273,8 @@ AcpiExGenerateAccess (
              * previous access
              */
             ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-                    "Backing off to previous optimal access width of %u\n",
-                    MinimumAccessWidth));
+                "Backing off to previous optimal access width of %u\n",
+                MinimumAccessWidth));
             return_VALUE (MinimumAccessWidth);
         }
     }
@@ -284,7 +284,7 @@ AcpiExGenerateAccess (
      * just use max access width
      */
     ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-            "Cannot access field in one operation, using width 8\n"));
+        "Cannot access field in one operation, using width 8\n"));
     return_VALUE (8);
 }
 #endif /* ACPI_UNDER_DEVELOPMENT */
@@ -444,18 +444,16 @@ AcpiExPrepCommonFieldObject (
      * the same (equivalent) as the ByteAlignment.
      */
     AccessBitWidth = AcpiExDecodeFieldAccess (ObjDesc, FieldFlags,
-                                &ByteAlignment);
+                        &ByteAlignment);
     if (!AccessBitWidth)
     {
         return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
     }
 
-    /* Setup width (access granularity) fields */
+    /* Setup width (access granularity) fields (values are: 1, 2, 4, 8) */
 
     ObjDesc->CommonField.AccessByteWidth = (UINT8)
-            ACPI_DIV_8 (AccessBitWidth);            /* 1,  2,  4,  8 */
-
-    ObjDesc->CommonField.AccessBitWidth = (UINT8) AccessBitWidth;
+        ACPI_DIV_8 (AccessBitWidth);
 
     /*
      * BaseByteOffset is the address of the start of the field within the
@@ -468,9 +466,9 @@ AcpiExPrepCommonFieldObject (
      * region or buffer.
      */
     NearestByteAddress =
-            ACPI_ROUND_BITS_DOWN_TO_BYTES (FieldBitPosition);
+        ACPI_ROUND_BITS_DOWN_TO_BYTES (FieldBitPosition);
     ObjDesc->CommonField.BaseByteOffset = (UINT32)
-            ACPI_ROUND_DOWN (NearestByteAddress, ByteAlignment);
+        ACPI_ROUND_DOWN (NearestByteAddress, ByteAlignment);
 
     /*
      * StartFieldBitOffset is the offset of the first bit of the field within
@@ -502,8 +500,9 @@ AcpiExPrepFieldValue (
 {
     ACPI_OPERAND_OBJECT     *ObjDesc;
     ACPI_OPERAND_OBJECT     *SecondDesc = NULL;
-    UINT32                  Type;
     ACPI_STATUS             Status;
+    UINT32                  AccessByteWidth;
+    UINT32                  Type;
 
 
     ACPI_FUNCTION_TRACE (ExPrepFieldValue);
@@ -522,8 +521,7 @@ AcpiExPrepFieldValue (
         Type = AcpiNsGetType (Info->RegionNode);
         if (Type != ACPI_TYPE_REGION)
         {
-            ACPI_ERROR ((AE_INFO,
-                "Needed Region, found type 0x%X (%s)",
+            ACPI_ERROR ((AE_INFO, "Needed Region, found type 0x%X (%s)",
                 Type, AcpiUtGetTypeName (Type)));
 
             return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
@@ -541,8 +539,9 @@ AcpiExPrepFieldValue (
     /* Initialize areas of the object that are common to all fields */
 
     ObjDesc->CommonField.Node = Info->FieldNode;
-    Status = AcpiExPrepCommonFieldObject (ObjDesc, Info->FieldFlags,
-                Info->Attribute, Info->FieldBitPosition, Info->FieldBitLength);
+    Status = AcpiExPrepCommonFieldObject (ObjDesc,
+                Info->FieldFlags, Info->Attribute,
+                Info->FieldBitPosition, Info->FieldBitLength);
     if (ACPI_FAILURE (Status))
     {
         AcpiUtDeleteObjectDesc (ObjDesc);
@@ -557,6 +556,22 @@ AcpiExPrepFieldValue (
 
         ObjDesc->Field.RegionObj = AcpiNsGetAttachedObject (Info->RegionNode);
 
+        /* Allow full data read from EC address space */
+
+        if ((ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_EC) &&
+            (ObjDesc->CommonField.BitLength > 8))
+        {
+            AccessByteWidth = ACPI_ROUND_BITS_UP_TO_BYTES (
+                ObjDesc->CommonField.BitLength);
+
+            /* Maximum byte width supported is 255 */
+
+            if (AccessByteWidth < 256)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 17:29:54 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9C7C6106567A;
	Fri,  6 Aug 2010 17:29:54 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 70F238FC18;
	Fri,  6 Aug 2010 17:29:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76HTskK082179;
	Fri, 6 Aug 2010 17:29:54 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76HTsOX082178;
	Fri, 6 Aug 2010 17:29:54 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008061729.o76HTsOX082178@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 6 Aug 2010 17:29:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor-sys
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210945 - vendor-sys/acpica/20100806
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 17:29:54 -0000

Author: jkim
Date: Fri Aug  6 17:29:54 2010
New Revision: 210945
URL: http://svn.freebsd.org/changeset/base/210945

Log:
  Tag ACPICA 20100806.

Added:
  vendor-sys/acpica/20100806/
     - copied from r210944, vendor-sys/acpica/dist/

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 18:44:07 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F07A61065675;
	Fri,  6 Aug 2010 18:44:07 +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 DF2FE8FC13;
	Fri,  6 Aug 2010 18:44:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76Ii7va098886;
	Fri, 6 Aug 2010 18:44:07 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76Ii7dA098884;
	Fri, 6 Aug 2010 18:44:07 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201008061844.o76Ii7dA098884@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 6 Aug 2010 18:44:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210946 - head/contrib/bsnmp/snmp_mibII
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 18:44:08 -0000

Author: yongari
Date: Fri Aug  6 18:44:07 2010
New Revision: 210946
URL: http://svn.freebsd.org/changeset/base/210946

Log:
  Fix a typo introduced in r210936 which broke build.

Modified:
  head/contrib/bsnmp/snmp_mibII/mibII.c

Modified: head/contrib/bsnmp/snmp_mibII/mibII.c
==============================================================================
--- head/contrib/bsnmp/snmp_mibII/mibII.c	Fri Aug  6 17:29:54 2010	(r210945)
+++ head/contrib/bsnmp/snmp_mibII/mibII.c	Fri Aug  6 18:44:07 2010	(r210946)
@@ -843,7 +843,7 @@ check_llbcast(struct mibif *ifp)
 	  case IFT_ETHER:
 	  case IFT_FDDI:
 	  case IFT_ISO88025:
-	  case IFI_L2VLAN:
+	  case IFT_L2VLAN:
 		if (mib_find_rcvaddr(ifp->index, ether_bcast, 6) == NULL &&
 		    (rcv = mib_rcvaddr_create(ifp, ether_bcast, 6)) != NULL)
 			rcv->flags |= MIBRCVADDR_BCAST;

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 18:46:28 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3F215106566B;
	Fri,  6 Aug 2010 18:46:28 +0000 (UTC)
	(envelope-from bschmidt@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2D8708FC18;
	Fri,  6 Aug 2010 18:46:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76IkSOM099432;
	Fri, 6 Aug 2010 18:46:28 GMT (envelope-from bschmidt@svn.freebsd.org)
Received: (from bschmidt@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76IkSQi099429;
	Fri, 6 Aug 2010 18:46:28 GMT (envelope-from bschmidt@svn.freebsd.org)
Message-Id: <201008061846.o76IkSQi099429@svn.freebsd.org>
From: Bernhard Schmidt 
Date: Fri, 6 Aug 2010 18:46:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210947 - in head/sys: amd64/conf i386/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 18:46:28 -0000

Author: bschmidt
Date: Fri Aug  6 18:46:27 2010
New Revision: 210947
URL: http://svn.freebsd.org/changeset/base/210947

Log:
  Fix whitespace nits.
  
  PR:		conf/148989
  Submitted by:	pluknet 
  MFC after:	3 days

Modified:
  head/sys/amd64/conf/GENERIC
  head/sys/i386/conf/GENERIC

Modified: head/sys/amd64/conf/GENERIC
==============================================================================
--- head/sys/amd64/conf/GENERIC	Fri Aug  6 18:44:07 2010	(r210946)
+++ head/sys/amd64/conf/GENERIC	Fri Aug  6 18:46:27 2010	(r210947)
@@ -62,7 +62,7 @@ options 	KBD_INSTALL_CDEV	# install a CD
 options 	HWPMC_HOOKS		# Necessary kernel hooks for hwpmc(4)
 options 	AUDIT			# Security event auditing
 options 	MAC			# TrustedBSD MAC Framework
-options		FLOWTABLE		# per-cpu routing cache
+options 	FLOWTABLE		# per-cpu routing cache
 #options 	KDTRACE_FRAME		# Ensure frames are compiled in
 #options 	KDTRACE_HOOKS		# Kernel DTrace hooks
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel

Modified: head/sys/i386/conf/GENERIC
==============================================================================
--- head/sys/i386/conf/GENERIC	Fri Aug  6 18:44:07 2010	(r210946)
+++ head/sys/i386/conf/GENERIC	Fri Aug  6 18:46:27 2010	(r210947)
@@ -63,7 +63,7 @@ options 	KBD_INSTALL_CDEV	# install a CD
 options 	HWPMC_HOOKS		# Necessary kernel hooks for hwpmc(4)
 options 	AUDIT			# Security event auditing
 options 	MAC			# TrustedBSD MAC Framework
-options		FLOWTABLE		# per-cpu routing cache
+options 	FLOWTABLE		# per-cpu routing cache
 #options 	KDTRACE_HOOKS		# Kernel DTrace hooks
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
 

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 18:49:54 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A12C91065675;
	Fri,  6 Aug 2010 18:49:54 +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 185688FC0A;
	Fri,  6 Aug 2010 18:49:53 +0000 (UTC)
Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua
	[10.1.1.148])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o76InomL067948
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 6 Aug 2010 21:49:50 +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.4/8.14.4) with ESMTP id
	o76Inofm039204; Fri, 6 Aug 2010 21:49:50 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o76Inoh3039203; 
	Fri, 6 Aug 2010 21:49:50 +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: Fri, 6 Aug 2010 21:49:50 +0300
From: Kostik Belousov 
To: Gavin Atkinson 
Message-ID: <20100806184950.GR22295@deviant.kiev.zoral.com.ua>
References: <201008060942.o769gFm2075268@svn.freebsd.org>
	<1281109176.68747.2.camel@buffy.york.ac.uk>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="M52+6DBBqdEJXByq"
Content-Disposition: inline
In-Reply-To: <1281109176.68747.2.camel@buffy.york.ac.uk>
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=-2.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_40,
	DNS_FROM_OPENWHOIS autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r210923 - in head/sys: fs/devfs kern sys vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 18:49:54 -0000


--M52+6DBBqdEJXByq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Aug 06, 2010 at 04:39:36PM +0100, Gavin Atkinson wrote:
> On Fri, 2010-08-06 at 09:42 +0000, Konstantin Belousov wrote:
> > Author: kib
> > Date: Fri Aug  6 09:42:15 2010
> > New Revision: 210923
> > URL: http://svn.freebsd.org/changeset/base/210923
> >=20
> > Log:
> >   Add new make_dev_p(9) flag MAKEDEV_ETERNAL to inform devfs that creat=
ed
> >   cdev will never be destroyed. Propagate the flag to devfs vnodes as
> >   VV_ETERNVALDEV. Use the flags to avoid acquiring devmtx and taking a
> >   thread reference on such nodes.
>=20
> Does this flag have any effect on unmounting a devfs mount?
It should not. The flag turns off some safety measures that are used
to make sure that cdev is not destroyed while cdevsw method is active.

Do you experience some trouble after the change ?

--M52+6DBBqdEJXByq
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkxcWU0ACgkQC3+MBN1Mb4j4twCfa0DXrhcSZ3b4Rul6M2xBXREp
USIAoMHCfrc1EW7LSm4ljeQg956lIrau
=EEwO
-----END PGP SIGNATURE-----

--M52+6DBBqdEJXByq--

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 18:55:49 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D37351065672;
	Fri,  6 Aug 2010 18:55:49 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C18988FC18;
	Fri,  6 Aug 2010 18:55:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76ItndO001702;
	Fri, 6 Aug 2010 18:55:49 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76Itnlh001700;
	Fri, 6 Aug 2010 18:55:49 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008061855.o76Itnlh001700@svn.freebsd.org>
From: Bruce Cran 
Date: Fri, 6 Aug 2010 18:55:49 +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: r210948 - stable/8/lib/libc/net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 18:55:49 -0000

Author: brucec
Date: Fri Aug  6 18:55:49 2010
New Revision: 210948
URL: http://svn.freebsd.org/changeset/base/210948

Log:
  MFC r209058:
  
  sctp_recvmsg returns the number of bytes received, not sent.
  
  Approved by: rrs (mentor)

Modified:
  stable/8/lib/libc/net/sctp_recvmsg.3
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/locale/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/lib/libc/sys/   (props changed)

Modified: stable/8/lib/libc/net/sctp_recvmsg.3
==============================================================================
--- stable/8/lib/libc/net/sctp_recvmsg.3	Fri Aug  6 18:46:27 2010	(r210947)
+++ stable/8/lib/libc/net/sctp_recvmsg.3	Fri Aug  6 18:55:49 2010	(r210948)
@@ -238,7 +238,7 @@ The
 field is not used by 
 .Fn sctp_recvmsg .
 .Sh RETURN VALUES
-The call returns the number of characters sent, or -1
+The call returns the number of bytes received, or -1
 if an error occurred.
 .Sh ERRORS
 The

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 18:57:10 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 220E2106566C;
	Fri,  6 Aug 2010 18:57:10 +0000 (UTC)
	(envelope-from bschmidt@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0F09D8FC15;
	Fri,  6 Aug 2010 18:57:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76Iv9ga002042;
	Fri, 6 Aug 2010 18:57:09 GMT (envelope-from bschmidt@svn.freebsd.org)
Received: (from bschmidt@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76Iv9rm002031;
	Fri, 6 Aug 2010 18:57:09 GMT (envelope-from bschmidt@svn.freebsd.org)
Message-Id: <201008061857.o76Iv9rm002031@svn.freebsd.org>
From: Bernhard Schmidt 
Date: Fri, 6 Aug 2010 18:57:09 +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: r210949 - in stable/7: share/man/man4 sys/dev/pccard
	sys/dev/wi sys/modules/wi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 18:57:10 -0000

Author: bschmidt
Date: Fri Aug  6 18:57:09 2010
New Revision: 210949
URL: http://svn.freebsd.org/changeset/base/210949

Log:
  MFC r182236,r182238,182250,182251:
  - Add recent ELSA additions to wi(4), plus make sure the list matches
    the driver for ELSA.
  - The APDL-325 is a Wireless LAN pcmcia adapter that sits inside some
    Billion Access Points.  Fix wi(4) to recognise the adapter.
  - Remove opt_wi.h
  
  PR:		kern/77913
  Submitted by:	Daan Vreeken [PA4DAN] 

Modified:
  stable/7/share/man/man4/wi.4
  stable/7/sys/dev/pccard/pccarddevs
  stable/7/sys/dev/wi/if_wi_pccard.c
  stable/7/sys/modules/wi/Makefile
Directory Properties:
  stable/7/share/man/man4/   (props changed)
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/share/man/man4/wi.4
==============================================================================
--- stable/7/share/man/man4/wi.4	Fri Aug  6 18:55:49 2010	(r210948)
+++ stable/7/share/man/man4/wi.4	Fri Aug  6 18:57:09 2010	(r210949)
@@ -189,6 +189,9 @@ Dlink DWL650	Prism-2.5	PCMCIA
 ELECOM Air@Hawk/LD-WL11/PCC		PCMCIA
 ELSA MC-11		PCMCIA
 ELSA XI300	Prism-II	PCMCIA
+ELSA XI325	Prism-2.5	PCMCIA
+ELSA APDL325	Prism-2.5	PCMCIA
+ELSA XI330	Prism-3	PCMCIA
 ELSA XI800	Prism-II	CF
 EMTAC A2424i	Prism-II	PCMCIA
 Ericsson Wireless LAN CARD C11	Spectrum24	PCMCIA

Modified: stable/7/sys/dev/pccard/pccarddevs
==============================================================================
--- stable/7/sys/dev/pccard/pccarddevs	Fri Aug  6 18:55:49 2010	(r210948)
+++ stable/7/sys/dev/pccard/pccarddevs	Fri Aug  6 18:57:09 2010	(r210949)
@@ -320,6 +320,7 @@ product ELSA MC2_IEEE		0x0001 AirLancer 
 product ELSA XI300_IEEE		0x0002 XI300 Wireless LAN
 product ELSA XI800_IEEE		0x0004 XI800 CF Wireless LAN
 product ELSA XI325_IEEE		0x0005 XI325 Wireless LAN
+product ELSA APDL325_IEEE	0x0006 ADPL325 Wireless LAN
 product ELSA XI330_IEEE		0x0010 XI330 Wireless LAN
 product ELSA WIFI_FLASH		0x0101 802.11b plus 128MB Flash
 

Modified: stable/7/sys/dev/wi/if_wi_pccard.c
==============================================================================
--- stable/7/sys/dev/wi/if_wi_pccard.c	Fri Aug  6 18:55:49 2010	(r210948)
+++ stable/7/sys/dev/wi/if_wi_pccard.c	Fri Aug  6 18:57:09 2010	(r210949)
@@ -41,8 +41,6 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-#include "opt_wi.h"
-
 #include 
 #include 
 #include 
@@ -126,6 +124,7 @@ static const struct pccard_product wi_pc
 	PCMCIA_CARD(DLINK, DWL650H),
 	PCMCIA_CARD(ELSA, XI300_IEEE),
 	PCMCIA_CARD(ELSA, XI325_IEEE),
+	PCMCIA_CARD(ELSA, APDL325_IEEE),
 	PCMCIA_CARD(ELSA, XI330_IEEE),
 	PCMCIA_CARD(ELSA, XI800_IEEE),
 	PCMCIA_CARD(ELSA, WIFI_FLASH),

Modified: stable/7/sys/modules/wi/Makefile
==============================================================================
--- stable/7/sys/modules/wi/Makefile	Fri Aug  6 18:55:49 2010	(r210948)
+++ stable/7/sys/modules/wi/Makefile	Fri Aug  6 18:57:09 2010	(r210949)
@@ -3,12 +3,7 @@
 .PATH: ${.CURDIR}/../../dev/wi
 
 KMOD=	if_wi
-SRCS=	opt_wi.h if_wi.c if_wi_pccard.c if_wi_pci.c \
+SRCS=	if_wi.c if_wi_pccard.c if_wi_pci.c \
 	card_if.h device_if.h bus_if.h pci_if.h pccarddevs.h
 
-.if !defined(KERNBUILDDIR)
-opt_wi.h:
-	echo "#define WI_SYMBOL_FIRMWARE 1" > ${.TARGET}
-.endif
-
 .include 

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 18:57:10 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3A5491065672;
	Fri,  6 Aug 2010 18:57:10 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 288E18FC16;
	Fri,  6 Aug 2010 18:57:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76IvAuC002046;
	Fri, 6 Aug 2010 18:57:10 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76IvAwx002044;
	Fri, 6 Aug 2010 18:57:10 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008061857.o76IvAwx002044@svn.freebsd.org>
From: Bruce Cran 
Date: Fri, 6 Aug 2010 18:57:10 +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: r210950 - stable/7/lib/libc/net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 18:57:10 -0000

Author: brucec
Date: Fri Aug  6 18:57:09 2010
New Revision: 210950
URL: http://svn.freebsd.org/changeset/base/210950

Log:
  MFC r209058:
  
  sctp_recvmsg returns the number of bytes received, not sent.
  
  Approved by:	rrs (mentor)

Modified:
  stable/7/lib/libc/net/sctp_recvmsg.3
Directory Properties:
  stable/7/lib/libc/   (props changed)
  stable/7/lib/libc/stdtime/   (props changed)

Modified: stable/7/lib/libc/net/sctp_recvmsg.3
==============================================================================
--- stable/7/lib/libc/net/sctp_recvmsg.3	Fri Aug  6 18:57:09 2010	(r210949)
+++ stable/7/lib/libc/net/sctp_recvmsg.3	Fri Aug  6 18:57:09 2010	(r210950)
@@ -238,7 +238,7 @@ The
 field is not used by 
 .Fn sctp_recvmsg .
 .Sh RETURN VALUES
-The call returns the number of characters sent, or -1
+The call returns the number of bytes received, or -1
 if an error occurred.
 .Sh ERRORS
 The

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 18:59:34 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9A47A106567C;
	Fri,  6 Aug 2010 18:59:34 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 6C9DF8FC18;
	Fri,  6 Aug 2010 18:59:34 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 1389C46B8B;
	Fri,  6 Aug 2010 14:59:34 -0400 (EDT)
Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPSA id 31E8D8A03C;
	Fri,  6 Aug 2010 14:59:33 -0400 (EDT)
From: John Baldwin 
To: Pyun YongHyeon 
Date: Fri, 6 Aug 2010 14:54:20 -0400
User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; )
References: <201008061844.o76Ii7dA098884@svn.freebsd.org>
In-Reply-To: <201008061844.o76Ii7dA098884@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201008061454.20577.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Fri, 06 Aug 2010 14:59:33 -0400 (EDT)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham
	version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r210946 - head/contrib/bsnmp/snmp_mibII
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 18:59:34 -0000

On Friday, August 06, 2010 2:44:07 pm Pyun YongHyeon wrote:
> Author: yongari
> Date: Fri Aug  6 18:44:07 2010
> New Revision: 210946
> URL: http://svn.freebsd.org/changeset/base/210946
> 
> Log:
>   Fix a typo introduced in r210936 which broke build.
> 
> Modified:
>   head/contrib/bsnmp/snmp_mibII/mibII.c
> 
> Modified: head/contrib/bsnmp/snmp_mibII/mibII.c
> ==============================================================================
> --- head/contrib/bsnmp/snmp_mibII/mibII.c	Fri Aug  6 17:29:54 2010	(r210945)
> +++ head/contrib/bsnmp/snmp_mibII/mibII.c	Fri Aug  6 18:44:07 2010	(r210946)
> @@ -843,7 +843,7 @@ check_llbcast(struct mibif *ifp)
>  	  case IFT_ETHER:
>  	  case IFT_FDDI:
>  	  case IFT_ISO88025:
> -	  case IFI_L2VLAN:
> +	  case IFT_L2VLAN:
>  		if (mib_find_rcvaddr(ifp->index, ether_bcast, 6) == NULL &&
>  		    (rcv = mib_rcvaddr_create(ifp, ether_bcast, 6)) != NULL)
>  			rcv->flags |= MIBRCVADDR_BCAST;

Argh, sorry. :(

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 19:16:21 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 26D661065674;
	Fri,  6 Aug 2010 19:16:21 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EF5188FC16;
	Fri,  6 Aug 2010 19:16:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76JGKMw006370;
	Fri, 6 Aug 2010 19:16:20 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76JGK7u006368;
	Fri, 6 Aug 2010 19:16:20 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008061916.o76JGK7u006368@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 6 Aug 2010 19:16:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210951 - head/tools/regression/fstest
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 19:16:21 -0000

Author: pjd
Date: Fri Aug  6 19:16:20 2010
New Revision: 210951
URL: http://svn.freebsd.org/changeset/base/210951

Log:
  Implement two new syscalls: bind(2) and connect(2) for operating on UNIX
  domain sockets.

Modified:
  head/tools/regression/fstest/fstest.c

Modified: head/tools/regression/fstest/fstest.c
==============================================================================
--- head/tools/regression/fstest/fstest.c	Fri Aug  6 18:57:09 2010	(r210950)
+++ head/tools/regression/fstest/fstest.c	Fri Aug  6 19:16:20 2010	(r210951)
@@ -28,6 +28,8 @@
 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -63,6 +65,8 @@ enum action {
 	ACTION_SYMLINK,
 	ACTION_RENAME,
 	ACTION_MKFIFO,
+	ACTION_BIND,
+	ACTION_CONNECT,
 	ACTION_CHMOD,
 #ifdef HAS_LCHMOD
 	ACTION_LCHMOD,
@@ -110,6 +114,8 @@ static struct syscall_desc syscalls[] = 
 	{ "symlink", ACTION_SYMLINK, { TYPE_STRING, TYPE_STRING, TYPE_NONE } },
 	{ "rename", ACTION_RENAME, { TYPE_STRING, TYPE_STRING, TYPE_NONE } },
 	{ "mkfifo", ACTION_MKFIFO, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } },
+	{ "bind", ACTION_BIND, { TYPE_STRING, TYPE_NONE } },
+	{ "connect", ACTION_CONNECT, { TYPE_STRING, TYPE_NONE } },
 	{ "chmod", ACTION_CHMOD, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } },
 #ifdef HAS_LCHMOD
 	{ "lchmod", ACTION_LCHMOD, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } },
@@ -496,6 +502,32 @@ call_syscall(struct syscall_desc *scall,
 	case ACTION_MKFIFO:
 		rval = mkfifo(STR(0), (mode_t)NUM(1));
 		break;
+	case ACTION_BIND:
+	    {
+		struct sockaddr_un sun;
+
+		sun.sun_family = AF_UNIX;
+		strlcpy(sun.sun_path, STR(0), sizeof(sun.sun_path));
+		sun.sun_len = SUN_LEN(&sun);
+		rval = socket(AF_UNIX, SOCK_STREAM, 0);
+		if (rval < 0)
+			break;
+		rval = bind(rval, (struct sockaddr *)&sun, sizeof(sun));
+		break;
+	    }
+	case ACTION_CONNECT:
+	    {
+		struct sockaddr_un sun;
+
+		sun.sun_family = AF_UNIX;
+		strlcpy(sun.sun_path, STR(0), sizeof(sun.sun_path));
+		sun.sun_len = SUN_LEN(&sun);
+		rval = socket(AF_UNIX, SOCK_STREAM, 0);
+		if (rval < 0)
+			break;
+		rval = connect(rval, (struct sockaddr *)&sun, sizeof(sun));
+		break;
+	    }
 	case ACTION_CHMOD:
 		rval = chmod(STR(0), (mode_t)NUM(1));
 		break;

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 19:16:49 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4BFF6106566B;
	Fri,  6 Aug 2010 19:16:49 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3AA2D8FC23;
	Fri,  6 Aug 2010 19:16:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76JGnP8006502;
	Fri, 6 Aug 2010 19:16:49 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76JGnGB006500;
	Fri, 6 Aug 2010 19:16:49 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008061916.o76JGnGB006500@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 6 Aug 2010 19:16:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210952 - head/tools/regression/fstest
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 19:16:49 -0000

Author: pjd
Date: Fri Aug  6 19:16:48 2010
New Revision: 210952
URL: http://svn.freebsd.org/changeset/base/210952

Log:
  Add missing -U argument to usage.

Modified:
  head/tools/regression/fstest/fstest.c

Modified: head/tools/regression/fstest/fstest.c
==============================================================================
--- head/tools/regression/fstest/fstest.c	Fri Aug  6 19:16:20 2010	(r210951)
+++ head/tools/regression/fstest/fstest.c	Fri Aug  6 19:16:48 2010	(r210952)
@@ -257,7 +257,7 @@ static void
 usage(void)
 {
 
-	fprintf(stderr, "usage: fstest [-u uid] [-g gid1[,gid2[...]]] syscall args ...\n");
+	fprintf(stderr, "usage: fstest [-U umask] [-u uid] [-g gid1[,gid2[...]]] syscall args ...\n");
 	exit(1);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 19:18:19 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 98F20106566C;
	Fri,  6 Aug 2010 19:18:19 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 87AC08FC08;
	Fri,  6 Aug 2010 19:18:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76JIJmB006888;
	Fri, 6 Aug 2010 19:18:19 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76JIJq2006886;
	Fri, 6 Aug 2010 19:18:19 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008061918.o76JIJq2006886@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 6 Aug 2010 19:18:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210953 - head/tools/regression/fstest/tests/open
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 19:18:19 -0000

Author: pjd
Date: Fri Aug  6 19:18:19 2010
New Revision: 210953
URL: http://svn.freebsd.org/changeset/base/210953

Log:
  Make description readable.

Modified:
  head/tools/regression/fstest/tests/open/13.t

Modified: head/tools/regression/fstest/tests/open/13.t
==============================================================================
--- head/tools/regression/fstest/tests/open/13.t	Fri Aug  6 19:16:48 2010	(r210952)
+++ head/tools/regression/fstest/tests/open/13.t	Fri Aug  6 19:18:19 2010	(r210953)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # $FreeBSD$
 
-desc="open returns EISDIR when he named file is a directory, and the arguments specify it is to be modified"
+desc="open returns EISDIR when trying to open a directory for writing"
 
 dir=`dirname $0`
 . ${dir}/../misc.sh

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 19:19:14 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9C146106564A;
	Fri,  6 Aug 2010 19:19:14 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8ACAB8FC12;
	Fri,  6 Aug 2010 19:19:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76JJENo007124;
	Fri, 6 Aug 2010 19:19:14 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76JJELQ007122;
	Fri, 6 Aug 2010 19:19:14 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008061919.o76JJELQ007122@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 6 Aug 2010 19:19:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210954 - head/tools/regression/fstest/tests/open
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 19:19:14 -0000

Author: pjd
Date: Fri Aug  6 19:19:14 2010
New Revision: 210954
URL: http://svn.freebsd.org/changeset/base/210954

Log:
  Test O_RDONLY|O_RDWR flags as potentially invalid.

Modified:
  head/tools/regression/fstest/tests/open/23.t

Modified: head/tools/regression/fstest/tests/open/23.t
==============================================================================
--- head/tools/regression/fstest/tests/open/23.t	Fri Aug  6 19:18:19 2010	(r210953)
+++ head/tools/regression/fstest/tests/open/23.t	Fri Aug  6 19:19:14 2010	(r210954)
@@ -6,11 +6,12 @@ desc="open may return EINVAL when an att
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
-echo "1..4"
+echo "1..5"
 
 n0=`namegen`
 
 expect 0 create ${n0} 0644
+expect "0|EINVAL" open ${n0} O_RDONLY,O_RDWR
 expect "0|EINVAL" open ${n0} O_WRONLY,O_RDWR
 expect "0|EINVAL" open ${n0} O_RDONLY,O_WRONLY,O_RDWR
 expect 0 unlink ${n0}

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 19:20:36 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1B2EC1065670;
	Fri,  6 Aug 2010 19:20:36 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 09CD68FC1A;
	Fri,  6 Aug 2010 19:20:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76JKZU7007468;
	Fri, 6 Aug 2010 19:20:35 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76JKZR6007466;
	Fri, 6 Aug 2010 19:20:35 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008061920.o76JKZR6007466@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 6 Aug 2010 19:20:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210955 - head/tools/regression/fstest/tests/open
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 19:20:36 -0000

Author: pjd
Date: Fri Aug  6 19:20:35 2010
New Revision: 210955
URL: http://svn.freebsd.org/changeset/base/210955

Log:
  Test for EACCES also when opening FIFO or directory.

Modified:
  head/tools/regression/fstest/tests/open/06.t

Modified: head/tools/regression/fstest/tests/open/06.t
==============================================================================
--- head/tools/regression/fstest/tests/open/06.t	Fri Aug  6 19:19:14 2010	(r210954)
+++ head/tools/regression/fstest/tests/open/06.t	Fri Aug  6 19:20:35 2010	(r210955)
@@ -6,7 +6,7 @@ desc="open returns EACCES when the requi
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
-echo "1..65"
+echo "1..144"
 
 n0=`namegen`
 n1=`namegen`
@@ -16,47 +16,104 @@ expect 0 chown ${n0} 65534 65534
 cdir=`pwd`
 cd ${n0}
 
+# Regular file.
+
 expect 0 -u 65534 -g 65534 create ${n1} 0644
 
 expect 0 -u 65534 -g 65534 chmod ${n1} 0600
-expect 0 -u 65534 -g 65534 open ${n1} O_RDONLY
-expect 0 -u 65534 -g 65534 open ${n1} O_WRONLY
-expect 0 -u 65534 -g 65534 open ${n1} O_RDWR
+expect 0 -u 65534 -g 65534 open ${n1} O_RDONLY,
+expect 0 -u 65534 -g 65534 open ${n1} O_WRONLY,
+expect 0 -u 65534 -g 65534 open ${n1} O_RDWR,
 expect 0 -u 65534 -g 65534 chmod ${n1} 0060
-expect 0 -u 65533 -g 65534 open ${n1} O_RDONLY
-expect 0 -u 65533 -g 65534 open ${n1} O_WRONLY
-expect 0 -u 65533 -g 65534 open ${n1} O_RDWR
+expect 0 -u 65533 -g 65534 open ${n1} O_RDONLY,
+expect 0 -u 65533 -g 65534 open ${n1} O_WRONLY,
+expect 0 -u 65533 -g 65534 open ${n1} O_RDWR,
 expect 0 -u 65534 -g 65534 chmod ${n1} 0006
-expect 0 -u 65533 -g 65533 open ${n1} O_RDONLY
-expect 0 -u 65533 -g 65533 open ${n1} O_WRONLY
-expect 0 -u 65533 -g 65533 open ${n1} O_RDWR
+expect 0 -u 65533 -g 65533 open ${n1} O_RDONLY,
+expect 0 -u 65533 -g 65533 open ${n1} O_WRONLY,
+expect 0 -u 65533 -g 65533 open ${n1} O_RDWR,
 
 expect 0 -u 65534 -g 65534 chmod ${n1} 0477
-expect 0 -u 65534 -g 65534 open ${n1} O_RDONLY
+expect 0 -u 65534 -g 65534 open ${n1} O_RDONLY,
+expect EACCES -u 65534 -g 65534 open ${n1} O_WRONLY,
+expect EACCES -u 65534 -g 65534 open ${n1} O_RDWR,
+expect 0 -u 65534 -g 65534 chmod ${n1} 0747
+expect 0 -u 65533 -g 65534 open ${n1} O_RDONLY,
+expect EACCES -u 65533 -g 65534 open ${n1} O_WRONLY,
+expect EACCES -u 65533 -g 65534 open ${n1} O_RDWR,
+expect 0 -u 65534 -g 65534 chmod ${n1} 0774
+expect 0 -u 65533 -g 65533 open ${n1} O_RDONLY,
+expect EACCES -u 65533 -g 65533 open ${n1} O_WRONLY,
+expect EACCES -u 65533 -g 65533 open ${n1} O_RDWR,
+
+expect 0 -u 65534 -g 65534 chmod ${n1} 0277
+expect EACCES -u 65534 -g 65534 open ${n1} O_RDONLY,
+expect 0 -u 65534 -g 65534 open ${n1} O_WRONLY,
+expect EACCES -u 65534 -g 65534 open ${n1} O_RDWR,
+expect 0 -u 65534 -g 65534 chmod ${n1} 0727
+expect EACCES -u 65533 -g 65534 open ${n1} O_RDONLY,
+expect 0 -u 65533 -g 65534 open ${n1} O_WRONLY,
+expect EACCES -u 65533 -g 65534 open ${n1} O_RDWR,
+expect 0 -u 65534 -g 65534 chmod ${n1} 0772
+expect EACCES -u 65533 -g 65533 open ${n1} O_RDONLY,
+expect 0 -u 65533 -g 65533 open ${n1} O_WRONLY,
+expect EACCES -u 65533 -g 65533 open ${n1} O_RDWR,
+
+expect 0 -u 65534 -g 65534 chmod ${n1} 0177
+expect EACCES -u 65534 -g 65534 open ${n1} O_RDONLY,
+expect EACCES -u 65534 -g 65534 open ${n1} O_WRONLY,
+expect EACCES -u 65534 -g 65534 open ${n1} O_RDWR,
+expect 0 -u 65534 -g 65534 chmod ${n1} 0717
+expect EACCES -u 65533 -g 65534 open ${n1} O_RDONLY,
+expect EACCES -u 65533 -g 65534 open ${n1} O_WRONLY,
+expect EACCES -u 65533 -g 65534 open ${n1} O_RDWR,
+expect 0 -u 65534 -g 65534 chmod ${n1} 0771
+expect EACCES -u 65533 -g 65533 open ${n1} O_RDONLY,
+expect EACCES -u 65533 -g 65533 open ${n1} O_WRONLY,
+expect EACCES -u 65533 -g 65533 open ${n1} O_RDWR,
+
+expect 0 -u 65534 -g 65534 chmod ${n1} 0077
+expect EACCES -u 65534 -g 65534 open ${n1} O_RDONLY,
+expect EACCES -u 65534 -g 65534 open ${n1} O_WRONLY,
+expect EACCES -u 65534 -g 65534 open ${n1} O_RDWR,
+expect 0 -u 65534 -g 65534 chmod ${n1} 0707
+expect EACCES -u 65533 -g 65534 open ${n1} O_RDONLY,
+expect EACCES -u 65533 -g 65534 open ${n1} O_WRONLY,
+expect EACCES -u 65533 -g 65534 open ${n1} O_RDWR,
+expect 0 -u 65534 -g 65534 chmod ${n1} 0770
+expect EACCES -u 65533 -g 65533 open ${n1} O_RDONLY,
+expect EACCES -u 65533 -g 65533 open ${n1} O_WRONLY,
+expect EACCES -u 65533 -g 65533 open ${n1} O_RDWR,
+
+expect 0 -u 65534 -g 65534 unlink ${n1}
+
+# FIFO.
+
+expect 0 -u 65534 -g 65534 mkfifo ${n1} 0644
+
+expect 0 -u 65534 -g 65534 chmod ${n1} 0600
+expect 0 -u 65534 -g 65534 open ${n1} O_RDONLY,O_NONBLOCK
+expect 0 -u 65534 -g 65534 open ${n1} O_RDWR,O_NONBLOCK
+expect 0 -u 65534 -g 65534 chmod ${n1} 0060
+expect 0 -u 65533 -g 65534 open ${n1} O_RDONLY,O_NONBLOCK
+expect 0 -u 65533 -g 65534 open ${n1} O_RDWR,O_NONBLOCK
+expect 0 -u 65534 -g 65534 chmod ${n1} 0006
+expect 0 -u 65533 -g 65533 open ${n1} O_RDONLY,O_NONBLOCK
+expect 0 -u 65533 -g 65533 open ${n1} O_RDWR,O_NONBLOCK
+
+expect 0 -u 65534 -g 65534 chmod ${n1} 0477
+expect 0 -u 65534 -g 65534 open ${n1} O_RDONLY,O_NONBLOCK
 expect EACCES -u 65534 -g 65534 open ${n1} O_WRONLY
 expect EACCES -u 65534 -g 65534 open ${n1} O_RDWR
 expect 0 -u 65534 -g 65534 chmod ${n1} 0747
-expect 0 -u 65533 -g 65534 open ${n1} O_RDONLY
+expect 0 -u 65533 -g 65534 open ${n1} O_RDONLY,O_NONBLOCK
 expect EACCES -u 65533 -g 65534 open ${n1} O_WRONLY
 expect EACCES -u 65533 -g 65534 open ${n1} O_RDWR
 expect 0 -u 65534 -g 65534 chmod ${n1} 0774
-expect 0 -u 65533 -g 65533 open ${n1} O_RDONLY
+expect 0 -u 65533 -g 65533 open ${n1} O_RDONLY,O_NONBLOCK
 expect EACCES -u 65533 -g 65533 open ${n1} O_WRONLY
 expect EACCES -u 65533 -g 65533 open ${n1} O_RDWR
 
-expect 0 -u 65534 -g 65534 chmod ${n1} 0277
-expect EACCES -u 65534 -g 65534 open ${n1} O_RDONLY
-expect 0 -u 65534 -g 65534 open ${n1} O_WRONLY
-expect EACCES -u 65534 -g 65534 open ${n1} O_RDWR
-expect 0 -u 65534 -g 65534 chmod ${n1} 0727
-expect EACCES -u 65533 -g 65534 open ${n1} O_RDONLY
-expect 0 -u 65533 -g 65534 open ${n1} O_WRONLY
-expect EACCES -u 65533 -g 65534 open ${n1} O_RDWR
-expect 0 -u 65534 -g 65534 chmod ${n1} 0772
-expect EACCES -u 65533 -g 65533 open ${n1} O_RDONLY
-expect 0 -u 65533 -g 65533 open ${n1} O_WRONLY
-expect EACCES -u 65533 -g 65533 open ${n1} O_RDWR
-
 expect 0 -u 65534 -g 65534 chmod ${n1} 0177
 expect EACCES -u 65534 -g 65534 open ${n1} O_RDONLY
 expect EACCES -u 65534 -g 65534 open ${n1} O_WRONLY
@@ -85,5 +142,46 @@ expect EACCES -u 65533 -g 65533 open ${n
 
 expect 0 -u 65534 -g 65534 unlink ${n1}
 
+# Directory.
+
+expect 0 -u 65534 -g 65534 mkdir ${n1} 0755
+
+expect 0 -u 65534 -g 65534 chmod ${n1} 0600
+expect 0 -u 65534 -g 65534 open ${n1} O_RDONLY
+expect 0 -u 65534 -g 65534 chmod ${n1} 0060
+expect 0 -u 65533 -g 65534 open ${n1} O_RDONLY
+expect 0 -u 65534 -g 65534 chmod ${n1} 0006
+expect 0 -u 65533 -g 65533 open ${n1} O_RDONLY
+
+expect 0 -u 65534 -g 65534 chmod ${n1} 0477
+expect 0 -u 65534 -g 65534 open ${n1} O_RDONLY
+expect 0 -u 65534 -g 65534 chmod ${n1} 0747
+expect 0 -u 65533 -g 65534 open ${n1} O_RDONLY
+expect 0 -u 65534 -g 65534 chmod ${n1} 0774
+expect 0 -u 65533 -g 65533 open ${n1} O_RDONLY
+
+expect 0 -u 65534 -g 65534 chmod ${n1} 0277
+expect EACCES -u 65534 -g 65534 open ${n1} O_RDONLY
+expect 0 -u 65534 -g 65534 chmod ${n1} 0727
+expect EACCES -u 65533 -g 65534 open ${n1} O_RDONLY
+expect 0 -u 65534 -g 65534 chmod ${n1} 0772
+expect EACCES -u 65533 -g 65533 open ${n1} O_RDONLY
+
+expect 0 -u 65534 -g 65534 chmod ${n1} 0177
+expect EACCES -u 65534 -g 65534 open ${n1} O_RDONLY
+expect 0 -u 65534 -g 65534 chmod ${n1} 0717
+expect EACCES -u 65533 -g 65534 open ${n1} O_RDONLY
+expect 0 -u 65534 -g 65534 chmod ${n1} 0771
+expect EACCES -u 65533 -g 65533 open ${n1} O_RDONLY
+
+expect 0 -u 65534 -g 65534 chmod ${n1} 0077
+expect EACCES -u 65534 -g 65534 open ${n1} O_RDONLY
+expect 0 -u 65534 -g 65534 chmod ${n1} 0707
+expect EACCES -u 65533 -g 65534 open ${n1} O_RDONLY
+expect 0 -u 65534 -g 65534 chmod ${n1} 0770
+expect EACCES -u 65533 -g 65533 open ${n1} O_RDONLY
+
+expect 0 -u 65534 -g 65534 rmdir ${n1}
+
 cd ${cdir}
 expect 0 rmdir ${n0}

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 19:22:43 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 03FB6106567A;
	Fri,  6 Aug 2010 19:22:43 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E6D4C8FC1F;
	Fri,  6 Aug 2010 19:22:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76JMgfp008054;
	Fri, 6 Aug 2010 19:22:42 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76JMgw5008052;
	Fri, 6 Aug 2010 19:22:42 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008061922.o76JMgw5008052@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 6 Aug 2010 19:22:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210956 - head/tools/regression/fstest/tests/open
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 19:22:43 -0000

Author: pjd
Date: Fri Aug  6 19:22:42 2010
New Revision: 210956
URL: http://svn.freebsd.org/changeset/base/210956

Log:
  open(2) returns EOPNOTSUPP when trying to open a socket.

Added:
  head/tools/regression/fstest/tests/open/24.t   (contents, props changed)

Added: head/tools/regression/fstest/tests/open/24.t
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/fstest/tests/open/24.t	Fri Aug  6 19:22:42 2010	(r210956)
@@ -0,0 +1,17 @@
+#!/bin/sh
+# $FreeBSD$
+
+desc="open returns EOPNOTSUPP when trying to open UNIX domain socket"
+
+dir=`dirname $0`
+. ${dir}/../misc.sh
+
+echo "1..5"
+
+n0=`namegen`
+
+expect 0 bind ${n0}
+expect "EOPNOTSUPP" open ${n0} O_RDONLY
+expect "EOPNOTSUPP" open ${n0} O_WRONLY
+expect "EOPNOTSUPP" open ${n0} O_RDWR
+expect 0 unlink ${n0}

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 19:35:40 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 76379106566B;
	Fri,  6 Aug 2010 19:35:40 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6545E8FC12;
	Fri,  6 Aug 2010 19:35:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76JZeVu010958;
	Fri, 6 Aug 2010 19:35:40 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76JZeaW010956;
	Fri, 6 Aug 2010 19:35:40 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201008061935.o76JZeaW010956@svn.freebsd.org>
From: Ed Schouten 
Date: Fri, 6 Aug 2010 19:35:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210957 - head/include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 19:35:40 -0000

Author: ed
Date: Fri Aug  6 19:35:40 2010
New Revision: 210957
URL: http://svn.freebsd.org/changeset/base/210957

Log:
  Remove stale reference to UT_NAMESIZE from .
  
  Spotted by:	bde@

Modified:
  head/include/stdio.h

Modified: head/include/stdio.h
==============================================================================
--- head/include/stdio.h	Fri Aug  6 19:22:42 2010	(r210956)
+++ head/include/stdio.h	Fri Aug  6 19:35:40 2010	(r210957)
@@ -285,8 +285,7 @@ int	 vsscanf(const char * __restrict, co
  * Functions defined in all versions of POSIX 1003.1.
  */
 #if __BSD_VISIBLE || __POSIX_VISIBLE <= 199506
-/* size for cuserid(3); UT_NAMESIZE + 1, see  */
-#define	L_cuserid	17	/* legacy */
+#define	L_cuserid	17	/* size for cuserid(3); MAXLOGNAME, legacy */
 #endif
 
 #if __POSIX_VISIBLE

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 20:13:36 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9B07B106566B;
	Fri,  6 Aug 2010 20:13:36 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6ED818FC0A;
	Fri,  6 Aug 2010 20:13:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76KDaZ0019443;
	Fri, 6 Aug 2010 20:13:36 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76KDaRf019440;
	Fri, 6 Aug 2010 20:13:36 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201008062013.o76KDaRf019440@svn.freebsd.org>
From: Ed Schouten 
Date: Fri, 6 Aug 2010 20:13:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210958 - in head: . lib/libcompat lib/libcompat/4.1
	lib/libcompat/4.3
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 20:13:36 -0000

Author: ed
Date: Fri Aug  6 20:13:36 2010
New Revision: 210958
URL: http://svn.freebsd.org/changeset/base/210958

Log:
  Remove unneeded functions from libcompat.
  
  Erwin fired up a ports build a couple of weeks ago and it seems the
  following functions are not used by any of the 20k ports we have, which
  makes me believe they don't have any purpose. Just remove them.

Deleted:
  head/lib/libcompat/4.1/ascftime.c
  head/lib/libcompat/4.1/cftime.3
  head/lib/libcompat/4.1/cftime.c
  head/lib/libcompat/4.1/getpw.3
  head/lib/libcompat/4.1/getpw.c
  head/lib/libcompat/4.3/cfree.3
  head/lib/libcompat/4.3/cfree.c
Modified:
  head/ObsoleteFiles.inc
  head/lib/libcompat/Makefile

Modified: head/ObsoleteFiles.inc
==============================================================================
--- head/ObsoleteFiles.inc	Fri Aug  6 19:35:40 2010	(r210957)
+++ head/ObsoleteFiles.inc	Fri Aug  6 20:13:36 2010	(r210958)
@@ -14,6 +14,11 @@
 # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
 #
 
+# 20100806: removal of unused libcompat routines
+OLD_FILES+=usr/share/man/man3/ascftime.3.gz
+OLD_FILES+=usr/share/man/man3/cfree.3.gz
+OLD_FILES+=usr/share/man/man3/cftime.3.gz
+OLD_FILES+=usr/share/man/man3/getpw.3.gz
 # 20100725: acpi_aiboost(4) removal.
 OLD_FILES+=usr/share/man/man4/acpi_aiboost.4.gz
 # 20100720: new clang import which bumps version from 2.0 to 2.8

Modified: head/lib/libcompat/Makefile
==============================================================================
--- head/lib/libcompat/Makefile	Fri Aug  6 19:35:40 2010	(r210957)
+++ head/lib/libcompat/Makefile	Fri Aug  6 20:13:36 2010	(r210958)
@@ -10,17 +10,14 @@ WARNS?=	0
 .PATH:	${.CURDIR}/4.1 ${.CURDIR}/4.3 ${.CURDIR}/4.4
 
 # compat 4.1 sources
-SRCS+=	ascftime.c cftime.c ftime.c getpw.c
+SRCS+=	ftime.c
 
-MAN+=	4.1/ftime.3 4.1/getpw.3
-MAN+=	4.1/cftime.3
-
-MLINKS+=cftime.3 ascftime.3
+MAN+=	4.1/ftime.3
 
 # compat 4.3 sources
-SRCS+=	cfree.c re_comp.c rexec.c
+SRCS+=	re_comp.c rexec.c
 
-MAN+=	4.3/cfree.3 4.3/re_comp.3 4.3/rexec.3
+MAN+=	4.3/re_comp.3 4.3/rexec.3
 
 MLINKS+=re_comp.3 re_exec.3
 

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 20:18:17 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F34FE106564A;
	Fri,  6 Aug 2010 20:18:16 +0000 (UTC)
	(envelope-from bschmidt@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E216D8FC19;
	Fri,  6 Aug 2010 20:18:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76KIGB4020522;
	Fri, 6 Aug 2010 20:18:16 GMT (envelope-from bschmidt@svn.freebsd.org)
Received: (from bschmidt@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76KIGA0020520;
	Fri, 6 Aug 2010 20:18:16 GMT (envelope-from bschmidt@svn.freebsd.org)
Message-Id: <201008062018.o76KIGA0020520@svn.freebsd.org>
From: Bernhard Schmidt 
Date: Fri, 6 Aug 2010 20:18:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210959 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 20:18:17 -0000

Author: bschmidt
Date: Fri Aug  6 20:18:16 2010
New Revision: 210959
URL: http://svn.freebsd.org/changeset/base/210959

Log:
  Obviously the option is known as COMPAT_LINUX32 on amd64.
  
  PR:		docs/149182
  Pointed out by:	Fernando 
  MFC after:	3 days

Modified:
  head/share/man/man4/linux.4

Modified: head/share/man/man4/linux.4
==============================================================================
--- head/share/man/man4/linux.4	Fri Aug  6 20:13:36 2010	(r210958)
+++ head/share/man/man4/linux.4	Fri Aug  6 20:18:16 2010	(r210959)
@@ -31,13 +31,18 @@
 .Nm linux
 .Nd Linux ABI support
 .Sh SYNOPSIS
-To compile support for this ABI into the kernel,
+To compile support for this ABI into an i386 kernel
 place the following line in your
 kernel configuration file:
 .Bd -ragged -offset indent
 .Cd "options COMPAT_LINUX"
 .Ed
 .Pp
+for an amd64 kernel use:
+.Bd -ragged -offset indent
+.Cd "options COMPAT_LINUX32"
+.Ed
+.Pp
 Alternatively, to load the ABI as a
 module at boot time, place the following line in
 .Xr loader.conf 5 :

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 20:18:27 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AD000106577C;
	Fri,  6 Aug 2010 20:18:27 +0000 (UTC)
	(envelope-from emax@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 99C228FC0C;
	Fri,  6 Aug 2010 20:18:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76KIRs2020626;
	Fri, 6 Aug 2010 20:18:27 GMT (envelope-from emax@svn.freebsd.org)
Received: (from emax@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76KIR3U020624;
	Fri, 6 Aug 2010 20:18:27 GMT (envelope-from emax@svn.freebsd.org)
Message-Id: <201008062018.o76KIR3U020624@svn.freebsd.org>
From: Maksim Yevmenkin 
Date: Fri, 6 Aug 2010 20:18: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: r210960 - stable/8/sys/netgraph/bluetooth/l2cap
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 20:18:27 -0000

Author: emax
Date: Fri Aug  6 20:18:27 2010
New Revision: 210960
URL: http://svn.freebsd.org/changeset/base/210960

Log:
  MFC r210783. Fix typo
  
  PR:		kern/140590

Modified:
  stable/8/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h
==============================================================================
--- stable/8/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h	Fri Aug  6 20:18:16 2010	(r210959)
+++ stable/8/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h	Fri Aug  6 20:18:27 2010	(r210960)
@@ -379,7 +379,7 @@ do {									\
 		break;							\
 									\
 	c = mtod((_m), struct _info_rsp *);				\
-	c->hdr.code = NG_L2CAP_INFO_REQ;				\
+	c->hdr.code = NG_L2CAP_INFO_RSP;				\
 	c->hdr.ident = (_ident);					\
 	c->hdr.length = sizeof(c->param);				\
 									\

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 20:46:26 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F26661065674;
	Fri,  6 Aug 2010 20:46:26 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E134E8FC1D;
	Fri,  6 Aug 2010 20:46:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76KkQd8026986;
	Fri, 6 Aug 2010 20:46:26 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76KkQ2i026984;
	Fri, 6 Aug 2010 20:46:26 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008062046.o76KkQ2i026984@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 6 Aug 2010 20:46:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210964 - head/tools/regression/fstest
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 20:46:27 -0000

Author: pjd
Date: Fri Aug  6 20:46:26 2010
New Revision: 210964
URL: http://svn.freebsd.org/changeset/base/210964

Log:
  Sort includes.

Modified:
  head/tools/regression/fstest/fstest.c

Modified: head/tools/regression/fstest/fstest.c
==============================================================================
--- head/tools/regression/fstest/fstest.c	Fri Aug  6 20:46:06 2010	(r210963)
+++ head/tools/regression/fstest/fstest.c	Fri Aug  6 20:46:26 2010	(r210964)
@@ -30,15 +30,16 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
+
+#include 
+#include 
+#include 
 #include 
 #include 
+#include 
+#include 
 #include 
-#include 
-#include 
-#include 
+#include 
 
 #ifndef HAS_TRUNCATE64
 #define	truncate64	truncate

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 20:48:10 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DED411065676;
	Fri,  6 Aug 2010 20:48:10 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B344C8FC16;
	Fri,  6 Aug 2010 20:48:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76KmAcL027393;
	Fri, 6 Aug 2010 20:48:10 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76KmACk027391;
	Fri, 6 Aug 2010 20:48:10 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008062048.o76KmACk027391@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 6 Aug 2010 20:48:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210965 - head/tools/regression/fstest
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 20:48:11 -0000

Author: pjd
Date: Fri Aug  6 20:48:10 2010
New Revision: 210965
URL: http://svn.freebsd.org/changeset/base/210965

Log:
  Add mknod(2) support.
  
  Submitted by:	Jan Senolt 
  Submitted by:	Milan Cermak 

Modified:
  head/tools/regression/fstest/fstest.c

Modified: head/tools/regression/fstest/fstest.c
==============================================================================
--- head/tools/regression/fstest/fstest.c	Fri Aug  6 20:46:26 2010	(r210964)
+++ head/tools/regression/fstest/fstest.c	Fri Aug  6 20:48:10 2010	(r210965)
@@ -27,9 +27,13 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
+#ifndef makedev
+#include 
+#endif
 
 #include 
 #include 
@@ -66,6 +70,7 @@ enum action {
 	ACTION_SYMLINK,
 	ACTION_RENAME,
 	ACTION_MKFIFO,
+	ACTION_MKNOD,
 	ACTION_BIND,
 	ACTION_CONNECT,
 	ACTION_CHMOD,
@@ -115,6 +120,7 @@ static struct syscall_desc syscalls[] = 
 	{ "symlink", ACTION_SYMLINK, { TYPE_STRING, TYPE_STRING, TYPE_NONE } },
 	{ "rename", ACTION_RENAME, { TYPE_STRING, TYPE_STRING, TYPE_NONE } },
 	{ "mkfifo", ACTION_MKFIFO, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } },
+	{ "mknod", ACTION_MKNOD, { TYPE_STRING, TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE} },
 	{ "bind", ACTION_BIND, { TYPE_STRING, TYPE_NONE } },
 	{ "connect", ACTION_CONNECT, { TYPE_STRING, TYPE_NONE } },
 	{ "chmod", ACTION_CHMOD, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } },
@@ -359,6 +365,10 @@ show_stat(struct stat64 *sp, const char 
 	else if (strcmp(what, "flags") == 0)
 		printf("%s", flags2str(chflags_flags, (long long)sp->st_flags));
 #endif
+	else if (strcmp(what, "major") == 0)
+		printf("%u", (unsigned int)major(sp->st_rdev));
+	else if (strcmp(what, "minor") == 0)
+		printf("%u", (unsigned int)minor(sp->st_rdev));
 	else if (strcmp(what, "type") == 0) {
 		switch (sp->st_mode & S_IFMT) {
 		case S_IFIFO:
@@ -503,6 +513,29 @@ call_syscall(struct syscall_desc *scall,
 	case ACTION_MKFIFO:
 		rval = mkfifo(STR(0), (mode_t)NUM(1));
 		break;
+	case ACTION_MKNOD:
+	    {
+		mode_t ntype;
+		dev_t dev;
+
+		dev = makedev(NUM(3), NUM(4));
+		if (strcmp(STR(1), "c") == 0)		/* character device */
+			ntype = S_IFCHR;
+		else if (strcmp(STR(1), "b") == 0)	/* block device */
+			ntype = S_IFBLK;
+		else if (strcmp(STR(1), "f") == 0)	/* fifo special */
+			ntype = S_IFIFO;
+		else if (strcmp(STR(1), "d") == 0)	/* directory */
+			ntype = S_IFDIR;
+		else if (strcmp(STR(1), "o") == 0)	/* regular file */
+			ntype = S_IFREG;
+		else {
+			fprintf(stderr, "wrong argument 1\n");
+			exit(1);
+		}
+		rval = mknod(STR(0), ntype | NUM(2), dev);
+		break;
+	    }
 	case ACTION_BIND:
 	    {
 		struct sockaddr_un sun;

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 20:51:39 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 628271065672;
	Fri,  6 Aug 2010 20:51:39 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 500818FC0C;
	Fri,  6 Aug 2010 20:51:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76KpdU5028316;
	Fri, 6 Aug 2010 20:51:39 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76KpdI4028304;
	Fri, 6 Aug 2010 20:51:39 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008062051.o76KpdI4028304@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 6 Aug 2010 20:51:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210967 - head/tools/regression/fstest/tests/mknod
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 20:51:39 -0000

Author: pjd
Date: Fri Aug  6 20:51:39 2010
New Revision: 210967
URL: http://svn.freebsd.org/changeset/base/210967

Log:
  Add tests for mknod(2).
  
  Submitted by:	Jan Senolt 
  Submitted by:	Milan Cermak 
  Polished by:	pjd

Added:
  head/tools/regression/fstest/tests/mknod/
  head/tools/regression/fstest/tests/mknod/00.t   (contents, props changed)
  head/tools/regression/fstest/tests/mknod/01.t   (contents, props changed)
  head/tools/regression/fstest/tests/mknod/02.t   (contents, props changed)
  head/tools/regression/fstest/tests/mknod/03.t   (contents, props changed)
  head/tools/regression/fstest/tests/mknod/04.t   (contents, props changed)
  head/tools/regression/fstest/tests/mknod/05.t   (contents, props changed)
  head/tools/regression/fstest/tests/mknod/06.t   (contents, props changed)
  head/tools/regression/fstest/tests/mknod/07.t   (contents, props changed)
  head/tools/regression/fstest/tests/mknod/08.t   (contents, props changed)
  head/tools/regression/fstest/tests/mknod/09.t   (contents, props changed)
  head/tools/regression/fstest/tests/mknod/10.t   (contents, props changed)
  head/tools/regression/fstest/tests/mknod/11.t   (contents, props changed)

Added: head/tools/regression/fstest/tests/mknod/00.t
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/fstest/tests/mknod/00.t	Fri Aug  6 20:51:39 2010	(r210967)
@@ -0,0 +1,73 @@
+#!/bin/sh
+# $FreeBSD$
+
+desc="mknod creates fifo files"
+
+dir=`dirname $0`
+. ${dir}/../misc.sh
+
+echo "1..36"
+
+n0=`namegen`
+n1=`namegen`
+
+expect 0 mkdir ${n1} 0755
+cdir=`pwd`
+cd ${n1}
+
+# POSIX: The file permission bits of the new FIFO shall be initialized from
+# mode. The file permission bits of the mode argument shall be modified by the
+# process' file creation mask.
+expect 0 mknod ${n0} f 0755 0 0
+expect fifo,0755 lstat ${n0} type,mode
+expect 0 unlink ${n0}
+expect 0 mknod ${n0} f 0151 0 0
+expect fifo,0151 lstat ${n0} type,mode
+expect 0 unlink ${n0}
+expect 0 -U 077 mknod ${n0} f 0151 0 0
+expect fifo,0100 lstat ${n0} type,mode
+expect 0 unlink ${n0}
+expect 0 -U 070 mknod ${n0} f 0345 0 0
+expect fifo,0305 lstat ${n0} type,mode
+expect 0 unlink ${n0}
+expect 0 -U 0501 mknod ${n0} f 0345 0 0
+expect fifo,0244 lstat ${n0} type,mode
+expect 0 unlink ${n0}
+
+# POSIX: The FIFO's user ID shall be set to the process' effective user ID.
+# The FIFO's group ID shall be set to the group ID of the parent directory or to
+# the effective group ID of the process.
+expect 0 chown . 65535 65535
+expect 0 -u 65535 -g 65535 mknod ${n0} f 0755 0 0
+expect 65535,65535 lstat ${n0} uid,gid
+expect 0 unlink ${n0}
+expect 0 -u 65535 -g 65534 mknod ${n0} f 0755 0 0
+expect "65535,6553[45]" lstat ${n0} uid,gid
+expect 0 unlink ${n0}
+expect 0 chmod . 0777
+expect 0 -u 65534 -g 65533 mknod ${n0} f 0755 0 0
+expect "65534,6553[35]" lstat ${n0} uid,gid
+expect 0 unlink ${n0}
+
+# POSIX: Upon successful completion, mkfifo() shall mark for update the
+# st_atime, st_ctime, and st_mtime fields of the file. Also, the st_ctime and
+# st_mtime fields of the directory that contains the new entry shall be marked
+# for update.
+expect 0 chown . 0 0
+time=`${fstest} stat . ctime`
+sleep 1
+expect 0 mknod ${n0} f 0755 0 0
+atime=`${fstest} stat ${n0} atime`
+test_check $time -lt $atime
+mtime=`${fstest} stat ${n0} mtime`
+test_check $time -lt $mtime
+ctime=`${fstest} stat ${n0} ctime`
+test_check $time -lt $ctime
+mtime=`${fstest} stat . mtime`
+test_check $time -lt $mtime
+ctime=`${fstest} stat . ctime`
+test_check $time -lt $ctime
+expect 0 unlink ${n0}
+
+cd ${cdir}
+expect 0 rmdir ${n1}

Added: head/tools/regression/fstest/tests/mknod/01.t
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/fstest/tests/mknod/01.t	Fri Aug  6 20:51:39 2010	(r210967)
@@ -0,0 +1,18 @@
+#!/bin/sh
+# $FreeBSD$
+
+desc="mknod returns ENOTDIR if a component of the path prefix is not a directory"
+
+dir=`dirname $0`
+. ${dir}/../misc.sh
+
+echo "1..5"
+
+n0=`namegen`
+n1=`namegen`
+
+expect 0 mkdir ${n0} 0755
+expect 0 create ${n0}/${n1} 0644
+expect ENOTDIR mknod ${n0}/${n1}/test f 0644 0 0
+expect 0 unlink ${n0}/${n1}
+expect 0 rmdir ${n0}

Added: head/tools/regression/fstest/tests/mknod/02.t
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/fstest/tests/mknod/02.t	Fri Aug  6 20:51:39 2010	(r210967)
@@ -0,0 +1,13 @@
+#!/bin/sh
+# $FreeBSD$
+
+desc="mknod returns ENAMETOOLONG if a component of a pathname exceeded 255 characters"
+
+dir=`dirname $0`
+. ${dir}/../misc.sh
+
+echo "1..3"
+
+expect 0 mknod ${name255} f 0644 0 0
+expect 0 unlink ${name255}
+expect ENAMETOOLONG mknod ${name256} f 0644 0 0

Added: head/tools/regression/fstest/tests/mknod/03.t
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/fstest/tests/mknod/03.t	Fri Aug  6 20:51:39 2010	(r210967)
@@ -0,0 +1,21 @@
+#!/bin/sh
+# $FreeBSD$
+
+desc="mknod returns ENAMETOOLONG if an entire path name exceeded 1023 characters"
+
+dir=`dirname $0`
+. ${dir}/../misc.sh
+
+echo "1..11"
+
+expect 0 mkdir ${name255} 0755				# 1
+expect 0 mkdir ${name255}/${name255} 0755		# 2
+expect 0 mkdir ${name255}/${name255}/${name255} 0755	# 3
+expect 0 mkdir ${path1021} 0755				# 4
+expect 0 mknod ${path1023} f 0644 0 0			# 5
+expect 0 unlink ${path1023}				# 6
+expect ENAMETOOLONG mknod ${path1024} f 0644 0 0	# 7
+expect 0 rmdir ${path1021}				# 8
+expect 0 rmdir ${name255}/${name255}/${name255}		# 9
+expect 0 rmdir ${name255}/${name255}			# 10
+expect 0 rmdir ${name255}				# 11

Added: head/tools/regression/fstest/tests/mknod/04.t
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/fstest/tests/mknod/04.t	Fri Aug  6 20:51:39 2010	(r210967)
@@ -0,0 +1,16 @@
+#!/bin/sh
+# $FreeBSD$
+
+desc="mkfifo returns ENOENT if a component of the path prefix does not exist"
+
+dir=`dirname $0`
+. ${dir}/../misc.sh
+
+echo "1..3"
+
+n0=`namegen`
+n1=`namegen`
+
+expect 0 mkdir ${n0} 0755
+expect ENOENT mknod ${n0}/${n1}/test f 0644 0 0
+expect 0 rmdir ${n0}

Added: head/tools/regression/fstest/tests/mknod/05.t
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/fstest/tests/mknod/05.t	Fri Aug  6 20:51:39 2010	(r210967)
@@ -0,0 +1,29 @@
+#!/bin/sh
+# $FreeBSD$
+
+desc="mknod returns EACCES when search permission is denied for a component of the path prefix"
+
+dir=`dirname $0`
+. ${dir}/../misc.sh
+
+echo "1..12"
+
+n0=`namegen`
+n1=`namegen`
+n2=`namegen`
+
+expect 0 mkdir ${n0} 0755
+cdir=`pwd`
+cd ${n0}
+expect 0 mkdir ${n1} 0755
+expect 0 chown ${n1} 65534 65534
+expect 0 -u 65534 -g 65534 mknod ${n1}/${n2} f 0644 0 0
+expect 0 -u 65534 -g 65534 unlink ${n1}/${n2}
+expect 0 chmod ${n1} 0644
+expect EACCES -u 65534 -g 65534 mknod ${n1}/${n2} f 0644 0 0
+expect 0 chmod ${n1} 0755
+expect 0 -u 65534 -g 65534 mknod ${n1}/${n2} f 0644 0 0
+expect 0 -u 65534 -g 65534 unlink ${n1}/${n2}
+expect 0 rmdir ${n1}
+cd ${cdir}
+expect 0 rmdir ${n0}

Added: head/tools/regression/fstest/tests/mknod/06.t
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/fstest/tests/mknod/06.t	Fri Aug  6 20:51:39 2010	(r210967)
@@ -0,0 +1,29 @@
+#!/bin/sh
+# $FreeBSD$
+
+desc="mknod returns EACCES when write permission is denied on the parent directory of the file to be created"
+
+dir=`dirname $0`
+. ${dir}/../misc.sh
+
+echo "1..12"
+
+n0=`namegen`
+n1=`namegen`
+n2=`namegen`
+
+expect 0 mkdir ${n0} 0755
+cdir=`pwd`
+cd ${n0}
+expect 0 mkdir ${n1} 0755
+expect 0 chown ${n1} 65534 65534
+expect 0 -u 65534 -g 65534 mknod ${n1}/${n2} f 0644 0 0
+expect 0 -u 65534 -g 65534 unlink ${n1}/${n2}
+expect 0 chmod ${n1} 0555
+expect EACCES -u 65534 -g 65534 mknod ${n1}/${n2} f 0644 0 0
+expect 0 chmod ${n1} 0755
+expect 0 -u 65534 -g 65534 mknod ${n1}/${n2} f 0644 0 0
+expect 0 -u 65534 -g 65534 unlink ${n1}/${n2}
+expect 0 rmdir ${n1}
+cd ${cdir}
+expect 0 rmdir ${n0}

Added: head/tools/regression/fstest/tests/mknod/07.t
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/fstest/tests/mknod/07.t	Fri Aug  6 20:51:39 2010	(r210967)
@@ -0,0 +1,19 @@
+#!/bin/sh
+# $FreeBSD$
+
+desc="mknod returns ELOOP if too many symbolic links were encountered in translating the pathname"
+
+dir=`dirname $0`
+. ${dir}/../misc.sh
+
+echo "1..6"
+
+n0=`namegen`
+n1=`namegen`
+
+expect 0 symlink ${n0} ${n1}
+expect 0 symlink ${n1} ${n0}
+expect ELOOP mknod ${n0}/test f 0644 0 0
+expect ELOOP mknod ${n1}/test f 0644 0 0
+expect 0 unlink ${n0}
+expect 0 unlink ${n1}

Added: head/tools/regression/fstest/tests/mknod/08.t
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/fstest/tests/mknod/08.t	Fri Aug  6 20:51:39 2010	(r210967)
@@ -0,0 +1,35 @@
+#!/bin/sh
+# $FreeBSD$
+
+desc="mknod returns EEXIST if the named file exists"
+
+dir=`dirname $0`
+. ${dir}/../misc.sh
+
+echo "1..18"
+
+n0=`namegen`
+
+expect 0 mkdir ${n0} 0755
+expect EEXIST mknod ${n0} f 0644 0 0
+expect 0 rmdir ${n0}
+
+expect 0 create ${n0} 0644
+expect EEXIST mknod ${n0} f 0644 0 0
+expect 0 unlink ${n0}
+
+expect 0 symlink test ${n0}
+expect EEXIST mknod ${n0} f 0644 0 0
+expect 0 unlink ${n0}
+
+expect 0 mkfifo ${n0} 0644
+expect EEXIST mknod ${n0} f 0644 0 0
+expect 0 unlink ${n0}
+
+expect 0 bind ${n0}
+expect EEXIST mknod ${n0} f 0644 0 0
+expect 0 unlink ${n0}
+
+expect 0 mknod ${n0} f 0644 0 0
+expect EEXIST mknod ${n0} f 0644 0 0
+expect 0 unlink ${n0}

Added: head/tools/regression/fstest/tests/mknod/09.t
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/fstest/tests/mknod/09.t	Fri Aug  6 20:51:39 2010	(r210967)
@@ -0,0 +1,64 @@
+#!/bin/sh
+# $FreeBSD$
+
+desc="mknod returns EPERM if the parent directory of the file to be created has its immutable flag set"
+
+dir=`dirname $0`
+. ${dir}/../misc.sh
+
+require chflags
+
+case "${os}:${fs}" in
+FreeBSD:UFS)
+	echo "1..30"
+	;;
+*)
+	echo "1..17"
+	;;
+esac
+
+n0=`namegen`
+n1=`namegen`
+
+expect 0 mkdir ${n0} 0755
+
+expect 0 mknod ${n0}/${n1} f 0644 0 0
+expect 0 unlink ${n0}/${n1}
+
+expect 0 chflags ${n0} SF_IMMUTABLE
+expect EPERM mknod ${n0}/${n1} f 0644 0 0
+expect 0 chflags ${n0} none
+expect 0 mknod ${n0}/${n1} f 0644 0 0
+expect 0 unlink ${n0}/${n1}
+
+expect 0 chflags ${n0} SF_APPEND
+expect 0 mknod ${n0}/${n1} f 0644 0 0
+expect 0 chflags ${n0} none
+expect 0 unlink ${n0}/${n1}
+
+expect 0 chflags ${n0} SF_NOUNLINK
+expect 0 mknod ${n0}/${n1} f 0644 0 0
+expect 0 unlink ${n0}/${n1}
+expect 0 chflags ${n0} none
+
+case "${os}:${fs}" in
+FreeBSD:UFS)
+	expect 0 chflags ${n0} UF_IMMUTABLE
+	expect EPERM mknod ${n0}/${n1} f 0644 0 0
+	expect 0 chflags ${n0} none
+	expect 0 mknod ${n0}/${n1} f 0644 0 0
+	expect 0 unlink ${n0}/${n1}
+
+	expect 0 chflags ${n0} UF_APPEND
+	expect 0 mknod ${n0}/${n1} f 0644 0 0
+	expect 0 chflags ${n0} none
+	expect 0 unlink ${n0}/${n1}
+
+	expect 0 chflags ${n0} UF_NOUNLINK
+	expect 0 mknod ${n0}/${n1} f 0644 0 0
+	expect 0 unlink ${n0}/${n1}
+	expect 0 chflags ${n0} none
+	;;
+esac
+
+expect 0 rmdir ${n0}

Added: head/tools/regression/fstest/tests/mknod/10.t
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/fstest/tests/mknod/10.t	Fri Aug  6 20:51:39 2010	(r210967)
@@ -0,0 +1,12 @@
+#!/bin/sh
+# $FreeBSD$
+
+desc="mknod returns EFAULT if the path argument points outside the process's allocated address space"
+
+dir=`dirname $0`
+. ${dir}/../misc.sh
+
+echo "1..2"
+
+expect EFAULT mknod NULL f 0644 0 0
+expect EFAULT mknod DEADCODE f 0644 0 0

Added: head/tools/regression/fstest/tests/mknod/11.t
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/fstest/tests/mknod/11.t	Fri Aug  6 20:51:39 2010	(r210967)
@@ -0,0 +1,79 @@
+#!/bin/sh
+# $FreeBSD$
+
+desc="mknod creates device files"
+
+dir=`dirname $0`
+. ${dir}/../misc.sh
+
+case "${os}" in
+SunOS)
+	echo "1..40"
+        ;;
+*)
+	echo "1..28"
+	;;
+esac
+
+n0=`namegen`
+n1=`namegen`
+
+expect 0 mkdir ${n1} 0755
+cdir=`pwd`
+cd ${n1}
+
+for type in c b; do
+	case "${type}" in
+	c)
+		stattype="char"
+		;;
+	b)
+		stattype="block"
+		;;
+	esac
+
+	# Create char special with old-style numbers
+	expect 0 mknod ${n0} ${type} 0755 1 2
+	expect ${stattype},0755 lstat ${n0} type,mode
+	expect 1,2 lstat ${n0} major,minor
+	expect EEXIST mknod ${n0} ${type} 0777 3 4
+	expect 0 unlink ${n0}
+
+	case "${os}" in
+	SunOS)
+		# Create char special with new-style numbers
+		expect 0 mknod ${n0} ${type} 0755 4095 4095
+		expect ${stattype},0755 lstat ${n0} type,mode
+		expect 4095,4095 lstat ${n0} major,minor
+		expect EEXIST mknod ${n0} ${type} 0777 4000 4000
+		expect 0 unlink ${n0}
+
+		# mknod returns EINVAL if device's numbers are too big
+		# for 32-bit solaris !!
+		expect EINVAL mknod ${n0} ${type} 0755 4096 262144
+	        ;;
+	esac
+
+	# POSIX: Upon successful completion, mknod(2) shall mark for update the
+	# st_atime, st_ctime, and st_mtime fields of the file. Also, the st_ctime and
+	# st_mtime fields of the directory that contains the new entry shall be marked
+	# for update.
+	expect 0 chown . 0 0
+	time=`${fstest} stat . ctime`
+	sleep 1
+	expect 0 mknod ${n0} ${type} 0755 1 2
+	atime=`${fstest} stat ${n0} atime`
+	test_check $time -lt $atime
+	mtime=`${fstest} stat ${n0} mtime`
+	test_check $time -lt $mtime
+	ctime=`${fstest} stat ${n0} ctime`
+	test_check $time -lt $ctime
+	mtime=`${fstest} stat . mtime`
+	test_check $time -lt $mtime
+	ctime=`${fstest} stat . ctime`
+	test_check $time -lt $ctime
+	expect 0 unlink ${n0}
+done
+
+cd ${cdir}
+expect 0 rmdir ${n1}

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 20:55:49 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E797C106566C;
	Fri,  6 Aug 2010 20:55:49 +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 D6E6A8FC08;
	Fri,  6 Aug 2010 20:55:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76KtnBg029280;
	Fri, 6 Aug 2010 20:55:49 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76Ktn27029278;
	Fri, 6 Aug 2010 20:55:49 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201008062055.o76Ktn27029278@svn.freebsd.org>
From: Jack F Vogel 
Date: Fri, 6 Aug 2010 20:55:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210968 - head/sys/dev/e1000
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 20:55:50 -0000

Author: jfv
Date: Fri Aug  6 20:55:49 2010
New Revision: 210968
URL: http://svn.freebsd.org/changeset/base/210968

Log:
  Put the early setting of the MAC type back, its
  removal resulted in broken code in MSIX setup.

Modified:
  head/sys/dev/e1000/if_igb.c

Modified: head/sys/dev/e1000/if_igb.c
==============================================================================
--- head/sys/dev/e1000/if_igb.c	Fri Aug  6 20:51:39 2010	(r210967)
+++ head/sys/dev/e1000/if_igb.c	Fri Aug  6 20:55:49 2010	(r210968)
@@ -2070,6 +2070,9 @@ igb_identify_hardware(struct adapter *ad
 	    pci_read_config(dev, PCIR_SUBVEND_0, 2);
 	adapter->hw.subsystem_device_id =
 	    pci_read_config(dev, PCIR_SUBDEV_0, 2);
+
+	/* Set MAC type early for PCI setup */
+	e1000_set_mac_type(&adapter->hw);
 }
 
 static int

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 21:02:54 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4D5281065672;
	Fri,  6 Aug 2010 21:02:54 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3C1FF8FC17;
	Fri,  6 Aug 2010 21:02:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76L2s0j030888;
	Fri, 6 Aug 2010 21:02:54 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76L2sGk030886;
	Fri, 6 Aug 2010 21:02:54 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008062102.o76L2sGk030886@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 6 Aug 2010 21:02:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210969 - head/tools/regression/fstest/tests
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 21:02:54 -0000

Author: pjd
Date: Fri Aug  6 21:02:53 2010
New Revision: 210969
URL: http://svn.freebsd.org/changeset/base/210969

Log:
  Convert file system type to upper case.

Modified:
  head/tools/regression/fstest/tests/conf

Modified: head/tools/regression/fstest/tests/conf
==============================================================================
--- head/tools/regression/fstest/tests/conf	Fri Aug  6 20:55:49 2010	(r210968)
+++ head/tools/regression/fstest/tests/conf	Fri Aug  6 21:02:53 2010	(r210969)
@@ -9,7 +9,7 @@ FreeBSD|Darwin)
 	GREP=grep
 	#fs=`df -T . | tail -1 | awk '{print $2}'`
 	pattern="`df . | tail -1 | awk '{printf("%s on %s \n", $1, $6)}'`"
-	fs=`mount | egrep "^${pattern}" | awk -F '[(,]' '{print $2}'`
+	fs=`mount | egrep "^${pattern}" | awk -F '[(,]' '{print $2}' | tr '[:lower:]' '[:upper:]'`
 	;;
 Solaris|SunOS)
 	GREP=ggrep
@@ -19,7 +19,7 @@ Solaris|SunOS)
 	;;
 Linux)
 	GREP=grep
-	fs=`df -PT . | tail -1 | awk '{print $2}'`
+	fs=`df -PT . | tail -1 | awk '{print $2}' | tr '[:lower:]' '[:upper:]'`
 	;;
 *)
 	echo "Unsupported operating system ${os}." >/dev/stderr

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 21:06:05 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 632311065676;
	Fri,  6 Aug 2010 21:06:05 +0000 (UTC) (envelope-from ed@hoeg.nl)
Received: from mx0.hoeg.nl (unknown [IPv6:2a01:4f8:101:5343::aa])
	by mx1.freebsd.org (Postfix) with ESMTP id 26C998FC0C;
	Fri,  6 Aug 2010 21:06:05 +0000 (UTC)
Received: by mx0.hoeg.nl (Postfix, from userid 1000)
	id 88DBE2A28CCA; Fri,  6 Aug 2010 23:06:04 +0200 (CEST)
Date: Fri, 6 Aug 2010 23:06:04 +0200
From: Ed Schouten 
To: Pawel Jakub Dawidek 
Message-ID: <20100806210604.GI76386@hoeg.nl>
References: <201008062102.o76L2sGk030886@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="7lMq7vMTJT4tNk0a"
Content-Disposition: inline
In-Reply-To: <201008062102.o76L2sGk030886@svn.freebsd.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r210969 - head/tools/regression/fstest/tests
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 21:06:05 -0000


--7lMq7vMTJT4tNk0a
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Pawel,

* Pawel Jakub Dawidek  wrote:
> +	fs=3D`mount | egrep "^${pattern}" | awk -F '[(,]' '{print $2}' | tr '[:=
lower:]' '[:upper:]'`
> ...
> +	fs=3D`df -PT . | tail -1 | awk '{print $2}' | tr '[:lower:]' '[:upper:]=
'`

Maybe this can be solved using '{ print toupper($2) }'?

--=20
 Ed Schouten 
 WWW: http://80386.nl/

--7lMq7vMTJT4tNk0a
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)

iEYEARECAAYFAkxceTwACgkQ52SDGA2eCwVKuQCfSjj29XsJRIJR0OhbiuzvddYQ
R8gAnA9qMN1G9k1LqRnQERG/7CyXz88Q
=Plf7
-----END PGP SIGNATURE-----

--7lMq7vMTJT4tNk0a--

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 21:53:50 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5D43E106566B;
	Fri,  6 Aug 2010 21:53:50 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4C48E8FC0C;
	Fri,  6 Aug 2010 21:53:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76LropU042112;
	Fri, 6 Aug 2010 21:53:50 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76LroCv042110;
	Fri, 6 Aug 2010 21:53:50 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008062153.o76LroCv042110@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 6 Aug 2010 21:53:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210970 - head/tools/regression/fstest/tests
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 21:53:50 -0000

Author: pjd
Date: Fri Aug  6 21:53:50 2010
New Revision: 210970
URL: http://svn.freebsd.org/changeset/base/210970

Log:
  For FreeBSD and Linux use awk's toupper() function.
  
  Suggested by:	ed

Modified:
  head/tools/regression/fstest/tests/conf

Modified: head/tools/regression/fstest/tests/conf
==============================================================================
--- head/tools/regression/fstest/tests/conf	Fri Aug  6 21:02:53 2010	(r210969)
+++ head/tools/regression/fstest/tests/conf	Fri Aug  6 21:53:50 2010	(r210970)
@@ -9,7 +9,7 @@ FreeBSD|Darwin)
 	GREP=grep
 	#fs=`df -T . | tail -1 | awk '{print $2}'`
 	pattern="`df . | tail -1 | awk '{printf("%s on %s \n", $1, $6)}'`"
-	fs=`mount | egrep "^${pattern}" | awk -F '[(,]' '{print $2}' | tr '[:lower:]' '[:upper:]'`
+	fs=`mount | egrep "^${pattern}" | awk -F '[(,]' '{print toupper($2)}'`
 	;;
 Solaris|SunOS)
 	GREP=ggrep
@@ -19,7 +19,7 @@ Solaris|SunOS)
 	;;
 Linux)
 	GREP=grep
-	fs=`df -PT . | tail -1 | awk '{print $2}' | tr '[:lower:]' '[:upper:]'`
+	fs=`df -PT . | tail -1 | awk '{print toupper($2)}'`
 	;;
 *)
 	echo "Unsupported operating system ${os}." >/dev/stderr

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 21:56:32 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9B9B5106567D;
	Fri,  6 Aug 2010 21:56:32 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8AA978FC18;
	Fri,  6 Aug 2010 21:56:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76LuWIi042777;
	Fri, 6 Aug 2010 21:56:32 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76LuWv8042775;
	Fri, 6 Aug 2010 21:56:32 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008062156.o76LuWv8042775@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 6 Aug 2010 21:56:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210971 - head/tools/regression/fstest/tests
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 21:56:32 -0000

Author: pjd
Date: Fri Aug  6 21:56:32 2010
New Revision: 210971
URL: http://svn.freebsd.org/changeset/base/210971

Log:
  Check first todo() argument against operating system name and operating system
  name plus file system name.

Modified:
  head/tools/regression/fstest/tests/misc.sh

Modified: head/tools/regression/fstest/tests/misc.sh
==============================================================================
--- head/tools/regression/fstest/tests/misc.sh	Fri Aug  6 21:53:50 2010	(r210970)
+++ head/tools/regression/fstest/tests/misc.sh	Fri Aug  6 21:56:32 2010	(r210971)
@@ -87,8 +87,7 @@ test_check()
 
 todo()
 {
-	echo "${os}" | $GREP -iq "${1}"
-	if [ $? -eq 0 ]; then
+	if [ "${os}" = "${1}" -o "${os}:${fs}" = "${1}" ]; then
 		todomsg="${2}"
 	fi
 }

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 21:57:12 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3E4271065687;
	Fri,  6 Aug 2010 21:57:12 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2D5348FC12;
	Fri,  6 Aug 2010 21:57:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76LvCVR042978;
	Fri, 6 Aug 2010 21:57:12 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76LvCnr042976;
	Fri, 6 Aug 2010 21:57:12 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008062157.o76LvCnr042976@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 6 Aug 2010 21:57:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210972 - head/tools/regression/fstest/tests
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 21:57:12 -0000

Author: pjd
Date: Fri Aug  6 21:57:11 2010
New Revision: 210972
URL: http://svn.freebsd.org/changeset/base/210972

Log:
  Don't use egrep directly - use ${GREP}.

Modified:
  head/tools/regression/fstest/tests/misc.sh

Modified: head/tools/regression/fstest/tests/misc.sh
==============================================================================
--- head/tools/regression/fstest/tests/misc.sh	Fri Aug  6 21:56:32 2010	(r210971)
+++ head/tools/regression/fstest/tests/misc.sh	Fri Aug  6 21:57:11 2010	(r210972)
@@ -9,7 +9,7 @@ path1021="${name255}/${name255}/${name25
 path1023="${path1021}/x"
 path1024="${path1023}x"
 
-echo ${dir} | egrep '^/' >/dev/null 2>&1
+echo ${dir} | ${GREP} -E '^/' >/dev/null 2>&1
 if [ $? -eq 0 ]; then
 	maindir="${dir}/../.."
 else
@@ -23,7 +23,7 @@ expect()
 	e="${1}"
 	shift
 	r=`${fstest} $* 2>/dev/null | tail -1`
-	echo "${r}" | egrep '^'${e}'$' >/dev/null 2>&1
+	echo "${r}" | ${GREP} -E '^'${e}'$' >/dev/null 2>&1
 	if [ $? -eq 0 ]; then
 		if [ -z "${todomsg}" ]; then
 			echo "ok ${ntest}"
@@ -48,7 +48,7 @@ jexpect()
 	e="${3}"
 	shift 3
 	r=`jail -s ${s} / fstest 127.0.0.1 /bin/sh -c "cd ${d} && ${fstest} $* 2>/dev/null" | tail -1`
-	echo "${r}" | egrep '^'${e}'$' >/dev/null 2>&1
+	echo "${r}" | ${GREP} -E '^'${e}'$' >/dev/null 2>&1
 	if [ $? -eq 0 ]; then
 		if [ -z "${todomsg}" ]; then
 			echo "ok ${ntest}"

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 21:58:53 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D2F82106564A;
	Fri,  6 Aug 2010 21:58:53 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C23808FC1B;
	Fri,  6 Aug 2010 21:58:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76LwrsX043389;
	Fri, 6 Aug 2010 21:58:53 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76Lwr2t043387;
	Fri, 6 Aug 2010 21:58:53 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008062158.o76Lwr2t043387@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 6 Aug 2010 21:58:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210973 - head/tools/regression/fstest/tests
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 21:58:53 -0000

Author: pjd
Date: Fri Aug  6 21:58:53 2010
New Revision: 210973
URL: http://svn.freebsd.org/changeset/base/210973

Log:
  ${GREP} can only be used after loading 'conf'.

Modified:
  head/tools/regression/fstest/tests/misc.sh

Modified: head/tools/regression/fstest/tests/misc.sh
==============================================================================
--- head/tools/regression/fstest/tests/misc.sh	Fri Aug  6 21:57:11 2010	(r210972)
+++ head/tools/regression/fstest/tests/misc.sh	Fri Aug  6 21:58:53 2010	(r210973)
@@ -9,7 +9,7 @@ path1021="${name255}/${name255}/${name25
 path1023="${path1021}/x"
 path1024="${path1023}x"
 
-echo ${dir} | ${GREP} -E '^/' >/dev/null 2>&1
+echo ${dir} | grep '^/' >/dev/null 2>&1
 if [ $? -eq 0 ]; then
 	maindir="${dir}/../.."
 else

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 22:04:19 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1E5311065670;
	Fri,  6 Aug 2010 22:04:19 +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 CB1D18FC12;
	Fri,  6 Aug 2010 22:04:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76M4Ixw044637;
	Fri, 6 Aug 2010 22:04:18 GMT (envelope-from jamie@svn.freebsd.org)
Received: (from jamie@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76M4IvZ044635;
	Fri, 6 Aug 2010 22:04:18 GMT (envelope-from jamie@svn.freebsd.org)
Message-Id: <201008062204.o76M4IvZ044635@svn.freebsd.org>
From: Jamie Gritton 
Date: Fri, 6 Aug 2010 22:04:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210974 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 22:04:19 -0000

Author: jamie
Date: Fri Aug  6 22:04:18 2010
New Revision: 210974
URL: http://svn.freebsd.org/changeset/base/210974

Log:
  Implicitly make a new jail persistent if it's set not to attach.
  
  MFC after:	3 days

Modified:
  head/sys/kern/kern_jail.c

Modified: head/sys/kern/kern_jail.c
==============================================================================
--- head/sys/kern/kern_jail.c	Fri Aug  6 21:58:53 2010	(r210973)
+++ head/sys/kern/kern_jail.c	Fri Aug  6 22:04:18 2010	(r210974)
@@ -599,6 +599,8 @@ kern_jail_set(struct thread *td, struct 
 		vfs_flagopt(opts, pr_flag_names[fi], &pr_flags, 1 << fi);
 		vfs_flagopt(opts, pr_flag_nonames[fi], &ch_flags, 1 << fi);
 	}
+	if ((flags & (JAIL_CREATE | JAIL_UPDATE | JAIL_ATTACH)) == JAIL_CREATE)
+	    pr_flags |= PR_PERSIST;
 	ch_flags |= pr_flags;
 	for (fi = 0; fi < sizeof(pr_flag_jailsys) / sizeof(pr_flag_jailsys[0]);
 	    fi++) {
@@ -628,12 +630,6 @@ kern_jail_set(struct thread *td, struct 
 		ch_flags |=
 		    pr_flag_jailsys[fi].new | pr_flag_jailsys[fi].disable;
 	}
-	if ((flags & (JAIL_CREATE | JAIL_UPDATE | JAIL_ATTACH)) == JAIL_CREATE
-	    && !(pr_flags & PR_PERSIST)) {
-		error = EINVAL;
-		vfs_opterror(opts, "new jail must persist or attach");
-		goto done_errmsg;
-	}
 #ifdef VIMAGE
 	if ((flags & JAIL_UPDATE) && (ch_flags & PR_VNET)) {
 		error = EINVAL;

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 22:06:12 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9F830106566C;
	Fri,  6 Aug 2010 22:06:12 +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 8EC128FC1A;
	Fri,  6 Aug 2010 22:06:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76M6CHJ045110;
	Fri, 6 Aug 2010 22:06:12 GMT (envelope-from jamie@svn.freebsd.org)
Received: (from jamie@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76M6CCa045108;
	Fri, 6 Aug 2010 22:06:12 GMT (envelope-from jamie@svn.freebsd.org)
Message-Id: <201008062206.o76M6CCa045108@svn.freebsd.org>
From: Jamie Gritton 
Date: Fri, 6 Aug 2010 22:06:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210975 - head/usr.sbin/jail
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 22:06:12 -0000

Author: jamie
Date: Fri Aug  6 22:06:12 2010
New Revision: 210975
URL: http://svn.freebsd.org/changeset/base/210975

Log:
  Note that a jail without a command parameter will be persistent,
  instead of explicitly requiring one of "command" or "persist".
  
  MFC after:	3 days

Modified:
  head/usr.sbin/jail/jail.8

Modified: head/usr.sbin/jail/jail.8
==============================================================================
--- head/usr.sbin/jail/jail.8	Fri Aug  6 22:04:18 2010	(r210974)
+++ head/usr.sbin/jail/jail.8	Fri Aug  6 22:06:12 2010	(r210975)
@@ -34,7 +34,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 17, 2010
+.Dd August 6, 2010
 .Dt JAIL 8
 .Os
 .Sh NAME
@@ -333,11 +333,11 @@ where the jail's chroot directory is loc
 Setting this boolean parameter allows a jail to exist without any
 processes.
 Normally, a jail is destroyed as its last process exits.
-A new jail must have either the
-.Va persist
-parameter or
+A new jail created without processes (i.e. the
 .Va command
-pseudo-parameter set.
+pseudo-parameter) will automatically have
+.Va persist
+set.
 .It Va cpuset.id
 The ID of the cpuset associated with this jail (read-only).
 .It Va dying

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 22:13:14 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 142B71065678;
	Fri,  6 Aug 2010 22:13:14 +0000 (UTC)
	(envelope-from pjd@garage.freebsd.pl)
Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl
	[89.77.43.238])
	by mx1.freebsd.org (Postfix) with ESMTP id 5AFE08FC1A;
	Fri,  6 Aug 2010 22:13:12 +0000 (UTC)
Received: by mail.garage.freebsd.pl (Postfix, from userid 65534)
	id 8BBCB45E11; Sat,  7 Aug 2010 00:13:11 +0200 (CEST)
Received: from localhost (chello089077043238.chello.pl [89.77.43.238])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.garage.freebsd.pl (Postfix) with ESMTP id 70FD045D8D;
	Sat,  7 Aug 2010 00:13:06 +0200 (CEST)
Date: Sat, 7 Aug 2010 00:12:58 +0200
From: Pawel Jakub Dawidek 
To: Ed Schouten 
Message-ID: <20100806221258.GA1708@garage.freebsd.pl>
References: <201008062102.o76L2sGk030886@svn.freebsd.org>
	<20100806210604.GI76386@hoeg.nl>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="AhhlLboLdkugWU4S"
Content-Disposition: inline
In-Reply-To: <20100806210604.GI76386@hoeg.nl>
User-Agent: Mutt/1.4.2.3i
X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc
X-OS: FreeBSD 9.0-CURRENT amd64
X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on 
	mail.garage.freebsd.pl
X-Spam-Level: 
X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL 
	autolearn=no version=3.0.4
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r210969 - head/tools/regression/fstest/tests
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 22:13:14 -0000


--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Aug 06, 2010 at 11:06:04PM +0200, Ed Schouten wrote:
> Hi Pawel,
>=20
> * Pawel Jakub Dawidek  wrote:
> > +	fs=3D`mount | egrep "^${pattern}" | awk -F '[(,]' '{print $2}' | tr '=
[:lower:]' '[:upper:]'`
> > ...
> > +	fs=3D`df -PT . | tail -1 | awk '{print $2}' | tr '[:lower:]' '[:upper=
:]'`
>=20
> Maybe this can be solved using '{ print toupper($2) }'?

Indeed, thanks.

--=20
Pawel Jakub Dawidek                       http://www.wheelsystems.com
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--AhhlLboLdkugWU4S
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAkxciOkACgkQForvXbEpPzSg6QCfYTVxH/jKGF/NThvVG1/mmpRm
2vQAn3U7DkmKLiwWC4aO0meqXzxbT+lU
=Ebhp
-----END PGP SIGNATURE-----

--AhhlLboLdkugWU4S--

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 23:11:19 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8596D1065678;
	Fri,  6 Aug 2010 23:11:19 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6D4088FC14;
	Fri,  6 Aug 2010 23:11:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76NBJQj059524;
	Fri, 6 Aug 2010 23:11:19 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76NBJmR059509;
	Fri, 6 Aug 2010 23:11:19 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008062311.o76NBJmR059509@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 6 Aug 2010 23:11:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210976 - in head: sys/conf sys/contrib/dev/acpica
	sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler
	sys/contrib/dev/acpica/debugger sys/contrib/dev/acpica/events
	sys/contri...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 23:11:19 -0000

Author: jkim
Date: Fri Aug  6 23:11:19 2010
New Revision: 210976
URL: http://svn.freebsd.org/changeset/base/210976

Log:
  Merge ACPICA 20100806.

Added:
  head/sys/contrib/dev/acpica/utilities/utosi.c
     - copied, changed from r210945, vendor-sys/acpica/dist/utilities/utosi.c
Modified:
  head/sys/conf/files
  head/sys/contrib/dev/acpica/changes.txt
  head/sys/contrib/dev/acpica/common/adisasm.c
  head/sys/contrib/dev/acpica/common/dmextern.c
  head/sys/contrib/dev/acpica/compiler/aslcompiler.h
  head/sys/contrib/dev/acpica/compiler/aslglobal.h
  head/sys/contrib/dev/acpica/compiler/aslmain.c
  head/sys/contrib/dev/acpica/compiler/aslstartup.c
  head/sys/contrib/dev/acpica/debugger/dbcmds.c
  head/sys/contrib/dev/acpica/debugger/dbinput.c
  head/sys/contrib/dev/acpica/events/evxfevnt.c
  head/sys/contrib/dev/acpica/executer/exfldio.c
  head/sys/contrib/dev/acpica/executer/exprep.c
  head/sys/contrib/dev/acpica/include/acdebug.h
  head/sys/contrib/dev/acpica/include/acdisasm.h
  head/sys/contrib/dev/acpica/include/acglobal.h
  head/sys/contrib/dev/acpica/include/aclocal.h
  head/sys/contrib/dev/acpica/include/acobject.h
  head/sys/contrib/dev/acpica/include/acpiosxf.h
  head/sys/contrib/dev/acpica/include/acpixf.h
  head/sys/contrib/dev/acpica/include/actypes.h
  head/sys/contrib/dev/acpica/include/acutils.h
  head/sys/contrib/dev/acpica/osunixxf.c
  head/sys/contrib/dev/acpica/utilities/uteval.c
  head/sys/contrib/dev/acpica/utilities/utglobal.c
  head/sys/contrib/dev/acpica/utilities/utinit.c
  head/sys/contrib/dev/acpica/utilities/utmutex.c
  head/sys/contrib/dev/acpica/utilities/utxface.c
  head/sys/dev/acpica/Osd/OsdHardware.c
  head/sys/dev/acpica/Osd/OsdMemory.c
  head/sys/modules/acpi/acpi/Makefile
  head/usr.sbin/acpi/acpidb/Makefile
  head/usr.sbin/acpi/iasl/Makefile
Directory Properties:
  head/sys/contrib/dev/acpica/   (props changed)

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Fri Aug  6 22:06:12 2010	(r210975)
+++ head/sys/conf/files	Fri Aug  6 23:11:19 2010	(r210976)
@@ -285,6 +285,7 @@ contrib/dev/acpica/utilities/utmath.c		o
 contrib/dev/acpica/utilities/utmisc.c		optional acpi
 contrib/dev/acpica/utilities/utmutex.c		optional acpi
 contrib/dev/acpica/utilities/utobject.c		optional acpi
+contrib/dev/acpica/utilities/utosi.c		optional acpi
 contrib/dev/acpica/utilities/utresrc.c		optional acpi
 contrib/dev/acpica/utilities/utstate.c		optional acpi
 contrib/dev/acpica/utilities/utxface.c		optional acpi

Modified: head/sys/contrib/dev/acpica/changes.txt
==============================================================================
--- head/sys/contrib/dev/acpica/changes.txt	Fri Aug  6 22:06:12 2010	(r210975)
+++ head/sys/contrib/dev/acpica/changes.txt	Fri Aug  6 23:11:19 2010	(r210976)
@@ -1,7 +1,68 @@
 ----------------------------------------
-02 July 2010. Summary of changes for version 20100702:
+06 August 2010. Summary of changes for version 20100806:
+
+1) ACPI CA Core Subsystem:
+
+Designed and implemented a new host interface to the _OSI support code. This 
+will allow the host to dynamically add or remove multiple _OSI strings, as 
+well as install an optional handler that is called for each _OSI invocation. 
+Also added a new AML debugger command, 'osi' to display and modify the global 
+_OSI string table, and test support in the AcpiExec utility. See the ACPICA 
+reference manual for full details. Lin Ming, Bob Moore. ACPICA BZ 836.
+New Functions:
+    AcpiInstallInterface - Add an _OSI string.
+    AcpiRemoveInterface - Delete an _OSI string.
+    AcpiInstallInterfaceHandler - Install optional _OSI handler.
+Obsolete Functions:
+    AcpiOsValidateInterface - no longer used.
+New Files:
+    source/components/utilities/utosi.c
+
+Re-introduced the support to enable multi-byte transfers for Embedded 
+Controller (EC) operation regions. A reported problem was found to be a bug 
+in the host OS, not in the multi-byte support. Previously, the maximum data 
+size passed to the EC operation region handler was a single byte. There are 
+often EC Fields larger than one byte that need to be transferred, and it is 
+useful for the EC driver to lock these as a single transaction. This change 
+enables single transfers larger than 8 bits. This effectively changes the 
+access to the EC space from ByteAcc to AnyAcc, and will probably require 
+changes to the host OS Embedded Controller driver to enable 16/32/64/256-bit 
+transfers in addition to 8-bit transfers. Alexey Starikovskiy, Lin Ming.
+
+Fixed a problem with the prototype for AcpiOsReadPciConfiguration. The 
+prototype in acpiosxf.h had the output value pointer as a (void *).
+It should be a (UINT64 *). This may affect some host OSL code.
+
+Fixed a couple problems with the recently modified Linux makefiles for iASL 
+and AcpiExec. These new makefiles place the generated object files in the 
+local directory so that there can be no collisions between the files that are 
+shared between them that are compiled with different options.
+
+Example Code and Data Size: These are the sizes for the OS-independent 
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The 
+debug version of the code includes the debug output trace mechanism and has a 
+much larger code and data size.
+
+  Previous Release:
+    Non-Debug Version:  88.3K Code, 18.8K Data, 107.1K Total
+    Debug Version:     164.0K Code, 51.5K Data, 215.5K Total
+  Current Release:
+    Non-Debug Version:  89.1K Code, 19.0K Data, 108.1K Total
+    Debug Version:     165.1K Code, 51.9K Data, 217.0K Total
 
-This release is available at www.acpica.org/downloads
+2) iASL Compiler/Disassembler and Tools:
+
+iASL/Disassembler: Added a new option (-da, "disassemble all") to load the 
+namespace from and disassemble an entire group of AML files. Useful for 
+loading all of the AML tables for a given machine (DSDT, SSDT1...SSDTn) and 
+disassembling with one simple command. ACPICA BZ 865. Lin Ming.
+
+iASL: Allow multiple invocations of -e option. This change allows multiple 
+uses of -e on the command line: "-e ssdt1.dat -e ssdt2.dat". ACPICA BZ 834. 
+Lin Ming.
+
+----------------------------------------
+02 July 2010. Summary of changes for version 20100702:
 
 1) ACPI CA Core Subsystem:
 
@@ -77,8 +138,6 @@ the #define __APPLE__ to enable this sup
 ----------------------------------------
 28 May 2010. Summary of changes for version 20100528:
 
-This release is available at www.acpica.org/downloads
-
 Note: The ACPI 4.0a specification was released on April 5, 2010 and is 
 available at www.acpi.info. This is primarily an errata release.
 

Modified: head/sys/contrib/dev/acpica/common/adisasm.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/adisasm.c	Fri Aug  6 22:06:12 2010	(r210975)
+++ head/sys/contrib/dev/acpica/common/adisasm.c	Fri Aug  6 23:11:19 2010	(r210976)
@@ -134,7 +134,6 @@
 
 
 extern int                  AslCompilerdebug;
-extern char                 *Gbl_ExternalFilename;
 
 
 ACPI_STATUS
@@ -313,6 +312,7 @@ AdAmlDisassemble (
     ACPI_STATUS             Status;
     char                    *DisasmFilename = NULL;
     char                    *ExternalFilename;
+    ACPI_EXTERNAL_FILE      *ExternalFileList = AcpiGbl_ExternalFileList;
     FILE                    *File = NULL;
     ACPI_TABLE_HEADER       *Table = NULL;
     ACPI_TABLE_HEADER       *ExternalTable;
@@ -335,46 +335,54 @@ AdAmlDisassemble (
          * External filenames separated by commas
          * Example: iasl -e file1,file2,file3 -d xxx.aml
          */
-        if (Gbl_ExternalFilename)
+        while (ExternalFileList)
         {
-            ExternalFilename = strtok (Gbl_ExternalFilename, ",");
+            ExternalFilename = ExternalFileList->Path;
+            if (!ACPI_STRCMP (ExternalFilename, Filename))
+            {
+                /* Next external file */
+
+                ExternalFileList = ExternalFileList->Next;
 
-            while (ExternalFilename)
+                continue;
+            }
+
+            Status = AcpiDbGetTableFromFile (ExternalFilename, &ExternalTable);
+            if (ACPI_FAILURE (Status))
             {
-                Status = AcpiDbGetTableFromFile (ExternalFilename, &ExternalTable);
+                return Status;
+            }
+
+            /* Load external table for symbol resolution */
+
+            if (ExternalTable)
+            {
+                Status = AdParseTable (ExternalTable, &OwnerId, TRUE, TRUE);
                 if (ACPI_FAILURE (Status))
                 {
+                    AcpiOsPrintf ("Could not parse external ACPI tables, %s\n",
+                        AcpiFormatException (Status));
                     return Status;
                 }
 
-                /* Load external table for symbol resolution */
-
-                if (ExternalTable)
-                {
-                    Status = AdParseTable (ExternalTable, &OwnerId, TRUE, TRUE);
-                    if (ACPI_FAILURE (Status))
-                    {
-                        AcpiOsPrintf ("Could not parse external ACPI tables, %s\n",
-                            AcpiFormatException (Status));
-                        return Status;
-                    }
-
-                    /*
-                     * Load namespace from names created within control methods
-                     * Set owner id of nodes in external table
-                     */
-                    AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,
-                        AcpiGbl_RootNode, OwnerId);
-                    AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);
-                }
+                /*
+                 * Load namespace from names created within control methods
+                 * Set owner id of nodes in external table
+                 */
+                AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,
+                    AcpiGbl_RootNode, OwnerId);
+                AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);
+            }
 
-                /* Next external file name */
+            /* Next external file */
 
-                ExternalFilename = strtok (NULL, ",");
-            }
+            ExternalFileList = ExternalFileList->Next;
+        }
 
-            /* Clear external list generated by Scope in external tables */
+        /* Clear external list generated by Scope in external tables */
 
+        if (AcpiGbl_ExternalFileList)
+        {
             AcpiDmClearExternalList ();
         }
     }

Modified: head/sys/contrib/dev/acpica/common/dmextern.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/dmextern.c	Fri Aug  6 22:06:12 2010	(r210975)
+++ head/sys/contrib/dev/acpica/common/dmextern.c	Fri Aug  6 23:11:19 2010	(r210976)
@@ -312,6 +312,95 @@ Cleanup:
 
 /*******************************************************************************
  *
+ * FUNCTION:    AcpiDmAddToExternalFileList
+ *
+ * PARAMETERS:  PathList            - Single path or list separated by comma
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Add external files to global list
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDmAddToExternalFileList (
+    char                    *PathList)
+{
+    ACPI_EXTERNAL_FILE      *ExternalFile;
+    char                    *Path;
+    char                    *TmpPath;
+
+
+    if (!PathList)
+    {
+        return (AE_OK);
+    }
+
+    Path = strtok (PathList, ",");
+
+    while (Path)
+    {
+        TmpPath = ACPI_ALLOCATE_ZEROED (ACPI_STRLEN (Path) + 1);
+        if (!TmpPath)
+        {
+            return (AE_NO_MEMORY);
+        }
+
+        ACPI_STRCPY (TmpPath, Path);
+
+        ExternalFile = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EXTERNAL_FILE));
+        if (!ExternalFile)
+        {
+            ACPI_FREE (TmpPath);
+            return (AE_NO_MEMORY);
+        }
+
+        ExternalFile->Path = TmpPath;
+
+        if (AcpiGbl_ExternalFileList)
+        {
+            ExternalFile->Next = AcpiGbl_ExternalFileList;
+        }
+
+        AcpiGbl_ExternalFileList = ExternalFile;
+        Path = strtok (NULL, ",");
+    }
+
+    return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDmClearExternalFileList
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Clear the external file list
+ *
+ ******************************************************************************/
+
+void
+AcpiDmClearExternalFileList (
+    void)
+{
+    ACPI_EXTERNAL_FILE      *NextExternal;
+
+
+    while (AcpiGbl_ExternalFileList)
+    {
+        NextExternal = AcpiGbl_ExternalFileList->Next;
+        ACPI_FREE (AcpiGbl_ExternalFileList->Path);
+        ACPI_FREE (AcpiGbl_ExternalFileList);
+        AcpiGbl_ExternalFileList = NextExternal;
+    }
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    AcpiDmAddToExternalList
  *
  * PARAMETERS:  Op                  - Current parser Op

Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/aslcompiler.h	Fri Aug  6 22:06:12 2010	(r210975)
+++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h	Fri Aug  6 23:11:19 2010	(r210976)
@@ -195,9 +195,14 @@ void
 AslInitializeGlobals (
     void);
 
+typedef
+ACPI_STATUS (*ASL_PATHNAME_CALLBACK) (
+    char *);
+
 ACPI_STATUS
 AslDoOnePathname (
-    char                    *Pathname);
+    char                    *Pathname,
+    ASL_PATHNAME_CALLBACK   Callback);
 
 ACPI_STATUS
 AslDoOneFile (

Modified: head/sys/contrib/dev/acpica/compiler/aslglobal.h
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/aslglobal.h	Fri Aug  6 22:06:12 2010	(r210975)
+++ head/sys/contrib/dev/acpica/compiler/aslglobal.h	Fri Aug  6 23:11:19 2010	(r210976)
@@ -171,6 +171,7 @@ ASL_EXTERN ASL_ERROR_MSG            ASL_
 
 ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_DoCompile, TRUE);
 ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_DoSignon, TRUE);
+ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_DisassembleAll, FALSE);
 
 ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_Acpi2, FALSE);
 ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_UseDefaultAmlFilename, TRUE);
@@ -214,7 +215,6 @@ ASL_EXTERN BOOLEAN                  ASL_
 ASL_EXTERN ASL_FILE_INFO            Gbl_Files [ASL_NUM_FILES];
 
 ASL_EXTERN char                     *Gbl_DirectoryPath;
-ASL_EXTERN char                     ASL_INIT_GLOBAL (*Gbl_ExternalFilename, NULL);
 ASL_EXTERN char                     ASL_INIT_GLOBAL (*Gbl_IncludeFilename, NULL);
 ASL_EXTERN char                     ASL_INIT_GLOBAL (*Gbl_OutputFilenamePrefix, NULL);
 ASL_EXTERN ASL_INCLUDE_DIR          ASL_INIT_GLOBAL (*Gbl_IncludeDirList, NULL);

Modified: head/sys/contrib/dev/acpica/compiler/aslmain.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/aslmain.c	Fri Aug  6 22:06:12 2010	(r210975)
+++ head/sys/contrib/dev/acpica/compiler/aslmain.c	Fri Aug  6 23:11:19 2010	(r210976)
@@ -119,6 +119,7 @@
 
 #include 
 #include 
+#include 
 
 #ifdef _DEBUG
 #include 
@@ -224,6 +225,7 @@ Options (
 
     printf ("\nAML Disassembler:\n");
     printf ("  -d  [file]     Disassemble or decode binary ACPI table to file (*.dsl)\n");
+    printf ("  -da [f1,f2]    Disassemble multiple tables from single namespace\n");
     printf ("  -dc [file]     Disassemble AML and immediately compile it\n");
     printf ("                 (Obtain DSDT from current system if no input file)\n");
     printf ("  -e  [f1,f2]    Include ACPI table(s) for external symbol resolution\n");
@@ -534,6 +536,11 @@ AslDoOptions (
             Gbl_DoCompile = FALSE;
             break;
 
+        case 'a':
+            Gbl_DoCompile = FALSE;
+            Gbl_DisassembleAll = TRUE;
+            break;
+
         case 'c':
             break;
 
@@ -547,7 +554,7 @@ AslDoOptions (
 
 
     case 'e':
-        Gbl_ExternalFilename = AcpiGbl_Optarg;
+        AcpiDmAddToExternalFileList (AcpiGbl_Optarg);
         break;
 
 
@@ -952,9 +959,12 @@ main (
     char                    **argv)
 {
     ACPI_STATUS             Status;
-    int                     Index;
+    int                     Index1;
+    int                     Index2;
 
 
+    AcpiGbl_ExternalFileList = NULL;
+
 #ifdef _DEBUG
     _CrtSetDbgFlag (_CRTDBG_CHECK_ALWAYS_DF | _CRTDBG_LEAK_CHECK_DF |
                     _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG));
@@ -963,7 +973,7 @@ main (
     /* Init and command line */
 
     AslInitialize ();
-    Index = AslCommandLine (argc, argv);
+    Index1 = Index2 = AslCommandLine (argc, argv);
 
     /* Options that have no additional parameters or pathnames */
 
@@ -977,17 +987,36 @@ main (
         return (0);
     }
 
+    if (Gbl_DisassembleAll)
+    {
+        while (argv[Index1])
+        {
+            Status = AslDoOnePathname (argv[Index1], AcpiDmAddToExternalFileList);
+            if (ACPI_FAILURE (Status))
+            {
+                return (-1);
+            }
+
+            Index1++;
+        }
+    }
+
     /* Process each pathname/filename in the list, with possible wildcards */
 
-    while (argv[Index])
+    while (argv[Index2])
     {
-        Status = AslDoOnePathname (argv[Index]);
+        Status = AslDoOnePathname (argv[Index2], AslDoOneFile);
         if (ACPI_FAILURE (Status))
         {
             return (-1);
         }
 
-        Index++;
+        Index2++;
+    }
+
+    if (AcpiGbl_ExternalFileList)
+    {
+        AcpiDmClearExternalFileList();
     }
 
     return (0);

Modified: head/sys/contrib/dev/acpica/compiler/aslstartup.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/aslstartup.c	Fri Aug  6 22:06:12 2010	(r210975)
+++ head/sys/contrib/dev/acpica/compiler/aslstartup.c	Fri Aug  6 23:11:19 2010	(r210976)
@@ -529,7 +529,8 @@ AslDoOneFile (
 
 ACPI_STATUS
 AslDoOnePathname (
-    char                    *Pathname)
+    char                    *Pathname,
+    ASL_PATHNAME_CALLBACK   PathCallback)
 {
     ACPI_STATUS             Status = AE_OK;
     char                    **FileList;
@@ -569,7 +570,7 @@ AslDoOnePathname (
 
         /* Save status from all compiles */
 
-        Status |= AslDoOneFile (FullPathname);
+        Status |= (*PathCallback) (FullPathname);
 
         ACPI_FREE (FullPathname);
         ACPI_FREE (*FileList);

Modified: head/sys/contrib/dev/acpica/debugger/dbcmds.c
==============================================================================
--- head/sys/contrib/dev/acpica/debugger/dbcmds.c	Fri Aug  6 22:06:12 2010	(r210975)
+++ head/sys/contrib/dev/acpica/debugger/dbcmds.c	Fri Aug  6 23:11:19 2010	(r210976)
@@ -1336,6 +1336,98 @@ AcpiDbDisplayObjects (
 
 /*******************************************************************************
  *
+ * FUNCTION:    AcpiDbDisplayInterfaces
+ *
+ * PARAMETERS:  ActionArg           - Null, "install", or "remove"
+ *              InterfaceNameArg    - Name for install/remove options
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Display or modify the global _OSI interface list
+ *
+ ******************************************************************************/
+
+void
+AcpiDbDisplayInterfaces (
+    char                    *ActionArg,
+    char                    *InterfaceNameArg)
+{
+    ACPI_INTERFACE_INFO     *NextInterface;
+    char                    *SubString;
+    ACPI_STATUS             Status;
+
+
+    /* If no arguments, just display current interface list */
+
+    if (!ActionArg)
+    {
+        (void) AcpiOsAcquireMutex (AcpiGbl_OsiMutex,
+                    ACPI_WAIT_FOREVER);
+
+        NextInterface = AcpiGbl_SupportedInterfaces;
+
+        while (NextInterface)
+        {
+            if (!(NextInterface->Flags & ACPI_OSI_INVALID))
+            {
+                AcpiOsPrintf ("%s\n", NextInterface->Name);
+            }
+            NextInterface = NextInterface->Next;
+        }
+
+        AcpiOsReleaseMutex (AcpiGbl_OsiMutex);
+        return;
+    }
+
+    /* If ActionArg exists, so must InterfaceNameArg */
+
+    if (!InterfaceNameArg)
+    {
+        AcpiOsPrintf ("Missing Interface Name argument\n");
+        return;
+    }
+
+    /* Uppercase the action for match below */
+
+    AcpiUtStrupr (ActionArg);
+
+    /* Install - install an interface */
+
+    SubString = ACPI_STRSTR ("INSTALL", ActionArg);
+    if (SubString)
+    {
+        Status = AcpiInstallInterface (InterfaceNameArg);
+        if (ACPI_FAILURE (Status))
+        {
+            AcpiOsPrintf ("%s, while installing \"%s\"\n",
+                AcpiFormatException (Status), InterfaceNameArg);
+        }
+        return;
+    }
+
+    /* Remove - remove an interface */
+
+    SubString = ACPI_STRSTR ("REMOVE", ActionArg);
+    if (SubString)
+    {
+        Status = AcpiRemoveInterface (InterfaceNameArg);
+        if (ACPI_FAILURE (Status))
+        {
+            AcpiOsPrintf ("%s, while removing \"%s\"\n",
+                AcpiFormatException (Status), InterfaceNameArg);
+        }
+        return;
+    }
+
+    /* Invalid ActionArg */
+
+    AcpiOsPrintf ("Invalid action argument: %s\n", ActionArg);
+    return;
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    AcpiDbWalkAndMatchName
  *
  * PARAMETERS:  Callback from WalkNamespace

Modified: head/sys/contrib/dev/acpica/debugger/dbinput.c
==============================================================================
--- head/sys/contrib/dev/acpica/debugger/dbinput.c	Fri Aug  6 22:06:12 2010	(r210975)
+++ head/sys/contrib/dev/acpica/debugger/dbinput.c	Fri Aug  6 23:11:19 2010	(r210976)
@@ -194,6 +194,7 @@ enum AcpiExDebuggerCommands
     CMD_NOTIFY,
     CMD_OBJECT,
     CMD_OPEN,
+    CMD_OSI,
     CMD_OWNER,
     CMD_PREDEFINED,
     CMD_PREFIX,
@@ -260,6 +261,7 @@ static const COMMAND_INFO       AcpiGbl_
     {"NOTIFY",       2},
     {"OBJECT",       1},
     {"OPEN",         1},
+    {"OSI",          0},
     {"OWNER",        1},
     {"PREDEFINED",   0},
     {"PREFIX",       0},
@@ -333,6 +335,7 @@ AcpiDbDisplayHelp (
         AcpiOsPrintf ("History                             Display command history buffer\n");
         AcpiOsPrintf ("Level [] [console]      Get/Set debug level for file or console\n");
         AcpiOsPrintf ("Locks                               Current status of internal mutexes\n");
+        AcpiOsPrintf ("Osi [Install|Remove ]         Display or modify global _OSI list\n");
         AcpiOsPrintf ("Quit or Exit                        Exit this command\n");
         AcpiOsPrintf ("Stats [Allocations|Memory|Misc\n");
         AcpiOsPrintf ("      |Objects|Sizes|Stack|Tables]  Display namespace and memory statistics\n");
@@ -455,13 +458,30 @@ AcpiDbGetNextToken (
         }
     }
 
-    Start = String;
+    if (*String == '"')
+    {
+        /* This is a quoted string, scan until closing quote */
+
+        String++;
+        Start = String;
 
-    /* Find end of token */
+        /* Find end of token */
 
-    while (*String && (*String != ' '))
+        while (*String && (*String != '"'))
+        {
+            String++;
+        }
+    }
+    else
     {
-        String++;
+        Start = String;
+
+        /* Find end of token */
+
+        while (*String && (*String != ' '))
+        {
+            String++;
+        }
     }
 
     if (!(*String))
@@ -820,6 +840,10 @@ AcpiDbCommandDispatch (
         AcpiDbOpenDebugFile (AcpiGbl_DbArgs[1]);
         break;
 
+    case CMD_OSI:
+        AcpiDbDisplayInterfaces (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
+        break;
+
     case CMD_OWNER:
         AcpiDbDumpNamespaceByOwner (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
         break;

Modified: head/sys/contrib/dev/acpica/events/evxfevnt.c
==============================================================================
--- head/sys/contrib/dev/acpica/events/evxfevnt.c	Fri Aug  6 22:06:12 2010	(r210975)
+++ head/sys/contrib/dev/acpica/events/evxfevnt.c	Fri Aug  6 23:11:19 2010	(r210976)
@@ -305,7 +305,6 @@ AcpiEnableEvent (
 ACPI_EXPORT_SYMBOL (AcpiEnableEvent)
 
 
-
 /*******************************************************************************
  *
  * FUNCTION:    AcpiGpeWakeup

Modified: head/sys/contrib/dev/acpica/executer/exfldio.c
==============================================================================
--- head/sys/contrib/dev/acpica/executer/exfldio.c	Fri Aug  6 22:06:12 2010	(r210975)
+++ head/sys/contrib/dev/acpica/executer/exfldio.c	Fri Aug  6 23:11:19 2010	(r210976)
@@ -202,8 +202,8 @@ AcpiExSetupRegion (
     }
 
     /*
-     * Exit now for SMBus or IPMI address space, it has a non-linear address space
-     * and the request cannot be directly validated
+     * Exit now for SMBus or IPMI address space, it has a non-linear
+     * address space and the request cannot be directly validated
      */
     if (RgnDesc->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
         RgnDesc->Region.SpaceId == ACPI_ADR_SPACE_IPMI)
@@ -233,8 +233,7 @@ AcpiExSetupRegion (
      * (Region length is specified in bytes)
      */
     if (RgnDesc->Region.Length <
-            (ObjDesc->CommonField.BaseByteOffset +
-            FieldDatumByteOffset +
+            (ObjDesc->CommonField.BaseByteOffset + FieldDatumByteOffset +
             ObjDesc->CommonField.AccessByteWidth))
     {
         if (AcpiGbl_EnableInterpreterSlack)
@@ -794,6 +793,7 @@ AcpiExExtractFromField (
     UINT32                  BufferTailBits;
     UINT32                  DatumCount;
     UINT32                  FieldDatumCount;
+    UINT32                  AccessBitWidth;
     UINT32                  i;
 
 
@@ -803,7 +803,7 @@ AcpiExExtractFromField (
     /* Validate target buffer and clear it */
 
     if (BufferLength <
-            ACPI_ROUND_BITS_UP_TO_BYTES (ObjDesc->CommonField.BitLength))
+        ACPI_ROUND_BITS_UP_TO_BYTES (ObjDesc->CommonField.BitLength))
     {
         ACPI_ERROR ((AE_INFO,
             "Field size %u (bits) is too large for buffer (%u)",
@@ -811,17 +811,37 @@ AcpiExExtractFromField (
 
         return_ACPI_STATUS (AE_BUFFER_OVERFLOW);
     }
+
     ACPI_MEMSET (Buffer, 0, BufferLength);
+    AccessBitWidth = ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth);
+
+    /* Handle the simple case here */
+
+    if ((ObjDesc->CommonField.StartFieldBitOffset == 0) &&
+        (ObjDesc->CommonField.BitLength == AccessBitWidth))
+    {
+        Status = AcpiExFieldDatumIo (ObjDesc, 0, Buffer, ACPI_READ);
+        return_ACPI_STATUS (Status);
+    }
+
+/* TBD: Move to common setup code */
+
+    /* Field algorithm is limited to sizeof(UINT64), truncate if needed */
+
+    if (ObjDesc->CommonField.AccessByteWidth > sizeof (UINT64))
+    {
+        ObjDesc->CommonField.AccessByteWidth = sizeof (UINT64);
+        AccessBitWidth = sizeof (UINT64) * 8;
+    }
 
     /* Compute the number of datums (access width data items) */
 
     DatumCount = ACPI_ROUND_UP_TO (
-                        ObjDesc->CommonField.BitLength,
-                        ObjDesc->CommonField.AccessBitWidth);
+        ObjDesc->CommonField.BitLength, AccessBitWidth);
+
     FieldDatumCount = ACPI_ROUND_UP_TO (
-                        ObjDesc->CommonField.BitLength +
-                        ObjDesc->CommonField.StartFieldBitOffset,
-                        ObjDesc->CommonField.AccessBitWidth);
+        ObjDesc->CommonField.BitLength +
+        ObjDesc->CommonField.StartFieldBitOffset, AccessBitWidth);
 
     /* Priming read from the field */
 
@@ -854,12 +874,11 @@ AcpiExExtractFromField (
          * This avoids the differences in behavior between different compilers
          * concerning shift values larger than the target data width.
          */
-        if ((ObjDesc->CommonField.AccessBitWidth -
-            ObjDesc->CommonField.StartFieldBitOffset) < ACPI_INTEGER_BIT_SIZE)
+        if (AccessBitWidth - ObjDesc->CommonField.StartFieldBitOffset <
+            ACPI_INTEGER_BIT_SIZE)
         {
             MergedDatum |= RawDatum <<
-                (ObjDesc->CommonField.AccessBitWidth -
-                    ObjDesc->CommonField.StartFieldBitOffset);
+                (AccessBitWidth - ObjDesc->CommonField.StartFieldBitOffset);
         }
 
         if (i == DatumCount)
@@ -879,8 +898,7 @@ AcpiExExtractFromField (
 
     /* Mask off any extra bits in the last datum */
 
-    BufferTailBits = ObjDesc->CommonField.BitLength %
-                        ObjDesc->CommonField.AccessBitWidth;
+    BufferTailBits = ObjDesc->CommonField.BitLength % AccessBitWidth;
     if (BufferTailBits)
     {
         MergedDatum &= ACPI_MASK_BITS_ABOVE (BufferTailBits);
@@ -916,6 +934,7 @@ AcpiExInsertIntoField (
     void                    *Buffer,
     UINT32                  BufferLength)
 {
+    void                    *NewBuffer;
     ACPI_STATUS             Status;
     UINT64                  Mask;
     UINT64                  WidthMask;
@@ -926,9 +945,9 @@ AcpiExInsertIntoField (
     UINT32                  BufferTailBits;
     UINT32                  DatumCount;
     UINT32                  FieldDatumCount;
-    UINT32                  i;
+    UINT32                  AccessBitWidth;
     UINT32                  RequiredLength;
-    void                    *NewBuffer;
+    UINT32                  i;
 
 
     ACPI_FUNCTION_TRACE (ExInsertIntoField);
@@ -965,31 +984,41 @@ AcpiExInsertIntoField (
         BufferLength = RequiredLength;
     }
 
+/* TBD: Move to common setup code */
+
+    /* Algo is limited to sizeof(UINT64), so cut the AccessByteWidth */
+    if (ObjDesc->CommonField.AccessByteWidth > sizeof (UINT64))
+    {
+        ObjDesc->CommonField.AccessByteWidth = sizeof (UINT64);
+    }
+
+    AccessBitWidth = ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth);
+
     /*
      * Create the bitmasks used for bit insertion.
      * Note: This if/else is used to bypass compiler differences with the
      * shift operator
      */
-    if (ObjDesc->CommonField.AccessBitWidth == ACPI_INTEGER_BIT_SIZE)
+    if (AccessBitWidth == ACPI_INTEGER_BIT_SIZE)
     {
         WidthMask = ACPI_UINT64_MAX;
     }
     else
     {
-        WidthMask = ACPI_MASK_BITS_ABOVE (ObjDesc->CommonField.AccessBitWidth);
+        WidthMask = ACPI_MASK_BITS_ABOVE (AccessBitWidth);
     }
 
     Mask = WidthMask &
-            ACPI_MASK_BITS_BELOW (ObjDesc->CommonField.StartFieldBitOffset);
+        ACPI_MASK_BITS_BELOW (ObjDesc->CommonField.StartFieldBitOffset);
 
     /* Compute the number of datums (access width data items) */
 
     DatumCount = ACPI_ROUND_UP_TO (ObjDesc->CommonField.BitLength,
-                    ObjDesc->CommonField.AccessBitWidth);
+        AccessBitWidth);
 
     FieldDatumCount = ACPI_ROUND_UP_TO (ObjDesc->CommonField.BitLength +
-                        ObjDesc->CommonField.StartFieldBitOffset,
-                        ObjDesc->CommonField.AccessBitWidth);
+        ObjDesc->CommonField.StartFieldBitOffset,
+        AccessBitWidth);
 
     /* Get initial Datum from the input buffer */
 
@@ -1024,12 +1053,11 @@ AcpiExInsertIntoField (
          * This avoids the differences in behavior between different compilers
          * concerning shift values larger than the target data width.
          */
-        if ((ObjDesc->CommonField.AccessBitWidth -
-            ObjDesc->CommonField.StartFieldBitOffset) < ACPI_INTEGER_BIT_SIZE)
+        if ((AccessBitWidth - ObjDesc->CommonField.StartFieldBitOffset) <
+            ACPI_INTEGER_BIT_SIZE)
         {
             MergedDatum = RawDatum >>
-                (ObjDesc->CommonField.AccessBitWidth -
-                    ObjDesc->CommonField.StartFieldBitOffset);
+                (AccessBitWidth - ObjDesc->CommonField.StartFieldBitOffset);
         }
         else
         {
@@ -1048,15 +1076,15 @@ AcpiExInsertIntoField (
         BufferOffset += ObjDesc->CommonField.AccessByteWidth;
         ACPI_MEMCPY (&RawDatum, ((char *) Buffer) + BufferOffset,
             ACPI_MIN(ObjDesc->CommonField.AccessByteWidth,
-                     BufferLength - BufferOffset));
+                 BufferLength - BufferOffset));
+
         MergedDatum |= RawDatum << ObjDesc->CommonField.StartFieldBitOffset;
     }
 
     /* Mask off any extra bits in the last datum */
 
     BufferTailBits = (ObjDesc->CommonField.BitLength +
-            ObjDesc->CommonField.StartFieldBitOffset) %
-                ObjDesc->CommonField.AccessBitWidth;
+        ObjDesc->CommonField.StartFieldBitOffset) % AccessBitWidth;
     if (BufferTailBits)
     {
         Mask &= ACPI_MASK_BITS_ABOVE (BufferTailBits);

Modified: head/sys/contrib/dev/acpica/executer/exprep.c
==============================================================================
--- head/sys/contrib/dev/acpica/executer/exprep.c	Fri Aug  6 22:06:12 2010	(r210975)
+++ head/sys/contrib/dev/acpica/executer/exprep.c	Fri Aug  6 23:11:19 2010	(r210976)
@@ -193,12 +193,12 @@ AcpiExGenerateAccess (
     FieldByteLength    = FieldByteEndOffset - FieldByteOffset;
 
     ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-            "Bit length %u, Bit offset %u\n",
-            FieldBitLength, FieldBitOffset));
+        "Bit length %u, Bit offset %u\n",
+        FieldBitLength, FieldBitOffset));
 
     ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-            "Byte Length %u, Byte Offset %u, End Offset %u\n",
-            FieldByteLength, FieldByteOffset, FieldByteEndOffset));
+        "Byte Length %u, Byte Offset %u, End Offset %u\n",
+        FieldByteLength, FieldByteOffset, FieldByteEndOffset));
 
     /*
      * Iterative search for the maximum access width that is both aligned
@@ -228,11 +228,11 @@ AcpiExGenerateAccess (
             Accesses = FieldEndOffset - FieldStartOffset;
 
             ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-                    "AccessWidth %u end is within region\n", AccessByteWidth));
+                "AccessWidth %u end is within region\n", AccessByteWidth));
 
             ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-                    "Field Start %u, Field End %u -- requires %u accesses\n",
-                    FieldStartOffset, FieldEndOffset, Accesses));
+                "Field Start %u, Field End %u -- requires %u accesses\n",
+                FieldStartOffset, FieldEndOffset, Accesses));
 
             /* Single access is optimal */
 
@@ -261,7 +261,7 @@ AcpiExGenerateAccess (
             if (AccessByteWidth == 1)
             {
                 ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-                        "Field goes beyond end-of-region!\n"));
+                    "Field goes beyond end-of-region!\n"));
 
                 /* Field does not fit in the region at all */
 
@@ -273,8 +273,8 @@ AcpiExGenerateAccess (
              * previous access
              */
             ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-                    "Backing off to previous optimal access width of %u\n",
-                    MinimumAccessWidth));
+                "Backing off to previous optimal access width of %u\n",
+                MinimumAccessWidth));
             return_VALUE (MinimumAccessWidth);
         }
     }
@@ -284,7 +284,7 @@ AcpiExGenerateAccess (
      * just use max access width
      */
     ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-            "Cannot access field in one operation, using width 8\n"));
+        "Cannot access field in one operation, using width 8\n"));
     return_VALUE (8);
 }
 #endif /* ACPI_UNDER_DEVELOPMENT */
@@ -444,18 +444,16 @@ AcpiExPrepCommonFieldObject (
      * the same (equivalent) as the ByteAlignment.
      */
     AccessBitWidth = AcpiExDecodeFieldAccess (ObjDesc, FieldFlags,
-                                &ByteAlignment);
+                        &ByteAlignment);
     if (!AccessBitWidth)
     {
         return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
     }
 
-    /* Setup width (access granularity) fields */
+    /* Setup width (access granularity) fields (values are: 1, 2, 4, 8) */
 
     ObjDesc->CommonField.AccessByteWidth = (UINT8)
-            ACPI_DIV_8 (AccessBitWidth);            /* 1,  2,  4,  8 */
-
-    ObjDesc->CommonField.AccessBitWidth = (UINT8) AccessBitWidth;
+        ACPI_DIV_8 (AccessBitWidth);
 
     /*
      * BaseByteOffset is the address of the start of the field within the
@@ -468,9 +466,9 @@ AcpiExPrepCommonFieldObject (
      * region or buffer.
      */
     NearestByteAddress =
-            ACPI_ROUND_BITS_DOWN_TO_BYTES (FieldBitPosition);
+        ACPI_ROUND_BITS_DOWN_TO_BYTES (FieldBitPosition);
     ObjDesc->CommonField.BaseByteOffset = (UINT32)
-            ACPI_ROUND_DOWN (NearestByteAddress, ByteAlignment);
+        ACPI_ROUND_DOWN (NearestByteAddress, ByteAlignment);
 
     /*
      * StartFieldBitOffset is the offset of the first bit of the field within
@@ -502,8 +500,9 @@ AcpiExPrepFieldValue (
 {
     ACPI_OPERAND_OBJECT     *ObjDesc;
     ACPI_OPERAND_OBJECT     *SecondDesc = NULL;
-    UINT32                  Type;
     ACPI_STATUS             Status;
+    UINT32                  AccessByteWidth;
+    UINT32                  Type;
 
 
     ACPI_FUNCTION_TRACE (ExPrepFieldValue);
@@ -522,8 +521,7 @@ AcpiExPrepFieldValue (
         Type = AcpiNsGetType (Info->RegionNode);
         if (Type != ACPI_TYPE_REGION)
         {
-            ACPI_ERROR ((AE_INFO,
-                "Needed Region, found type 0x%X (%s)",
+            ACPI_ERROR ((AE_INFO, "Needed Region, found type 0x%X (%s)",
                 Type, AcpiUtGetTypeName (Type)));
 
             return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
@@ -541,8 +539,9 @@ AcpiExPrepFieldValue (
     /* Initialize areas of the object that are common to all fields */
 
     ObjDesc->CommonField.Node = Info->FieldNode;
-    Status = AcpiExPrepCommonFieldObject (ObjDesc, Info->FieldFlags,
-                Info->Attribute, Info->FieldBitPosition, Info->FieldBitLength);
+    Status = AcpiExPrepCommonFieldObject (ObjDesc,
+                Info->FieldFlags, Info->Attribute,
+                Info->FieldBitPosition, Info->FieldBitLength);
     if (ACPI_FAILURE (Status))
     {
         AcpiUtDeleteObjectDesc (ObjDesc);
@@ -557,6 +556,22 @@ AcpiExPrepFieldValue (
 
         ObjDesc->Field.RegionObj = AcpiNsGetAttachedObject (Info->RegionNode);
 
+        /* Allow full data read from EC address space */
+
+        if ((ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_EC) &&
+            (ObjDesc->CommonField.BitLength > 8))
+        {
+            AccessByteWidth = ACPI_ROUND_BITS_UP_TO_BYTES (
+                ObjDesc->CommonField.BitLength);
+
+            /* Maximum byte width supported is 255 */
+
+            if (AccessByteWidth < 256)
+            {
+                ObjDesc->CommonField.AccessByteWidth = (UINT8) AccessByteWidth;
+            }
+        }
+
         /* An additional reference for the container */
 
         AcpiUtAddReference (ObjDesc->Field.RegionObj);
@@ -570,11 +585,11 @@ AcpiExPrepFieldValue (
 

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 23:35:33 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8CC84106566B;
	Fri,  6 Aug 2010 23:35:33 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7B88C8FC14;
	Fri,  6 Aug 2010 23:35:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76NZXvZ065012;
	Fri, 6 Aug 2010 23:35:33 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76NZXEm065010;
	Fri, 6 Aug 2010 23:35:33 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008062335.o76NZXEm065010@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 6 Aug 2010 23:35:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210977 - head/sys/dev/acpica
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 23:35:33 -0000

Author: jkim
Date: Fri Aug  6 23:35:33 2010
New Revision: 210977
URL: http://svn.freebsd.org/changeset/base/210977

Log:
  When EC burst mode is activated and multiple bytes are accessed, do not
  disable and enable repeatedly, just do it once per call.  It also reduces
  code duplication.  Check all parameters early and fail immediately.

Modified:
  head/sys/dev/acpica/acpi_ec.c

Modified: head/sys/dev/acpica/acpi_ec.c
==============================================================================
--- head/sys/dev/acpica/acpi_ec.c	Fri Aug  6 23:11:19 2010	(r210976)
+++ head/sys/dev/acpica/acpi_ec.c	Fri Aug  6 23:35:33 2010	(r210977)
@@ -720,24 +720,19 @@ EcSpaceHandler(UINT32 Function, ACPI_PHY
 	       UINT64 *Value, void *Context, void *RegionContext)
 {
     struct acpi_ec_softc	*sc = (struct acpi_ec_softc *)Context;
-    ACPI_STATUS			Status;
+    ACPI_PHYSICAL_ADDRESS	EcAddr;
     UINT8			*EcData;
-    UINT8			EcAddr;
-    int				bytes, i;
+    ACPI_STATUS			Status;
 
     ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, (UINT32)Address);
 
+    if (Function != ACPI_READ && Function != ACPI_WRITE)
+	return_ACPI_STATUS (AE_BAD_PARAMETER);
     if (Width % 8 != 0 || Value == NULL || Context == NULL)
 	return_ACPI_STATUS (AE_BAD_PARAMETER);
-    bytes = Width / 8;
-    if (Address + bytes - 1 > 0xFF)
+    if (Address + Width / 8 > 256)
 	return_ACPI_STATUS (AE_BAD_ADDRESS);
 
-    if (Function == ACPI_READ)
-	*Value = 0;
-    EcAddr = Address;
-    EcData = (UINT8 *)Value;
-
     /*
      * If booting, check if we need to run the query handler.  If so, we
      * we call it directly here since our thread taskq is not active yet.
@@ -754,8 +749,21 @@ EcSpaceHandler(UINT32 Function, ACPI_PHY
     if (ACPI_FAILURE(Status))
 	return_ACPI_STATUS (Status);
 
+    /* If we can't start burst mode, continue anyway. */
+    Status = EcCommand(sc, EC_COMMAND_BURST_ENABLE);
+    if (ACPI_SUCCESS(Status)) {
+	if (EC_GET_DATA(sc) == EC_BURST_ACK) {
+	    CTR0(KTR_ACPI, "ec burst enabled");
+	    sc->ec_burstactive = TRUE;
+	}
+    }
+
     /* Perform the transaction(s), based on Width. */
-    for (i = 0; i < bytes; i++, EcAddr++, EcData++) {
+    EcAddr = Address;
+    EcData = (UINT8 *)Value;
+    if (Function == ACPI_READ)
+	*Value = 0;
+    do {
 	switch (Function) {
 	case ACPI_READ:
 	    Status = EcRead(sc, EcAddr, EcData);
@@ -763,14 +771,17 @@ EcSpaceHandler(UINT32 Function, ACPI_PHY
 	case ACPI_WRITE:
 	    Status = EcWrite(sc, EcAddr, *EcData);
 	    break;
-	default:
-	    device_printf(sc->ec_dev, "invalid EcSpaceHandler function %d\n",
-			  Function);
-	    Status = AE_BAD_PARAMETER;
-	    break;
 	}
 	if (ACPI_FAILURE(Status))
 	    break;
+	EcAddr++;
+	EcData++;
+    } while (EcAddr < Address + Width / 8);
+
+    if (sc->ec_burstactive) {
+	sc->ec_burstactive = FALSE;
+	if (ACPI_SUCCESS(EcCommand(sc, EC_COMMAND_BURST_DISABLE)))
+	    CTR0(KTR_ACPI, "ec disabled burst ok");
     }
 
     EcUnlock(sc);
@@ -943,22 +954,11 @@ static ACPI_STATUS
 EcRead(struct acpi_ec_softc *sc, UINT8 Address, UINT8 *Data)
 {
     ACPI_STATUS	status;
-    UINT8 data;
     u_int gen_count;
 
     ACPI_SERIAL_ASSERT(ec);
     CTR1(KTR_ACPI, "ec read from %#x", Address);
 
-    /* If we can't start burst mode, continue anyway. */
-    status = EcCommand(sc, EC_COMMAND_BURST_ENABLE);
-    if (status == AE_OK) {
-    	data = EC_GET_DATA(sc);
-	if (data == EC_BURST_ACK) {
-	    CTR0(KTR_ACPI, "ec burst enabled");
-	    sc->ec_burstactive = TRUE;
-	}
-    }
-
     status = EcCommand(sc, EC_COMMAND_READ);
     if (ACPI_FAILURE(status))
 	return (status);
@@ -972,14 +972,6 @@ EcRead(struct acpi_ec_softc *sc, UINT8 A
     }
     *Data = EC_GET_DATA(sc);
 
-    if (sc->ec_burstactive) {
-	sc->ec_burstactive = FALSE;
-	status = EcCommand(sc, EC_COMMAND_BURST_DISABLE);
-	if (ACPI_FAILURE(status))
-	    return (status);
-	CTR0(KTR_ACPI, "ec disabled burst ok");
-    }
-
     return (AE_OK);
 }
 
@@ -987,22 +979,11 @@ static ACPI_STATUS
 EcWrite(struct acpi_ec_softc *sc, UINT8 Address, UINT8 Data)
 {
     ACPI_STATUS	status;
-    UINT8 data;
     u_int gen_count;
 
     ACPI_SERIAL_ASSERT(ec);
     CTR2(KTR_ACPI, "ec write to %#x, data %#x", Address, Data);
 
-    /* If we can't start burst mode, continue anyway. */
-    status = EcCommand(sc, EC_COMMAND_BURST_ENABLE);
-    if (status == AE_OK) {
-    	data = EC_GET_DATA(sc);
-	if (data == EC_BURST_ACK) {
-	    CTR0(KTR_ACPI, "ec burst enabled");
-	    sc->ec_burstactive = TRUE;
-	}
-    }
-
     status = EcCommand(sc, EC_COMMAND_WRITE);
     if (ACPI_FAILURE(status))
 	return (status);
@@ -1023,13 +1004,5 @@ EcWrite(struct acpi_ec_softc *sc, UINT8 
 	return (status);
     }
 
-    if (sc->ec_burstactive) {
-	sc->ec_burstactive = FALSE;
-	status = EcCommand(sc, EC_COMMAND_BURST_DISABLE);
-	if (ACPI_FAILURE(status))
-	    return (status);
-	CTR0(KTR_ACPI, "ec disabled burst ok");
-    }
-
     return (AE_OK);
 }

From owner-svn-src-all@FreeBSD.ORG  Fri Aug  6 23:58:54 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A1C6A106566B;
	Fri,  6 Aug 2010 23:58:54 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 850AD8FC08;
	Fri,  6 Aug 2010 23:58:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76Nwsvm070462;
	Fri, 6 Aug 2010 23:58:54 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76NwsLv070441;
	Fri, 6 Aug 2010 23:58:54 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008062358.o76NwsLv070441@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 6 Aug 2010 23:58:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210984 - in head/tools/regression/fstest/tests: chmod
	chown granular link mkdir mkfifo open rename rmdir symlink
	truncate unlink
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Aug 2010 23:58:54 -0000

Author: pjd
Date: Fri Aug  6 23:58:54 2010
New Revision: 210984
URL: http://svn.freebsd.org/changeset/base/210984

Log:
  Various cleanups, mostly to make the test work on FreeBSD/ZFS.

Modified:
  head/tools/regression/fstest/tests/chmod/08.t
  head/tools/regression/fstest/tests/chmod/09.t
  head/tools/regression/fstest/tests/chown/08.t
  head/tools/regression/fstest/tests/chown/09.t
  head/tools/regression/fstest/tests/granular/00.t
  head/tools/regression/fstest/tests/granular/01.t
  head/tools/regression/fstest/tests/granular/02.t
  head/tools/regression/fstest/tests/granular/03.t
  head/tools/regression/fstest/tests/granular/04.t
  head/tools/regression/fstest/tests/granular/05.t
  head/tools/regression/fstest/tests/link/05.t
  head/tools/regression/fstest/tests/link/12.t
  head/tools/regression/fstest/tests/link/13.t
  head/tools/regression/fstest/tests/link/14.t
  head/tools/regression/fstest/tests/link/15.t
  head/tools/regression/fstest/tests/link/16.t
  head/tools/regression/fstest/tests/mkdir/08.t
  head/tools/regression/fstest/tests/mkdir/09.t
  head/tools/regression/fstest/tests/mkdir/11.t
  head/tools/regression/fstest/tests/mkfifo/08.t
  head/tools/regression/fstest/tests/mkfifo/10.t
  head/tools/regression/fstest/tests/mkfifo/11.t
  head/tools/regression/fstest/tests/open/09.t
  head/tools/regression/fstest/tests/open/10.t
  head/tools/regression/fstest/tests/open/11.t
  head/tools/regression/fstest/tests/open/14.t
  head/tools/regression/fstest/tests/open/15.t
  head/tools/regression/fstest/tests/open/18.t
  head/tools/regression/fstest/tests/open/19.t
  head/tools/regression/fstest/tests/open/20.t
  head/tools/regression/fstest/tests/rename/06.t
  head/tools/regression/fstest/tests/rename/07.t
  head/tools/regression/fstest/tests/rename/08.t
  head/tools/regression/fstest/tests/rename/15.t
  head/tools/regression/fstest/tests/rename/16.t
  head/tools/regression/fstest/tests/rmdir/09.t
  head/tools/regression/fstest/tests/rmdir/10.t
  head/tools/regression/fstest/tests/rmdir/13.t
  head/tools/regression/fstest/tests/rmdir/14.t
  head/tools/regression/fstest/tests/symlink/09.t
  head/tools/regression/fstest/tests/symlink/10.t
  head/tools/regression/fstest/tests/symlink/11.t
  head/tools/regression/fstest/tests/truncate/08.t
  head/tools/regression/fstest/tests/truncate/10.t
  head/tools/regression/fstest/tests/truncate/11.t
  head/tools/regression/fstest/tests/unlink/09.t
  head/tools/regression/fstest/tests/unlink/10.t
  head/tools/regression/fstest/tests/unlink/12.t

Modified: head/tools/regression/fstest/tests/chmod/08.t
==============================================================================
--- head/tools/regression/fstest/tests/chmod/08.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/chmod/08.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -8,7 +8,16 @@ dir=`dirname $0`
 
 require chflags
 
-echo "1..40"
+case "${os}:${fs}" in
+FreeBSD:ZFS)
+	echo "1..22"
+	;;
+FreeBSD:UFS)
+	echo "1..44"
+	;;
+*)
+	quick_exit
+esac
 
 n0=`namegen`
 
@@ -18,30 +27,7 @@ expect EPERM chmod ${n0} 0600
 expect 0644 stat ${n0} mode
 expect 0 chflags ${n0} none
 expect 0 chmod ${n0} 0600
-expect 0 unlink ${n0}
-
-expect 0 create ${n0} 0644
-expect 0 chflags ${n0} UF_IMMUTABLE
-expect EPERM chmod ${n0} 0600
-expect 0644 stat ${n0} mode
-expect 0 chflags ${n0} none
-expect 0 chmod ${n0} 0600
-expect 0 unlink ${n0}
-
-expect 0 create ${n0} 0644
-expect 0 chflags ${n0} SF_APPEND
-expect EPERM chmod ${n0} 0600
-expect 0644 stat ${n0} mode
-expect 0 chflags ${n0} none
-expect 0 chmod ${n0} 0600
-expect 0 unlink ${n0}
-
-expect 0 create ${n0} 0644
-expect 0 chflags ${n0} UF_APPEND
-expect EPERM chmod ${n0} 0600
-expect 0644 stat ${n0} mode
-expect 0 chflags ${n0} none
-expect 0 chmod ${n0} 0600
+expect 0600 stat ${n0} mode
 expect 0 unlink ${n0}
 
 expect 0 create ${n0} 0644
@@ -51,9 +37,50 @@ expect 0600 stat ${n0} mode
 expect 0 chflags ${n0} none
 expect 0 unlink ${n0}
 
-expect 0 create ${n0} 0644
-expect 0 chflags ${n0} UF_NOUNLINK
-expect 0 chmod ${n0} 0600
-expect 0600 stat ${n0} mode
-expect 0 chflags ${n0} none
-expect 0 unlink ${n0}
+case "${os}:${fs}" in
+FreeBSD:ZFS)
+	expect 0 create ${n0} 0644
+	expect 0 chflags ${n0} SF_APPEND
+	expect 0 chmod ${n0} 0600
+	expect 0600 stat ${n0} mode
+	expect 0 chflags ${n0} none
+	expect 0 chmod ${n0} 0600
+	expect 0600 stat ${n0} mode
+	expect 0 unlink ${n0}
+	;;
+FreeBSD:UFS)
+	expect 0 create ${n0} 0644
+	expect 0 chflags ${n0} SF_APPEND
+	expect EPERM chmod ${n0} 0600
+	expect 0644 stat ${n0} mode
+	expect 0 chflags ${n0} none
+	expect 0 chmod ${n0} 0600
+	expect 0600 stat ${n0} mode
+	expect 0 unlink ${n0}
+
+	expect 0 create ${n0} 0644
+	expect 0 chflags ${n0} UF_IMMUTABLE
+	expect EPERM chmod ${n0} 0600
+	expect 0644 stat ${n0} mode
+	expect 0 chflags ${n0} none
+	expect 0 chmod ${n0} 0600
+	expect 0600 stat ${n0} mode
+	expect 0 unlink ${n0}
+
+	expect 0 create ${n0} 0644
+	expect 0 chflags ${n0} UF_NOUNLINK
+	expect 0 chmod ${n0} 0600
+	expect 0600 stat ${n0} mode
+	expect 0 chflags ${n0} none
+	expect 0 unlink ${n0}
+
+	expect 0 create ${n0} 0644
+	expect 0 chflags ${n0} UF_APPEND
+	expect EPERM chmod ${n0} 0600
+	expect 0644 stat ${n0} mode
+	expect 0 chflags ${n0} none
+	expect 0 chmod ${n0} 0600
+	expect 0600 stat ${n0} mode
+	expect 0 unlink ${n0}
+	;;
+esac

Modified: head/tools/regression/fstest/tests/chmod/09.t
==============================================================================
--- head/tools/regression/fstest/tests/chmod/09.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/chmod/09.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -6,32 +6,27 @@ desc="chmod returns EROFS if the named f
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
-case "${os}:${fs}" in
-FreeBSD:UFS)
-	echo "1..10"
+[ "${os}:${fs}" = "FreeBSD:UFS" ] || quick_exit
 
-	n0=`namegen`
-	n1=`namegen`
+echo "1..10"
 
-	expect 0 mkdir ${n0} 0755
-	n=`mdconfig -a -n -t malloc -s 1m`
-	newfs /dev/md${n} >/dev/null
-	mount /dev/md${n} ${n0}
-	expect 0 create ${n0}/${n1} 0644
-	expect 0 chmod ${n0}/${n1} 0640
-	expect 0640 stat ${n0}/${n1} mode
-	mount -ur /dev/md${n}
-	expect EROFS chmod ${n0}/${n1} 0600
-	expect 0640 stat ${n0}/${n1} mode
-	mount -uw /dev/md${n}
-	expect 0 chmod ${n0}/${n1} 0600
-	expect 0600 stat ${n0}/${n1} mode
-	expect 0 unlink ${n0}/${n1}
-	umount /dev/md${n}
-	mdconfig -d -u ${n}
-	expect 0 rmdir ${n0}
-	;;
-*)
-	quick_exit
-	;;
-esac
+n0=`namegen`
+n1=`namegen`
+
+expect 0 mkdir ${n0} 0755
+n=`mdconfig -a -n -t malloc -s 1m`
+newfs /dev/md${n} >/dev/null
+mount /dev/md${n} ${n0}
+expect 0 create ${n0}/${n1} 0644
+expect 0 chmod ${n0}/${n1} 0640
+expect 0640 stat ${n0}/${n1} mode
+mount -ur /dev/md${n}
+expect EROFS chmod ${n0}/${n1} 0600
+expect 0640 stat ${n0}/${n1} mode
+mount -uw /dev/md${n}
+expect 0 chmod ${n0}/${n1} 0600
+expect 0600 stat ${n0}/${n1} mode
+expect 0 unlink ${n0}/${n1}
+umount /dev/md${n}
+mdconfig -d -u ${n}
+expect 0 rmdir ${n0}

Modified: head/tools/regression/fstest/tests/chown/08.t
==============================================================================
--- head/tools/regression/fstest/tests/chown/08.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/chown/08.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -8,46 +8,77 @@ dir=`dirname $0`
 
 require chflags
 
-echo "1..34"
+case "${os}:${fs}" in
+FreeBSD:ZFS)
+	echo "1..20"
+	;;
+FreeBSD:UFS)
+	echo "1..44"
+	;;
+*)
+	quick_exit
+esac
 
 n0=`namegen`
 
 expect 0 create ${n0} 0644
 expect 0 chflags ${n0} SF_IMMUTABLE
 expect EPERM chown ${n0} 65534 65534
+expect 0,0 stat ${n0} uid,gid
 expect 0 chflags ${n0} none
 expect 0 chown ${n0} 65534 65534
-expect 0 unlink ${n0}
-
-expect 0 create ${n0} 0644
-expect 0 chflags ${n0} UF_IMMUTABLE
-expect EPERM chown ${n0} 65534 65534
-expect 0 chflags ${n0} none
-expect 0 chown ${n0} 65534 65534
-expect 0 unlink ${n0}
-
-expect 0 create ${n0} 0644
-expect 0 chflags ${n0} SF_APPEND
-expect EPERM chown ${n0} 65534 65534
-expect 0 chflags ${n0} none
-expect 0 chown ${n0} 65534 65534
-expect 0 unlink ${n0}
-
-expect 0 create ${n0} 0644
-expect 0 chflags ${n0} UF_APPEND
-expect EPERM chown ${n0} 65534 65534
-expect 0 chflags ${n0} none
-expect 0 chown ${n0} 65534 65534
+expect 65534,65534 stat ${n0} uid,gid
 expect 0 unlink ${n0}
 
 expect 0 create ${n0} 0644
 expect 0 chflags ${n0} SF_NOUNLINK
 expect 0 chown ${n0} 65534 65534
+expect 65534,65534 stat ${n0} uid,gid
 expect 0 chflags ${n0} none
 expect 0 unlink ${n0}
 
-expect 0 create ${n0} 0644
-expect 0 chflags ${n0} UF_NOUNLINK
-expect 0 chown ${n0} 65534 65534
-expect 0 chflags ${n0} none
-expect 0 unlink ${n0}
+case "${os}:${fs}" in
+FreeBSD:ZFS)
+	expect 0 create ${n0} 0644
+	expect 0 chflags ${n0} SF_APPEND
+	expect 0 chown ${n0} 65534 65534
+	expect 65534,65534 stat ${n0} uid,gid
+	expect 0 chflags ${n0} none
+	expect 0 unlink ${n0}
+	;;
+FreeBSD:UFS)
+	expect 0 create ${n0} 0644
+	expect 0 chflags ${n0} SF_APPEND
+	expect EPERM chown ${n0} 65534 65534
+	expect 0,0 stat ${n0} uid,gid
+	expect 0 chflags ${n0} none
+	expect 0 chown ${n0} 65534 65534
+	expect 65534,65534 stat ${n0} uid,gid
+	expect 0 unlink ${n0}
+
+	expect 0 create ${n0} 0644
+	expect 0 chflags ${n0} UF_IMMUTABLE
+	expect EPERM chown ${n0} 65534 65534
+	expect 0,0 stat ${n0} uid,gid
+	expect 0 chflags ${n0} none
+	expect 0 chown ${n0} 65534 65534
+	expect 65534,65534 stat ${n0} uid,gid
+	expect 0 unlink ${n0}
+
+	expect 0 create ${n0} 0644
+	expect 0 chflags ${n0} UF_NOUNLINK
+	expect 0 chown ${n0} 65534 65534
+	expect 65534,65534 stat ${n0} uid,gid
+	expect 0 chflags ${n0} none
+	expect 0 unlink ${n0}
+
+	expect 0 create ${n0} 0644
+	expect 0 chflags ${n0} UF_APPEND
+	expect EPERM chown ${n0} 65534 65534
+	expect 0,0 stat ${n0} uid,gid
+	expect 0 chflags ${n0} none
+	expect 0 chown ${n0} 65534 65534
+	expect 65534,65534 stat ${n0} uid,gid
+	expect 0 unlink ${n0}
+	;;
+esac

Modified: head/tools/regression/fstest/tests/chown/09.t
==============================================================================
--- head/tools/regression/fstest/tests/chown/09.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/chown/09.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -6,32 +6,27 @@ desc="chown returns EROFS if the named f
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
-case "${os}:{fs}" in
-FreeBSD:UFS)
-	echo "1..10"
+[ "${os}:${fs}" = "FreeBSD:UFS" ] || quick_exit
 
-	n0=`namegen`
-	n1=`namegen`
+echo "1..10"
 
-	expect 0 mkdir ${n0} 0755
-	n=`mdconfig -a -n -t malloc -s 1m`
-	newfs /dev/md${n} >/dev/null
-	mount /dev/md${n} ${n0}
-	expect 0 create ${n0}/${n1} 0644
-	expect 0 chown ${n0}/${n1} 65534 65534
-	expect 65534,65534 stat ${n0}/${n1} uid,gid
-	mount -ur /dev/md${n}
-	expect EROFS chown ${n0}/${n1} 65533 65533
-	expect 65534,65534 stat ${n0}/${n1} uid,gid
-	mount -uw /dev/md${n}
-	expect 0 chown ${n0}/${n1} 65533 65533
-	expect 65533,65533 stat ${n0}/${n1} uid,gid
-	expect 0 unlink ${n0}/${n1}
-	umount /dev/md${n}
-	mdconfig -d -u ${n}
-	expect 0 rmdir ${n0}
-	;;
-*)
-	quick_exit
-	;;
-esac
+n0=`namegen`
+n1=`namegen`
+
+expect 0 mkdir ${n0} 0755
+n=`mdconfig -a -n -t malloc -s 1m`
+newfs /dev/md${n} >/dev/null
+mount /dev/md${n} ${n0}
+expect 0 create ${n0}/${n1} 0644
+expect 0 chown ${n0}/${n1} 65534 65534
+expect 65534,65534 stat ${n0}/${n1} uid,gid
+mount -ur /dev/md${n}
+expect EROFS chown ${n0}/${n1} 65533 65533
+expect 65534,65534 stat ${n0}/${n1} uid,gid
+mount -uw /dev/md${n}
+expect 0 chown ${n0}/${n1} 65533 65533
+expect 65533,65533 stat ${n0}/${n1} uid,gid
+expect 0 unlink ${n0}/${n1}
+umount /dev/md${n}
+mdconfig -d -u ${n}
+expect 0 rmdir ${n0}

Modified: head/tools/regression/fstest/tests/granular/00.t
==============================================================================
--- head/tools/regression/fstest/tests/granular/00.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/granular/00.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -6,6 +6,8 @@ desc="NFSv4 granular permissions checkin
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
+[ "${os}:${fs}" = "FreeBSD:ZFS" ] || quick_exit
+
 echo "1..49"
 
 n0=`namegen`

Modified: head/tools/regression/fstest/tests/granular/01.t
==============================================================================
--- head/tools/regression/fstest/tests/granular/01.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/granular/01.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -6,6 +6,8 @@ desc="NFSv4 granular permissions checkin
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
+[ "${os}:${fs}" = "FreeBSD:ZFS" ] || quick_exit
+
 echo "1..12"
 
 n0=`namegen`

Modified: head/tools/regression/fstest/tests/granular/02.t
==============================================================================
--- head/tools/regression/fstest/tests/granular/02.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/granular/02.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -6,6 +6,8 @@ desc="NFSv4 granular permissions checkin
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
+[ "${os}:${fs}" = "FreeBSD:ZFS" ] || quick_exit
+
 echo "1..83"
 
 n0=`namegen`

Modified: head/tools/regression/fstest/tests/granular/03.t
==============================================================================
--- head/tools/regression/fstest/tests/granular/03.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/granular/03.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -6,6 +6,8 @@ desc="NFSv4 granular permissions checkin
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
+[ "${os}:${fs}" = "FreeBSD:ZFS" ] || quick_exit
+
 echo "1..65"
 
 n0=`namegen`

Modified: head/tools/regression/fstest/tests/granular/04.t
==============================================================================
--- head/tools/regression/fstest/tests/granular/04.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/granular/04.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -6,6 +6,8 @@ desc="NFSv4 granular permissions checkin
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
+[ "${os}:${fs}" = "FreeBSD:ZFS" ] || quick_exit
+
 echo "1..52"
 
 n0=`namegen`

Modified: head/tools/regression/fstest/tests/granular/05.t
==============================================================================
--- head/tools/regression/fstest/tests/granular/05.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/granular/05.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -6,6 +6,8 @@ desc="NFSv4 granular permissions checkin
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
+[ "${os}:${fs}" = "FreeBSD:ZFS" ] || quick_exit
+
 echo "1..68"
 
 n0=`namegen`

Modified: head/tools/regression/fstest/tests/link/05.t
==============================================================================
--- head/tools/regression/fstest/tests/link/05.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/link/05.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -6,36 +6,31 @@ desc="link returns EMLINK if the link co
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
-case "${os}:${fs}" in
-FreeBSD:UFS)
-	echo "1..5"
-
-	n0=`namegen`
-	n1=`namegen`
-	n2=`namegen`
-
-	expect 0 mkdir ${n0} 0755
-	n=`mdconfig -a -n -t malloc -s 1m`
-	newfs -i 1 /dev/md${n} >/dev/null
-	mount /dev/md${n} ${n0}
-	expect 0 create ${n0}/${n1} 0644
-	i=1
-	while :; do
-		link ${n0}/${n1} ${n0}/${i} >/dev/null 2>&1
-		if [ $? -ne 0 ]; then
-			break
-		fi
-		i=`expr $i + 1`
-	done
-	test_check $i -eq 32767
-
-	expect EMLINK link ${n0}/${n1} ${n0}/${n2}
-
-	umount /dev/md${n}
-	mdconfig -d -u ${n}
-	expect 0 rmdir ${n0}
-	;;
-*)
-	quick_exit
-	;;
-esac
+[ "${os}:${fs}" = "FreeBSD:UFS" ] || quick_exit
+
+echo "1..5"
+
+n0=`namegen`
+n1=`namegen`
+n2=`namegen`
+
+expect 0 mkdir ${n0} 0755
+n=`mdconfig -a -n -t malloc -s 1m`
+newfs -i 1 /dev/md${n} >/dev/null
+mount /dev/md${n} ${n0}
+expect 0 create ${n0}/${n1} 0644
+i=1
+while :; do
+	link ${n0}/${n1} ${n0}/${i} >/dev/null 2>&1
+	if [ $? -ne 0 ]; then
+		break
+	fi
+	i=`expr $i + 1`
+done
+test_check $i -eq 32767
+
+expect EMLINK link ${n0}/${n1} ${n0}/${n2}
+
+umount /dev/md${n}
+mdconfig -d -u ${n}
+expect 0 rmdir ${n0}

Modified: head/tools/regression/fstest/tests/link/12.t
==============================================================================
--- head/tools/regression/fstest/tests/link/12.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/link/12.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -8,48 +8,88 @@ dir=`dirname $0`
 
 require chflags
 
-echo "1..32"
+case "${os}:${fs}" in
+FreeBSD:ZFS)
+	echo "1..27"
+	;;
+FreeBSD:UFS)
+	echo "1..48"
+	;;
+*)
+	quick_exit
+esac
 
 n0=`namegen`
 n1=`namegen`
 
 expect 0 create ${n0} 0644
 
+expect 1 stat ${n0} nlink
 expect 0 link ${n0} ${n1}
+expect 2 stat ${n0} nlink
 expect 0 unlink ${n1}
+expect 1 stat ${n0} nlink
 
 expect 0 chflags ${n0} SF_IMMUTABLE
+todo FreeBSD:ZFS "Creating a hard link to a file protected by SF_IMMUTABLE should return EPERM."
 expect EPERM link ${n0} ${n1}
+todo FreeBSD:ZFS "Creating a hard link to a file protected by SF_IMMUTABLE should return EPERM."
+expect 1 stat ${n0} nlink
 expect 0 chflags ${n0} none
+todo FreeBSD:ZFS "Creating a hard link to a file protected by SF_IMMUTABLE should return EPERM."
 expect 0 link ${n0} ${n1}
+expect 2 stat ${n0} nlink
 expect 0 unlink ${n1}
-
-expect 0 chflags ${n0} UF_IMMUTABLE
-expect EPERM link ${n0} ${n1}
-expect 0 chflags ${n0} none
-expect 0 link ${n0} ${n1}
-expect 0 unlink ${n1}
-
-expect 0 chflags ${n0} SF_APPEND
-expect EPERM link ${n0} ${n1}
-expect 0 chflags ${n0} none
-expect 0 link ${n0} ${n1}
-expect 0 unlink ${n1}
-
-expect 0 chflags ${n0} UF_APPEND
-expect EPERM link ${n0} ${n1}
-expect 0 chflags ${n0} none
-expect 0 link ${n0} ${n1}
-expect 0 unlink ${n1}
+expect 1 stat ${n0} nlink
 
 expect 0 chflags ${n0} SF_NOUNLINK
 expect 0 link ${n0} ${n1}
+expect 2 stat ${n0} nlink
 expect 0 chflags ${n0} none
 expect 0 unlink ${n1}
+expect 1 stat ${n0} nlink
 
-expect 0 chflags ${n0} UF_NOUNLINK
-expect 0 link ${n0} ${n1}
-expect 0 chflags ${n0} none
-expect 0 unlink ${n1}
+case "${os}:${fs}" in
+FreeBSD:ZFS)
+	expect 0 chflags ${n0} SF_APPEND
+	expect 0 link ${n0} ${n1}
+	expect 2 stat ${n0} nlink
+	expect 0 chflags ${n0} none
+	expect 0 unlink ${n1}
+	expect 1 stat ${n0} nlink
+	;;
+FreeBSD:UFS)
+	expect 0 chflags ${n0} SF_APPEND
+	expect EPERM link ${n0} ${n1}
+	expect 0 chflags ${n0} none
+	expect 0 link ${n0} ${n1}
+	expect 2 stat ${n0} nlink
+	expect 0 unlink ${n1}
+	expect 1 stat ${n0} nlink
+
+	expect 0 chflags ${n0} UF_IMMUTABLE
+	expect EPERM link ${n0} ${n1}
+	expect 0 chflags ${n0} none
+	expect 0 link ${n0} ${n1}
+	expect 2 stat ${n0} nlink
+	expect 0 unlink ${n1}
+	expect 1 stat ${n0} nlink
+
+	expect 0 chflags ${n0} UF_NOUNLINK
+	expect 0 link ${n0} ${n1}
+	expect 2 stat ${n0} nlink
+	expect 0 chflags ${n0} none
+	expect 0 unlink ${n1}
+	expect 1 stat ${n0} nlink
+
+	expect 0 chflags ${n0} UF_APPEND
+	expect EPERM link ${n0} ${n1}
+	expect 0 chflags ${n0} none
+	expect 0 link ${n0} ${n1}
+	expect 2 stat ${n0} nlink
+	expect 0 unlink ${n1}
+	expect 1 stat ${n0} nlink
+	;;
+esac
 
 expect 0 unlink ${n0}

Modified: head/tools/regression/fstest/tests/link/13.t
==============================================================================
--- head/tools/regression/fstest/tests/link/13.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/link/13.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -8,7 +8,16 @@ dir=`dirname $0`
 
 require chflags
 
-echo "1..32"
+case "${os}:${fs}" in
+FreeBSD:ZFS)
+	echo "1..29"
+	;;
+FreeBSD:UFS)
+	echo "1..49"
+	;;
+*)
+	quick_exit
+esac
 
 n0=`namegen`
 n1=`namegen`
@@ -17,40 +26,61 @@ n2=`namegen`
 expect 0 mkdir ${n0} 0755
 
 expect 0 create ${n0}/${n1} 0644
+expect 1 stat ${n0}/${n1} nlink
 expect 0 link ${n0}/${n1} ${n0}/${n2}
+expect 2 stat ${n0}/${n1} nlink
 expect 0 unlink ${n0}/${n2}
+expect 1 stat ${n0}/${n1} nlink
 
 expect 0 chflags ${n0} SF_IMMUTABLE
 expect EPERM link ${n0}/${n1} ${n0}/${n2}
+expect 1 stat ${n0}/${n1} nlink
 expect 0 chflags ${n0} none
 expect 0 link ${n0}/${n1} ${n0}/${n2}
+expect 2 stat ${n0}/${n1} nlink
 expect 0 unlink ${n0}/${n2}
-
-expect 0 chflags ${n0} UF_IMMUTABLE
-expect EPERM link ${n0}/${n1} ${n0}/${n2}
-expect 0 chflags ${n0} none
-expect 0 link ${n0}/${n1} ${n0}/${n2}
-expect 0 unlink ${n0}/${n2}
-
-expect 0 chflags ${n0} SF_APPEND
-expect 0 link ${n0}/${n1} ${n0}/${n2}
-expect 0 chflags ${n0} none
-expect 0 unlink ${n0}/${n2}
-
-expect 0 chflags ${n0} UF_APPEND
-expect 0 link ${n0}/${n1} ${n0}/${n2}
-expect 0 chflags ${n0} none
-expect 0 unlink ${n0}/${n2}
+expect 1 stat ${n0}/${n1} nlink
 
 expect 0 chflags ${n0} SF_NOUNLINK
 expect 0 link ${n0}/${n1} ${n0}/${n2}
+expect 2 stat ${n0}/${n1} nlink
 expect 0 chflags ${n0} none
 expect 0 unlink ${n0}/${n2}
+expect 1 stat ${n0}/${n1} nlink
 
-expect 0 chflags ${n0} UF_NOUNLINK
+expect 0 chflags ${n0} SF_APPEND
 expect 0 link ${n0}/${n1} ${n0}/${n2}
+expect 2 stat ${n0}/${n1} nlink
 expect 0 chflags ${n0} none
 expect 0 unlink ${n0}/${n2}
+expect 1 stat ${n0}/${n1} nlink
+
+case "${os}:${fs}" in
+FreeBSD:UFS)
+	expect 0 chflags ${n0} UF_IMMUTABLE
+	expect EPERM link ${n0}/${n1} ${n0}/${n2}
+	expect 1 stat ${n0}/${n1} nlink
+	expect 0 chflags ${n0} none
+	expect 0 link ${n0}/${n1} ${n0}/${n2}
+	expect 2 stat ${n0}/${n1} nlink
+	expect 0 unlink ${n0}/${n2}
+	expect 1 stat ${n0}/${n1} nlink
+
+	expect 0 chflags ${n0} UF_NOUNLINK
+	expect 0 link ${n0}/${n1} ${n0}/${n2}
+	expect 2 stat ${n0}/${n1} nlink
+	expect 0 chflags ${n0} none
+	expect 0 unlink ${n0}/${n2}
+	expect 1 stat ${n0}/${n1} nlink
+
+	expect 0 chflags ${n0} UF_APPEND
+	expect 0 link ${n0}/${n1} ${n0}/${n2}
+	expect 2 stat ${n0}/${n1} nlink
+	expect 0 chflags ${n0} none
+	expect 0 unlink ${n0}/${n2}
+	expect 1 stat ${n0}/${n1} nlink
+	;;
+esac
 
 expect 0 unlink ${n0}/${n1}
 expect 0 rmdir ${n0}

Modified: head/tools/regression/fstest/tests/link/14.t
==============================================================================
--- head/tools/regression/fstest/tests/link/14.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/link/14.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -6,29 +6,24 @@ desc="link returns EXDEV if the source a
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
-case "${os}" in
-FreeBSD)
-	echo "1..8"
+[ "${os}" = "FreeBSD" ] || quick_exit
 
-	n0=`namegen`
-	n1=`namegen`
-	n2=`namegen`
+echo "1..8"
 
-	expect 0 mkdir ${n0} 0755
-	n=`mdconfig -a -n -t malloc -s 1m`
-	newfs /dev/md${n} >/dev/null
-	mount /dev/md${n} ${n0}
-	expect 0 create ${n0}/${n1} 0644
-	expect EXDEV link ${n0}/${n1} ${n2}
-	expect 0 unlink ${n0}/${n1}
-	expect 0 create ${n1} 0644
-	expect EXDEV link ${n1} ${n0}/${n2}
-	expect 0 unlink ${n1}
-	umount /dev/md${n}
-	mdconfig -d -u ${n}
-	expect 0 rmdir ${n0}
-	;;
-*)
-	quick_exit
-	;;
-esac
+n0=`namegen`
+n1=`namegen`
+n2=`namegen`
+
+expect 0 mkdir ${n0} 0755
+n=`mdconfig -a -n -t malloc -s 1m`
+newfs /dev/md${n} >/dev/null
+mount /dev/md${n} ${n0}
+expect 0 create ${n0}/${n1} 0644
+expect EXDEV link ${n0}/${n1} ${n2}
+expect 0 unlink ${n0}/${n1}
+expect 0 create ${n1} 0644
+expect EXDEV link ${n1} ${n0}/${n2}
+expect 0 unlink ${n1}
+umount /dev/md${n}
+mdconfig -d -u ${n}
+expect 0 rmdir ${n0}

Modified: head/tools/regression/fstest/tests/link/15.t
==============================================================================
--- head/tools/regression/fstest/tests/link/15.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/link/15.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -6,33 +6,28 @@ desc="link returns ENOSPC if the directo
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
-case "${os}:${fs}" in
-FreeBSD:UFS)
-	echo "1..4"
+[ "${os}:${fs}" = "FreeBSD:UFS" ] || quick_exit
 
-	n0=`namegen`
-	n1=`namegen`
-	n2=`namegen`
+echo "1..4"
 
-	expect 0 mkdir ${n0} 0755
-	n=`mdconfig -a -n -t malloc -s 256k`
-	newfs /dev/md${n} >/dev/null
-	mount /dev/md${n} ${n0}
-	expect 0 create ${n0}/${n1} 0644
-	i=0
-	while :; do
-		link ${n0}/${n1} ${n0}/${i} >/dev/null 2>&1
-		if [ $? -ne 0 ]; then
-			break
-		fi
-		i=`expr $i + 1`
-	done
-	expect ENOSPC link ${n0}/${n1} ${n0}/${n2}
-	umount /dev/md${n}
-	mdconfig -d -u ${n}
-	expect 0 rmdir ${n0}
-	;;
-*)
-	quick_exit
-	;;
-esac
+n0=`namegen`
+n1=`namegen`
+n2=`namegen`
+
+expect 0 mkdir ${n0} 0755
+n=`mdconfig -a -n -t malloc -s 256k`
+newfs /dev/md${n} >/dev/null
+mount /dev/md${n} ${n0}
+expect 0 create ${n0}/${n1} 0644
+i=0
+while :; do
+	link ${n0}/${n1} ${n0}/${i} >/dev/null 2>&1
+	if [ $? -ne 0 ]; then
+		break
+	fi
+	i=`expr $i + 1`
+done
+expect ENOSPC link ${n0}/${n1} ${n0}/${n2}
+umount /dev/md${n}
+mdconfig -d -u ${n}
+expect 0 rmdir ${n0}

Modified: head/tools/regression/fstest/tests/link/16.t
==============================================================================
--- head/tools/regression/fstest/tests/link/16.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/link/16.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -6,34 +6,29 @@ desc="link returns EROFS if the requeste
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
-case "${os}" in
-FreeBSD)
-	echo "1..9"
-
-	n0=`namegen`
-	n1=`namegen`
-	n2=`namegen`
-
-	expect 0 mkdir ${n0} 0755
-	n=`mdconfig -a -n -t malloc -s 1m`
-	newfs /dev/md${n} >/dev/null
-	mount /dev/md${n} ${n0}
-	expect 0 create ${n0}/${n1} 0644
-
-	expect 0 link ${n0}/${n1} ${n0}/${n2}
-	expect 0 unlink ${n0}/${n2}
-	mount -ur /dev/md${n}
-	expect EROFS link ${n0}/${n1} ${n0}/${n2}
-	mount -uw /dev/md${n}
-	expect 0 link ${n0}/${n1} ${n0}/${n2}
-	expect 0 unlink ${n0}/${n2}
-
-	expect 0 unlink ${n0}/${n1}
-	umount /dev/md${n}
-	mdconfig -d -u ${n}
-	expect 0 rmdir ${n0}
-	;;
-*)
-	quick_exit
-	;;
-esac
+[ "${os}" = "FreeBSD" ] || quick_exit
+
+echo "1..9"
+
+n0=`namegen`
+n1=`namegen`
+n2=`namegen`
+
+expect 0 mkdir ${n0} 0755
+n=`mdconfig -a -n -t malloc -s 1m`
+newfs /dev/md${n} >/dev/null
+mount /dev/md${n} ${n0}
+expect 0 create ${n0}/${n1} 0644
+
+expect 0 link ${n0}/${n1} ${n0}/${n2}
+expect 0 unlink ${n0}/${n2}
+mount -ur /dev/md${n}
+expect EROFS link ${n0}/${n1} ${n0}/${n2}
+mount -uw /dev/md${n}
+expect 0 link ${n0}/${n1} ${n0}/${n2}
+expect 0 unlink ${n0}/${n2}
+
+expect 0 unlink ${n0}/${n1}
+umount /dev/md${n}
+mdconfig -d -u ${n}
+expect 0 rmdir ${n0}

Modified: head/tools/regression/fstest/tests/mkdir/08.t
==============================================================================
--- head/tools/regression/fstest/tests/mkdir/08.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/mkdir/08.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -8,7 +8,16 @@ dir=`dirname $0`
 
 require chflags
 
-echo "1..30"
+case "${os}:${fs}" in
+FreeBSD:ZFS)
+	echo "1..17"
+	;;
+FreeBSD:UFS)
+	echo "1..30"
+	;;
+*)
+	quick_exit
+esac
 
 n0=`namegen`
 n1=`namegen`
@@ -24,30 +33,34 @@ expect 0 chflags ${n0} none
 expect 0 mkdir ${n0}/${n1} 0755
 expect 0 rmdir ${n0}/${n1}
 
-expect 0 chflags ${n0} UF_IMMUTABLE
-expect EPERM mkdir ${n0}/${n1} 0755
-expect 0 chflags ${n0} none
+expect 0 chflags ${n0} SF_NOUNLINK
 expect 0 mkdir ${n0}/${n1} 0755
 expect 0 rmdir ${n0}/${n1}
-
-expect 0 chflags ${n0} SF_APPEND
-expect 0 mkdir ${n0}/${n1} 0755
 expect 0 chflags ${n0} none
-expect 0 rmdir ${n0}/${n1}
 
-expect 0 chflags ${n0} UF_APPEND
+expect 0 chflags ${n0} SF_APPEND
 expect 0 mkdir ${n0}/${n1} 0755
 expect 0 chflags ${n0} none
 expect 0 rmdir ${n0}/${n1}
 
-expect 0 chflags ${n0} SF_NOUNLINK
-expect 0 mkdir ${n0}/${n1} 0755
-expect 0 rmdir ${n0}/${n1}
-expect 0 chflags ${n0} none
-
-expect 0 chflags ${n0} UF_NOUNLINK
-expect 0 mkdir ${n0}/${n1} 0755
-expect 0 rmdir ${n0}/${n1}
-expect 0 chflags ${n0} none
+case "${os}:${fs}" in
+FreeBSD:UFS)
+	expect 0 chflags ${n0} UF_IMMUTABLE
+	expect EPERM mkdir ${n0}/${n1} 0755
+	expect 0 chflags ${n0} none
+	expect 0 mkdir ${n0}/${n1} 0755
+	expect 0 rmdir ${n0}/${n1}
+
+	expect 0 chflags ${n0} UF_NOUNLINK
+	expect 0 mkdir ${n0}/${n1} 0755
+	expect 0 rmdir ${n0}/${n1}
+	expect 0 chflags ${n0} none
+
+	expect 0 chflags ${n0} UF_APPEND
+	expect 0 mkdir ${n0}/${n1} 0755
+	expect 0 chflags ${n0} none
+	expect 0 rmdir ${n0}/${n1}
+	;;
+esac
 
 expect 0 rmdir ${n0}

Modified: head/tools/regression/fstest/tests/mkdir/09.t
==============================================================================
--- head/tools/regression/fstest/tests/mkdir/09.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/mkdir/09.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -6,29 +6,24 @@ desc="mkdir returns EROFS if the named f
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
-case "${os}:${fs}" in
-FreeBSD:UFS)
-	echo "1..7"
+[ "${os}:${fs}" = "FreeBSD:UFS" ] || quick_exit
 
-	n0=`namegen`
-	n1=`namegen`
+echo "1..7"
 
-	expect 0 mkdir ${n0} 0755
-	n=`mdconfig -a -n -t malloc -s 1m`
-	newfs /dev/md${n} >/dev/null
-	mount /dev/md${n} ${n0}
-	expect 0 mkdir ${n0}/${n1} 0755
-	expect 0 rmdir ${n0}/${n1}
-	mount -ur /dev/md${n}
-	expect EROFS mkdir ${n0}/${n1} 0755
-	mount -uw /dev/md${n}
-	expect 0 mkdir ${n0}/${n1} 0755
-	expect 0 rmdir ${n0}/${n1}
-	umount /dev/md${n}
-	mdconfig -d -u ${n}
-	expect 0 rmdir ${n0}
-	;;
-*)
-	quick_exit
-	;;
-esac
+n0=`namegen`
+n1=`namegen`
+
+expect 0 mkdir ${n0} 0755
+n=`mdconfig -a -n -t malloc -s 1m`
+newfs /dev/md${n} >/dev/null
+mount /dev/md${n} ${n0}
+expect 0 mkdir ${n0}/${n1} 0755
+expect 0 rmdir ${n0}/${n1}
+mount -ur /dev/md${n}
+expect EROFS mkdir ${n0}/${n1} 0755
+mount -uw /dev/md${n}
+expect 0 mkdir ${n0}/${n1} 0755
+expect 0 rmdir ${n0}/${n1}
+umount /dev/md${n}
+mdconfig -d -u ${n}
+expect 0 rmdir ${n0}

Modified: head/tools/regression/fstest/tests/mkdir/11.t
==============================================================================
--- head/tools/regression/fstest/tests/mkdir/11.t	Fri Aug  6 23:52:16 2010	(r210983)
+++ head/tools/regression/fstest/tests/mkdir/11.t	Fri Aug  6 23:58:54 2010	(r210984)
@@ -6,31 +6,26 @@ desc="mkdir returns ENOSPC if there are 
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
-case "${os}:${fs}" in
-FreeBSD:UFS)
-	echo "1..3"
+[ "${os}:${fs}" = "FreeBSD:UFS" ] || quick_exit
 
-	n0=`namegen`
-	n1=`namegen`
+echo "1..3"
 
-	expect 0 mkdir ${n0} 0755
-	n=`mdconfig -a -n -t malloc -s 256k`
-	newfs /dev/md${n} >/dev/null
-	mount /dev/md${n} ${n0}
-	i=0
-	while :; do
-		mkdir ${n0}/${i} >/dev/null 2>&1
-		if [ $? -ne 0 ]; then
-			break
-		fi
-		i=`expr $i + 1`
-	done
-	expect ENOSPC mkdir ${n0}/${n1} 0755

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 01:05:02 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E335A1065673;
	Sat,  7 Aug 2010 01:05:02 +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 CDDD58FC15;
	Sat,  7 Aug 2010 01:05:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77152Og085174;
	Sat, 7 Aug 2010 01:05:02 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o771527L085159;
	Sat, 7 Aug 2010 01:05:02 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008070105.o771527L085159@svn.freebsd.org>
From: Rick Macklem 
Date: Sat, 7 Aug 2010 01:05: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: r210985 - in stable/8: sys/conf sys/fs/nfsclient
	sys/modules sys/modules/nfscl sys/modules/nfsclient
	sys/modules/nfslock sys/nfs sys/nfsclient usr.sbin/rpc.lockd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 01:05:03 -0000

Author: rmacklem
Date: Sat Aug  7 01:05:02 2010
New Revision: 210985
URL: http://svn.freebsd.org/changeset/base/210985

Log:
  MFC: r210455, r210456
  Move sys/nfsclient/nfs_lock.c into sys/nfs and build it as a separate
  module that can be used by both the regular and experimental nfs
  clients. This fixes the problem reported by jh@ where /dev/nfslock
  would be registered twice when both nfs clients were used.
  I also defined the size of the lm_fh field to be the correct value,
  as it should be the maximum size of an NFSv3 file handle.
  Also fix the include path for nfs_lock.h for usr.sbin/rpc.lockd/kern.c.

Added:
  stable/8/sys/modules/nfslock/
     - copied from r210455, head/sys/modules/nfslock/
  stable/8/sys/nfs/nfs_lock.c
     - copied unchanged from r210455, head/sys/nfs/nfs_lock.c
  stable/8/sys/nfs/nfs_lock.h
     - copied unchanged from r210455, head/sys/nfs/nfs_lock.h
Deleted:
  stable/8/sys/fs/nfsclient/nfs_cllock.c
  stable/8/sys/fs/nfsclient/nfs_lock.h
  stable/8/sys/nfsclient/nfs_lock.c
  stable/8/sys/nfsclient/nfs_lock.h
Modified:
  stable/8/sys/conf/files
  stable/8/sys/fs/nfsclient/nfs_clnfsiod.c
  stable/8/sys/fs/nfsclient/nfs_clport.c
  stable/8/sys/fs/nfsclient/nfs_clsubs.c
  stable/8/sys/fs/nfsclient/nfs_clvnops.c
  stable/8/sys/modules/Makefile
  stable/8/sys/modules/nfscl/Makefile
  stable/8/sys/modules/nfsclient/Makefile
  stable/8/sys/nfsclient/nfs_nfsiod.c
  stable/8/sys/nfsclient/nfs_vfsops.c
  stable/8/sys/nfsclient/nfs_vnops.c
  stable/8/usr.sbin/rpc.lockd/kern.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (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/xen/xenpci/   (props changed)
  stable/8/usr.sbin/rpc.lockd/   (props changed)

Modified: stable/8/sys/conf/files
==============================================================================
--- stable/8/sys/conf/files	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/conf/files	Sat Aug  7 01:05:02 2010	(r210985)
@@ -1871,7 +1871,6 @@ fs/nfsclient/nfs_clrpcops.c	optional nfs
 fs/nfsclient/nfs_clvnops.c	optional nfscl
 fs/nfsclient/nfs_clnode.c	optional nfscl
 fs/nfsclient/nfs_clvfsops.c	optional nfscl
-fs/nfsclient/nfs_cllock.c	optional nfscl
 fs/nfsclient/nfs_clport.c	optional nfscl
 fs/nfsclient/nfs_clbio.c	optional nfscl
 fs/nfsclient/nfs_clnfsiod.c	optional nfscl
@@ -2637,6 +2636,7 @@ netsmb/smb_subr.c		optional netsmb
 netsmb/smb_trantcp.c		optional netsmb
 netsmb/smb_usr.c		optional netsmb
 nfs/nfs_common.c		optional nfsclient | nfsserver
+nfs/nfs_lock.c			optional nfsclient | nfscl
 nfsclient/bootp_subr.c		optional bootp nfsclient
 nfsclient/krpc_subr.c		optional bootp nfsclient
 nfsclient/nfs_bio.c		optional nfsclient
@@ -2647,7 +2647,6 @@ nfsclient/nfs_subs.c		optional nfsclient
 nfsclient/nfs_nfsiod.c		optional nfsclient
 nfsclient/nfs_vfsops.c		optional nfsclient
 nfsclient/nfs_vnops.c		optional nfsclient
-nfsclient/nfs_lock.c		optional nfsclient
 nfsserver/nfs_fha.c		optional nfsserver
 nfsserver/nfs_serv.c		optional nfsserver
 nfsserver/nfs_srvkrpc.c		optional nfsserver

Modified: stable/8/sys/fs/nfsclient/nfs_clnfsiod.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clnfsiod.c	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/fs/nfsclient/nfs_clnfsiod.c	Sat Aug  7 01:05:02 2010	(r210985)
@@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 extern struct mtx ncl_iod_mutex;
 

Modified: stable/8/sys/fs/nfsclient/nfs_clport.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clport.c	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/fs/nfsclient/nfs_clport.c	Sat Aug  7 01:05:02 2010	(r210985)
@@ -1268,4 +1268,5 @@ MODULE_VERSION(nfscl, 1);
 MODULE_DEPEND(nfscl, nfscommon, 1, 1, 1);
 MODULE_DEPEND(nfscl, krpc, 1, 1, 1);
 MODULE_DEPEND(nfscl, nfssvc, 1, 1, 1);
+MODULE_DEPEND(nfscl, nfslock, 1, 1, 1);
 

Modified: stable/8/sys/fs/nfsclient/nfs_clsubs.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clsubs.c	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/fs/nfsclient/nfs_clsubs.c	Sat Aug  7 01:05:02 2010	(r210985)
@@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 

Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clvnops.c	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/fs/nfsclient/nfs_clvnops.c	Sat Aug  7 01:05:02 2010	(r210985)
@@ -67,24 +67,24 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-
 #include 
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
 #include 
 
+#include 
+
 /* Defs */
 #define	TRUE	1
 #define	FALSE	0
 
 extern struct nfsstats newnfsstats;
 MALLOC_DECLARE(M_NEWNFSREQ);
-vop_advlock_t	*ncl_advlock_p = ncl_dolock;
+vop_advlock_t	*ncl_advlock_p = nfs_dolock;
 
 /*
  * Ifdef for FreeBSD-current merged buffer cache. It is unfortunate that these

Modified: stable/8/sys/modules/Makefile
==============================================================================
--- stable/8/sys/modules/Makefile	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/modules/Makefile	Sat Aug  7 01:05:02 2010	(r210985)
@@ -201,6 +201,7 @@ SUBDIR=	${_3dfx} \
 	nfsclient \
 	nfscommon \
 	nfsd \
+	nfslock \
 	nfslockd \
 	nfsserver \
 	nfssvc \

Modified: stable/8/sys/modules/nfscl/Makefile
==============================================================================
--- stable/8/sys/modules/nfscl/Makefile	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/modules/nfscl/Makefile	Sat Aug  7 01:05:02 2010	(r210985)
@@ -9,7 +9,6 @@ SRCS=	vnode_if.h \
 	nfs_clcomsubs.c \
 	nfs_clport.c \
 	nfs_clbio.c \
-	nfs_cllock.c \
 	nfs_clnfsiod.c \
 	nfs_clnode.c \
 	nfs_clsubs.c \

Modified: stable/8/sys/modules/nfsclient/Makefile
==============================================================================
--- stable/8/sys/modules/nfsclient/Makefile	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/modules/nfsclient/Makefile	Sat Aug  7 01:05:02 2010	(r210985)
@@ -4,7 +4,7 @@
 
 KMOD=	nfsclient
 SRCS=	vnode_if.h \
-	nfs_bio.c nfs_lock.c nfs_node.c nfs_subs.c nfs_nfsiod.c \
+	nfs_bio.c nfs_node.c nfs_subs.c nfs_nfsiod.c \
 	nfs_vfsops.c nfs_vnops.c nfs_krpc.c \
 	opt_inet.h opt_nfs.h opt_bootp.h opt_nfsroot.h
 SRCS+=	opt_inet6.h opt_kdtrace.h opt_kgssapi.h

Copied: stable/8/sys/nfs/nfs_lock.c (from r210455, head/sys/nfs/nfs_lock.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/8/sys/nfs/nfs_lock.c	Sat Aug  7 01:05:02 2010	(r210985, copy of r210455, head/sys/nfs/nfs_lock.c)
@@ -0,0 +1,396 @@
+/*-
+ * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Berkeley Software Design Inc's name may not be used to endorse or
+ *    promote products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``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 BERKELEY SOFTWARE DESIGN INC 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.
+ *
+ *      from BSDI nfs_lock.c,v 2.4 1998/12/14 23:49:56 jch Exp
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+#include 		/* for hz */
+#include 
+#include 
+#include 
+#include 		/* for hz */ /* Must come after sys/malloc.h */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+extern void (*nlminfo_release_p)(struct proc *p);
+
+MALLOC_DEFINE(M_NFSLOCK, "nfsclient_lock", "NFS lock request");
+MALLOC_DEFINE(M_NLMINFO, "nfsclient_nlminfo", "NFS lock process structure");
+
+static int nfslockdans(struct thread *td, struct lockd_ans *ansp);
+static void nlminfo_release(struct proc *p);
+/*
+ * --------------------------------------------------------------------
+ * A miniature device driver which the userland uses to talk to us.
+ *
+ */
+
+static struct cdev *nfslock_dev;
+static struct mtx nfslock_mtx;
+static int nfslock_isopen;
+static TAILQ_HEAD(,__lock_msg)	nfslock_list;
+
+static int
+nfslock_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
+{
+	int error;
+
+	error = priv_check(td, PRIV_NFS_LOCKD);
+	if (error)
+		return (error);
+
+	mtx_lock(&nfslock_mtx);
+	if (!nfslock_isopen) {
+		error = 0;
+		nfslock_isopen = 1;
+	} else {
+		error = EOPNOTSUPP;
+	}
+	mtx_unlock(&nfslock_mtx);
+		
+	return (error);
+}
+
+static int
+nfslock_close(struct cdev *dev, int fflag, int devtype, struct thread *td)
+{
+	struct __lock_msg *lm;
+
+	mtx_lock(&nfslock_mtx);
+	nfslock_isopen = 0;
+	while (!TAILQ_EMPTY(&nfslock_list)) {
+		lm = TAILQ_FIRST(&nfslock_list);
+		/* XXX: answer request */
+		TAILQ_REMOVE(&nfslock_list, lm, lm_link);
+		free(lm, M_NFSLOCK);
+	}
+	mtx_unlock(&nfslock_mtx);
+	return (0);
+}
+
+static int
+nfslock_read(struct cdev *dev, struct uio *uio, int ioflag)
+{
+	int error;
+	struct __lock_msg *lm;
+
+	if (uio->uio_resid != sizeof *lm)
+		return (EOPNOTSUPP);
+	lm = NULL;
+	error = 0;
+	mtx_lock(&nfslock_mtx);
+	while (TAILQ_EMPTY(&nfslock_list)) {
+		error = msleep(&nfslock_list, &nfslock_mtx, PSOCK | PCATCH,
+		    "nfslockd", 0);
+		if (error)
+			break;
+	}
+	if (!error) {
+		lm = TAILQ_FIRST(&nfslock_list);
+		TAILQ_REMOVE(&nfslock_list, lm, lm_link);
+	}
+	mtx_unlock(&nfslock_mtx);
+	if (!error) {
+		error = uiomove(lm, sizeof *lm, uio);
+		free(lm, M_NFSLOCK);
+	}
+	return (error);
+}
+
+static int
+nfslock_write(struct cdev *dev, struct uio *uio, int ioflag)
+{
+	struct lockd_ans la;
+	int error;
+
+	if (uio->uio_resid != sizeof la)
+		return (EOPNOTSUPP);
+	error = uiomove(&la, sizeof la, uio);
+	if (!error)
+		error = nfslockdans(curthread, &la);
+	return (error);
+}
+
+static int
+nfslock_send(struct __lock_msg *lm)
+{
+	struct __lock_msg *lm2;
+	int error;
+
+	error = 0;
+	lm2 = malloc(sizeof *lm2, M_NFSLOCK, M_WAITOK);
+	mtx_lock(&nfslock_mtx);
+	if (nfslock_isopen) {
+		memcpy(lm2, lm, sizeof *lm2);
+		TAILQ_INSERT_TAIL(&nfslock_list, lm2, lm_link);
+		wakeup(&nfslock_list);
+	} else {
+		error = EOPNOTSUPP;
+	}
+	mtx_unlock(&nfslock_mtx);
+	if (error)
+		free(lm2, M_NFSLOCK);
+	return (error);
+}
+
+static struct cdevsw nfslock_cdevsw = {
+	.d_version =	D_VERSION,
+	.d_open =	nfslock_open,
+	.d_close =	nfslock_close,
+	.d_read =	nfslock_read,
+	.d_write =	nfslock_write,
+	.d_name =	"nfslock"
+};
+
+static int
+nfslock_modevent(module_t mod __unused, int type, void *data __unused)
+{
+
+	switch (type) {
+	case MOD_LOAD:
+		if (bootverbose)
+			printf("nfslock: pseudo-device\n");
+		mtx_init(&nfslock_mtx, "nfslock", NULL, MTX_DEF);
+		TAILQ_INIT(&nfslock_list);
+		nlminfo_release_p = nlminfo_release;
+		nfslock_dev = make_dev(&nfslock_cdevsw, 0,
+		    UID_ROOT, GID_KMEM, 0600, _PATH_NFSLCKDEV);
+		return (0);
+	default:
+		return (EOPNOTSUPP);
+	}
+}
+
+DEV_MODULE(nfslock, nfslock_modevent, NULL);
+MODULE_VERSION(nfslock, 1);
+
+
+/*
+ * XXX
+ * We have to let the process know if the call succeeded.  I'm using an extra
+ * field in the p_nlminfo field in the proc structure, as it is already for
+ * lockd stuff.
+ */
+
+/*
+ * nfs_advlock --
+ *      NFS advisory byte-level locks.
+ *
+ * The vnode shall be (shared) locked on the entry, it is
+ * unconditionally unlocked after.
+ */
+int
+nfs_dolock(struct vop_advlock_args *ap)
+{
+	LOCKD_MSG msg;
+	struct thread *td;
+	struct vnode *vp;
+	int error;
+	struct flock *fl;
+	struct proc *p;
+
+	td = curthread;
+	p = td->td_proc;
+
+	vp = ap->a_vp;
+	fl = ap->a_fl;
+
+	ASSERT_VOP_LOCKED(vp, "nfs_dolock");
+
+	bcopy(VFSTONFS(vp->v_mount)->nm_nam, &msg.lm_addr,
+		min(sizeof msg.lm_addr, VFSTONFS(vp->v_mount)->nm_nam->sa_len));
+	msg.lm_fh_len = NFS_ISV3(vp) ? VTONFS(vp)->n_fhsize : NFSX_V2FH;
+	bcopy(VTONFS(vp)->n_fhp, msg.lm_fh, msg.lm_fh_len);
+	msg.lm_nfsv3 = NFS_ISV3(vp);
+	VOP_UNLOCK(vp, 0);
+
+	/*
+	 * the NLM protocol doesn't allow the server to return an error
+	 * on ranges, so we do it.
+	 */
+	if (fl->l_whence != SEEK_END) {
+		if ((fl->l_whence != SEEK_CUR && fl->l_whence != SEEK_SET) ||
+		    fl->l_start < 0 ||
+		    (fl->l_len < 0 &&
+		     (fl->l_start == 0 || fl->l_start + fl->l_len < 0)))
+			return (EINVAL);
+		if (fl->l_len > 0 &&
+			 (fl->l_len - 1 > OFF_MAX - fl->l_start))
+			return (EOVERFLOW);
+	}
+
+	/*
+	 * Fill in the information structure.
+	 */
+	msg.lm_version = LOCKD_MSG_VERSION;
+	msg.lm_msg_ident.pid = p->p_pid;
+
+	mtx_lock(&Giant);
+	/*
+	 * if there is no nfsowner table yet, allocate one.
+	 */
+	if (p->p_nlminfo == NULL) {
+		p->p_nlminfo = malloc(sizeof(struct nlminfo),
+		    M_NLMINFO, M_WAITOK | M_ZERO);
+		p->p_nlminfo->pid_start = p->p_stats->p_start;
+		timevaladd(&p->p_nlminfo->pid_start, &boottime);
+	}
+	msg.lm_msg_ident.pid_start = p->p_nlminfo->pid_start;
+	msg.lm_msg_ident.msg_seq = ++(p->p_nlminfo->msg_seq);
+
+	msg.lm_fl = *fl;
+	msg.lm_wait = ap->a_flags & F_WAIT;
+	msg.lm_getlk = ap->a_op == F_GETLK;
+	cru2x(td->td_ucred, &msg.lm_cred);
+
+	for (;;) {
+		error = nfslock_send(&msg);
+		if (error)
+			goto out;
+
+		/* Unlocks succeed immediately.  */
+		if (fl->l_type == F_UNLCK)
+			goto out;
+
+		/*
+		 * Retry after 20 seconds if we haven't gotten a response yet.
+		 * This number was picked out of thin air... but is longer
+		 * then even a reasonably loaded system should take (at least
+		 * on a local network).  XXX Probably should use a back-off
+		 * scheme.
+		 *
+		 * XXX: No PCATCH here since we currently have no useful
+		 * way to signal to the userland rpc.lockd that the request
+		 * has been aborted.  Once the rpc.lockd implementation
+		 * can handle aborts, and we report them properly,
+		 * PCATCH can be put back.  In the mean time, if we did
+		 * permit aborting, the lock attempt would "get lost"
+		 * and the lock would get stuck in the locked state.
+		 */
+		error = tsleep(p->p_nlminfo, PUSER, "lockd", 20*hz);
+		if (error != 0) {
+			if (error == EWOULDBLOCK) {
+				/*
+				 * We timed out, so we rewrite the request
+				 * to the fifo.
+				 */
+				continue;
+			}
+
+			break;
+		}
+
+		if (msg.lm_getlk && p->p_nlminfo->retcode == 0) {
+			if (p->p_nlminfo->set_getlk_pid) {
+				fl->l_sysid = 0; /* XXX */
+				fl->l_pid = p->p_nlminfo->getlk_pid;
+			} else {
+				fl->l_type = F_UNLCK;
+			}
+		}
+		error = p->p_nlminfo->retcode;
+		break;
+	}
+ out:
+	mtx_unlock(&Giant);
+	return (error);
+}
+
+/*
+ * nfslockdans --
+ *      NFS advisory byte-level locks answer from the lock daemon.
+ */
+static int
+nfslockdans(struct thread *td, struct lockd_ans *ansp)
+{
+	struct proc *targetp;
+
+	/* the version should match, or we're out of sync */
+	if (ansp->la_vers != LOCKD_ANS_VERSION)
+		return (EINVAL);
+
+	/* Find the process, set its return errno and wake it up. */
+	if ((targetp = pfind(ansp->la_msg_ident.pid)) == NULL)
+		return (ESRCH);
+
+	/* verify the pid hasn't been reused (if we can), and it isn't waiting
+	 * for an answer from a more recent request.  We return an EPIPE if
+	 * the match fails, because we've already used ESRCH above, and this
+	 * is sort of like writing on a pipe after the reader has closed it.
+	 */
+	if (targetp->p_nlminfo == NULL ||
+	    ((ansp->la_msg_ident.msg_seq != -1) &&
+	      (timevalcmp(&targetp->p_nlminfo->pid_start,
+			&ansp->la_msg_ident.pid_start, !=) ||
+	       targetp->p_nlminfo->msg_seq != ansp->la_msg_ident.msg_seq))) {
+		PROC_UNLOCK(targetp);
+		return (EPIPE);
+	}
+
+	targetp->p_nlminfo->retcode = ansp->la_errno;
+	targetp->p_nlminfo->set_getlk_pid = ansp->la_set_getlk_pid;
+	targetp->p_nlminfo->getlk_pid = ansp->la_getlk_pid;
+
+	wakeup(targetp->p_nlminfo);
+
+	PROC_UNLOCK(targetp);
+	return (0);
+}
+
+/*
+ * Free nlminfo attached to process.
+ */
+void        
+nlminfo_release(struct proc *p)
+{  
+	free(p->p_nlminfo, M_NLMINFO);
+	p->p_nlminfo = NULL;
+}

Copied: stable/8/sys/nfs/nfs_lock.h (from r210455, head/sys/nfs/nfs_lock.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/8/sys/nfs/nfs_lock.h	Sat Aug  7 01:05:02 2010	(r210985, copy of r210455, head/sys/nfs/nfs_lock.h)
@@ -0,0 +1,90 @@
+/*-
+ * Copyright (c) 1998 Berkeley Software Design, Inc. All rights reserved.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Berkeley Software Design Inc's name may not be used to endorse or
+ *    promote products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``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 BERKELEY SOFTWARE DESIGN INC 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.
+ *
+ *      from nfs_lock.h,v 2.2 1998/04/28 19:38:41 don Exp
+ * $FreeBSD$
+ */
+
+/*
+ * lockd uses the nfssvc system call to get the unique kernel services it needs.
+ * It passes in a request structure with a version number at the start.
+ * This prevents libc from needing to change if the information passed
+ * between lockd and the kernel needs to change.
+ *
+ * If a structure changes, you must bump the version number.
+ */
+
+/*
+ * The fifo where the kernel writes requests for locks on remote NFS files,
+ * and where lockd reads these requests.
+ *
+ */
+#define	_PATH_NFSLCKDEV	"nfslock"
+
+/*
+ * This structure is used to uniquely identify the process which originated
+ * a particular message to lockd.  A sequence number is used to differentiate
+ * multiple messages from the same process.  A process start time is used to
+ * detect the unlikely, but possible, event of the recycling of a pid.
+ */
+struct lockd_msg_ident {
+	pid_t		pid;            /* The process ID. */
+	struct timeval	pid_start;	/* Start time of process id */
+	int		msg_seq;	/* Sequence number of message */
+};
+
+#define LOCKD_MSG_VERSION	3
+
+/*
+ * The structure that the kernel hands us for each lock request.
+ */
+typedef struct __lock_msg {
+	TAILQ_ENTRY(__lock_msg)	lm_link;	/* internal linkage */
+	int			lm_version;	/* which version is this */
+	struct lockd_msg_ident	lm_msg_ident;	/* originator of the message */
+	struct flock		lm_fl;             /* The lock request. */
+	int			lm_wait;           /* The F_WAIT flag. */
+	int			lm_getlk;		/* is this a F_GETLK request */
+	struct sockaddr_storage lm_addr;		/* The address. */
+	int			lm_nfsv3;		/* If NFS version 3. */
+	size_t			lm_fh_len;		/* The file handle length. */
+	struct xucred		lm_cred;		/* user cred for lock req */
+	u_int8_t		lm_fh[NFSX_V3FHMAX];/* The file handle. */
+} LOCKD_MSG;
+
+#define LOCKD_ANS_VERSION	1
+
+struct lockd_ans {
+	int		la_vers;
+	struct lockd_msg_ident	la_msg_ident;	/* originator of the message */
+	int		la_errno;
+	int		la_set_getlk_pid;		/* use returned pid */
+	int		la_getlk_pid;		/* returned pid for F_GETLK */
+};
+
+#ifdef _KERNEL
+int	nfs_dolock(struct vop_advlock_args *ap);
+#endif

Modified: stable/8/sys/nfsclient/nfs_nfsiod.c
==============================================================================
--- stable/8/sys/nfsclient/nfs_nfsiod.c	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/nfsclient/nfs_nfsiod.c	Sat Aug  7 01:05:02 2010	(r210985)
@@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
+#include 
 
 static MALLOC_DEFINE(M_NFSSVC, "nfsclient_srvsock", "Nfs server structure");
 

Modified: stable/8/sys/nfsclient/nfs_vfsops.c
==============================================================================
--- stable/8/sys/nfsclient/nfs_vfsops.c	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/nfsclient/nfs_vfsops.c	Sat Aug  7 01:05:02 2010	(r210985)
@@ -148,6 +148,7 @@ MODULE_DEPEND(nfs, krpc, 1, 1, 1);
 MODULE_DEPEND(nfs, kgssapi, 1, 1, 1);
 #endif
 MODULE_DEPEND(nfs, nfs_common, 1, 1, 1);
+MODULE_DEPEND(nfs, nfslock, 1, 1, 1);
 
 static struct nfs_rpcops nfs_rpcops = {
 	nfs_readrpc,

Modified: stable/8/sys/nfsclient/nfs_vnops.c
==============================================================================
--- stable/8/sys/nfsclient/nfs_vnops.c	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/nfsclient/nfs_vnops.c	Sat Aug  7 01:05:02 2010	(r210985)
@@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 

Modified: stable/8/usr.sbin/rpc.lockd/kern.c
==============================================================================
--- stable/8/usr.sbin/rpc.lockd/kern.c	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/usr.sbin/rpc.lockd/kern.c	Sat Aug  7 01:05:02 2010	(r210985)
@@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$");
 
 #include "nlm_prot.h"
 #include 
-#include 
+#include 
 
 #include "lockd.h"
 #include "lockd_lock.h"

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 01:49:45 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 40C46106566B;
	Sat,  7 Aug 2010 01:49:45 +0000 (UTC)
	(envelope-from neel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2F2588FC13;
	Sat,  7 Aug 2010 01:49:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o771nj7B095047;
	Sat, 7 Aug 2010 01:49:45 GMT (envelope-from neel@svn.freebsd.org)
Received: (from neel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o771njrt095042;
	Sat, 7 Aug 2010 01:49:45 GMT (envelope-from neel@svn.freebsd.org)
Message-Id: <201008070149.o771njrt095042@svn.freebsd.org>
From: Neel Natu 
Date: Sat, 7 Aug 2010 01:49:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210986 - in head/sys/mips: include mips
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 01:49:45 -0000

Author: neel
Date: Sat Aug  7 01:49:44 2010
New Revision: 210986
URL: http://svn.freebsd.org/changeset/base/210986

Log:
  - Consolidate the the cache coherence attribute definitions in a single place.
    Adapted from Juli's changes to pte.h in the octeon branch:
    http://svn.freebsd.org/viewvc/base/user/jmallett/octeon/sys/mips/include/pte.h
  
  - Set the KX and UX bits in the status register for n64 kernels.
  
  Reviewed by:	jmallett

Modified:
  head/sys/mips/include/cpuregs.h
  head/sys/mips/include/pte.h
  head/sys/mips/mips/locore.S
  head/sys/mips/mips/mpboot.S

Modified: head/sys/mips/include/cpuregs.h
==============================================================================
--- head/sys/mips/include/cpuregs.h	Sat Aug  7 01:05:02 2010	(r210985)
+++ head/sys/mips/include/cpuregs.h	Sat Aug  7 01:49:44 2010	(r210986)
@@ -110,15 +110,75 @@
 #define	MIPS_XKPHYS_START		0x8000000000000000
 #define	MIPS_XKPHYS_END			0xbfffffffffffffff
 
-#define	MIPS_CCA_UC		0x02	/* Uncached.  */
-#define	MIPS_CCA_CNC		0x03	/* Cacheable non-coherent.  */
+/*
+ * Cache Coherency Attributes:
+ *	UC:	Uncached.
+ *	UA:	Uncached accelerated.
+ *	C:	Cacheable, coherency unspecified.
+ *	CNC:	Cacheable non-coherent.
+ *	CC:	Cacheable coherent.
+ *	CCE:	Cacheable coherent, exclusive read.
+ *	CCEW:	Cacheable coherent, exclusive write.
+ *	CCUOW:	Cacheable coherent, update on write.
+ *
+ * Note that some bits vary in meaning across implementations (and that the
+ * listing here is no doubt incomplete) and that the optimal cached mode varies
+ * between implementations.  0x02 is required to be UC and 0x03 is required to
+ * be a least C.
+ *
+ * We define the following logical bits:
+ * 	UNCACHED:
+ * 		The optimal uncached mode for the target CPU type.  This must
+ * 		be suitable for use in accessing memory-mapped devices.
+ * 	CACHED:	The optional cached mode for the target CPU type.
+ */
+
+#define	MIPS_CCA_UC		0x02	/* Uncached. */
+#define	MIPS_CCA_C		0x03	/* Cacheable, coherency unspecified. */
+
+#if defined(CPU_R4000) || defined(CPU_R10000)
+#define	MIPS_CCA_CNC	0x03
+#define	MIPS_CCA_CCE	0x04
+#define	MIPS_CCA_CCEW	0x05
+
+#ifdef CPU_R4000
+#define	MIPS_CCA_CCUOW	0x06
+#endif
+
+#ifdef CPU_R10000
+#define	MIPS_CCA_UA	0x07
+#endif
+
+#define	MIPS_CCA_CACHED	MIPS_CCA_CCEW
+#endif /* defined(CPU_R4000) || defined(CPU_R10000) */
+
+#if defined(CPU_SB1)
+#define	MIPS_CCA_CC	0x05	/* Cacheable Coherent. */
+#endif
+
+#ifndef	MIPS_CCA_UNCACHED
+#define	MIPS_CCA_UNCACHED	MIPS_CCA_UC
+#endif
+
+/*
+ * If we don't know which cached mode to use and there is a cache coherent
+ * mode, use it.  If there is not a cache coherent mode, use the required
+ * cacheable mode.
+ */
+#ifndef MIPS_CCA_CACHED
+#ifdef MIPS_CCA_CC
+#define	MIPS_CCA_CACHED	MIPS_CCA_CC
+#else
+#define	MIPS_CCA_CACHED	MIPS_CCA_C
+#endif
+#endif
 
 #define	MIPS_PHYS_TO_XKPHYS(cca,x) \
 	((0x2ULL << 62) | ((unsigned long long)(cca) << 59) | (x))
 #define	MIPS_PHYS_TO_XKPHYS_CACHED(x) \
-	((0x2ULL << 62) | ((unsigned long long)(MIPS_CCA_CNC) << 59) | (x))
+	((0x2ULL << 62) | ((unsigned long long)(MIPS_CCA_CACHED) << 59) | (x))
 #define	MIPS_PHYS_TO_XKPHYS_UNCACHED(x) \
-	((0x2ULL << 62) | ((unsigned long long)(MIPS_CCA_UC) << 59) | (x))
+	((0x2ULL << 62) | ((unsigned long long)(MIPS_CCA_UNCACHED) << 59) | (x))
 
 #define	MIPS_XKPHYS_TO_PHYS(x)		((x) & 0x07ffffffffffffffULL)
 

Modified: head/sys/mips/include/pte.h
==============================================================================
--- head/sys/mips/include/pte.h	Sat Aug  7 01:05:02 2010	(r210985)
+++ head/sys/mips/include/pte.h	Sat Aug  7 01:49:44 2010	(r210986)
@@ -113,17 +113,8 @@ typedef	pt_entry_t *pd_entry_t;
  * 		it is matched.
  */
 #define	PTE_C(attr)	((attr & 0x07) << 3)
-#define	PTE_C_UNCACHED	(PTE_C(0x02))
-/*
- * The preferred cache attribute for cacheable pages, this can be 
- * implementation dependent. We will use the standard value 0x3 as 
- * default.
- */
-#if defined(CPU_SB1)
-#define	PTE_C_CACHE	(PTE_C(0x05))
-#else
-#define	PTE_C_CACHE	(PTE_C(0x03))
-#endif
+#define	PTE_C_UNCACHED	(PTE_C(MIPS_CCA_UNCACHED))
+#define	PTE_C_CACHE	(PTE_C(MIPS_CCA_CACHED))
 #define	PTE_D		0x04
 #define	PTE_V		0x02
 #define	PTE_G		0x01

Modified: head/sys/mips/mips/locore.S
==============================================================================
--- head/sys/mips/mips/locore.S	Sat Aug  7 01:05:02 2010	(r210985)
+++ head/sys/mips/mips/locore.S	Sat Aug  7 01:49:44 2010	(r210986)
@@ -117,6 +117,9 @@ VECTOR(_locore, unknown)
 	 *	Enable FPU
 	 */
 	li	t1, MIPS_SR_COP_1_BIT
+#ifdef __mips_n64
+	or	t1, MIPS_SR_KX | MIPS_SR_UX
+#endif
 #endif
 	/*
 	 * Read coprocessor 0 status register, clear bits not
@@ -130,7 +133,7 @@ VECTOR(_locore, unknown)
 	COP0_SYNC
 
 	/* Make sure KSEG0 is cached */
-	li	t0, MIPS_CCA_CNC
+	li	t0, MIPS_CCA_CACHED
 	mtc0	t0, MIPS_COP_0_CONFIG
 	COP0_SYNC
 

Modified: head/sys/mips/mips/mpboot.S
==============================================================================
--- head/sys/mips/mips/mpboot.S	Sat Aug  7 01:05:02 2010	(r210985)
+++ head/sys/mips/mips/mpboot.S	Sat Aug  7 01:49:44 2010	(r210986)
@@ -54,7 +54,7 @@ GLOBAL(mpentry)
 
 	mtc0	zero, MIPS_COP_0_CAUSE	/* clear soft interrupts */
 
-	li	t0, MIPS_CCA_CNC	/* make sure kseg0 is cached */
+	li	t0, MIPS_CCA_CACHED	/* make sure kseg0 is cached */
 	mtc0	t0, MIPS_COP_0_CONFIG
 	COP0_SYNC
 

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 03:45:46 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 541E2106566C;
	Sat,  7 Aug 2010 03:45:46 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 43D018FC20;
	Sat,  7 Aug 2010 03:45:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o773jkHa021188;
	Sat, 7 Aug 2010 03:45:46 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o773jkcF021186;
	Sat, 7 Aug 2010 03:45:46 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008070345.o773jkcF021186@svn.freebsd.org>
From: Jung-uk Kim 
Date: Sat, 7 Aug 2010 03:45:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210992 - head/sys/compat/x86bios
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 03:45:46 -0000

Author: jkim
Date: Sat Aug  7 03:45:45 2010
New Revision: 210992
URL: http://svn.freebsd.org/changeset/base/210992

Log:
  Optimize interrupt vector lookup.  There is no need to check the page table.

Modified:
  head/sys/compat/x86bios/x86bios.c

Modified: head/sys/compat/x86bios/x86bios.c
==============================================================================
--- head/sys/compat/x86bios/x86bios.c	Sat Aug  7 02:19:19 2010	(r210991)
+++ head/sys/compat/x86bios/x86bios.c	Sat Aug  7 03:45:45 2010	(r210992)
@@ -194,7 +194,7 @@ uint32_t
 x86bios_get_intr(int intno)
 {
 
-	return (readl(x86bios_offset(intno * 4)));
+	return (readl(BIOS_PADDRTOVADDR(intno * 4)));
 }
 
 void

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 04:05:59 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 06C311065675;
	Sat,  7 Aug 2010 04:05:59 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CB10D8FC17;
	Sat,  7 Aug 2010 04:05:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7745wDM025651;
	Sat, 7 Aug 2010 04:05:58 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7745wmG025649;
	Sat, 7 Aug 2010 04:05:58 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008070405.o7745wmG025649@svn.freebsd.org>
From: Jung-uk Kim 
Date: Sat, 7 Aug 2010 04:05:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210993 - head/sys/compat/x86bios
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 04:05:59 -0000

Author: jkim
Date: Sat Aug  7 04:05:58 2010
New Revision: 210993
URL: http://svn.freebsd.org/changeset/base/210993

Log:
  Do not block any I/O port on amd64.

Modified:
  head/sys/compat/x86bios/x86bios.c

Modified: head/sys/compat/x86bios/x86bios.c
==============================================================================
--- head/sys/compat/x86bios/x86bios.c	Sat Aug  7 03:45:45 2010	(r210992)
+++ head/sys/compat/x86bios/x86bios.c	Sat Aug  7 04:05:58 2010	(r210993)
@@ -424,10 +424,12 @@ static uint8_t
 x86bios_emu_inb(struct x86emu *emu, uint16_t port)
 {
 
+#ifndef X86BIOS_NATIVE_ARCH
 	if (port == 0xb2) /* APM scratch register */
 		return (0);
 	if (port >= 0x80 && port < 0x88) /* POST status register */
 		return (0);
+#endif
 
 	return (iodev_read_1(port));
 }
@@ -437,10 +439,10 @@ x86bios_emu_inw(struct x86emu *emu, uint
 {
 	uint16_t val;
 
+#ifndef X86BIOS_NATIVE_ARCH
 	if (port >= 0x80 && port < 0x88) /* POST status register */
 		return (0);
 
-#ifndef X86BIOS_NATIVE_ARCH
 	if ((port & 1) != 0) {
 		val = iodev_read_1(port);
 		val |= iodev_read_1(port + 1) << 8;
@@ -456,10 +458,10 @@ x86bios_emu_inl(struct x86emu *emu, uint
 {
 	uint32_t val;
 
+#ifndef X86BIOS_NATIVE_ARCH
 	if (port >= 0x80 && port < 0x88) /* POST status register */
 		return (0);
 
-#ifndef X86BIOS_NATIVE_ARCH
 	if ((port & 1) != 0) {
 		val = iodev_read_1(port);
 		val |= iodev_read_2(port + 1) << 8;
@@ -478,10 +480,12 @@ static void
 x86bios_emu_outb(struct x86emu *emu, uint16_t port, uint8_t val)
 {
 
+#ifndef X86BIOS_NATIVE_ARCH
 	if (port == 0xb2) /* APM scratch register */
 		return;
 	if (port >= 0x80 && port < 0x88) /* POST status register */
 		return;
+#endif
 
 	iodev_write_1(port, val);
 }
@@ -490,10 +494,10 @@ static void
 x86bios_emu_outw(struct x86emu *emu, uint16_t port, uint16_t val)
 {
 
+#ifndef X86BIOS_NATIVE_ARCH
 	if (port >= 0x80 && port < 0x88) /* POST status register */
 		return;
 
-#ifndef X86BIOS_NATIVE_ARCH
 	if ((port & 1) != 0) {
 		iodev_write_1(port, val);
 		iodev_write_1(port + 1, val >> 8);
@@ -506,10 +510,10 @@ static void
 x86bios_emu_outl(struct x86emu *emu, uint16_t port, uint32_t val)
 {
 
+#ifndef X86BIOS_NATIVE_ARCH
 	if (port >= 0x80 && port < 0x88) /* POST status register */
 		return;
 
-#ifndef X86BIOS_NATIVE_ARCH
 	if ((port & 1) != 0) {
 		iodev_write_1(port, val);
 		iodev_write_2(port + 1, val >> 8);

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 05:46:04 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B0D231065670;
	Sat,  7 Aug 2010 05:46:04 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A072F8FC15;
	Sat,  7 Aug 2010 05:46:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o775k4H7047806;
	Sat, 7 Aug 2010 05:46:04 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o775k4Cm047804;
	Sat, 7 Aug 2010 05:46:04 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201008070546.o775k4Cm047804@svn.freebsd.org>
From: Jung-uk Kim 
Date: Sat, 7 Aug 2010 05:46:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210994 - head/sys/dev/fb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 05:46:04 -0000

Author: jkim
Date: Sat Aug  7 05:46:04 2010
New Revision: 210994
URL: http://svn.freebsd.org/changeset/base/210994

Log:
  Protect shared palette and state buffer with a mutex.  Remove defunct
  spltty() calls while I am here.

Modified:
  head/sys/dev/fb/vesa.c

Modified: head/sys/dev/fb/vesa.c
==============================================================================
--- head/sys/dev/fb/vesa.c	Sat Aug  7 04:05:58 2010	(r210993)
+++ head/sys/dev/fb/vesa.c	Sat Aug  7 05:46:04 2010	(r210994)
@@ -37,8 +37,10 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -73,6 +75,8 @@ struct adp_state {
 };
 typedef struct adp_state adp_state_t;
 
+static struct mtx vesa_lock;
+
 static void *vesa_state_buf = NULL;
 static uint32_t vesa_state_buf_offs = 0;
 static ssize_t vesa_state_buf_size = 0;
@@ -381,17 +385,19 @@ vesa_bios_save_palette(int start, int co
 	regs.R_ES = X86BIOS_PHYSTOSEG(vesa_palette_offs);
 	regs.R_DI = X86BIOS_PHYSTOOFF(vesa_palette_offs);
 
+	bits = 8 - bits;
+	mtx_lock(&vesa_lock);
 	x86bios_intr(®s, 0x10);
-
-	if (regs.R_AX != 0x004f)
+	if (regs.R_AX != 0x004f) {
+		mtx_unlock(&vesa_lock);
 		return (1);
-
-	bits = 8 - bits;
+	}
 	for (i = 0; i < colors; ++i) {
 		palette[i * 3] = vesa_palette[i * 4 + 2] << bits;
 		palette[i * 3 + 1] = vesa_palette[i * 4 + 1] << bits;
 		palette[i * 3 + 2] = vesa_palette[i * 4] << bits;
 	}
+	mtx_unlock(&vesa_lock);
 
 	return (0);
 }
@@ -412,17 +418,19 @@ vesa_bios_save_palette2(int start, int c
 	regs.R_ES = X86BIOS_PHYSTOSEG(vesa_palette_offs);
 	regs.R_DI = X86BIOS_PHYSTOOFF(vesa_palette_offs);
 
+	bits = 8 - bits;
+	mtx_lock(&vesa_lock);
 	x86bios_intr(®s, 0x10);
-
-	if (regs.R_AX != 0x004f)
+	if (regs.R_AX != 0x004f) {
+		mtx_unlock(&vesa_lock);
 		return (1);
-
-	bits = 8 - bits;
+	}
 	for (i = 0; i < colors; ++i) {
 		r[i] = vesa_palette[i * 4 + 2] << bits;
 		g[i] = vesa_palette[i * 4 + 1] << bits;
 		b[i] = vesa_palette[i * 4] << bits;
 	}
+	mtx_unlock(&vesa_lock);
 
 	return (0);
 }
@@ -443,6 +451,7 @@ vesa_bios_load_palette(int start, int co
 	regs.R_DI = X86BIOS_PHYSTOOFF(vesa_palette_offs);
 
 	bits = 8 - bits;
+	mtx_lock(&vesa_lock);
 	for (i = 0; i < colors; ++i) {
 		vesa_palette[i * 4] = palette[i * 3 + 2] >> bits;
 		vesa_palette[i * 4 + 1] = palette[i * 3 + 1] >> bits;
@@ -450,6 +459,7 @@ vesa_bios_load_palette(int start, int co
 		vesa_palette[i * 4 + 3] = 0;
 	}
 	x86bios_intr(®s, 0x10);
+	mtx_unlock(&vesa_lock);
 
 	return (regs.R_AX != 0x004f);
 }
@@ -471,6 +481,7 @@ vesa_bios_load_palette2(int start, int c
 	regs.R_DI = X86BIOS_PHYSTOOFF(vesa_palette_offs);
 
 	bits = 8 - bits;
+	mtx_lock(&vesa_lock);
 	for (i = 0; i < colors; ++i) {
 		vesa_palette[i * 4] = b[i] >> bits;
 		vesa_palette[i * 4 + 1] = g[i] >> bits;
@@ -478,6 +489,7 @@ vesa_bios_load_palette2(int start, int c
 		vesa_palette[i * 4 + 3] = 0;
 	}
 	x86bios_intr(®s, 0x10);
+	mtx_unlock(&vesa_lock);
 
 	return (regs.R_AX != 0x004f);
 }
@@ -516,6 +528,7 @@ vesa_bios_save_restore(int code, void *p
 	regs.R_ES = X86BIOS_PHYSTOSEG(vesa_state_buf_offs);
 	regs.R_BX = X86BIOS_PHYSTOOFF(vesa_state_buf_offs);
 
+	mtx_lock(&vesa_lock);
 	switch (code) {
 	case STATE_SAVE:
 		x86bios_intr(®s, 0x10);
@@ -526,6 +539,7 @@ vesa_bios_save_restore(int code, void *p
 		x86bios_intr(®s, 0x10);
 		break;
 	}
+	mtx_unlock(&vesa_lock);
 
 	return (regs.R_AX != 0x004f);
 }
@@ -1805,16 +1819,15 @@ static int
 vesa_load(void)
 {
 	int error;
-	int s;
 
 	if (vesa_init_done)
 		return (0);
 
+	mtx_init(&vesa_lock, "VESA lock", NULL, MTX_DEF);
+
 	/* locate a VGA adapter */
-	s = spltty();
 	vesa_adp = NULL;
 	error = vesa_configure(0);
-	splx(s);
 
 	if (error == 0)
 		vesa_bios_info(bootverbose);
@@ -1827,7 +1840,6 @@ vesa_unload(void)
 {
 	u_char palette[256*3];
 	int error;
-	int s;
 
 	/* if the adapter is currently in a VESA mode, don't unload */
 	if ((vesa_adp != NULL) && VESA_MODE(vesa_adp->va_mode))
@@ -1837,7 +1849,6 @@ vesa_unload(void)
 	 * we shouldn't be unloading! XXX
 	 */
 
-	s = spltty();
 	if ((error = vesa_unload_ioctl()) == 0) {
 		if (vesa_adp != NULL) {
 			if ((vesa_adp->va_flags & V_ADP_DAC8) != 0) {
@@ -1850,7 +1861,6 @@ vesa_unload(void)
 			vidsw[vesa_adp->va_index] = prevvidsw;
 		}
 	}
-	splx(s);
 
 	if (vesa_adp_info != NULL)
 		free(vesa_adp_info, M_DEVBUF);
@@ -1867,6 +1877,9 @@ vesa_unload(void)
 	if (vesa_palette != NULL)
 		x86bios_free(vesa_palette,
 		    VESA_PALETTE_SIZE + vesa_state_buf_size);
+
+	mtx_destroy(&vesa_lock);
+
 	return (error);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 08:08:14 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6682D1065679;
	Sat,  7 Aug 2010 08:08:14 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 55F798FC16;
	Sat,  7 Aug 2010 08:08:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7788EHr079212;
	Sat, 7 Aug 2010 08:08:14 GMT (envelope-from rwatson@svn.freebsd.org)
Received: (from rwatson@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7788ElU079208;
	Sat, 7 Aug 2010 08:08:14 GMT (envelope-from rwatson@svn.freebsd.org)
Message-Id: <201008070808.o7788ElU079208@svn.freebsd.org>
From: Robert Watson 
Date: Sat, 7 Aug 2010 08:08:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210997 - head/sys/fs/coda
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 08:08:14 -0000

Author: rwatson
Date: Sat Aug  7 08:08:14 2010
New Revision: 210997
URL: http://svn.freebsd.org/changeset/base/210997

Log:
  Properly bounds check ioctl/pioctl data arguments for Coda:
  
  1. Use unsigned rather than signed lengths
  2. Bound messages to/from Venus to VC_MAXMSGSIZE
  3. Bound messages to/from general user processes to VC_MAXDATASIZE
  4. Update comment regarding data limits for pioctl
  
  Without (1) and (3), it may be possible for unprivileged user processes to
  read sensitive portions of kernel memory.  This issue is only present if
  the Coda kernel module is loaded and venus (the userspace Coda daemon) is
  running and has /coda mounted.
  
  As Coda is considered experimental and production use is warned against in
  the coda(4) man page, and because Coda must be explicitly configured for a
  configuration to be vulnerable, we won't be issuing a security advisory.
  However, if you are using Coda, then you are advised to apply these fixes.
  
  Reported by:	Dan J. Rosenberg 
  Obtained from:	NetBSD (Christos Zoulas)
  Security:	Kernel memory disclosure; no advisory as feature experimental
  MFC after:	3 days

Modified:
  head/sys/fs/coda/coda.h
  head/sys/fs/coda/coda_venus.c
  head/sys/fs/coda/coda_vnops.c

Modified: head/sys/fs/coda/coda.h
==============================================================================
--- head/sys/fs/coda/coda.h	Sat Aug  7 06:39:58 2010	(r210996)
+++ head/sys/fs/coda/coda.h	Sat Aug  7 08:08:14 2010	(r210997)
@@ -41,7 +41,9 @@
 #ifndef _CODA_HEADER_
 #define _CODA_HEADER_
 
+#ifdef _KERNEL
 #include "opt_coda.h"	/* for CODA_COMPAT_5 option */
+#endif
 
 /* Avoid CODA_COMPAT_5 redefinition in coda5 module */
 #if defined (CODA5_MODULE) && !defined(CODA_COMPAT_5)
@@ -782,8 +784,8 @@ union coda_downcalls {
 #define PIOCPARM_MASK 0x0000ffff
 struct ViceIoctl {
         caddr_t in, out;        /* Data to be transferred in, or out */
-        short in_size;          /* Size of input buffer <= 2K */
-        short out_size;         /* Maximum size of output buffer, <= 2K */
+        unsigned short in_size;	/* Size of input buffer <= 8K */
+        unsigned short out_size; /* Maximum size of output buffer, <= 8K */
 };
 
 #if defined(__CYGWIN32__) || defined(DJGPP)

Modified: head/sys/fs/coda/coda_venus.c
==============================================================================
--- head/sys/fs/coda/coda_venus.c	Sat Aug  7 06:39:58 2010	(r210996)
+++ head/sys/fs/coda/coda_venus.c	Sat Aug  7 08:08:14 2010	(r210997)
@@ -274,6 +274,12 @@ venus_ioctl(void *mdp, struct CodaFid *f
 	tmp = ((com >> 16) & IOCPARM_MASK) - sizeof (char *) - sizeof (int);
 	inp->cmd |= (tmp & IOCPARM_MASK) << 16;
 
+	if (iap->vi.in_size > VC_MAXMSGSIZE ||
+	    iap->vi.out_size > VC_MAXMSGSIZE) {
+		CODA_FREE(inp, coda_ioctl_size);
+		return (EINVAL);
+	}
+
 	inp->rwflag = flag;
 	inp->len = iap->vi.in_size;
 	inp->data = (char *)(sizeof (struct coda_ioctl_in));

Modified: head/sys/fs/coda/coda_vnops.c
==============================================================================
--- head/sys/fs/coda/coda_vnops.c	Sat Aug  7 06:39:58 2010	(r210996)
+++ head/sys/fs/coda/coda_vnops.c	Sat Aug  7 08:08:14 2010	(r210997)
@@ -471,7 +471,8 @@ coda_ioctl(struct vop_ioctl_args *ap)
 		    iap->path)););
 		return (EINVAL);
 	}
-	if (iap->vi.in_size > VC_MAXDATASIZE) {
+	if (iap->vi.in_size > VC_MAXDATASIZE ||
+	    iap->vi.out_size > VC_MAXDATASIZE) {
 		NDFREE(&ndp, 0);
 		return (EINVAL);
 	}

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 08:31:33 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2497D1065670;
	Sat,  7 Aug 2010 08:31:33 +0000 (UTC)
	(envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1409B8FC14;
	Sat,  7 Aug 2010 08:31:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o778VWKo084415;
	Sat, 7 Aug 2010 08:31:32 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o778VWXG084412;
	Sat, 7 Aug 2010 08:31:32 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201008070831.o778VWXG084412@svn.freebsd.org>
From: Joel Dahl 
Date: Sat, 7 Aug 2010 08:31:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210998 - in head: share/man/man4 sys/dev/iicbus
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 08:31:33 -0000

Author: joel (doc committer)
Date: Sat Aug  7 08:31:32 2010
New Revision: 210998
URL: http://svn.freebsd.org/changeset/base/210998

Log:
  Fix typo in comment.

Modified:
  head/share/man/man4/iic.4
  head/sys/dev/iicbus/iic.h

Modified: head/share/man/man4/iic.4
==============================================================================
--- head/share/man/man4/iic.4	Sat Aug  7 08:08:14 2010	(r210997)
+++ head/share/man/man4/iic.4	Sat Aug  7 08:31:32 2010	(r210998)
@@ -144,7 +144,7 @@ struct iic_msg
 	uint16_t	slave;
 	uint16_t	flags;
 #define IIC_M_RD	0x0001	/* read vs write */
-	uint16_t	len;	/* msg legnth */
+	uint16_t	len;	/* msg length */
 	uint8_t *	buf;
 };
 

Modified: head/sys/dev/iicbus/iic.h
==============================================================================
--- head/sys/dev/iicbus/iic.h	Sat Aug  7 08:08:14 2010	(r210997)
+++ head/sys/dev/iicbus/iic.h	Sat Aug  7 08:31:32 2010	(r210998)
@@ -40,7 +40,7 @@ struct iic_msg
 #define	IIC_M_RD	0x0001	/* read vs write */
 #define	IIC_M_NOSTOP	0x0002	/* do not send a I2C stop after message */
 #define	IIC_M_NOSTART	0x0004	/* do not send a I2C start before message */
-	uint16_t	len;	/* msg legnth */
+	uint16_t	len;	/* msg length */
 	uint8_t *	buf;
 };
 

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 10:23:54 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A699F1065672;
	Sat,  7 Aug 2010 10:23:54 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 958838FC19;
	Sat,  7 Aug 2010 10:23:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77ANsGH009424;
	Sat, 7 Aug 2010 10:23:54 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77ANseB009422;
	Sat, 7 Aug 2010 10:23:54 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201008071023.o77ANseB009422@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Sat, 7 Aug 2010 10:23:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210999 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 10:23:54 -0000

Author: pjd
Date: Sat Aug  7 10:23:54 2010
New Revision: 210999
URL: http://svn.freebsd.org/changeset/base/210999

Log:
  In FreeBSD we use 'jailed' property.
  
  MFC after:	2 weeks

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c	Sat Aug  7 08:31:32 2010	(r210998)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c	Sat Aug  7 10:23:54 2010	(r210999)
@@ -357,7 +357,7 @@ zfs_secpolicy_setprop(const char *name, 
 			 * quota on things *under* (ie. contained by)
 			 * the thing they own.
 			 */
-			if (dsl_prop_get_integer(name, "zoned", &zoned,
+			if (dsl_prop_get_integer(name, "jailed", &zoned,
 			    setpoint))
 				return (EPERM);
 			if (!zoned || strlen(name) <= strlen(setpoint))

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 10:51:02 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5399E1065675;
	Sat,  7 Aug 2010 10:51:02 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 373538FC15;
	Sat,  7 Aug 2010 10:51:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77Ap21G016707;
	Sat, 7 Aug 2010 10:51:02 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77Ap2dT016703;
	Sat, 7 Aug 2010 10:51:02 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071051.o77Ap2dT016703@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 10:51: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: r211000 - stable/8/usr.sbin/sysinstall
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 10:51:02 -0000

Author: brucec
Date: Sat Aug  7 10:51:01 2010
New Revision: 211000
URL: http://svn.freebsd.org/changeset/base/211000

Log:
  MFC r209235, r210381 (bug fix for r209235):
  
  * Allow partial MB/GB values to be entered in the slice and label editors.
  * Don't strdup the name when calling deviceRegister because the string is
  copied within new_device.
  * Use a subtype of 165, not 3, when creating a slice in noninteractive
  mode.
  
  PR: bin/135333
  PR: bin/66350
  Approved by:	rrs (mentor)

Modified:
  stable/8/usr.sbin/sysinstall/devices.c
  stable/8/usr.sbin/sysinstall/disks.c
  stable/8/usr.sbin/sysinstall/label.c
Directory Properties:
  stable/8/usr.sbin/sysinstall/   (props changed)

Modified: stable/8/usr.sbin/sysinstall/devices.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/devices.c	Sat Aug  7 10:23:54 2010	(r210999)
+++ stable/8/usr.sbin/sysinstall/devices.c	Sat Aug  7 10:51:01 2010	(r211000)
@@ -295,6 +295,8 @@ deviceGetAll(void)
 
     msgNotify("Probing devices, please wait (this can take a while)...");
     /* First go for the network interfaces.  Stolen shamelessly from ifconfig! */
+    memset(&ifc, 0, sizeof(ifc));
+    memset(buffer, 0, INTERFACE_MAX * sizeof(struct ifreq));
     ifc.ifc_len = sizeof(buffer);
     ifc.ifc_buf = buffer;
 
@@ -371,7 +373,7 @@ skipif:
 
 		    if (fd >= 0) close(fd);
 		    snprintf(n, sizeof n, device_names[i].name, j);
-		    deviceRegister(strdup(n), device_names[i].description, strdup(try),
+		    deviceRegister(n, device_names[i].description, strdup(try),
 					 DEVICE_TYPE_CDROM, TRUE, mediaInitCDROM, mediaGetCDROM,
 					 mediaShutdownCDROM, NULL);
 		    if (isDebug())
@@ -390,7 +392,7 @@ skipif:
 
 		    close(fd);
 		    snprintf(n, sizeof n, device_names[i].name, j);
-		    deviceRegister(strdup(n), device_names[i].description, strdup(try),
+		    deviceRegister(n, device_names[i].description, strdup(try),
 				   DEVICE_TYPE_FLOPPY, TRUE, mediaInitFloppy, mediaGetFloppy,
 				   mediaShutdownFloppy, NULL);
 		    if (isDebug())
@@ -405,7 +407,7 @@ skipif:
 
 			close(fd);
 			snprintf(n, sizeof(n), device_names[i].name, j);
-			deviceRegister(strdup(n), device_names[i].description,
+			deviceRegister(n, device_names[i].description,
 			    strdup(try), DEVICE_TYPE_USB, TRUE, mediaInitUSB,
 			    mediaGetUSB, mediaShutdownUSB, NULL);
 

Modified: stable/8/usr.sbin/sysinstall/disks.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/disks.c	Sat Aug  7 10:23:54 2010	(r210999)
+++ stable/8/usr.sbin/sysinstall/disks.c	Sat Aug  7 10:51:01 2010	(r211000)
@@ -443,6 +443,7 @@ diskPartition(Device *dev)
 	    else {
 		char *val, tmp[20], name[16], *cp;
 		daddr_t size;
+		long double dsize;
 		int subtype;
 		chunk_e partitiontype;
 #ifdef PC98
@@ -457,11 +458,20 @@ diskPartition(Device *dev)
 		snprintf(tmp, 20, "%jd", (intmax_t)chunk_info[current_chunk]->size);
 		val = msgGetInput(tmp, "Please specify the size for new FreeBSD slice in blocks\n"
 				  "or append a trailing `M' for megabytes (e.g. 20M).");
-		if (val && (size = strtoimax(val, &cp, 0)) > 0) {
+		if (val && (dsize = strtold(val, &cp)) > 0 && dsize < UINT32_MAX) {
 		    if (*cp && toupper(*cp) == 'M')
-			size *= ONE_MEG;
+			size = (daddr_t) (dsize * ONE_MEG);
 		    else if (*cp && toupper(*cp) == 'G')
-			size *= ONE_GIG;
+			size = (daddr_t) (dsize * ONE_GIG);
+		    else
+			size = (daddr_t) dsize;
+
+		    if (size < ONE_MEG) {
+			msgConfirm("The minimum slice size is 1MB");
+			break;
+		    }
+
+
 		    sprintf(tmp, "%d", SUBTYPE_FREEBSD);
 		    val = msgGetInput(tmp, "Enter type of partition to create:\n\n"
 			"Pressing Enter will choose the default, a native FreeBSD\n"
@@ -915,7 +925,8 @@ diskPartitionNonInteractive(Device *dev)
 {
     char *cp;
     int i, all_disk = 0;
-    daddr_t sz;
+    daddr_t size;
+    long double dsize;
 #ifdef PC98
     u_char *bootipl;
     size_t bootipl_size;
@@ -959,7 +970,7 @@ diskPartitionNonInteractive(Device *dev)
 		/* If a chunk is at least 10MB in size, use it. */
 		if (chunk_info[i]->type == unused && chunk_info[i]->size > (10 * ONE_MEG)) {
 		    Create_Chunk(d, chunk_info[i]->offset, chunk_info[i]->size,
-				 freebsd, 3,
+				 freebsd, SUBTYPE_FREEBSD,
 				 (chunk_info[i]->flags & CHUNK_ALIGN),
 				 "FreeBSD");
 		    variable_set2(DISK_PARTITIONED, "yes", 0);
@@ -983,16 +994,19 @@ diskPartitionNonInteractive(Device *dev)
 
 	    All_FreeBSD(d, all_disk = TRUE);
 	}
-	else if ((sz = strtoimax(cp, &cp, 0))) {
-	    /* Look for sz bytes free */
+	else if ((dsize = strtold(cp, &cp))) {
 	    if (*cp && toupper(*cp) == 'M')
-		sz *= ONE_MEG;
+		size *= (daddr_t) (dsize * ONE_MEG);
 	    else if (*cp && toupper(*cp) == 'G')
-		sz *= ONE_GIG;
+		size = (daddr_t) (dsize * ONE_GIG);
+	    else
+		size = (daddr_t) dsize;
+
+	    /* Look for size bytes free */
 	    for (i = 0; chunk_info[i]; i++) {
 		/* If a chunk is at least sz MB, use it. */
-		if (chunk_info[i]->type == unused && chunk_info[i]->size >= sz) {
-		    Create_Chunk(d, chunk_info[i]->offset, sz, freebsd, 3,
+		if (chunk_info[i]->type == unused && chunk_info[i]->size >= size) {
+		    Create_Chunk(d, chunk_info[i]->offset, size, freebsd, SUBTYPE_FREEBSD,
 				 (chunk_info[i]->flags & CHUNK_ALIGN),
 				 "FreeBSD");
 		    variable_set2(DISK_PARTITIONED, "yes", 0);
@@ -1001,7 +1015,7 @@ diskPartitionNonInteractive(Device *dev)
 	    }
 	    if (!chunk_info[i]) {
 		    msgConfirm("Unable to find %jd free blocks on this disk!",
-			(intmax_t)sz);
+			(intmax_t)size);
 		return;
 	    }
 	}

Modified: stable/8/usr.sbin/sysinstall/label.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/label.c	Sat Aug  7 10:23:54 2010	(r210999)
+++ stable/8/usr.sbin/sysinstall/label.c	Sat Aug  7 10:51:01 2010	(r211000)
@@ -999,6 +999,7 @@ diskLabel(Device *dev)
 	    else {
 		char *val;
 		daddr_t size;
+		long double dsize;
 		struct chunk *tmp;
 		char osize[80];
 		u_long flags = 0;
@@ -1019,22 +1020,27 @@ diskLabel(Device *dev)
 #endif
 				  "%jd blocks (%jdMB) are free.",
 				  (intmax_t)sz, (intmax_t)sz / ONE_MEG);
-		if (!val || (size = strtoimax(val, &cp, 0)) <= 0) {
+		if (!val || (dsize = strtold(val, &cp)) <= 0) {
 		    clear_wins();
 		    break;
 		}
 
 		if (*cp) {
 		    if (toupper(*cp) == 'M')
-			size *= ONE_MEG;
+			size = (daddr_t) (dsize * ONE_MEG);
 		    else if (toupper(*cp) == 'G')
-			size *= ONE_GIG;
+			size = (daddr_t) (dsize * ONE_GIG);
 #ifndef __ia64__
 		    else if (toupper(*cp) == 'C')
-			size *= (label_chunk_info[here].c->disk->bios_hd * label_chunk_info[here].c->disk->bios_sect);
+			size = (daddr_t) dsize * (label_chunk_info[here].c->disk->bios_hd * label_chunk_info[here].c->disk->bios_sect);
 #endif
+		    else
+			size = (daddr_t) dsize;
+		} else {
+			size = (daddr_t) dsize;
 		}
-		if (size <= FS_MIN_SIZE) {
+
+		if (size < FS_MIN_SIZE) {
 		    msgConfirm("The minimum filesystem size is %dMB", FS_MIN_SIZE / ONE_MEG);
 		    clear_wins();
 		    break;

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 11:13:50 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BC81E1065673;
	Sat,  7 Aug 2010 11:13:50 +0000 (UTC) (envelope-from yar@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id ABD1A8FC16;
	Sat,  7 Aug 2010 11:13:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77BDoGG021866;
	Sat, 7 Aug 2010 11:13:50 GMT (envelope-from yar@svn.freebsd.org)
Received: (from yar@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77BDoTJ021864;
	Sat, 7 Aug 2010 11:13:50 GMT (envelope-from yar@svn.freebsd.org)
Message-Id: <201008071113.o77BDoTJ021864@svn.freebsd.org>
From: Yar Tikhiy 
Date: Sat, 7 Aug 2010 11:13:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211001 - head/usr.sbin/iostat
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 11:13:50 -0000

Author: yar
Date: Sat Aug  7 11:13:50 2010
New Revision: 211001
URL: http://svn.freebsd.org/changeset/base/211001

Log:
  Move the sentences telling the defaults for -c and -w
  to where they belong.  Previously they were misplaced,
  i.e., swapped.
  
  MFC after:	3 days

Modified:
  head/usr.sbin/iostat/iostat.8

Modified: head/usr.sbin/iostat/iostat.8
==============================================================================
--- head/usr.sbin/iostat/iostat.8	Sat Aug  7 10:51:01 2010	(r211000)
+++ head/usr.sbin/iostat/iostat.8	Sat Aug  7 11:13:50 2010	(r211001)
@@ -100,9 +100,9 @@ The options are as follows:
 Repeat the display
 .Ar count
 times.
-If no
-.Ar wait
-interval is specified, the default is 1 second.
+If no repeat
+.Ar count
+is specified, the default is infinity.
 .It Fl C
 Display CPU statistics.
 This is on by default, unless
@@ -236,9 +236,9 @@ is specified.
 Pause
 .Ar wait
 seconds between each display.
-If no repeat
-.Ar count
-is specified, the default is infinity.
+If no
+.Ar wait
+interval is specified, the default is 1 second.
 The
 .Nm
 command will accept and honor a non-integer number of seconds.

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 11:15:33 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 480D4106564A;
	Sat,  7 Aug 2010 11:15:33 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 35A708FC1B;
	Sat,  7 Aug 2010 11:15:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77BFX6d022279;
	Sat, 7 Aug 2010 11:15:33 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77BFXi4022275;
	Sat, 7 Aug 2010 11:15:33 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071115.o77BFXi4022275@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 11:15:33 +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: r211002 - stable/7/usr.sbin/sysinstall
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 11:15:33 -0000

Author: brucec
Date: Sat Aug  7 11:15:32 2010
New Revision: 211002
URL: http://svn.freebsd.org/changeset/base/211002

Log:
  MFC r209235, r210381 (bug fix for r209235):
  
  * Allow partial MB/GB values to be entered in the slice and label editor.
  * Don't strdup the name when calling deviceRegister because the string is
  copied within new_device.
  * Use a subtype of 165, not 3, when creating a slice in noninteractive
  mode.
  
  PR: bin/135333
  PR: bin/66350
  Approved by: rrs (mentor)

Modified:
  stable/7/usr.sbin/sysinstall/devices.c
  stable/7/usr.sbin/sysinstall/disks.c
  stable/7/usr.sbin/sysinstall/label.c
Directory Properties:
  stable/7/usr.sbin/sysinstall/   (props changed)

Modified: stable/7/usr.sbin/sysinstall/devices.c
==============================================================================
--- stable/7/usr.sbin/sysinstall/devices.c	Sat Aug  7 11:13:50 2010	(r211001)
+++ stable/7/usr.sbin/sysinstall/devices.c	Sat Aug  7 11:15:32 2010	(r211002)
@@ -281,6 +281,8 @@ deviceGetAll(void)
 
     msgNotify("Probing devices, please wait (this can take a while)...");
     /* First go for the network interfaces.  Stolen shamelessly from ifconfig! */
+    memset(&ifc, 0, sizeof(ifc));
+    memset(buffer, 0, INTERFACE_MAX * sizeof(struct ifreq));
     ifc.ifc_len = sizeof(buffer);
     ifc.ifc_buf = buffer;
 
@@ -357,7 +359,7 @@ skipif:
 
 		    if (fd >= 0) close(fd);
 		    snprintf(n, sizeof n, device_names[i].name, j);
-		    deviceRegister(strdup(n), device_names[i].description, strdup(try),
+		    deviceRegister(n, device_names[i].description, strdup(try),
 					 DEVICE_TYPE_CDROM, TRUE, mediaInitCDROM, mediaGetCDROM,
 					 mediaShutdownCDROM, NULL);
 		    if (isDebug())
@@ -390,7 +392,7 @@ skipif:
 
 		    close(fd);
 		    snprintf(n, sizeof n, device_names[i].name, j);
-		    deviceRegister(strdup(n), device_names[i].description, strdup(try),
+		    deviceRegister(n, device_names[i].description, strdup(try),
 				   DEVICE_TYPE_FLOPPY, TRUE, mediaInitFloppy, mediaGetFloppy,
 				   mediaShutdownFloppy, NULL);
 		    if (isDebug())

Modified: stable/7/usr.sbin/sysinstall/disks.c
==============================================================================
--- stable/7/usr.sbin/sysinstall/disks.c	Sat Aug  7 11:13:50 2010	(r211001)
+++ stable/7/usr.sbin/sysinstall/disks.c	Sat Aug  7 11:15:32 2010	(r211002)
@@ -455,6 +455,7 @@ diskPartition(Device *dev)
 	    else {
 		char *val, tmp[20], name[16], *cp;
 		daddr_t size;
+		long double dsize;
 		int subtype;
 		chunk_e partitiontype;
 #ifdef PC98
@@ -469,11 +470,20 @@ diskPartition(Device *dev)
 		snprintf(tmp, 20, "%jd", (intmax_t)chunk_info[current_chunk]->size);
 		val = msgGetInput(tmp, "Please specify the size for new FreeBSD slice in blocks\n"
 				  "or append a trailing `M' for megabytes (e.g. 20M).");
-		if (val && (size = strtoimax(val, &cp, 0)) > 0) {
+		if (val && (dsize = strtold(val, &cp)) > 0 && dsize < UINT32_MAX) {
 		    if (*cp && toupper(*cp) == 'M')
-			size *= ONE_MEG;
+			size = (daddr_t) (dsize * ONE_MEG);
 		    else if (*cp && toupper(*cp) == 'G')
-			size *= ONE_GIG;
+			size = (daddr_t) (dsize * ONE_GIG);
+		    else
+			size = (daddr_t) dsize;
+
+		    if (size < ONE_MEG) {
+			msgConfirm("The minimum slice size is 1MB");
+			break;
+		    }
+
+
 		    sprintf(tmp, "%d", SUBTYPE_FREEBSD);
 		    val = msgGetInput(tmp, "Enter type of partition to create:\n\n"
 			"Pressing Enter will choose the default, a native FreeBSD\n"
@@ -927,7 +937,8 @@ diskPartitionNonInteractive(Device *dev)
 {
     char *cp;
     int i, all_disk = 0;
-    daddr_t sz;
+    daddr_t size;
+    long double dsize;
 #ifdef PC98
     u_char *bootipl;
     size_t bootipl_size;
@@ -971,7 +982,7 @@ diskPartitionNonInteractive(Device *dev)
 		/* If a chunk is at least 10MB in size, use it. */
 		if (chunk_info[i]->type == unused && chunk_info[i]->size > (10 * ONE_MEG)) {
 		    Create_Chunk(d, chunk_info[i]->offset, chunk_info[i]->size,
-				 freebsd, 3,
+				 freebsd, SUBTYPE_FREEBSD,
 				 (chunk_info[i]->flags & CHUNK_ALIGN),
 				 "FreeBSD");
 		    variable_set2(DISK_PARTITIONED, "yes", 0);
@@ -995,16 +1006,19 @@ diskPartitionNonInteractive(Device *dev)
 
 	    All_FreeBSD(d, all_disk = TRUE);
 	}
-	else if ((sz = strtoimax(cp, &cp, 0))) {
-	    /* Look for sz bytes free */
+	else if ((dsize = strtold(cp, &cp))) {
 	    if (*cp && toupper(*cp) == 'M')
-		sz *= ONE_MEG;
+		size *= (daddr_t) (dsize * ONE_MEG);
 	    else if (*cp && toupper(*cp) == 'G')
-		sz *= ONE_GIG;
+		size = (daddr_t) (dsize * ONE_GIG);
+	    else
+		size = (daddr_t) dsize;
+
+	    /* Look for size bytes free */
 	    for (i = 0; chunk_info[i]; i++) {
 		/* If a chunk is at least sz MB, use it. */
-		if (chunk_info[i]->type == unused && chunk_info[i]->size >= sz) {
-		    Create_Chunk(d, chunk_info[i]->offset, sz, freebsd, 3,
+		if (chunk_info[i]->type == unused && chunk_info[i]->size >= size) {
+		    Create_Chunk(d, chunk_info[i]->offset, size, freebsd, SUBTYPE_FREEBSD,
 				 (chunk_info[i]->flags & CHUNK_ALIGN),
 				 "FreeBSD");
 		    variable_set2(DISK_PARTITIONED, "yes", 0);
@@ -1013,7 +1027,7 @@ diskPartitionNonInteractive(Device *dev)
 	    }
 	    if (!chunk_info[i]) {
 		    msgConfirm("Unable to find %jd free blocks on this disk!",
-			(intmax_t)sz);
+			(intmax_t)size);
 		return;
 	    }
 	}

Modified: stable/7/usr.sbin/sysinstall/label.c
==============================================================================
--- stable/7/usr.sbin/sysinstall/label.c	Sat Aug  7 11:13:50 2010	(r211001)
+++ stable/7/usr.sbin/sysinstall/label.c	Sat Aug  7 11:15:32 2010	(r211002)
@@ -999,6 +999,7 @@ diskLabel(Device *dev)
 	    else {
 		char *val;
 		daddr_t size;
+		long double dsize;
 		struct chunk *tmp;
 		char osize[80];
 		u_long flags = 0;
@@ -1019,22 +1020,27 @@ diskLabel(Device *dev)
 #endif
 				  "%jd blocks (%jdMB) are free.",
 				  (intmax_t)sz, (intmax_t)sz / ONE_MEG);
-		if (!val || (size = strtoimax(val, &cp, 0)) <= 0) {
+		if (!val || (dsize = strtold(val, &cp)) <= 0) {
 		    clear_wins();
 		    break;
 		}
 
 		if (*cp) {
 		    if (toupper(*cp) == 'M')
-			size *= ONE_MEG;
+			size = (daddr_t) (dsize * ONE_MEG);
 		    else if (toupper(*cp) == 'G')
-			size *= ONE_GIG;
+			size = (daddr_t) (dsize * ONE_GIG);
 #ifndef __ia64__
 		    else if (toupper(*cp) == 'C')
-			size *= (label_chunk_info[here].c->disk->bios_hd * label_chunk_info[here].c->disk->bios_sect);
+			size = (daddr_t) dsize * (label_chunk_info[here].c->disk->bios_hd * label_chunk_info[here].c->disk->bios_sect);
 #endif
+		    else
+			size = (daddr_t) dsize;
+		} else {
+			size = (daddr_t) dsize;
 		}
-		if (size <= FS_MIN_SIZE) {
+
+		if (size < FS_MIN_SIZE) {
 		    msgConfirm("The minimum filesystem size is %dMB", FS_MIN_SIZE / ONE_MEG);
 		    clear_wins();
 		    break;

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 11:32:17 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8FB62106564A;
	Sat,  7 Aug 2010 11:32:17 +0000 (UTC) (envelope-from yar@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7F4048FC18;
	Sat,  7 Aug 2010 11:32:17 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77BWHS1026008;
	Sat, 7 Aug 2010 11:32:17 GMT (envelope-from yar@svn.freebsd.org)
Received: (from yar@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77BWHxi026006;
	Sat, 7 Aug 2010 11:32:17 GMT (envelope-from yar@svn.freebsd.org)
Message-Id: <201008071132.o77BWHxi026006@svn.freebsd.org>
From: Yar Tikhiy 
Date: Sat, 7 Aug 2010 11:32:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211003 - head/usr.sbin/iostat
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 11:32:17 -0000

Author: yar
Date: Sat Aug  7 11:32:17 2010
New Revision: 211003
URL: http://svn.freebsd.org/changeset/base/211003

Log:
  Properly spell and mark up the name of kern.hz.
  
  MFC after:	3 days

Modified:
  head/usr.sbin/iostat/iostat.8

Modified: head/usr.sbin/iostat/iostat.8
==============================================================================
--- head/usr.sbin/iostat/iostat.8	Sat Aug  7 11:15:32 2010	(r211002)
+++ head/usr.sbin/iostat/iostat.8	Sat Aug  7 11:32:17 2010	(r211003)
@@ -247,8 +247,9 @@ Smaller values will be truncated.
 .Pp
 e.g. -w1.0001 becomes -w1.000
 .Pp
-The interval will also suffer from modifications to hz so your mileage
-may vary.
+The interval will also suffer from modifications to
+.Va kern.hz
+so your mileage may vary.
 .It Fl x
 Show extended disk statistics.
 Each disk is displayed on a line of its own with all available statistics.

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 11:48:32 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4308B1065678;
	Sat,  7 Aug 2010 11:48:32 +0000 (UTC) (envelope-from yar@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3272B8FC20;
	Sat,  7 Aug 2010 11:48:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77BmWxh029637;
	Sat, 7 Aug 2010 11:48:32 GMT (envelope-from yar@svn.freebsd.org)
Received: (from yar@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77BmWN6029635;
	Sat, 7 Aug 2010 11:48:32 GMT (envelope-from yar@svn.freebsd.org)
Message-Id: <201008071148.o77BmWN6029635@svn.freebsd.org>
From: Yar Tikhiy 
Date: Sat, 7 Aug 2010 11:48:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211004 - head/usr.sbin/iostat
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 11:48:32 -0000

Author: yar
Date: Sat Aug  7 11:48:31 2010
New Revision: 211004
URL: http://svn.freebsd.org/changeset/base/211004

Log:
  Clean up the style and markup of the paragraph on fractional wait intervals.
  
  MFC after:	3 days

Modified:
  head/usr.sbin/iostat/iostat.8

Modified: head/usr.sbin/iostat/iostat.8
==============================================================================
--- head/usr.sbin/iostat/iostat.8	Sat Aug  7 11:32:17 2010	(r211003)
+++ head/usr.sbin/iostat/iostat.8	Sat Aug  7 11:48:31 2010	(r211004)
@@ -239,14 +239,16 @@ seconds between each display.
 If no
 .Ar wait
 interval is specified, the default is 1 second.
+.Pp
 The
 .Nm
 command will accept and honor a non-integer number of seconds.
 Note that the interval only has millisecond granularity.
-Smaller values will be truncated.
-.Pp
-e.g. -w1.0001 becomes -w1.000
-.Pp
+Finer values will be truncated.
+E.g.,
+.Dq Li -w1.0001
+is the same as
+.Dq Li -w1.000 .
 The interval will also suffer from modifications to
 .Va kern.hz
 so your mileage may vary.

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 11:53:39 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2A5591065674;
	Sat,  7 Aug 2010 11:53:39 +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 198668FC18;
	Sat,  7 Aug 2010 11:53:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77BrcYC030829;
	Sat, 7 Aug 2010 11:53:38 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77BrchK030827;
	Sat, 7 Aug 2010 11:53:38 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201008071153.o77BrchK030827@svn.freebsd.org>
From: Konstantin Belousov 
Date: Sat, 7 Aug 2010 11:53:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211005 - head/sys/compat/freebsd32
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 11:53:39 -0000

Author: kib
Date: Sat Aug  7 11:53:38 2010
New Revision: 211005
URL: http://svn.freebsd.org/changeset/base/211005

Log:
  Add compat32 definition for (old) struct ostat.
  
  MFC after:	1 week

Modified:
  head/sys/compat/freebsd32/freebsd32.h

Modified: head/sys/compat/freebsd32/freebsd32.h
==============================================================================
--- head/sys/compat/freebsd32/freebsd32.h	Sat Aug  7 11:48:31 2010	(r211004)
+++ head/sys/compat/freebsd32/freebsd32.h	Sat Aug  7 11:53:38 2010	(r211005)
@@ -157,6 +157,24 @@ struct stat32 {
 	unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec32));
 };
 
+struct ostat32 {
+	__uint16_t st_dev;
+	ino_t	st_ino;
+	mode_t	st_mode;
+	nlink_t	st_nlink;
+	__uint16_t st_uid;
+	__uint16_t st_gid;
+	__uint16_t st_rdev;
+	__int32_t st_size;
+	struct timespec32 st_atim;
+	struct timespec32 st_mtim;
+	struct timespec32 st_ctim;
+	__int32_t st_blksize;
+	__int32_t st_blocks;
+	u_int32_t st_flags;
+	__uint32_t st_gen;
+};
+
 struct jail32_v0 {
 	u_int32_t	version;
 	uint32_t	path;

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 11:57:13 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8DBCA1065673;
	Sat,  7 Aug 2010 11:57:13 +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 7C5928FC1C;
	Sat,  7 Aug 2010 11:57:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77BvD5t031683;
	Sat, 7 Aug 2010 11:57:13 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77BvDAE031679;
	Sat, 7 Aug 2010 11:57:13 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201008071157.o77BvDAE031679@svn.freebsd.org>
From: Konstantin Belousov 
Date: Sat, 7 Aug 2010 11:57:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211006 - in head/sys: amd64/ia32 compat/freebsd32
	ia64/ia32
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 11:57:13 -0000

Author: kib
Date: Sat Aug  7 11:57:13 2010
New Revision: 211006
URL: http://svn.freebsd.org/changeset/base/211006

Log:
  Prefer struct sysentvec sv_psstrings to hardcoding FREEBSD32_PS_STRINGS
  in the compat32 code. Use sv_usrstack instead of FREEBSD32_USRSTACK as well.
  
  MFC after:	1 week

Modified:
  head/sys/amd64/ia32/ia32_signal.c
  head/sys/compat/freebsd32/freebsd32_misc.c
  head/sys/ia64/ia32/ia32_signal.c

Modified: head/sys/amd64/ia32/ia32_signal.c
==============================================================================
--- head/sys/amd64/ia32/ia32_signal.c	Sat Aug  7 11:53:38 2010	(r211005)
+++ head/sys/amd64/ia32/ia32_signal.c	Sat Aug  7 11:57:13 2010	(r211006)
@@ -391,7 +391,7 @@ freebsd4_ia32_sendsig(sig_t catcher, ksi
 	}
 
 	regs->tf_rsp = (uintptr_t)sfp;
-	regs->tf_rip = FREEBSD32_PS_STRINGS - sz_freebsd4_ia32_sigcode;
+	regs->tf_rip = p->p_sysent->sv_psstrings - sz_freebsd4_ia32_sigcode;
 	regs->tf_rflags &= ~(PSL_T | PSL_D);
 	regs->tf_cs = _ucode32sel;
 	regs->tf_ss = _udatasel;
@@ -512,7 +512,7 @@ ia32_sendsig(sig_t catcher, ksiginfo_t *
 	}
 
 	regs->tf_rsp = (uintptr_t)sfp;
-	regs->tf_rip = FREEBSD32_PS_STRINGS - *(p->p_sysent->sv_szsigcode);
+	regs->tf_rip = p->p_sysent->sv_psstrings - *(p->p_sysent->sv_szsigcode);
 	regs->tf_rflags &= ~(PSL_T | PSL_D);
 	regs->tf_cs = _ucode32sel;
 	regs->tf_ss = _udatasel;

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_misc.c	Sat Aug  7 11:53:38 2010	(r211005)
+++ head/sys/compat/freebsd32/freebsd32_misc.c	Sat Aug  7 11:57:13 2010	(r211006)
@@ -2541,7 +2541,8 @@ freebsd32_copyout_strings(struct image_p
 		execpath_len = strlen(imgp->execpath) + 1;
 	else
 		execpath_len = 0;
-	arginfo = (struct freebsd32_ps_strings *)FREEBSD32_PS_STRINGS;
+	arginfo = (struct freebsd32_ps_strings *)curproc->p_sysent->
+	    sv_psstrings;
 	szsigcode = *(imgp->proc->p_sysent->sv_szsigcode);
 	destp =	(caddr_t)arginfo - szsigcode - SPARE_USRSPACE -
 		roundup(execpath_len, sizeof(char *)) -

Modified: head/sys/ia64/ia32/ia32_signal.c
==============================================================================
--- head/sys/ia64/ia32/ia32_signal.c	Sat Aug  7 11:53:38 2010	(r211005)
+++ head/sys/ia64/ia32/ia32_signal.c	Sat Aug  7 11:57:13 2010	(r211006)
@@ -128,7 +128,9 @@ ia32_setregs(struct thread *td, struct i
 	u_int64_t codeseg, dataseg, gdtseg, ldtseg;
 	struct segment_descriptor desc;
 	struct vmspace *vmspace = td->td_proc->p_vmspace;
+	struct sysentvec *sv;
 
+	sv = td->td_proc->p_sysent;
 	exec_setregs(td, imgp, stack);
 
 	/* Non-syscall frames are cleared by exec_setregs() */
@@ -142,7 +144,7 @@ ia32_setregs(struct thread *td, struct i
 	tf->tf_special.sp = stack;
 
 	/* Point the RSE backstore to something harmless. */
-	tf->tf_special.bspstore = (FREEBSD32_PS_STRINGS - sz_ia32_sigcode -
+	tf->tf_special.bspstore = (sv->sv_psstrings - sz_ia32_sigcode -
 	    SPARE_USRSPACE + 15) & ~15;
 
 	codesel = LSEL(LUCODE_SEL, SEL_UPL);
@@ -157,7 +159,7 @@ ia32_setregs(struct thread *td, struct i
 	/*
 	 * Build the GDT and LDT.
 	 */
-	gdt = FREEBSD32_USRSTACK;
+	gdt = sv->sv_usrstack;
 	vm_map_find(&vmspace->vm_map, 0, 0, &gdt, IA32_PAGE_SIZE << 1, 0,
 	    VM_PROT_ALL, VM_PROT_ALL, 0);
 	ldt = gdt + IA32_PAGE_SIZE;
@@ -173,12 +175,12 @@ ia32_setregs(struct thread *td, struct i
 	desc.sd_hibase = ldt >> 24;
 	copyout(&desc, (caddr_t) gdt + 8*GLDT_SEL, sizeof(desc));
 
-	desc.sd_lolimit = ((FREEBSD32_USRSTACK >> 12) - 1) & 0xffff;
+	desc.sd_lolimit = ((sv->sv_usrstack >> 12) - 1) & 0xffff;
 	desc.sd_lobase = 0;
 	desc.sd_type = SDT_MEMERA;
 	desc.sd_dpl = SEL_UPL;
 	desc.sd_p = 1;
-	desc.sd_hilimit = ((FREEBSD32_USRSTACK >> 12) - 1) >> 16;
+	desc.sd_hilimit = ((sv->sv_usrstack >> 12) - 1) >> 16;
 	desc.sd_def32 = 1;
 	desc.sd_gran = 1;
 	desc.sd_hibase = 0;
@@ -187,14 +189,14 @@ ia32_setregs(struct thread *td, struct i
 	copyout(&desc, (caddr_t) ldt + 8*LUDATA_SEL, sizeof(desc));
 
 	codeseg = 0		/* base */
-		+ (((FREEBSD32_USRSTACK >> 12) - 1) << 32) /* limit */
+		+ (((sv->sv_usrstack >> 12) - 1) << 32) /* limit */
 		+ ((long)SDT_MEMERA << 52)
 		+ ((long)SEL_UPL << 57)
 		+ (1L << 59) /* present */
 		+ (1L << 62) /* 32 bits */
 		+ (1L << 63); /* page granularity */
 	dataseg = 0		/* base */
-		+ (((FREEBSD32_USRSTACK >> 12) - 1) << 32) /* limit */
+		+ (((sv->sv_usrstack >> 12) - 1) << 32) /* limit */
 		+ ((long)SDT_MEMRWA << 52)
 		+ ((long)SEL_UPL << 57)
 		+ (1L << 59) /* present */
@@ -231,7 +233,7 @@ ia32_setregs(struct thread *td, struct i
 	ia64_set_eflag(PSL_USER);
 
 	/* PS_STRINGS value for BSD/OS binaries.  It is 0 for non-BSD/OS. */
-	tf->tf_scratch.gr11 = FREEBSD32_PS_STRINGS;
+	tf->tf_scratch.gr11 = td->td_proc->p_sysent->sv_psstrings;
 
 	/*
 	 * XXX - Linux emulator

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 12:18:37 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 35AD51065670;
	Sat,  7 Aug 2010 12:18:37 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 09D318FC12;
	Sat,  7 Aug 2010 12:18:37 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77CIads036478;
	Sat, 7 Aug 2010 12:18:36 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77CIavd036475;
	Sat, 7 Aug 2010 12:18:36 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071218.o77CIavd036475@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 12:18:36 +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: r211007 - stable/8/usr.sbin/sysinstall
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 12:18:37 -0000

Author: brucec
Date: Sat Aug  7 12:18:36 2010
New Revision: 211007
URL: http://svn.freebsd.org/changeset/base/211007

Log:
  MFC r209764:
  
  Increase the default and minimum partition sizes.
  Bump / to 1GB, /var to 4GB and /tmp to 1GB.
  
  A 512MB root partition is now too small to hold two kernels, so to
  prevent installkernel failing 1GB is a better default. Likewise,
  applications are storing more data in /var so 4GB is more reasonable
  on a modern machine.
  
  The previous minimum partition sizes were too small to hold a minimal
  installation, and have been adjusted accordingly.
  
  Approved by: rrs (mentor)

Modified:
  stable/8/usr.sbin/sysinstall/label.c
Directory Properties:
  stable/8/usr.sbin/sysinstall/   (props changed)

Modified: stable/8/usr.sbin/sysinstall/label.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/label.c	Sat Aug  7 11:57:13 2010	(r211006)
+++ stable/8/usr.sbin/sysinstall/label.c	Sat Aug  7 12:18:36 2010	(r211007)
@@ -62,9 +62,9 @@
  * Minimum partition sizes
  */
 #if defined(__ia64__) || defined(__sparc64__) || defined(__amd64__)
-#define ROOT_MIN_SIZE			128
+#define ROOT_MIN_SIZE			280
 #else
-#define ROOT_MIN_SIZE			118
+#define ROOT_MIN_SIZE			180
 #endif
 #define SWAP_MIN_SIZE			32
 #define USR_MIN_SIZE			160
@@ -82,10 +82,10 @@
  * for this configuration we scale things relative to the NOM vs DEFAULT
  * sizes.  If the disk is larger then /home will get any remaining space.
  */
-#define ROOT_DEFAULT_SIZE		512
+#define ROOT_DEFAULT_SIZE		1024
 #define USR_DEFAULT_SIZE		8192
-#define VAR_DEFAULT_SIZE		1024
-#define TMP_DEFAULT_SIZE		512
+#define VAR_DEFAULT_SIZE		4096
+#define TMP_DEFAULT_SIZE		1024
 #define HOME_DEFAULT_SIZE		USR_DEFAULT_SIZE
 
 /*
@@ -93,9 +93,9 @@
  * when we have insufficient disk space.  If this isn't sufficient we scale
  * down using the MIN sizes instead.
  */
-#define ROOT_NOMINAL_SIZE		256
+#define ROOT_NOMINAL_SIZE		512
 #define USR_NOMINAL_SIZE		1536
-#define VAR_NOMINAL_SIZE		128
+#define VAR_NOMINAL_SIZE		512
 #define TMP_NOMINAL_SIZE		128
 #define HOME_NOMINAL_SIZE		USR_NOMINAL_SIZE
 

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 12:21:29 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AE6151065670;
	Sat,  7 Aug 2010 12:21:29 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8232B8FC17;
	Sat,  7 Aug 2010 12:21:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77CLTho037222;
	Sat, 7 Aug 2010 12:21:29 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77CLTlh037220;
	Sat, 7 Aug 2010 12:21:29 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071221.o77CLTlh037220@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 12:21: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: r211008 - stable/7/usr.sbin/sysinstall
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 12:21:29 -0000

Author: brucec
Date: Sat Aug  7 12:21:29 2010
New Revision: 211008
URL: http://svn.freebsd.org/changeset/base/211008

Log:
  MFC r209764:
  
  Increase the default and minimum partition sizes.
  Bump / to 1GB, /var to 4GB and /tmp to 1GB.
  
  A 512MB root partition is now too small to hold two kernels, so to
  prevent installkernel failing 1GB is a better default. Likewise,
  applications are storing more data in /var so 4GB is more reasonable
  on a modern machine.
  
  The previous minimum partition sizes were too small to hold a minimal
  installation, and have been adjusted accordingly.
  
  Approved by: rrs (mentor)

Modified:
  stable/7/usr.sbin/sysinstall/label.c
Directory Properties:
  stable/7/usr.sbin/sysinstall/   (props changed)

Modified: stable/7/usr.sbin/sysinstall/label.c
==============================================================================
--- stable/7/usr.sbin/sysinstall/label.c	Sat Aug  7 12:18:36 2010	(r211007)
+++ stable/7/usr.sbin/sysinstall/label.c	Sat Aug  7 12:21:29 2010	(r211008)
@@ -62,9 +62,9 @@
  * Minimum partition sizes
  */
 #if defined(__alpha__) || defined(__ia64__) || defined(__sparc64__) || defined(__amd64__)
-#define ROOT_MIN_SIZE			128
+#define ROOT_MIN_SIZE			280
 #else
-#define ROOT_MIN_SIZE			118
+#define ROOT_MIN_SIZE			180
 #endif
 #define SWAP_MIN_SIZE			32
 #define USR_MIN_SIZE			160
@@ -82,10 +82,10 @@
  * for this configuration we scale things relative to the NOM vs DEFAULT
  * sizes.  If the disk is larger then /home will get any remaining space.
  */
-#define ROOT_DEFAULT_SIZE		512
+#define ROOT_DEFAULT_SIZE		1024
 #define USR_DEFAULT_SIZE		8192
-#define VAR_DEFAULT_SIZE		1024
-#define TMP_DEFAULT_SIZE		512
+#define VAR_DEFAULT_SIZE		4096
+#define TMP_DEFAULT_SIZE		1024
 #define HOME_DEFAULT_SIZE		USR_DEFAULT_SIZE
 
 /*
@@ -93,9 +93,9 @@
  * when we have insufficient disk space.  If this isn't sufficient we scale
  * down using the MIN sizes instead.
  */
-#define ROOT_NOMINAL_SIZE		256
+#define ROOT_NOMINAL_SIZE		512
 #define USR_NOMINAL_SIZE		1536
-#define VAR_NOMINAL_SIZE		128
+#define VAR_NOMINAL_SIZE		512
 #define TMP_NOMINAL_SIZE		128
 #define HOME_NOMINAL_SIZE		USR_NOMINAL_SIZE
 

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 12:41:12 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CEA031065673;
	Sat,  7 Aug 2010 12:41:12 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BCE738FC12;
	Sat,  7 Aug 2010 12:41:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77CfCKu041657;
	Sat, 7 Aug 2010 12:41:12 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77CfCdX041655;
	Sat, 7 Aug 2010 12:41:12 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071241.o77CfCdX041655@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 12:41: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: r211009 - stable/8/usr.sbin/sysinstall
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 12:41:12 -0000

Author: brucec
Date: Sat Aug  7 12:41:12 2010
New Revision: 211009
URL: http://svn.freebsd.org/changeset/base/211009

Log:
  MFC r209467:
  
  When installing on a machine which doesn't have a VGA card installed, enable
  a getty on the serial port so that it's possible to login when the system is
  rebooted.
  
  PR: bin/23098
  Submitted by: Doug Ambrisko 
  Approved by: rrs (mentor)

Modified:
  stable/8/usr.sbin/sysinstall/install.c
Directory Properties:
  stable/8/usr.sbin/sysinstall/   (props changed)

Modified: stable/8/usr.sbin/sysinstall/install.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/install.c	Sat Aug  7 12:21:29 2010	(r211008)
+++ stable/8/usr.sbin/sysinstall/install.c	Sat Aug  7 12:41:12 2010	(r211009)
@@ -875,6 +875,9 @@ installConfigure(void)
 int
 installFixupBase(dialogMenuItem *self)
 {
+    FILE *orig, *new;
+    char buf[1024];
+    char *pos;
     FILE *fp;
 #ifdef __ia64__
     const char *efi_mntpt;
@@ -891,6 +894,32 @@ installFixupBase(dialogMenuItem *self)
 	    fclose(fp);
 	}
 #endif
+
+	/* Fixup /etc/ttys to start a getty on the serial port.
+	  This way after a serial installation you can login via
+	  the serial port */
+
+	if (!OnVTY){
+	    if (((orig=fopen("/etc/ttys","r")) != NULL) &&
+		((new=fopen("/etc/ttys.tmp","w")) != NULL)) {
+		while (fgets(buf,sizeof(buf),orig)){
+		    if (strstr(buf,"ttyu0")){
+			if ((pos=strstr(buf,"off"))){
+			    *pos++='o';
+			    *pos++='n';
+			    *pos++=' ';
+			}
+		    }
+		    fputs(buf,new);
+		}
+		fclose(orig);
+		fclose(new);
+
+		rename("/etc/ttys.tmp","/etc/ttys");
+		unlink("/etc/ttys.tmp");
+	    }
+	}
+
 	
 	/* BOGON #2: We leave /etc in a bad state */
 	chmod("/etc", 0755);

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 12:46:50 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 11144106566B;
	Sat,  7 Aug 2010 12:46:50 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F368B8FC14;
	Sat,  7 Aug 2010 12:46:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77CknGw042980;
	Sat, 7 Aug 2010 12:46:49 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77Ckniq042978;
	Sat, 7 Aug 2010 12:46:49 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071246.o77Ckniq042978@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 12:46:49 +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: r211010 - stable/7/usr.sbin/sysinstall
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 12:46:50 -0000

Author: brucec
Date: Sat Aug  7 12:46:49 2010
New Revision: 211010
URL: http://svn.freebsd.org/changeset/base/211010

Log:
  MFC r209467:
  
  When installing on a machine which doesn't have a VGA card installed, enable
  a getty on the serial port so that it's possible to login when the system is
  rebooted.
  
  PR: bin/23098
  Submitted by: Doug Ambrisko 
  Approved by: rrs (mentor)

Modified:
  stable/7/usr.sbin/sysinstall/install.c
Directory Properties:
  stable/7/usr.sbin/sysinstall/   (props changed)

Modified: stable/7/usr.sbin/sysinstall/install.c
==============================================================================
--- stable/7/usr.sbin/sysinstall/install.c	Sat Aug  7 12:41:12 2010	(r211009)
+++ stable/7/usr.sbin/sysinstall/install.c	Sat Aug  7 12:46:49 2010	(r211010)
@@ -839,6 +839,9 @@ installConfigure(void)
 int
 installFixupBase(dialogMenuItem *self)
 {
+    FILE *orig, *new;
+    char buf[1024];
+    char *pos;
     FILE *fp;
 #ifdef __ia64__
     const char *efi_mntpt;
@@ -855,6 +858,32 @@ installFixupBase(dialogMenuItem *self)
 	    fclose(fp);
 	}
 #endif
+
+	/* Fixup /etc/ttys to start a getty on the serial port.
+	  This way after a serial installation you can login via
+	  the serial port */
+
+	if (!OnVTY){
+	    if (((orig=fopen("/etc/ttys","r")) != NULL) &&
+		((new=fopen("/etc/ttys.tmp","w")) != NULL)) {
+		while (fgets(buf,sizeof(buf),orig)){
+		    if (strstr(buf,"ttyd0")){
+			if ((pos=strstr(buf,"off"))){
+			    *pos++='o';
+			    *pos++='n';
+			    *pos++=' ';
+			}
+		    }
+		    fputs(buf,new);
+		}
+		fclose(orig);
+		fclose(new);
+
+		rename("/etc/ttys.tmp","/etc/ttys");
+		unlink("/etc/ttys.tmp");
+	    }
+	}
+
 	
 	/* BOGON #2: We leave /etc in a bad state */
 	chmod("/etc", 0755);

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 12:51:45 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 00A41106564A;
	Sat,  7 Aug 2010 12:51:45 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E2A8F8FC1F;
	Sat,  7 Aug 2010 12:51:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77Cpifc044108;
	Sat, 7 Aug 2010 12:51:44 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77Cpiwo044105;
	Sat, 7 Aug 2010 12:51:44 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071251.o77Cpiwo044105@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 12:51: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: r211011 - stable/8/usr.sbin/sysinstall
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 12:51:45 -0000

Author: brucec
Date: Sat Aug  7 12:51:44 2010
New Revision: 211011
URL: http://svn.freebsd.org/changeset/base/211011

Log:
  MFC r209468:
  
  Make it easier to cancel a failing installation by only attempting to
  extract distributions once. If a distribution fails to fetch/extract
  and the user doesn't want to retry, abort the installation.
  
  Approved by: rrs (mentor)

Modified:
  stable/8/usr.sbin/sysinstall/dist.c
  stable/8/usr.sbin/sysinstall/install.c
Directory Properties:
  stable/8/usr.sbin/sysinstall/   (props changed)

Modified: stable/8/usr.sbin/sysinstall/dist.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/dist.c	Sat Aug  7 12:46:49 2010	(r211010)
+++ stable/8/usr.sbin/sysinstall/dist.c	Sat Aug  7 12:51:44 2010	(r211011)
@@ -613,7 +613,7 @@ getinfo:
 	    if (fp == NULL)
 		msgConfirm("Failed to find %s on this media.  Reinitializing media.", fname);
 	    else
-		msgConfirm("Failed to retreive piece file %s.\n"
+		msgConfirm("Failed to retrieve piece file %s.\n"
 			   "%s: Reinitializing media.",
 			   fname, !intr ? "I/O error" : "User interrupt");
 	    DEVICE_SHUTDOWN(mediaDevice);
@@ -709,6 +709,7 @@ distExtract(char *parent, Distribution *
     char *path, *dist;
     WINDOW *w = savescr();
     struct sigaction old, new;
+    int canceled = 0;
 
     status = TRUE;
     if (isDebug())
@@ -723,7 +724,7 @@ distExtract(char *parent, Distribution *
     sigaction(SIGINT, &new, &old);
 
     /* Loop through to see if we're in our parent's plans */
-    for (i = 0; me[i].my_name; i++) {
+    for (i = 0; me[i].my_name && canceled == 0; i++) {
 	dist = me[i].my_name;
 	path = parent ? parent : dist;
 
@@ -758,8 +759,11 @@ distExtract(char *parent, Distribution *
 		    status = msgYesNo("Unable to transfer the %s distribution from\n%s.\n\n"
 			              "Do you want to try to retrieve it again?",
 				      me[i].my_name, mediaDevice->name);
-		    if (!status)
+		    if (status == 0)
 			--i;
+		    else
+			canceled = 1;	
+
 		    status = FALSE;
 		}
 	    }
@@ -773,6 +777,7 @@ distExtract(char *parent, Distribution *
 	if (status)
 	    *(me[i].my_mask) &= ~(me[i].my_bit);
     }
+
     sigaction(SIGINT, &old, NULL);	/* Restore signal handler */
     restorescr(w);
     return status;
@@ -865,8 +870,9 @@ printSelected(char *buf, int selected, D
 int
 distExtractAll(dialogMenuItem *self)
 {
-    int old_dists, old_kernel, retries = 0, status = DITEM_SUCCESS;
+    int old_dists, old_kernel, status = DITEM_SUCCESS;
     char buf[512];
+    int extract_status = TRUE;
     WINDOW *w;
 
     /* paranoia */
@@ -886,9 +892,7 @@ distExtractAll(dialogMenuItem *self)
     w = savescr();
     msgNotify("Attempting to install all selected distributions..");
 
-    /* Try for 3 times around the loop, then give up. */
-    while (Dists && ++retries < 3)
-	distExtract(NULL, DistTable);
+    extract_status = distExtract(NULL, DistTable);
 
     dialog_clear_norefresh();
     /* Only do base fixup if base dist was successfully extracted */
@@ -915,5 +919,9 @@ distExtractAll(dialogMenuItem *self)
 	}
     }
     restorescr(w);
+
+    if (extract_status == FALSE)
+	status = DITEM_FAILURE;
+
     return status;
 }

Modified: stable/8/usr.sbin/sysinstall/install.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/install.c	Sat Aug  7 12:46:49 2010	(r211010)
+++ stable/8/usr.sbin/sysinstall/install.c	Sat Aug  7 12:51:44 2010	(r211011)
@@ -676,8 +676,7 @@ nodisks:
 	msgConfirm("Installation completed with some errors.  You may wish to\n"
 		   "scroll through the debugging messages on VTY1 with the\n"
 		   "scroll-lock feature.  You can also choose \"No\" at the next\n"
-		   "prompt and go back into the installation menus to retry\n"
-		   "whichever operations have failed.");
+		   "prompt and reboot and try the installation again.");
 	return i;
 
     }
@@ -853,6 +852,9 @@ try_media:
     /* Now go get it all */
     i = distExtractAll(self);
 
+    if (i == FALSE)
+	    return FALSE;
+
     /* When running as init, *now* it's safe to grab the rc.foo vars */
     installEnvironment();
 

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 12:54:13 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 40B7E1065670;
	Sat,  7 Aug 2010 12:54:13 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2EB198FC1C;
	Sat,  7 Aug 2010 12:54:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77CsDVU044713;
	Sat, 7 Aug 2010 12:54:13 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77CsDIP044710;
	Sat, 7 Aug 2010 12:54:13 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071254.o77CsDIP044710@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 12:54:13 +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: r211012 - stable/7/usr.sbin/sysinstall
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 12:54:13 -0000

Author: brucec
Date: Sat Aug  7 12:54:12 2010
New Revision: 211012
URL: http://svn.freebsd.org/changeset/base/211012

Log:
  MFC r209468:
  
  Make it easier to cancel a failing installation by only attempting to
  extract distributions once. If a distribution fails to fetch/extract
  and the user doesn't want to retry, abort the installation.
  
  Approved by: rrs (mentor)

Modified:
  stable/7/usr.sbin/sysinstall/dist.c
  stable/7/usr.sbin/sysinstall/install.c
Directory Properties:
  stable/7/usr.sbin/sysinstall/   (props changed)

Modified: stable/7/usr.sbin/sysinstall/dist.c
==============================================================================
--- stable/7/usr.sbin/sysinstall/dist.c	Sat Aug  7 12:51:44 2010	(r211011)
+++ stable/7/usr.sbin/sysinstall/dist.c	Sat Aug  7 12:54:12 2010	(r211012)
@@ -629,7 +629,7 @@ getinfo:
 	    if (fp == NULL)
 		msgConfirm("Failed to find %s on this media.  Reinitializing media.", fname);
 	    else
-		msgConfirm("Failed to retreive piece file %s.\n"
+		msgConfirm("Failed to retrieve piece file %s.\n"
 			   "%s: Reinitializing media.",
 			   fname, !intr ? "I/O error" : "User interrupt");
 	    DEVICE_SHUTDOWN(mediaDevice);
@@ -725,6 +725,7 @@ distExtract(char *parent, Distribution *
     char *path, *dist;
     WINDOW *w = savescr();
     struct sigaction old, new;
+    int canceled = 0;
 
     status = TRUE;
     if (isDebug())
@@ -739,7 +740,7 @@ distExtract(char *parent, Distribution *
     sigaction(SIGINT, &new, &old);
 
     /* Loop through to see if we're in our parent's plans */
-    for (i = 0; me[i].my_name; i++) {
+    for (i = 0; me[i].my_name && canceled == 0; i++) {
 	dist = me[i].my_name;
 	path = parent ? parent : dist;
 
@@ -774,8 +775,11 @@ distExtract(char *parent, Distribution *
 		    status = msgYesNo("Unable to transfer the %s distribution from\n%s.\n\n"
 			              "Do you want to try to retrieve it again?",
 				      me[i].my_name, mediaDevice->name);
-		    if (!status)
+		    if (status == 0)
 			--i;
+		    else
+			canceled = 1;	
+
 		    status = FALSE;
 		}
 	    }
@@ -789,6 +793,7 @@ distExtract(char *parent, Distribution *
 	if (status)
 	    *(me[i].my_mask) &= ~(me[i].my_bit);
     }
+
     sigaction(SIGINT, &old, NULL);	/* Restore signal handler */
     restorescr(w);
     return status;
@@ -822,8 +827,9 @@ printSelected(char *buf, int selected, D
 int
 distExtractAll(dialogMenuItem *self)
 {
-    int old_dists, old_kernel, retries = 0, status = DITEM_SUCCESS;
+    int old_dists, old_kernel, status = DITEM_SUCCESS;
     char buf[512];
+    int extract_status = TRUE;
     WINDOW *w;
 
     /* paranoia */
@@ -843,9 +849,7 @@ distExtractAll(dialogMenuItem *self)
     w = savescr();
     msgNotify("Attempting to install all selected distributions..");
 
-    /* Try for 3 times around the loop, then give up. */
-    while (Dists && ++retries < 3)
-	distExtract(NULL, DistTable);
+    extract_status = distExtract(NULL, DistTable);
 
     dialog_clear_norefresh();
     /* Only do base fixup if base dist was successfully extracted */
@@ -872,5 +876,9 @@ distExtractAll(dialogMenuItem *self)
 	}
     }
     restorescr(w);
+
+    if (extract_status == FALSE)
+	status = DITEM_FAILURE;
+
     return status;
 }

Modified: stable/7/usr.sbin/sysinstall/install.c
==============================================================================
--- stable/7/usr.sbin/sysinstall/install.c	Sat Aug  7 12:51:44 2010	(r211011)
+++ stable/7/usr.sbin/sysinstall/install.c	Sat Aug  7 12:54:12 2010	(r211012)
@@ -628,8 +628,7 @@ nodisks:
 	msgConfirm("Installation completed with some errors.  You may wish to\n"
 		   "scroll through the debugging messages on VTY1 with the\n"
 		   "scroll-lock feature.  You can also choose \"No\" at the next\n"
-		   "prompt and go back into the installation menus to retry\n"
-		   "whichever operations have failed.");
+		   "prompt and reboot and try the installation again.");
 	return i;
 
     }
@@ -817,6 +816,9 @@ try_media:
     /* Now go get it all */
     i = distExtractAll(self);
 
+    if (i == FALSE)
+	    return FALSE;
+
     /* When running as init, *now* it's safe to grab the rc.foo vars */
     installEnvironment();
 

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 12:58:02 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2D9DD1065673;
	Sat,  7 Aug 2010 12:58:02 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1C0038FC1E;
	Sat,  7 Aug 2010 12:58:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77Cw2OA045771;
	Sat, 7 Aug 2010 12:58:02 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77Cw1Y1045769;
	Sat, 7 Aug 2010 12:58:02 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071258.o77Cw1Y1045769@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 12:58:01 +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: r211013 - stable/8/usr.sbin/boot0cfg
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 12:58:02 -0000

Author: brucec
Date: Sat Aug  7 12:58:01 2010
New Revision: 211013
URL: http://svn.freebsd.org/changeset/base/211013

Log:
  MFC r209469:
  
  If a device can't be opened, don't keep going but display the error
  returned from open() and quit.
  
  PR: bin/81035
  Submitted by: Peter Schuller 
  Approved by: rrs (mentor)

Modified:
  stable/8/usr.sbin/boot0cfg/boot0cfg.c
Directory Properties:
  stable/8/usr.sbin/boot0cfg/   (props changed)

Modified: stable/8/usr.sbin/boot0cfg/boot0cfg.c
==============================================================================
--- stable/8/usr.sbin/boot0cfg/boot0cfg.c	Sat Aug  7 12:54:12 2010	(r211012)
+++ stable/8/usr.sbin/boot0cfg/boot0cfg.c	Sat Aug  7 12:58:01 2010	(r211013)
@@ -356,6 +356,8 @@ write_mbr(const char *fname, int flags, 
 	if (n != mbr_size)
 	   errx(1, "%s: short write", fname);
 	return;
+    } else {
+	    err(1, "write_mbr: %s", fname);
     }
 
     /*

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 13:02:26 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5E4F61065675;
	Sat,  7 Aug 2010 13:02:26 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4CBAE8FC1A;
	Sat,  7 Aug 2010 13:02:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77D2Qr2046795;
	Sat, 7 Aug 2010 13:02:26 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77D2QTR046793;
	Sat, 7 Aug 2010 13:02:26 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071302.o77D2QTR046793@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 13:02:26 +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: r211014 - stable/7/usr.sbin/boot0cfg
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 13:02:26 -0000

Author: brucec
Date: Sat Aug  7 13:02:26 2010
New Revision: 211014
URL: http://svn.freebsd.org/changeset/base/211014

Log:
  MFC r209469:
  
  If a device can't be opened, don't keep going but display the error
  returned from open() and quit.
  
  PR: bin/81035
  Submitted by: Peter Schuller 
  Approved by: rrs (mentor)

Modified:
  stable/7/usr.sbin/boot0cfg/boot0cfg.c
Directory Properties:
  stable/7/usr.sbin/boot0cfg/   (props changed)

Modified: stable/7/usr.sbin/boot0cfg/boot0cfg.c
==============================================================================
--- stable/7/usr.sbin/boot0cfg/boot0cfg.c	Sat Aug  7 12:58:01 2010	(r211013)
+++ stable/7/usr.sbin/boot0cfg/boot0cfg.c	Sat Aug  7 13:02:26 2010	(r211014)
@@ -355,6 +355,8 @@ write_mbr(const char *fname, int flags, 
 	if (n != mbr_size)
 	   errx(1, "%s: short write", fname);
 	return;
+    } else {
+	    err(1, "write_mbr: %s", fname);
     }
 
     if (flags != 0)

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 13:25:47 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E133F106564A;
	Sat,  7 Aug 2010 13:25:46 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CA59F8FC15;
	Sat,  7 Aug 2010 13:25:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77DPkE1052155;
	Sat, 7 Aug 2010 13:25:46 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77DPkSR052153;
	Sat, 7 Aug 2010 13:25:46 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071325.o77DPkSR052153@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 13:25:46 +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: r211015 - stable/8/sys/boot/forth
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 13:25:47 -0000

Author: brucec
Date: Sat Aug  7 13:25:46 2010
New Revision: 211015
URL: http://svn.freebsd.org/changeset/base/211015

Log:
  MFC r209466:
  
  Add some more modules to loader.conf. Remove if_awi since support for it
  was removed 2 years ago.
  
  PR: conf/147126
  PR: conf/116071
  Approved by: rrs (mentor)

Modified:
  stable/8/sys/boot/forth/loader.conf
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/boot/forth/loader.conf
==============================================================================
--- stable/8/sys/boot/forth/loader.conf	Sat Aug  7 13:02:26 2010	(r211014)
+++ stable/8/sys/boot/forth/loader.conf	Sat Aug  7 13:25:46 2010	(r211015)
@@ -119,6 +119,35 @@ module_path="/boot/modules"	# Set the mo
 
 
 ##############################################################
+### ATA modules ##############################################
+##############################################################
+
+ataahci_load="NO"		# AHCI SATA
+ataacard_load="NO"		# ACARD
+ataacerlabs_load="NO"		# Acer Labs Inc. (ALI)
+ataadaptec_load="NO"		# Adaptec
+ataamd_load="NO"		# American Micro Devices (AMD)
+ataati_load="NO"		# ATI
+atacenatek_load="NO"		# Cenatek
+atacypress_load="NO"		# Cypress
+atacyrix_load="NO"		# Cyrix
+atahighpoint_load="NO"		# HighPoint
+ataintel_load="NO"		# Intel
+ataite_load="NO"		# Integrated Technology Inc. (ITE)
+atajmicron_load="NO"		# JMicron
+atamarvell_load="NO"		# Marvell
+atamicron_load="NO"		# Micron
+atanational_load="NO"		# National
+atanetcell_load="NO"		# NetCell
+atanvidia_load="NO"		# nVidia
+atapromise_load="NO"		# Promise
+ataserverworks_load="NO"	# ServerWorks
+atasiliconimage_load="NO"	# Silicon Image Inc. (SiI) (formerly CMD)
+atasis_load="NO"		# Silicon Integrated Systems Corp.(SiS)
+atavia_load="NO"		# VIA Technologies Inc.
+
+
+##############################################################
 ###  Filesystem and related modules  #########################
 ##############################################################
 
@@ -133,6 +162,7 @@ msdosfs_load="NO"		# FAT-12/16/32
 nfsclient_load="NO"		# NFS client
 nfsserver_load="NO"		# NFS server
 ntfs_load="NO"			# NTFS
+ntfs_iconv_load="NO"		# NTFS iconv character support
 nullfs_load="NO"		# Null filesystem
 portalfs_load="NO"		# Portal filesystem
 procfs_load="NO"		# Process filesystem
@@ -164,6 +194,18 @@ geom_vinum_load="NO"		# Concatenated/mir
 
 
 ##############################################################
+###  FireWire modules  #######################################
+##############################################################
+
+firewire_load="NO"              # IEEE1394 High-performance Serial Bus
+fwe_load="NO"                   # Ethernet emulation driver for FireWire
+fwip_load="NO"                  # IP over FireWire driver
+fwohci_load="NO"                # OHCI FireWire chipset device driver
+sbp_load="NO"                   # SBP-2 Mass Storage Devices driver
+sbp_targ_load="NO"		# SBP-2 Target mode
+
+
+##############################################################
 ###  Screen saver modules  ###################################
 ##############################################################
 
@@ -216,16 +258,17 @@ if_ale_load="NO"		# Atheros AR8121/AR811
 if_an_load="NO"			# Aironet 4500/4800 802.11 wireless NICs
 if_ath_load="NO"		# Atheros IEEE 802.11 wireless NICs
 if_aue_load="NO"		# ADMtek AN986 Pegasus USB Ethernet
-if_awi_load="NO"		# AMD PCnetMobile IEEE 802.11 wireless NICs
 if_axe_load="NO"		# ASIX Electronics AX88172 USB Ethernet
 if_bce_load="NO"		# Broadcom NetXtreme II Gigabit Ethernet
 if_bfe_load="NO"		# Broadcom BCM4401
 if_bge_load="NO"		# Broadcom BCM570x PCI Gigabit Ethernet
+if_bwi_load="NO"		# Broadcom BCM53xx IEEE 802.11b/g wireness NICs
 if_bwn_load="NO"		# Broadcom BCM43xx IEEE 802.11 wireless NICs
 if_cas_load="NO"		# Sun Cassini/Cassini+ and NS DP83065 Saturn
 if_cm_load="NO"			# SMC (90c26, 90c56, 90c66)
 if_cs_load="NO"			# Crystal Semiconductor CS8920
 if_cue_load="NO"		# CATC USB-EL1210A USB Ethernet
+if_cxgb_load="NO"		# Chelsio T3 10 Gigabit Ethernet
 if_dc_load="NO"			# DEC/Intel 21143 and various workalikes
 if_de_load="NO"			# DEC DC21x4x Ethernet
 if_ed_load="NO"			# National Semiconductor DS8390/WD83C690
@@ -235,16 +278,19 @@ if_en_load="NO"			# Midway-based ATM int
 if_ep_load="NO"			# 3Com Etherlink III (3c5x9)
 if_et_load="NO"			# Agere ET1310 10/100/Gigabit Ethernet
 if_ex_load="NO"			# Intel EtherExpress Pro/10 Ethernet
+if_fatm_load="NO"		# Fore PCA200E ATM
 if_fe_load="NO"			# Fujitsu MB86960A/MB86965A based Ethernet
 				# adapters
 if_fxp_load="NO"		# Intel EtherExpress PRO/100B (82557, 82558)
 if_gem_load="NO"		# Sun GEM/Sun ERI/Apple GMAC
+if_hatm_load="NO"		# Fore/Marconi HE155 and HE622
 if_hme_load="NO"		# Sun Microelectronics STP2002-STQ Ethernet
 if_ie_load="NO"			# Intel 82586
 if_igb_load="NO"		# Intel(R) PRO/1000 Gigabit Ethernet
 if_ipw_load="NO"		# Intel PRO/Wireless 2100 wireless
 if_iwi_load="NO"		# Intel PRO/Wireless 2200BG/2225BG/2915ABG
 				# wireless
+if_iwn_load="NO"		# Intel Wireless WiFi Link 802.11n wireless
 if_ixgb_load="NO"		# Intel PRO/10Gb Ethernet
 if_ixgbe_load="NO"		# Intel PRO/10Gb Ethernet PCI Express
 if_jme_load="NO"		# JMicron JMC250 Gigabit/JMC260 Fast Ethernet
@@ -260,11 +306,14 @@ if_nfe_load="NO"		# NVIDIA nForce MCP Ne
 if_nge_load="NO"		# National Semiconductor PCI Gigabit Ethernet
 if_nve_load="NO"		# NVIDIA nForce MCP Networking Adapter
 if_nxge_load="NO"		# Neterion Xframe 10Gb Ethernet
+if_patm_load="NO"		# IDT77252 ATM
 if_pcn_load="NO"		# AMD PCnet PCI
 if_ral_load="NO"		# Ralink Technology wireless
 if_re_load="NO"			# RealTek 8139C+/8169/8169S/8110S
 if_rl_load="NO"			# RealTek 8129/8139
 if_rue_load="NO"		# RealTek RTL8150 USB to Fast Ethernet
+if_rum_load="NO"		# Ralink Technology USB 802.11a/b/g wireless
+if_run_load="NO"		# Ralink Technology USB 802.11a/g/n wireless
 if_sbni_load="NO"		# Granch SBNI12 leased line adapters
 if_sf_load="NO"			# Adaptec Duralink PCI (AIC-6915 "starfire")
 if_sge_load="NO"		# Silicon Integrated Systems SiS 190/191
@@ -290,6 +339,7 @@ if_wi_load="NO"			# WaveLAN/IEEE 802.11 
 if_wpi_load="NO"		# Intel 3945ABG Wireless LAN IEEE 802.11
 if_xe_load="NO"			# Xircom CreditCard PCMCIA
 if_xl_load="NO"			# 3Com Etherlink XL (3c900, 3c905, 3c905B)
+utopia_load="NO"		# ATM PHY driver
 
 ##############################################################
 ###  Netgraph modules  #######################################
@@ -376,18 +426,27 @@ snd_driver_load="NO"		# All sound driver
 usb_load="NO"			# USB subsystem
 udbp_load="NO"			# USB double bulk pipe host 2 host cables
 ugen_load="NO"			# USB generic device, if all else fails ...
+ucycom_load="NO"		# Cyprus USB serial adapters
 ufm_load="NO"			# Fm Radio
 uhid_load="NO"			# Human Interface Devices
 ukbd_load="NO"			# Keyboard
 ulpt_load="NO"			# Printer
 ums_load="NO"			# Mouse
 umass_load="NO"			# Mass Storage Devices
+umct_load="NO"			# Magic Control Technology USB-RS232
 umodem_load="NO"		# Modems
+uplcom_load="NO"		# Prolific USB serial adapters
+urio_load="NO"			# Rio MP3 players
+uvisor_load="NO"		# PalmOS based PDAs
 if_aue_load="NO"		# ADMtek USB ethernet
 if_axe_load="NO"		# ASIX Electronics AX88172 USB ethernet
+if_cdce_load="NO"		# Ethernet over USB (CDC)
 if_cue_load="NO"		# CATC USB ethernet
 if_kue_load="NO"		# Kawasaki LSI USB ethernet
+if_rae_load="NO"		# Realtek RTL8150 USB adapter.
 if_rum_load="NO"		# Ralink USB 802.11 wireless adapter
+if_uath_load="NO"		# Atheros AR5523 wireless adapter
+if_run_load="NO"		# Ralink USB 802.11 wireless adapter
 if_ural_load="NO"		# Ralink RT2500USB 802.11 wireless adapter
 if_zyd_load="NO"		# ZyDAS ZD1211(B) USB 802.11 wireless adapter
 snd_uaudio_load="NO"		# USB audio
@@ -396,15 +455,22 @@ snd_uaudio_load="NO"		# USB audio
 ###  Other modules  ##########################################
 ##############################################################
 
+aio_load="NO"			# Asynchronous I/O
 bktr_load="NO"			# Brooktree Bt848/Bt878 TV/Video Capture Card
 ispfw_load="NO"			# Qlogic ISP Firmware
 agp_load="NO"			# agp module
 accf_data_load="NO"		# Wait for data accept filter
 accf_dns_load="NO"		# Wait for full DNS request accept filter
 accf_http_load="NO"		# Wait for full HTTP request accept filter
+ppi_load="NO"			# Interface to ppbus parallel 'geek' port
+pps_load="NO"			# Pulse per second devices
+puc_load="NO"			# PCI "Universal" Communications driver
 random_load="NO"		# Random device
 speaker_load="NO"		# AT speaker module
 coretemp_load="NO"		# Intel Core CPU temperature monitor
+vkbd_load="NO"			# Virtual AT keyboard interface
+vpd_load="NO"			# Vital Product Data kernel interface
+vpo_load="NO"			# Parallel to SCSI interface driver
 amdtemp_load="NO"		# AMD K8/K10/K11 temperature monitor
 
 ##############################################################

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 13:26:08 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CDA481065670;
	Sat,  7 Aug 2010 13:26:08 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A248E8FC1A;
	Sat,  7 Aug 2010 13:26:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77DQ8qE052300;
	Sat, 7 Aug 2010 13:26:08 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77DQ8AN052298;
	Sat, 7 Aug 2010 13:26:08 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201008071326.o77DQ8AN052298@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Sat, 7 Aug 2010 13:26:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211016 - head/share/man/man9
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 13:26:08 -0000

Author: des
Date: Sat Aug  7 13:26:08 2010
New Revision: 211016
URL: http://svn.freebsd.org/changeset/base/211016

Log:
  Document the MEXTADD macro.
  
  MFC after:	2 weeks

Modified:
  head/share/man/man9/mbuf.9

Modified: head/share/man/man9/mbuf.9
==============================================================================
--- head/share/man/man9/mbuf.9	Sat Aug  7 13:25:46 2010	(r211015)
+++ head/share/man/man9/mbuf.9	Sat Aug  7 13:26:08 2010	(r211016)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 25, 2008
+.Dd August 7, 2010
 .Dt MBUF 9
 .Os
 .\"
@@ -211,7 +211,7 @@ flag bits are defined as follows:
 #define	M_EOR		0x0004	/* end of record */
 #define	M_RDONLY	0x0008	/* associated data marked read-only */
 #define	M_PROTO1	0x0010	/* protocol-specific */
-#define	M_PROTO2	0x0020 	/* protocol-specific */
+#define	M_PROTO2	0x0020	/* protocol-specific */
 #define	M_PROTO3	0x0040	/* protocol-specific */
 #define	M_PROTO4	0x0080	/* protocol-specific */
 #define	M_PROTO5	0x0100	/* protocol-specific */
@@ -238,6 +238,22 @@ types are defined as follows:
 #define	MT_OOBDATA	15	/* expedited data */
 .Ed
 .Pp
+The available external buffer types are defined as follows:
+.Bd -literal
+/* external buffer types */
+#define EXT_CLUSTER	1	/* mbuf cluster */
+#define EXT_SFBUF	2	/* sendfile(2)'s sf_bufs */
+#define EXT_JUMBOP	3	/* jumbo cluster 4096 bytes */
+#define EXT_JUMBO9	4	/* jumbo cluster 9216 bytes */
+#define EXT_JUMBO16	5	/* jumbo cluster 16184 bytes */
+#define EXT_PACKET	6	/* mbuf+cluster from packet zone */
+#define EXT_MBUF	7	/* external mbuf reference (M_IOVEC) */
+#define EXT_NET_DRV	100	/* custom ext_buf provided by net driver(s) */
+#define EXT_MOD_TYPE	200	/* custom module's ext_buf type */
+#define EXT_DISPOSABLE	300	/* can throw this buffer away w/page flipping */
+#define EXT_EXTREF	400	/* has externally maintained ref_cnt ptr */
+.Ed
+.Pp
 If the
 .Dv M_PKTHDR
 flag is set, a
@@ -383,6 +399,43 @@ and internal data.
 See
 .Fn MGET
 for details.
+.It Fn MEXTADD mbuf buf size free opt_arg1 opt_arg2 flags type
+Associate externally managed data with
+.Fa mbuf .
+Any internal data contained in the mbuf will be discarded, and the
+.Dv M_EXT flag will be set.
+The
+.Fa buf
+and
+.Fa size
+arguments are the address and length, respectively, of the data.
+The
+.Fa free
+argument points to a function which will be called to free the data
+when the mbuf is freed; it is only used if
+.Fa type
+is
+.Dv EXT_EXTREF .
+The
+.Fa opt_arg1
+and
+.Fa opt_arg2
+arguments will be passed unmodified to
+.Fa free .
+The
+.Fa flags
+argument specifies additional
+.Vt mbuf
+flags; it is not necessary to specify
+.Dv M_EXT .
+Finally, the
+.Fa type
+argument specifies the type of external data, which controls how it
+will be disposed of when the
+.Vt mbuf
+is freed.
+In most cases, the correct value is
+.Dv EXT_EXTREF .
 .It Fn MCLGET mbuf how
 Allocate and attach an
 .Vt mbuf cluster

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 13:34:52 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ABFA9106566C;
	Sat,  7 Aug 2010 13:34:52 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9A4448FC14;
	Sat,  7 Aug 2010 13:34:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77DYqFU054298;
	Sat, 7 Aug 2010 13:34:52 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77DYqjL054294;
	Sat, 7 Aug 2010 13:34:52 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071334.o77DYqjL054294@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 13:34: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: r211017 - stable/8/lib/libc/net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 13:34:52 -0000

Author: brucec
Date: Sat Aug  7 13:34:52 2010
New Revision: 211017
URL: http://svn.freebsd.org/changeset/base/211017

Log:
  MFC r209684:
  
  Use ISO C99 integer types instead of the BSD-specific u_int*_t.
  
  Approved by: rrs (mentor)

Modified:
  stable/8/lib/libc/net/sctp_recvmsg.3
  stable/8/lib/libc/net/sctp_send.3
  stable/8/lib/libc/net/sctp_sys_calls.c
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/locale/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/lib/libc/sys/   (props changed)

Modified: stable/8/lib/libc/net/sctp_recvmsg.3
==============================================================================
--- stable/8/lib/libc/net/sctp_recvmsg.3	Sat Aug  7 13:26:08 2010	(r211016)
+++ stable/8/lib/libc/net/sctp_recvmsg.3	Sat Aug  7 13:34:52 2010	(r211017)
@@ -146,14 +146,14 @@ The 
 argument is defined as follows.
 .Bd -literal
 struct sctp_sndrcvinfo {
-	u_int16_t sinfo_stream;  /* Stream arriving on */
-	u_int16_t sinfo_ssn;     /* Stream Sequence Number */
-	u_int16_t sinfo_flags;   /* Flags on the incoming message */
-	u_int32_t sinfo_ppid;    /* The ppid field */
-	u_int32_t sinfo_context; /* context field */
-	u_int32_t sinfo_timetolive; /* not used by sctp_recvmsg */
-	u_int32_t sinfo_tsn;        /* The transport sequence number */
-	u_int32_t sinfo_cumtsn;     /* The cumulative acknowledgment point  */
+	uint16_t sinfo_stream;  /* Stream arriving on */
+	uint16_t sinfo_ssn;     /* Stream Sequence Number */
+	uint16_t sinfo_flags;   /* Flags on the incoming message */
+	uint32_t sinfo_ppid;    /* The ppid field */
+	uint32_t sinfo_context; /* context field */
+	uint32_t sinfo_timetolive; /* not used by sctp_recvmsg */
+	uint32_t sinfo_tsn;        /* The transport sequence number */
+	uint32_t sinfo_cumtsn;     /* The cumulative acknowledgment point  */
 	sctp_assoc_t sinfo_assoc_id; /* The association id of the peer */
 };
 .Ed

Modified: stable/8/lib/libc/net/sctp_send.3
==============================================================================
--- stable/8/lib/libc/net/sctp_send.3	Sat Aug  7 13:26:08 2010	(r211016)
+++ stable/8/lib/libc/net/sctp_send.3	Sat Aug  7 13:34:52 2010	(r211017)
@@ -94,14 +94,14 @@ structure is used to control various SCT
 and has the following format:
 .Bd -literal
 struct sctp_sndrcvinfo {
-	u_int16_t sinfo_stream;  /* Stream sending to */
-	u_int16_t sinfo_ssn;     /* valid for recv only */
-	u_int16_t sinfo_flags;   /* flags to control sending */
-	u_int32_t sinfo_ppid;    /* ppid field */
-	u_int32_t sinfo_context; /* context field */
-	u_int32_t sinfo_timetolive; /* timetolive for PR-SCTP */
-	u_int32_t sinfo_tsn;        /* valid for recv only */
-	u_int32_t sinfo_cumtsn;     /* valid for recv only */
+	uint16_t sinfo_stream;  /* Stream sending to */
+	uint16_t sinfo_ssn;     /* valid for recv only */
+	uint16_t sinfo_flags;   /* flags to control sending */
+	uint32_t sinfo_ppid;    /* ppid field */
+	uint32_t sinfo_context; /* context field */
+	uint32_t sinfo_timetolive; /* timetolive for PR-SCTP */
+	uint32_t sinfo_tsn;        /* valid for recv only */
+	uint32_t sinfo_cumtsn;     /* valid for recv only */
 	sctp_assoc_t sinfo_assoc_id; /* The association id */
 };
 .Ed

Modified: stable/8/lib/libc/net/sctp_sys_calls.c
==============================================================================
--- stable/8/lib/libc/net/sctp_sys_calls.c	Sat Aug  7 13:26:08 2010	(r211016)
+++ stable/8/lib/libc/net/sctp_sys_calls.c	Sat Aug  7 13:34:52 2010	(r211017)
@@ -49,9 +49,9 @@ __FBSDID("$FreeBSD$");
 
 #ifndef IN6_IS_ADDR_V4MAPPED
 #define IN6_IS_ADDR_V4MAPPED(a)		      \
-	((*(const u_int32_t *)(const void *)(&(a)->s6_addr[0]) == 0) &&	\
-	 (*(const u_int32_t *)(const void *)(&(a)->s6_addr[4]) == 0) &&	\
-	 (*(const u_int32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
+	((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) &&	\
+	 (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) &&	\
+	 (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
 #endif
 
 
@@ -533,11 +533,11 @@ sctp_sendmsg(int s,
     size_t len,
     const struct sockaddr *to,
     socklen_t tolen,
-    u_int32_t ppid,
-    u_int32_t flags,
-    u_int16_t stream_no,
-    u_int32_t timetolive,
-    u_int32_t context)
+    uint32_t ppid,
+    uint32_t flags,
+    uint16_t stream_no,
+    uint32_t timetolive,
+    uint32_t context)
 {
 #ifdef SYS_sctp_generic_sendmsg
 	struct sctp_sndrcvinfo sinfo;
@@ -814,11 +814,11 @@ sctp_sendmsgx(int sd,
     size_t len,
     struct sockaddr *addrs,
     int addrcnt,
-    u_int32_t ppid,
-    u_int32_t flags,
-    u_int16_t stream_no,
-    u_int32_t timetolive,
-    u_int32_t context)
+    uint32_t ppid,
+    uint32_t flags,
+    uint16_t stream_no,
+    uint32_t timetolive,
+    uint32_t context)
 {
 	struct sctp_sndrcvinfo sinfo;
 

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 13:36:34 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 89CDD1065672;
	Sat,  7 Aug 2010 13:36:34 +0000 (UTC)
	(envelope-from gavin@ury.york.ac.uk)
Received: from ixe-mta-27.emailfiltering.com (ixe-mta-27-tx.emailfiltering.com
	[194.116.199.158])
	by mx1.freebsd.org (Postfix) with ESMTP id A09998FC14;
	Sat,  7 Aug 2010 13:36:33 +0000 (UTC)
Received: from mail-gw12.york.ac.uk ([144.32.129.162])
	by ixe-mta-27.emailfiltering.com with emfmta (version 4.5.0.261) by TLS
	id 705539010 for kostikbel@gmail.com; 7de639d96941fa8a;
	Sat, 07 Aug 2010 14:18:33 +0100
Received: from ury.york.ac.uk ([144.32.108.81]:57362)
	by mail-gw12.york.ac.uk with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from )
	id 1OhjIH-0004DR-D7; Sat, 07 Aug 2010 14:18:33 +0100
Received: from gavin (helo=localhost)
	by ury.york.ac.uk with local-esmtp (Exim 4.72)
	(envelope-from )
	id 1OhjIH-0005lM-6M; Sat, 07 Aug 2010 14:18:33 +0100
Date: Sat, 7 Aug 2010 14:18:33 +0100 (BST)
From: Gavin Atkinson 
X-X-Sender: gavin@ury.york.ac.uk
To: Kostik Belousov 
In-Reply-To: <20100806184950.GR22295@deviant.kiev.zoral.com.ua>
Message-ID: 
References: <201008060942.o769gFm2075268@svn.freebsd.org>
	<1281109176.68747.2.camel@buffy.york.ac.uk>
	<20100806184950.GR22295@deviant.kiev.zoral.com.ua>
User-Agent: Alpine 2.00 (LNX 1167 2008-08-23)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: 
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r210923 - in head/sys: fs/devfs kern sys vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 13:36:34 -0000

On Fri, 6 Aug 2010, Kostik Belousov wrote:
> On Fri, Aug 06, 2010 at 04:39:36PM +0100, Gavin Atkinson wrote:
> > On Fri, 2010-08-06 at 09:42 +0000, Konstantin Belousov wrote:
> > > Author: kib
> > > Date: Fri Aug  6 09:42:15 2010
> > > New Revision: 210923
> > > URL: http://svn.freebsd.org/changeset/base/210923
> > > 
> > > Log:
> > >   Add new make_dev_p(9) flag MAKEDEV_ETERNAL to inform devfs that created
> > >   cdev will never be destroyed. Propagate the flag to devfs vnodes as
> > >   VV_ETERNVALDEV. Use the flags to avoid acquiring devmtx and taking a
> > >   thread reference on such nodes.
> > 
> > Does this flag have any effect on unmounting a devfs mount?
> 
> It should not. The flag turns off some safety measures that are used
> to make sure that cdev is not destroyed while cdevsw method is active.

OK, thanks.

> Do you experience some trouble after the change ?

I've not seen any problems, I was just wanting to check that I understood 
the exact meaning of this flag.

Thanks,

Gavin

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 13:36:55 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E54531065670;
	Sat,  7 Aug 2010 13:36:55 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D3E728FC17;
	Sat,  7 Aug 2010 13:36:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77DatoX054787;
	Sat, 7 Aug 2010 13:36:55 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77DatHk054785;
	Sat, 7 Aug 2010 13:36:55 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071336.o77DatHk054785@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 13:36: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: r211018 - stable/8/lib/libc/net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 13:36:56 -0000

Author: brucec
Date: Sat Aug  7 13:36:55 2010
New Revision: 211018
URL: http://svn.freebsd.org/changeset/base/211018

Log:
  MFC r209709:
  
  Increment 'sa' at the end of the loop; otherwise, only the first
  address ever gets checked.
  
  Approved by: rrs (mentor)

Modified:
  stable/8/lib/libc/net/sctp_sys_calls.c
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/locale/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/lib/libc/sys/   (props changed)

Modified: stable/8/lib/libc/net/sctp_sys_calls.c
==============================================================================
--- stable/8/lib/libc/net/sctp_sys_calls.c	Sat Aug  7 13:34:52 2010	(r211017)
+++ stable/8/lib/libc/net/sctp_sys_calls.c	Sat Aug  7 13:36:55 2010	(r211018)
@@ -304,7 +304,7 @@ sctp_bindx(int sd, struct sockaddr *addr
 			goto out_error;
 		}
 
-
+		sa = (struct sockaddr *)((caddr_t)sa + sz);
 	}
 	sa = addrs;
 	/*

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 13:40:00 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3FA31106564A;
	Sat,  7 Aug 2010 13:40:00 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 13CA98FC1C;
	Sat,  7 Aug 2010 13:40:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77DdxQS055550;
	Sat, 7 Aug 2010 13:39:59 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77DdxhP055548;
	Sat, 7 Aug 2010 13:39:59 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071339.o77DdxhP055548@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 13:39:59 +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: r211019 - stable/8/usr.sbin/sysinstall
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 13:40:00 -0000

Author: brucec
Date: Sat Aug  7 13:39:59 2010
New Revision: 211019
URL: http://svn.freebsd.org/changeset/base/211019

Log:
  MFC r209748:
  
  Simplify the wording of the console configuration dialogs since we now
  only have a single video console driver.
  
  Approved by: rrs (mentor)

Modified:
  stable/8/usr.sbin/sysinstall/menus.c
Directory Properties:
  stable/8/usr.sbin/sysinstall/   (props changed)

Modified: stable/8/usr.sbin/sysinstall/menus.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/menus.c	Sat Aug  7 13:36:55 2010	(r211018)
+++ stable/8/usr.sbin/sysinstall/menus.c	Sat Aug  7 13:39:59 2010	(r211019)
@@ -1840,9 +1840,8 @@ DMenu MenuNTP = {
 DMenu MenuSyscons = {
     DMENU_NORMAL_TYPE,
     "System Console Configuration",
-    "The default system console driver for FreeBSD (syscons) has a\n"
-    "number of configuration options which may be set according to\n"
-    "your preference.\n\n"
+    "The system console driver for FreeBSD has a number of configuration\n"
+    "options which may be set according to your preference.\n\n"
     "When you are done setting configuration options, select Cancel.",
     "Configure your system console settings",
     NULL,
@@ -1866,9 +1865,9 @@ DMenu MenuSyscons = {
 DMenu MenuSysconsKeymap = {
     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
     "System Console Keymap",
-    "The default system console driver for FreeBSD (syscons) defaults\n"
-    "to a standard \"PC-98x1\" keyboard map.  Users may wish to choose\n"
-    "one of the other keymaps below.\n"
+    "The system console driver for FreeBSD defaults to a standard\n"
+    "\"PC-98x1\" keyboard map.  Users may wish to choose one of the\n"
+    "other keymaps below.\n"
     "Note that sysinstall itself only uses the part of the keyboard map\n"
     "which is required to generate the ANSI character subset, but your\n"
     "choice of keymap will also be saved for later (fuller) use.",
@@ -1882,10 +1881,10 @@ DMenu MenuSysconsKeymap = {
 DMenu MenuSysconsKeymap = {
     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
     "System Console Keymap",
-    "The default system console driver for FreeBSD (syscons) defaults\n"
-    "to a standard \"American\" keyboard map.  Users in other countries\n"
-    "(or with different keyboard preferences) may wish to choose one of\n"
-    "the other keymaps below.\n"
+    "The system console driver for FreeBSD defaults to a standard\n"
+    "\"American\" keyboard map.  Users in other countries (or with\n"
+    "different keyboard preferences) may wish to choose one of the\n"
+    "other keymaps below.\n"
     "Note that sysinstall itself only uses the part of the keyboard map\n"
     "which is required to generate the ANSI character subset, but your\n"
     "choice of keymap will also be saved for later (fuller) use.",

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 13:42:55 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1E219106564A;
	Sat,  7 Aug 2010 13:42:55 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0B1CD8FC13;
	Sat,  7 Aug 2010 13:42:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77DgspG056254;
	Sat, 7 Aug 2010 13:42:54 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77DgsVx056249;
	Sat, 7 Aug 2010 13:42:54 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071342.o77DgsVx056249@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 13:42:54 +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: r211020 - stable/8/usr.sbin/sysinstall
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 13:42:55 -0000

Author: brucec
Date: Sat Aug  7 13:42:54 2010
New Revision: 211020
URL: http://svn.freebsd.org/changeset/base/211020

Log:
  MFC r210175:
  
  FreeBSD 8 doesn't support kernel PPP or SLIP; remove code for configuring
  and installing via such devices from sysinstall.
  
  Approved by: rrs (mentor)

Modified:
  stable/8/usr.sbin/sysinstall/devices.c
  stable/8/usr.sbin/sysinstall/install.c
  stable/8/usr.sbin/sysinstall/menus.c
  stable/8/usr.sbin/sysinstall/network.c
Directory Properties:
  stable/8/usr.sbin/sysinstall/   (props changed)

Modified: stable/8/usr.sbin/sysinstall/devices.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/devices.c	Sat Aug  7 13:39:59 2010	(r211019)
+++ stable/8/usr.sbin/sysinstall/devices.c	Sat Aug  7 13:42:54 2010	(r211020)
@@ -321,14 +321,6 @@ deviceGetAll(void)
 	if (!strncmp(ifptr->ifr_name, "lo", 2))
 	    goto loopend;
 
-	/* If we have a slip device, don't register it */
-	if (!strncmp(ifptr->ifr_name, "sl", 2)) {
-	    goto loopend;
-	}
-	/* And the same for ppp */
-	if (!strncmp(ifptr->ifr_name, "tun", 3) || !strncmp(ifptr->ifr_name, "ppp", 3)) {
-	    goto loopend;
-	}
 	/* Try and find its description */
 	for (i = 0, descr = NULL; device_names[i].name; i++) {
 	    int len = strlen(device_names[i].name);
@@ -416,29 +408,6 @@ skipif:
 		}
 		break;
 
-	    case DEVICE_TYPE_NETWORK:
-		fd = deviceTry(device_names[i], try, j);
-		/* The only network devices that you can open this way are serial ones */
-		if (fd >= 0) {
-		    char *newdesc, *cp;
-
-		    close(fd);
-		    cp = device_names[i].description;
-		    /* Serial devices get a slip and ppp device each, if supported */
-		    newdesc = safe_malloc(strlen(cp) + 40);
-		    sprintf(newdesc, cp, "SLIP interface", try, j + 1);
-		    deviceRegister("sl0", newdesc, strdup(try), DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork,
-				   NULL, mediaShutdownNetwork, NULL);
-		    msgDebug("Add mapping for %s to sl0\n", try);
-		    newdesc = safe_malloc(strlen(cp) + 50);
-		    sprintf(newdesc, cp, "PPP interface", try, j + 1);
-		    deviceRegister("ppp0", newdesc, strdup(try), DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork,
-				   NULL, mediaShutdownNetwork, NULL);
-		    if (isDebug())
-			msgDebug("Add mapping for %s to ppp0\n", try);
-		}
-		break;
-
 	    default:
 		break;
 	    }

Modified: stable/8/usr.sbin/sysinstall/install.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/install.c	Sat Aug  7 13:39:59 2010	(r211019)
+++ stable/8/usr.sbin/sysinstall/install.c	Sat Aug  7 13:42:54 2010	(r211020)
@@ -690,7 +690,7 @@ nodisks:
 		   "may do so by typing: /usr/sbin/sysinstall.");
     }
     if (mediaDevice->type != DEVICE_TYPE_FTP && mediaDevice->type != DEVICE_TYPE_NFS) {
-	if (!msgYesNo("Would you like to configure any Ethernet or SLIP/PPP network devices?")) {
+	if (!msgYesNo("Would you like to configure any Ethernet network devices?")) {
 	    Device *tmp = tcpDeviceSelect();
 
 	    if (tmp && !((DevInfo *)tmp->private)->use_dhcp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))

Modified: stable/8/usr.sbin/sysinstall/menus.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/menus.c	Sat Aug  7 13:39:59 2010	(r211019)
+++ stable/8/usr.sbin/sysinstall/menus.c	Sat Aug  7 13:42:54 2010	(r211020)
@@ -882,13 +882,8 @@ DMenu MenuMediaFTP = {
 DMenu MenuNetworkDevice = {
     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
     "Network interface information required",
-    "If you are using PPP over a serial device, as opposed to a direct\n"
-    "ethernet connection, then you may first need to dial your Internet\n"
-    "Service Provider using the ppp utility we provide for that purpose.\n"
-    "If you're using SLIP over a serial device then the expectation is\n"
-    "that you have a HARDWIRED connection.\n\n"
-    "You can also install over a parallel port using a special \"laplink\"\n"
-    "cable to another machine running FreeBSD.",
+    "Please select the ethernet device to configure.\n\n"
+    "",
     "Press F1 to read network configuration manual",
     "network_device",
     { { NULL } },

Modified: stable/8/usr.sbin/sysinstall/network.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/network.c	Sat Aug  7 13:39:59 2010	(r211019)
+++ stable/8/usr.sbin/sysinstall/network.c	Sat Aug  7 13:42:54 2010	(r211020)
@@ -45,9 +45,6 @@
 #include 
 
 static Boolean	networkInitialized;
-static pid_t	startPPP(Device *devp);
-
-static pid_t	pppPID;
 
 Boolean
 mediaInitNetwork(Device *dev)
@@ -73,56 +70,6 @@ mediaInitNetwork(Device *dev)
     w = savescr();
     dialog_clear_norefresh();
 
-    /* Old PPP process lying around? */
-    if (pppPID) {
-	msgConfirm("Killing previous PPP process %d.", pppPID);
-	kill(pppPID, SIGTERM);
-	pppPID = 0;
-    }
-    if (!strncmp("ppp", dev->name, 3)) {	/* PPP? */
-	if (!(pppPID = startPPP(dev))) {
-	    msgConfirm("Unable to start PPP!  This installation method cannot be used.");
-	    return FALSE;
-	}
-	networkInitialized = TRUE;
-	return TRUE;
-    }
-    else if (!strncmp("sl", dev->name, 2)) {	/* SLIP? */
-	char *val;
-	char attach[256];
-
-	/* Cheesy slip attach */
-	snprintf(attach, 256, "slattach -a -h -l -s 9600 %s", dev->devname);
-	val = msgGetInput(attach,
-			  "Warning:  SLIP is rather poorly supported in this revision\n"
-			  "of the installation due to the lack of a dialing utility.\n"
-			  "If you can use PPP for this instead then you're much better\n"
-			  "off doing so, otherwise SLIP works fairly well for *hardwired*\n"
-			  "links.  Please edit the following slattach command for\n"
-			  "correctness (default here is: VJ compression, Hardware flow-\n"
-			  "control, ignore carrier and 9600 baud data rate).  When you're\n"
-			  "ready, press [ENTER] to execute it.");
-	if (!val) {
-	    msgConfirm("slattach command was empty.  Try again!");
-	    restorescr(w);
-	    return FALSE;
-	}
-	else
-	    SAFE_STRCPY(attach, val);
-	/*
-	 * Doing this with vsystem() is actually bogus since we should be storing the pid of slattach
-	 * for later killing.  It's just too convenient to call vsystem(), however, rather than
-	 * constructing a proper argument for exec() so we punt on doing slip right for now.
-	 */
-	if (vsystem("%s", attach)) {
-	    msgConfirm("slattach returned a bad status!  Please verify that\n"
-		       "the command is correct and try this operation again.");
-	    restorescr(w);
-	    return FALSE;
-	}
-	restorescr(w);
-    }
-
     snprintf(ifconfig, 255, "%s%s", VAR_IFCONFIG, dev->name);
     cp = variable_get(ifconfig);
     if (cp) {
@@ -181,9 +128,7 @@ mediaShutdownNetwork(Device *dev)
     if (!RunningAsInit || !networkInitialized)
 	return;
 
-    msgDebug("Shutdown called for network device %s\n", dev->name);
-    /* Not a serial device? */
-    if (strncmp("sl", dev->name, 2) && strncmp("ppp", dev->name, 3)) {
+	msgDebug("Shutdown called for network device %s\n", dev->name);
 	int i;
 	char ifconfig[255];
 
@@ -200,172 +145,5 @@ mediaShutdownNetwork(Device *dev)
 	    msgDebug("Deleting default route.\n");
 	    vsystem("route -n delete default");
 	}
-    }
-    else if (pppPID) {
-	msgConfirm("Killing previous PPP process %d.", pppPID);
-	kill(pppPID, SIGTERM);
-	pppPID = 0;
-    }
-    networkInitialized = FALSE;
 }
 
-/* Start PPP on the 3rd screen */
-static pid_t
-startPPP(Device *devp)
-{
-    int fd2, pulse;
-    FILE *fp;
-    char *val;
-    pid_t pid = 0;
-    char myaddr[16], provider[16], speed[16], authname[32], authkey[16];
-    char phone[16];
-    WINDOW *w = savescr();
-    
-    /* These are needed to make ppp work */
-    Mkdir("/var/log");
-    Mkdir("/var/run");
-    Mkdir("/var/spool/lock");
-    Mkdir("/etc/ppp");
-
-    dialog_clear_norefresh();
-    if (!variable_get(VAR_SERIAL_SPEED))
-	variable_set2(VAR_SERIAL_SPEED, "115200", 0);
-    /* Get any important user values */
-    val = variable_get_value(VAR_SERIAL_SPEED,
-		      "Enter the baud rate for your modem - this can be higher than the actual\n"
-		      "maximum data rate since most modems can talk at one speed to the\n"
-		      "computer and at another speed to the remote end.\n\n"
-		      "If you're not sure what to put here, just select the default.", 0);
-    SAFE_STRCPY(speed, (val && *val) ? val : "115200");
-
-    val = variable_get(VAR_GATEWAY);
-    SAFE_STRCPY(provider, (val && *val) ? val : "0");
-
-    dialog_clear_norefresh();
-    val = msgGetInput(provider, "Enter the IP address of your service provider or 0 if you\n"
-		      "don't know it and would prefer to negotiate it dynamically.");
-    SAFE_STRCPY(provider, (val && *val) ? val : "0");
-
-    if (devp->private && ((DevInfo *)devp->private)->ipaddr[0])
-	SAFE_STRCPY(myaddr, ((DevInfo *)devp->private)->ipaddr);
-    else
-	strcpy(myaddr, "0");
-
-    if (!Fake)
-	fp = fopen("/etc/ppp/ppp.linkup", "w");
-    else
-	fp = fopen("/dev/stderr", "w");
-    if (fp != NULL) {
-	fprintf(fp, "MYADDR:\n");
-	fprintf(fp, " delete ALL\n");
-        fprintf(fp, " add 0 0 HISADDR\n");
-	fchmod(fileno(fp), 0755);
-	fclose(fp);
-    }
-    if (!Fake)
-	fd2 = open("/etc/ppp/ppp.secret", O_CREAT);
-    else
-	fd2 = -1;
-    if (fd2 != -1) {
-	fchmod(fd2, 0700);
-	close(fd2);
-    }
-    if (!Fake)
-	fp = fopen("/etc/ppp/ppp.conf", "a");
-    else
-	fp = fopen("/dev/stderr", "w");
-    if (!fp) {
-	msgConfirm("Couldn't open /etc/ppp/ppp.conf file!  This isn't going to work");
-	restorescr(w);
-	return 0;
-    }
-    authname[0] = '\0';
-    pulse = 0;
-    dialog_clear_norefresh();
-    if (!dialog_yesno("", "Does your ISP support PAP or CHAP ppp logins?", -1, -1)) {
-	val = msgGetInput(NULL, "Enter the name you use to login to your provider.");
-	SAFE_STRCPY(authname, val);
-	dialog_clear_norefresh();
-	val = msgGetInput(NULL, "Enter the password you use to login to your provider.");
-	SAFE_STRCPY(authkey, val);
-	dialog_clear_norefresh();
-	val = msgGetInput(NULL, "Enter the your provider's login phone number.");
-	SAFE_STRCPY(phone, val);
-	dialog_clear_norefresh();
-	pulse = dialog_yesno("", "Does your telephone line support tone dialing?", -1, -1);
-    }
-    fprintf(fp, "\ninstall:\n");
-    fprintf(fp, " set speed %s\n", speed);
-    fprintf(fp, " set device %s\n", devp->devname);
-    fprintf(fp, " set ifaddr %s %s 255.255.255.0 0.0.0.0\n", myaddr, provider);
-    fprintf(fp, " add! default HISADDR\n");
-    fprintf(fp, " set timeout 0\n");
-    fprintf(fp, " enable dns\n");
-    fprintf(fp, " set log local phase\n");
-    if(authname[0] != '\0'){
-	fprintf(fp, " set dial \"ABORT BUSY ABORT NO\\\\sCARRIER TIMEOUT 5 \\\"\\\" AT OK-AT-OK ATE1Q0 OK \\\\dATD%c\\\\T TIMEOUT 40 CONNECT\"\n", pulse ? 'P' : 'T');
-	fprintf(fp, " set login\n");
-	fprintf(fp, " set authname %s\n", authname);
-	fprintf(fp, " set authkey %s\n", authkey);
-	fprintf(fp, " set phone %s\n", phone);
-    }
-    if (fchmod(fileno(fp), 0600) != 0)
-	msgConfirm("Warning: Failed to fix permissions on /etc/ppp/ppp.conf !");
-    fclose(fp);
-
-    /* Make the ppp config persistent */
-    variable_set2(VAR_PPP_ENABLE, "YES", 0);
-    variable_set2(VAR_PPP_PROFILE, "install", 0);
-
-    if (!Fake && !file_readable("/dev/tun0")) {
-	msgConfirm("Warning:  No /dev/tun0 device.  PPP will not work!");
-	restorescr(w);
-	return 0;
-    }
-
-    if (isDebug())
-	msgDebug("About to start PPP on device %s @ %s baud.  Provider = %s\n", devp->devname, speed, provider);
-
-    if (!Fake && !(pid = fork())) {
-	int i, fd;
-	struct termios foo;
-	extern int login_tty(int);
-
-	for (i = getdtablesize(); i >= 0; i--)
-	    close(i);
-
-	/* We're going over to VTY2 */
-	fd = open("/dev/ttyv2", O_RDWR);
-	ioctl(0, TIOCSCTTY, &fd);
-	dup2(0, 1);
-	dup2(0, 2);
-	DebugFD = 2;
-	if (login_tty(fd) == -1)
-	    msgDebug("ppp: Can't set the controlling terminal.\n");
-	signal(SIGTTOU, SIG_IGN);
-	if (tcgetattr(fd, &foo) != -1) {
-	    foo.c_cc[VERASE] = '\010';
-	    if (tcsetattr(fd, TCSANOW, &foo) == -1)
-		msgDebug("ppp: Unable to set the erase character.\n");
-	}
-	else
-	    msgDebug("ppp: Unable to get the terminal attributes!\n");
-	execlp("ppp", "ppp", "install", (char *)NULL);
-	msgDebug("PPP process failed to exec!\n");
-	exit(1);
-    }
-    else {
-	dialog_clear_norefresh();
-	msgConfirm("NOTICE: The PPP command is now started on VTY3 (type ALT-F3 to\n"
-           "interact with it, ALT-F1 to switch back here). If you are using\n"
-           "a PAP or CHAP login simply enter \"dial\", otherwise you'll need\n"
-           "to use the \"term\" command which starts a terminal emulator\n"
-           "which you can use to talk to your modem and dial the service\n"
-           "provider.  Once you're connected, come back to this screen and\n"
-           "press return.\n\n"
-           "DO NOT PRESS [ENTER] HERE UNTIL THE CONNECTION IS FULLY\n"
-           "ESTABLISHED!");
-    }
-    restorescr(w);
-    return pid;
-}

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 16:08:38 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 16A721065670;
	Sat,  7 Aug 2010 16:08:38 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 05A598FC12;
	Sat,  7 Aug 2010 16:08:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77G8b8A088676;
	Sat, 7 Aug 2010 16:08:37 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77G8bNN088653;
	Sat, 7 Aug 2010 16:08:37 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201008071608.o77G8bNN088653@svn.freebsd.org>
From: Gavin Atkinson 
Date: Sat, 7 Aug 2010 16:08:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211021 - head/sys/dev/usb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 16:08:38 -0000

Author: gavin
Date: Sat Aug  7 16:08:37 2010
New Revision: 211021
URL: http://svn.freebsd.org/changeset/base/211021

Log:
  Sort this file a little better: the vendors are supposed to be sorted by
  vendor ID in the vendor section, and by symbolic name in the product
  section.  Products are sorted by product ID.  While here, get rid of a
  duplicate Microsoft Mouse entry, revealed by sorting.
  
  MFC after:	1 week

Modified:
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/usbdevs
==============================================================================
--- head/sys/dev/usb/usbdevs	Sat Aug  7 13:42:54 2010	(r211020)
+++ head/sys/dev/usb/usbdevs	Sat Aug  7 16:08:37 2010	(r211021)
@@ -548,6 +548,7 @@ vendor DYNASTREAM	0x0fcf	Dynastream Inno
 vendor QUALCOMM		0x1004	Qualcomm
 vendor APACER		0x1005	Apacer
 vendor MOTOROLA4	0x100d	Motorola
+vendor AIRPLUS		0x1011  Airplus
 vendor DESKNOTE		0x1019	Desknote
 vendor GIGABYTE		0x1044	GIGABYTE
 vendor WESTERN		0x1058	Western Digital
@@ -561,7 +562,6 @@ vendor ASANTE		0x10bd	Asante
 vendor SILABS		0x10c4	Silicon Labs
 vendor SILABS3		0x10c5	Silicon Labs
 vendor ACTIONS		0x10d6  Actions
-vendor AIRPLUS		0x1011  Airplus
 vendor ANALOG		0x1110	Analog Devices
 vendor TENX		0x1130	Ten X Technology, Inc.
 vendor ISSC		0x1131	Integrated System Solution Corp.
@@ -2102,11 +2102,10 @@ product MICROSOFT MN110		0x007a	10/100 U
 product MICROSOFT WLINTELLIMOUSE 0x008c	Wireless Optical IntelliMouse
 product MICROSOFT WLNOTEBOOK	0x00b9	Wireless Optical Mouse (Model 1023)
 product MICROSOFT COMFORT3000	0x00d1	Comfort Optical Mouse 3000 (Model 1043)
-product MICROSOFT WLNOTEBOOK2	0x00e1	Wireless Optical Mouse 3000 (Model 1056)
 product MICROSOFT WLNOTEBOOK3	0x00d2	Wireless Optical Mouse 3000 (Model 1049)
-product MICROSOFT WLUSBMOUSE	0x00b9	Wireless USB Mouse
-product MICROSOFT XBOX360	0x0292	XBOX 360 WLAN
 product MICROSOFT NATURAL4000	0x00db	Natural Ergonomic Keyboard 4000
+product MICROSOFT WLNOTEBOOK2	0x00e1	Wireless Optical Mouse 3000 (Model 1056)
+product MICROSOFT XBOX360	0x0292	XBOX 360 WLAN
 
 /* Microtech products */
 product MICROTECH SCSIDB25	0x0004	USB-SCSI-DB25
@@ -3103,6 +3102,9 @@ product UNKNOWN4 USBMEMSTICK	0x6025	Flas
 /* Unknown vendors */
 product UNKNOWN5 USB2IDEBRIDGE	0x00ff	USB 2.0 ATA/SATA Bridge
 
+/* USI products */
+product USI MC60		0x10c5	MC60 Serial
+
 /* U.S. Robotics products */
 product USR USR5422		0x0118	USR5422 WLAN
 product USR USR5423		0x0121	USR5423 WLAN
@@ -3110,9 +3112,6 @@ product USR USR5423		0x0121	USR5423 WLAN
 /* VIA Technologies products */
 product VIA USB2IDEBRIDGE	0x6204	USB 2.0 IDE Bridge
 
-/* USI products */
-product USI MC60		0x10c5	MC60 Serial
-
 /* VidzMedia products */
 product VIDZMEDIA MONSTERTV	0x4fb1	MonsterTV P2H
 
@@ -3177,9 +3176,6 @@ product XIRLINK PCCAM		0x8080	IBM PC Cam
 product XYRATEX PRISM_GT_1	0x2000	PrismGT USB 2.0 WLAN
 product XYRATEX PRISM_GT_2	0x2002	PrismGT USB 2.0 WLAN
 
-/* Y-E Data products */
-product YEDATA FLASHBUSTERU	0x0000	Flashbuster-U
-
 /* Yamaha products */
 product YAMAHA UX256		0x1000	UX256 MIDI I/F
 product YAMAHA UX96		0x1008	UX96 MIDI I/F
@@ -3192,6 +3188,9 @@ product YAMAHA RTW65I		0x4002	NetVolante
 product YANO U640MO		0x0101	U640MO-03
 product YANO FW800HD		0x05fc	METALWEAR-HDD
 
+/* Y-E Data products */
+product YEDATA FLASHBUSTERU	0x0000	Flashbuster-U
+
 /* Yiso Wireless Co. products */
 product	YISO C893		0xc893	CDMA 2000 1xEVDO PC Card
 

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 16:14:40 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ED0111065678;
	Sat,  7 Aug 2010 16:14:40 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B287D8FC20;
	Sat,  7 Aug 2010 16:14:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77GEedo090069;
	Sat, 7 Aug 2010 16:14:40 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77GEeVM090066;
	Sat, 7 Aug 2010 16:14:40 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201008071614.o77GEeVM090066@svn.freebsd.org>
From: Gavin Atkinson 
Date: Sat, 7 Aug 2010 16:14:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211022 - in head/sys/dev/usb: . serial
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 16:14:41 -0000

Author: gavin
Date: Sat Aug  7 16:14:40 2010
New Revision: 211022
URL: http://svn.freebsd.org/changeset/base/211022

Log:
  Sync the list of devices supported by uslcom(4) with NetBSD, Linux, OpenBSD
  and BeOS.  The devices supported by uslcom(4) are now in sync with:
  
  NetBSD  src/sys/dev/usb/uslsa.c 1.11
  OpenBSD src/sys/dev/usb/uslcom.c 1.20
  Linux   source/drivers/usb/serial/cp210x.c from kernel 2.6.35
  BeOS    usb_serial/driver.c 1.32
  
  Two vendor/product IDs from Linux have not been added to uslcom(4):
    SILABS SAEL - This device has special code in u3g to support it
    SILABS GSM2228 - I suspect this should also be covered by u3g(4).
  
  MFC after:	1 week

Modified:
  head/sys/dev/usb/serial/uslcom.c
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/serial/uslcom.c
==============================================================================
--- head/sys/dev/usb/serial/uslcom.c	Sat Aug  7 16:08:37 2010	(r211021)
+++ head/sys/dev/usb/serial/uslcom.c	Sat Aug  7 16:14:40 2010	(r211022)
@@ -178,35 +178,77 @@ static const struct usb_device_id uslcom
 #define	USLCOM_DEV(v,p)  { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) }
     USLCOM_DEV(BALTECH, CARDREADER),
     USLCOM_DEV(CLIPSAL, 5500PCU),
+    USLCOM_DEV(DATAAPEX, MULTICOM),
+    USLCOM_DEV(DELL, DW700),
+    USLCOM_DEV(DIGIANSWER, ZIGBEE802154),
     USLCOM_DEV(DYNASTREAM, ANTDEVBOARD),
+    USLCOM_DEV(DYNASTREAM, ANTDEVBOARD2),
     USLCOM_DEV(DYNASTREAM, ANT2USB),
+    USLCOM_DEV(ELV, USBI2C),
+    USLCOM_DEV(FOXCONN, PIRELLI_DP_L10),
     USLCOM_DEV(GEMALTO, PROXPU),
     USLCOM_DEV(JABLOTRON, PC60B),
+    USLCOM_DEV(MEI, CASHFLOW_SC),
+    USLCOM_DEV(MEI, S2000),
+    USLCOM_DEV(JABLOTRON, PC60B),
+    USLCOM_DEV(OWEN, AC4),
+    USLCOM_DEV(PHILIPS, ACE1001),
+    USLCOM_DEV(PLX, CA42),
     USLCOM_DEV(SILABS, AEROCOMM),
+    USLCOM_DEV(SILABS, AMBER_AMB2560),
     USLCOM_DEV(SILABS, ARGUSISP),
+    USLCOM_DEV(SILABS, ARKHAM_DS101_A),
+    USLCOM_DEV(SILABS, ARKHAM_DS101_M),
+    USLCOM_DEV(SILABS, ARYGON_MIFARE),
+    USLCOM_DEV(SILABS, AVIT_USB_TTL),
+    USLCOM_DEV(SILABS, BEI_VCP),
     USLCOM_DEV(SILABS, BSM7DUSB),
     USLCOM_DEV(SILABS, BURNSIDE),
+    USLCOM_DEV(SILABS, C2_EDGE_MODEM),
     USLCOM_DEV(SILABS, CP2102),
     USLCOM_DEV(SILABS, CP210X_2),
     USLCOM_DEV(SILABS, CRUMB128),
+    USLCOM_DEV(SILABS, CYGNAL),
+    USLCOM_DEV(SILABS, CYGNAL_DEBUG),
+    USLCOM_DEV(SILABS, CYGNAL_GPS),
     USLCOM_DEV(SILABS, DEGREE),
+    USLCOM_DEV(SILABS, EMS_C1007),
     USLCOM_DEV(SILABS, HELICOM),
+    USLCOM_DEV(SILABS, IMS_USB_RS422),
+    USLCOM_DEV(SILABS, INFINITY_MIC),
+    USLCOM_DEV(SILABS, INSYS_MODEM),
+    USLCOM_DEV(SILABS, KYOCERA_GPS),
     USLCOM_DEV(SILABS, LIPOWSKY_HARP),
     USLCOM_DEV(SILABS, LIPOWSKY_JTAG),
     USLCOM_DEV(SILABS, LIPOWSKY_LIN),
     USLCOM_DEV(SILABS, MC35PU),
+    USLCOM_DEV(SILABS, MJS_TOSLINK),
+    USLCOM_DEV(SILABS, MSD_DASHHAWK),
     USLCOM_DEV(SILABS, POLOLU),
-    USLCOM_DEV(SILABS, RIGBLASTER),
-    USLCOM_DEV(SILABS, RIGTALK),
+    USLCOM_DEV(SILABS, PROCYON_AVS),
+    USLCOM_DEV(SILABS, SB_PARAMOUNT_ME),
     USLCOM_DEV(SILABS, SUUNTO),
+    USLCOM_DEV(SILABS, TAMSMASTER),
+    USLCOM_DEV(SILABS, TELEGESYS_ETRX2),
     USLCOM_DEV(SILABS, TRACIENT),
     USLCOM_DEV(SILABS, TRAQMATE),
     USLCOM_DEV(SILABS, USBCOUNT50),
     USLCOM_DEV(SILABS, USBPULSE100),
+    USLCOM_DEV(SILABS, USBSCOPE50),
     USLCOM_DEV(SILABS, USBWAVE12),
+    USLCOM_DEV(SILABS, VSTABI),
+    USLCOM_DEV(SILABS, WAVIT),
+    USLCOM_DEV(SILABS, WMRBATT),
+    USLCOM_DEV(SILABS, WMRRIGBLASTER),
+    USLCOM_DEV(SILABS, WMRRIGTALK),
+    USLCOM_DEV(SILABS, ZEPHYR_BIO),
     USLCOM_DEV(SILABS2, DCU11CLONE),
     USLCOM_DEV(SILABS3, GPRS_MODEM),
+    USLCOM_DEV(SILABS4, 100EU_MODEM),
+    USLCOM_DEV(SYNTECH, CYPHERLAB100),
     USLCOM_DEV(USI, MC60),
+    USLCOM_DEV(VAISALA, CABLE),
+    USLCOM_DEV(WAVESENSE, JAZZ),
 #undef USLCOM_DEV
 };
 

Modified: head/sys/dev/usb/usbdevs
==============================================================================
--- head/sys/dev/usb/usbdevs	Sat Aug  7 16:08:37 2010	(r211021)
+++ head/sys/dev/usb/usbdevs	Sat Aug  7 16:14:40 2010	(r211022)
@@ -436,6 +436,7 @@ vendor BILLIONTON	0x08dd	Billionton Syst
 vendor GEMALTO		0x08e6	Gemalto SA
 vendor EXTENDED		0x08e9	Extended Systems
 vendor MSYSTEMS		0x08ec	M-Systems
+vendor DIGIANSWER	0x08fd	Digianswer
 vendor AUTHENTEC	0x08ff	AuthenTec
 vendor AUDIOTECHNICA	0x0909	Audio-Technica
 vendor TRUMPION		0x090a	Trumpion Microelectronics
@@ -503,6 +504,7 @@ vendor USR		0x0baf	U.S. Robotics
 vendor AMBIT		0x0bb2	Ambit Microsystems
 vendor HTC		0x0bb4	HTC
 vendor REALTEK		0x0bda	Realtek
+vendor MEI		0x0bed	MEI
 vendor ADDONICS2	0x0bf6	Addonics Technology
 vendor FSC		0x0bf8	Fujitsu Siemens Computers
 vendor AGATE		0x0c08	Agate Technologies
@@ -561,6 +563,7 @@ vendor PLX		0x10b5	PLX
 vendor ASANTE		0x10bd	Asante
 vendor SILABS		0x10c4	Silicon Labs
 vendor SILABS3		0x10c5	Silicon Labs
+vendor SILABS4		0x10ce	Silicon Labs
 vendor ACTIONS		0x10d6  Actions
 vendor ANALOG		0x1110	Analog Devices
 vendor TENX		0x1130	Ten X Technology, Inc.
@@ -614,6 +617,7 @@ vendor UBIQUAM		0x1529	UBIQUAM Co., Ltd.
 vendor JMICRON		0x152d	JMicron
 vendor UBLOX		0x1546	U-blox
 vendor PNY		0x154b	PNY
+vendor OWEN		0x1555	Owen
 vendor OQO		0x1557	OQO
 vendor UMEDIA		0x157e	U-MEDIA Communications
 vendor FIBERLINE	0x1582	Fiberline
@@ -640,8 +644,11 @@ vendor SENAO		0x1740	Senao
 vendor ASUS2		0x1761	ASUS
 vendor SWEEX2		0x177f	Sweex
 vendor METAGEEK		0x1781	MetaGeek
+vendor WAVESENSE	0x17f4	WaveSense
+vendor VAISALA		0x1843	Vaisala
 vendor AMIT		0x18c5	AMIT
 vendor QCOM		0x18e8	Qcom
+vendor ELV		0x18ef	ELV
 vendor LINKSYS3		0x1915	Linksys
 vendor QUALCOMMINC	0x19d2	Qualcomm, Incorporated
 vendor WCH2		0x1a86	QinHeng Electronics
@@ -695,6 +702,7 @@ vendor SITECOM2		0x9016	Sitecom
 vendor MOSCHIP		0x9710	MosChip Semiconductor
 vendor MARVELL		0x9e88	Marvell Technology Group Ltd.
 vendor 3COM3		0xa727	3Com
+vendor DATAAPEX		0xdaae	DataApex
 vendor HP2		0xf003	Hewlett Packard
 vendor USRP		0xfffe	GNU Radio USRP
 
@@ -1291,6 +1299,9 @@ product DAISY DMC		0x6901	USB MultiMedia
 /* Dallas Semiconductor products */
 product DALLAS J6502		0x4201	J-6502 speakers
 
+/* DataApex products */
+product DATAAPEX MULTICOM	0xead6	MultiCom
+
 /* Dell products */
 product DELL PORT		0x0058	Port Replicator
 product DELL AIO926		0x5115	Photo AIO Printer 926
@@ -1314,6 +1325,7 @@ product DELL U5520_3		0x8138	Dell 5520 3
 product DELL U5730		0x8180	Dell 5730 3G
 product DELL U5730_2		0x8181	Dell 5730 3G
 product DELL U5730_3		0x8182	Dell 5730 3G
+product DELL DW700		0x9500	Dell DW700 GPS
 
 /* Delorme Paublishing products */
 product DELORME EARTHMATE	0x0100	Earthmate GPS
@@ -1333,6 +1345,9 @@ product DIGI ACCELEPORT2	0x0002	AccelePo
 product DIGI ACCELEPORT4	0x0004	AccelePort USB 4
 product DIGI ACCELEPORT8	0x0008	AccelePort USB 8
 
+/* Digianswer A/S products */
+product DIGIANSWER ZIGBEE802154	0x000a	ZigBee/802.15.4 MAC
+
 /* D-Link products */
 /*product DLINK DSBS25		0x0100	DSB-S25 serial*/
 product DLINK DUBE100		0x1a00	10/100 Ethernet
@@ -1390,6 +1405,7 @@ product DRESDENELEKTRONIK WIRELESSHANDHE
 /* Dynastream Innovations */
 product DYNASTREAM ANTDEVBOARD	0x1003	ANT dev board
 product DYNASTREAM ANT2USB	0x1004	ANT2USB
+product DYNASTREAM ANTDEVBOARD2	0x1006	ANT dev board
 
 /* Edimax products */
 product EDIMAX EW7318USG	0x7318	USB Wireless dongle
@@ -1427,6 +1443,9 @@ product ELECOM LDUSBTX3		0xabc1	LD-USB/T
 product ELSA MODEM1		0x2265	ELSA Modem Board
 product ELSA USB2ETHERNET	0x3000	Microlink USB2Ethernet
 
+/* ELV products */
+product ELV USBI2C		0xe00f	USB-I2C interface
+
 /* EMS products */
 product EMS DUAL_SHOOTER	0x0003	PSX gun controller converter
 
@@ -1507,6 +1526,9 @@ product FIBERLINE WL430U	0x6003	WL-430U
 /* Fossil, Inc products */
 product FOSSIL WRISTPDA		0x0002	Wrist PDA
 
+/* Foxconn products */
+product FOXCONN PIRELLI_DP_L10	0xe000	Pirelli DP-L10
+
 /* Freecom products */
 product FREECOM DVD		0xfc01	DVD drive
 product FREECOM HDD		0xfc05	Classic SL Hard Drive
@@ -2065,6 +2087,10 @@ product METRICOM RICOCHET_GS	0x0001	Rico
 product MGE UPS1		0x0001	MGE UPS SYSTEMS PROTECTIONCENTER 1
 product MGE UPS2		0xffff	MGE UPS SYSTEMS PROTECTIONCENTER 2
 
+/* MEI products */
+product MEI CASHFLOW_SC		0x1100	Cashflow-SC Cash Acceptor
+product MEI S2000		0x1101	Seies 2000 Combo Acceptor
+
 /* Micro Star International products */
 product MSI BT_DONGLE		0x1967	Bluetooth USB dongle
 product MSI RT3070_1		0x3820	RT3070
@@ -2348,6 +2374,9 @@ product OQO BT01		0x0003	model 01 Blueto
 product OQO ETHER01PLUS		0x7720	model 01+ Ethernet
 product OQO ETHER01		0x8150	model 01 Ethernet interface
 
+/* Owen.ru products */
+product OWEN AC4		0x0004	AC4 USB-RS485 converter
+
 /* Palm Computing, Inc. product */
 product PALM SERIAL		0x0080	USB Serial
 product PALM M500		0x0001	Palm m500
@@ -2391,6 +2420,7 @@ product PHILIPS HUB		0x0201	hub
 product PHILIPS PCA646VC	0x0303	PCA646VC PC Camera
 product PHILIPS PCVC680K	0x0308	PCVC680K Vesta Pro PC Camera
 product PHILIPS DSS150		0x0471	DSS 150 Digital Speaker System
+product PHILIPS ACE1001		0x066a	AKTAKOM ACE-1001 cable
 product PHILIPS SPE3030CC	0x083a	USB 2.0 External Disk
 product PHILIPS SNU5600		0x1236	SNU5600
 product PHILIPS UM10016		0x1552	ISP 1581 Hi-Speed USB MPEG2 Encoder Reference Kit
@@ -2429,6 +2459,7 @@ product PLEXTOR 40_12_40U	0x0011	PlexWri
 
 /* PLX products */
 product PLX TESTBOARD		0x9060	test board
+product PLX CA42		0xac70	CA-42
 
 /* PNY products */
 product PNY ATTACHE2		0x0010	USB 2.0 Flash Drive
@@ -2802,32 +2833,59 @@ product SILICOM U2E		0x0001	U2E
 product SILICOM GPE		0x0002	Psion Gold Port Ethernet
 
 /* SI Labs */
+product SILABS	VSTABI		0x0f91	Vstabi
+product SILABS	ARKHAM_DS101_M	0x1101	Arkham DS101 Monitor
+product SILABS	ARKHAM_DS101_A	0x1601	Arkham DS101 Adapter
 product SILABS	BSM7DUSB	0x800a	BSM7-D-USB
 product SILABS	POLOLU		0x803b	Pololu Serial
+product SILABS	CYGNAL_DEBUG	0x8044	Cygnal Debug Adapter
+product SILABS	SB_PARAMOUNT_ME	0x8043	Software Bisque Paramount ME
 product SILABS	SAEL		0x8053	SA-EL USB
+product SILABS	GSM2228		0x8054	Enfora GSM2228 USB
 product SILABS	ARGUSISP	0x8066	Argussoft ISP
+product SILABS	IMS_USB_RS422	0x806f	IMS USB-RS422
 product SILABS	CRUMB128	0x807a	Crumb128 board
 product SILABS	DEGREE		0x80ca	Degree Controls Inc
 product SILABS	TRACIENT	0x80dd	Tracient RFID
 product SILABS	TRAQMATE	0x80ed	Track Systems Traqmate
 product SILABS	SUUNTO		0x80f6	Suunto Sports Instrument
+product SILABS	ARYGON_MIFARE	0x8115	Arygon Mifare RFID reader
 product SILABS	BURNSIDE	0x813d	Burnside Telecon Deskmobile
-product SILABS	RIGBLASTER	0x814a	WMR RIGblaster Plug&Play
-product SILABS	RIGTALK		0x814b	WMR RIGtalk RT1
+product SILABS	TAMSMASTER	0x813f	Tams Master Easy Control
+product SILABS	WMRBATT		0x814a	WMR RIGblaster Plug&Play
+product SILABS	WMRRIGBLASTER	0x814a	WMR RIGblaster Plug&Play
+product SILABS	WMRRIGTALK	0x814b	WMR RIGtalk RT1
 product SILABS	HELICOM		0x815e	Helicomm IP-Link 1220-DVM
+product SILABS	AVIT_USB_TTL	0x818b	AVIT Research USB-TTL
+product SILABS	MJS_TOSLINK	0x819f	MJS USB-TOSLINk
+product SILABS	WAVIT		0x81a6	ThinkOptics WavIt
+product SILABS	MSD_DASHHAWK	0x81ac	MSD DashHawk
+product SILABS	INSYS_MODEM	0x81ad	INSYS Modem
 product SILABS	LIPOWSKY_JTAG	0x81c8	Lipowsky Baby-JTAG
 product SILABS	LIPOWSKY_LIN	0x81e2	Lipowsky Baby-LIN
 product SILABS	AEROCOMM	0x81e7	Aerocomm Radio
+product SILABS	ZEPHYR_BIO	0x81e8	Zephyr Bioharness
+product SILABS	EMS_C1007	0x81f2	EMS C1007 HF RFID controller
 product SILABS	LIPOWSKY_HARP	0x8218	Lipowsky HARP-1
+product SILABS	C2_EDGE_MODEM	0x822b	Commander 2 EDGE(GSM) Modem
+product SILABS	CYGNAL_GPS	0x826b	Cygnal Fasttrax GPS
+product SILABS	TELEGESYS_ETRX2	0x8293	Telegesys ETRX2USB
+product SILABS	PROCYON_AVS	0x82f9	Procyon AVS
 product SILABS	MC35PU		0x8341	MC35pu
+product SILABS	CYGNAL		0x8382	Cygnal
+product SILABS	AMBER_AMB2560	0x83a8	Amber Wireless AMB2560
+product SILABS	KYOCERA_GPS	0x8411	Kyocera GPS
+product SILABS	BEI_VCP		0x846e	BEI USB Sensor (VCP)
 product SILABS	CP2102		0xea60	SILABS USB UART
 product SILABS	CP210X_2	0xea61	CP210x Serial
+product SILABS	INFINITY_MIC	0xea71	Infinity GPS-MIC-1 Radio Monophone
 product SILABS	USBSCOPE50	0xf001	USBscope50
 product SILABS	USBWAVE12	0xf002	USBwave12
 product SILABS	USBPULSE100	0xf003	USBpulse100
 product SILABS	USBCOUNT50	0xf004	USBcount50
 product SILABS2 DCU11CLONE	0xaa26	DCU-11 clone
 product SILABS3 GPRS_MODEM	0xea61	GPRS Modem
+product SILABS4 100EU_MODEM	0xea61	GPRS Modem 100EU
 
 /* Silicon Portals Inc. */
 product SILICONPORTALS YAPPH_NF	0x0200	YAP Phone (no firmware)
@@ -2975,6 +3033,9 @@ product SUN KBD_HUB		0x100e	Kbd Hub
 /* Super Top products */
 product	SUPERTOP IDE		0x6600	USB-IDE
 
+/* Syntech products */
+product	SYNTECH CYPHERLAB100	0x1000	CipherLab USB Barcode Scanner
+
 /* Teclast products */
 product TECLAST TLC300		0x3203	USB Media Player
 
@@ -3112,6 +3173,9 @@ product USR USR5423		0x0121	USR5423 WLAN
 /* VIA Technologies products */
 product VIA USB2IDEBRIDGE	0x6204	USB 2.0 IDE Bridge
 
+/* Vaisala products */
+product VAISALA CABLE		0x0200	USB Interface cable
+
 /* VidzMedia products */
 product VIDZMEDIA MONSTERTV	0x4fb1	MonsterTV P2H
 
@@ -3141,6 +3205,9 @@ product WACOM GRAPHIRE3_4X5	0x0013	Graph
 product WACOM INTUOSA5		0x0021	Intuos A5
 product WACOM GD0912U		0x0022	Intuos 9x12 Graphics Tablet
 
+/* WaveSense products */
+product WAVESENSE JAZZ		0xaaaa	Jazz blood glucose meter
+
 /* WCH products */
 product WCH CH341SER		0x5523	CH341/CH340 USB-Serial Bridge
 product WCH2 CH341SER		0x7523	CH341/CH340 USB-Serial Bridge

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 16:20:13 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 595801065677;
	Sat,  7 Aug 2010 16:20:13 +0000 (UTC)
	(envelope-from olli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 47EA48FC1A;
	Sat,  7 Aug 2010 16:20:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77GKDpF091346;
	Sat, 7 Aug 2010 16:20:13 GMT (envelope-from olli@svn.freebsd.org)
Received: (from olli@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77GKDBb091327;
	Sat, 7 Aug 2010 16:20:13 GMT (envelope-from olli@svn.freebsd.org)
Message-Id: <201008071620.o77GKDBb091327@svn.freebsd.org>
From: Oliver Fromme 
Date: Sat, 7 Aug 2010 16:20:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211023 - head/usr.sbin/syslogd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 16:20:13 -0000

Author: olli
Date: Sat Aug  7 16:20:12 2010
New Revision: 211023
URL: http://svn.freebsd.org/changeset/base/211023

Log:
  syslogd(8) already supports *sending* log messages to non-
  standard ports, but it can't *receive* them (port 514 is
  hardcoded).  This commit adds that missing feature.
  
  (NB:  I actually needed this feature for a server farm where
  multiple jails run with shared IP addresses, and every jail
  should have its own syslogd process.)
  
  As a side effect, syslogd now compiles with WARNS=6.
  
  Approved by:	des (mentor)
  MFC after:	3 weeks

Modified:
  head/usr.sbin/syslogd/Makefile
  head/usr.sbin/syslogd/syslogd.8
  head/usr.sbin/syslogd/syslogd.c

Modified: head/usr.sbin/syslogd/Makefile
==============================================================================
--- head/usr.sbin/syslogd/Makefile	Sat Aug  7 16:14:40 2010	(r211022)
+++ head/usr.sbin/syslogd/Makefile	Sat Aug  7 16:20:12 2010	(r211023)
@@ -12,7 +12,7 @@ SRCS=	syslogd.c ttymsg.c
 DPADD=	${LIBUTIL}
 LDADD=	-lutil
 
-WARNS?=	3
+WARNS?=	6
 
 .if ${MK_INET6_SUPPORT} != "no"
 CFLAGS+= -DINET6

Modified: head/usr.sbin/syslogd/syslogd.8
==============================================================================
--- head/usr.sbin/syslogd/syslogd.8	Sat Aug  7 16:14:40 2010	(r211022)
+++ head/usr.sbin/syslogd/syslogd.8	Sat Aug  7 16:20:12 2010	(r211023)
@@ -171,10 +171,29 @@ The
 options are ignored if the
 .Fl s
 option is also specified.
-.It Fl b Ar bind_address
-Specify one specific IP address or hostname to bind to.
-If a hostname is specified,
-the IPv4 or IPv6 address which corresponds to it is used.
+.It Xo
+.Fl b
+.Sm off
+.Ar bind_address Op : Ar service
+.Sm on
+.Xc
+.It Xo
+.Fl b
+.Sm off
+.Li : Ar service
+.Sm on
+.Xc
+Bind to a specific address and/or port.
+The address can be specified as a hostname,
+and the port as a service name.
+If an IPv6 address is specified, it should be enclosed with
+.Ql \&[
+and
+.Ql \&] .
+The default
+.Ar service
+is
+.Ql syslog .
 .It Fl C
 Create log files that do not exist (permission is set to
 .Li 0600 ) .

Modified: head/usr.sbin/syslogd/syslogd.c
==============================================================================
--- head/usr.sbin/syslogd/syslogd.c	Sat Aug  7 16:14:40 2010	(r211022)
+++ head/usr.sbin/syslogd/syslogd.c	Sat Aug  7 16:20:12 2010	(r211023)
@@ -317,7 +317,7 @@ static void	dodie(int);
 static void	dofsync(void);
 static void	domark(int);
 static void	fprintlog(struct filed *, int, const char *);
-static int	*socksetup(int, const char *);
+static int	*socksetup(int, char *);
 static void	init(int);
 static void	logerror(const char *);
 static void	logmsg(int, const char *, const char *, int);
@@ -345,7 +345,8 @@ main(int argc, char *argv[])
 	struct sockaddr_storage frominet;
 	fd_set *fdsr = NULL;
 	char line[MAXLINE + 1];
-	const char *bindhostname, *hname;
+	char *bindhostname;
+	const char *hname;
 	struct timeval tv, *tvp;
 	struct sigaction sact;
 	struct funix *fx, *fx1;
@@ -2605,16 +2606,47 @@ log_deadchild(pid_t pid, int status, con
 }
 
 static int *
-socksetup(int af, const char *bindhostname)
+socksetup(int af, char *bindhostname)
 {
 	struct addrinfo hints, *res, *r;
+	const char *bindservice;
+	char *cp;
 	int error, maxs, *s, *socks;
 
+	/*
+	 * We have to handle this case for backwards compatibility:
+	 * If there are two (or more) colons but no '[' and ']',
+	 * assume this is an inet6 address without a service.
+	 */
+	bindservice = "syslog";
+	if (bindhostname != NULL) {
+#ifdef INET6
+		if (*bindhostname == '[' &&
+		    (cp = strchr(bindhostname + 1, ']')) != NULL) {
+			++bindhostname;
+			*cp = '\0';
+			if (cp[1] == ':' && cp[2] != '\0')
+				bindservice = cp + 2;
+		} else {
+#endif
+			cp = strchr(bindhostname, ':');
+			if (cp != NULL && strchr(cp + 1, ':') == NULL) {
+				*cp = '\0';
+				if (cp[1] != '\0')
+					bindservice = cp + 1;
+				if (cp == bindhostname)
+					bindhostname = NULL;
+			}
+#ifdef INET6
+		}
+#endif
+	}
+
 	memset(&hints, 0, sizeof(hints));
 	hints.ai_flags = AI_PASSIVE;
 	hints.ai_family = af;
 	hints.ai_socktype = SOCK_DGRAM;
-	error = getaddrinfo(bindhostname, "syslog", &hints, &res);
+	error = getaddrinfo(bindhostname, bindservice, &hints, &res);
 	if (error) {
 		logerror(gai_strerror(error));
 		errno = 0;

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 17:02:36 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 70854106564A;
	Sat,  7 Aug 2010 17:02:36 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5EB718FC1A;
	Sat,  7 Aug 2010 17:02:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77H2amn001169;
	Sat, 7 Aug 2010 17:02:36 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77H2a8M001165;
	Sat, 7 Aug 2010 17:02:36 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201008071702.o77H2a8M001165@svn.freebsd.org>
From: Gavin Atkinson 
Date: Sat, 7 Aug 2010 17:02:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211026 - head/share/syscons/keymaps
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 17:02:36 -0000

Author: gavin
Date: Sat Aug  7 17:02:36 2010
New Revision: 211026
URL: http://svn.freebsd.org/changeset/base/211026

Log:
  Add a keymap for the Swiss-German Macbook keyboard.
  
  PR:		conf/139997
  Submitted by:	Andreas Tobler 
  MFC after:	2 weeks
  Committed from:	Bugathon #7

Added:
  head/share/syscons/keymaps/swissgerman.macbook.acc.kbd   (contents, props changed)
Modified:
  head/share/syscons/keymaps/INDEX.keymaps
  head/share/syscons/keymaps/Makefile

Modified: head/share/syscons/keymaps/INDEX.keymaps
==============================================================================
--- head/share/syscons/keymaps/INDEX.keymaps	Sat Aug  7 17:01:01 2010	(r211025)
+++ head/share/syscons/keymaps/INDEX.keymaps	Sat Aug  7 17:02:36 2010	(r211026)
@@ -440,6 +440,12 @@ swissgerman.cp850.kbd:fr:Suisse-Allemand
 swissgerman.cp850.kbd:pt:Suiço-Alemão Codepage 850
 swissgerman.cp850.kbd:es:Germanosuizo Codepage 850
 
+swissgerman.macbook.acc.kbd:en:Swiss-German Macbook/Macbook Pro (accent keys)
+swissgerman.macbook.acc.kbd:de:Schweiz-Deutsch Macbook/Macbook Pro (mit Akzenten)
+swissgerman.macbook.acc.kbd:fr:Suisse-Allemand  Macbook/Macbook Pro (avec accents)
+swissgerman.macbook.acc.kbd:pt:Suiço-Alemão Macbook/Macbook Pro (com acentos)
+swissgerman.macbook.acc.kbd:es:Germanosuizo  Macbook/Macbook Pro (con acentos)
+
 tr.iso9.q.kbd:en:Turkish ISO-8859-9
 tr.iso9.q.kbd:fr:Turc ISO-8859-9
 tr.iso9.q.kbd:uk:ôÕÒÅÃØËÁ ISO-8859-9

Modified: head/share/syscons/keymaps/Makefile
==============================================================================
--- head/share/syscons/keymaps/Makefile	Sat Aug  7 17:01:01 2010	(r211025)
+++ head/share/syscons/keymaps/Makefile	Sat Aug  7 17:02:36 2010	(r211026)
@@ -40,6 +40,7 @@ FILES=	INDEX.keymaps \
 	swedish.iso.kbd swedish.cp850.kbd \
 	swissfrench.iso.kbd swissfrench.iso.acc.kbd swissfrench.cp850.kbd \
 	swissgerman.iso.kbd swissgerman.iso.acc.kbd swissgerman.cp850.kbd \
+	swissgerman.macbook.acc.kbd \
 	tr.iso9.q.kbd \
 	ua.koi8-u.kbd ua.koi8-u.shift.alt.kbd ua.iso5.kbd \
 	uk.iso.kbd uk.iso-ctrl.kbd uk.cp850.kbd uk.cp850-ctrl.kbd \

Added: head/share/syscons/keymaps/swissgerman.macbook.acc.kbd
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/share/syscons/keymaps/swissgerman.macbook.acc.kbd	Sat Aug  7 17:02:36 2010	(r211026)
@@ -0,0 +1,134 @@
+# $FreeBSD$
+#
+# swissgerman Macbook/Macbook PRO ISO 8859-1 keymap, with accent keys
+# derived from swissgerman.iso.acc.kbd
+# 06.08.2010 by Andreas Tobler 
+#                                                         alt
+# scan                       cntrl          alt    alt   cntrl lock
+# code  base   shift  cntrl  shift  alt    shift  cntrl  shift state
+# ------------------------------------------------------------------
+  000   nop    nop    nop    nop    nop    nop    nop    nop     O
+  001   esc    esc    esc    esc    esc    esc    debug  esc     O
+  002   '1'    '+'    nop    nop    '1'    '1'    nop    nop     O
+  003   '2'    '"'    nul    nul    '2'    '2'    nul    nul     O
+  004   '3'    '*'    nop    nop    '#'    '#'    nop    nop     O
+  005   '4'    231    nop    nop    '4'    231    nop    nop     O
+  006   '5'    '%'    nop    nop    '['    '['    nop    nop     O
+  007   '6'    '&'    nop    nop    ']'    ']'    nop    nop     O
+  008   '7'    '/'    nop    nop    '|'    '\'    nop    nop     O
+  009   '8'    '('    esc    esc    '{'    '{'    nop    nop     O
+  010   '9'    ')'    gs     gs     '}'    '}'    nop    nop     O
+  011   '0'    '='    nop    nop    '0'    '='    nop    nop     O
+  012   '''    '?'    fs     fs     dacu   dacu   fs     fs      O
+  013   dcir   dgra   nop    nop    dtil   dtil   nop    nop     O
+  014   bs     bs     del    del    bs     bs     del    del     O
+  015   ht     btab   nop    nop    ht     btab   nop    nop     O
+  016   'q'    'Q'    dc1    dc1    'q'    'Q'    dc1    dc1     C
+  017   'w'    'W'    etb    etb    'w'    'W'    etb    etb     C
+  018   'e'    'E'    enq    enq    164    'E'    enq    enq     C
+  019   'r'    'R'    dc2    dc2    'r'    'R'    dc2    dc2     C
+  020   't'    'T'    dc4    dc4    't'    'T'    dc4    dc4     C
+  021   'z'    'Z'    sub    sub    'z'    'Z'    sub    sub     C
+  022   'u'    'U'    nak    nak    'u'    'U'    nak    nak     C
+  023   'i'    'I'    ht     ht     'i'    'I'    ht     ht      C
+  024   'o'    'O'    si     si     'o'    'O'    si     si      C
+  025   'p'    'P'    dle    dle    'p'    'P'    dle    dle     C
+  026   dgra   duml   esc    esc    '['    220    esc    esc     C
+  027   duml   '!'    gs     gs     ']'    ']'    gs     gs      O
+  028   cr     cr     nl     nl     cr     cr     nl     nl      O
+  029   lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl   O
+  030   'a'    'A'    soh    soh    'a'    'A'    soh    soh     C
+  031   's'    'S'    dc3    dc3    's'    'S'    dc3    dc3     C
+  032   'd'    'D'    eot    eot    'd'    'D'    eot    eot     C
+  033   'f'    'F'    ack    ack    'f'    'F'    ack    ack     C
+  034   'g'    'G'    bel    bel    '@'    '@'    bel    bel     C
+  035   'h'    'H'    bs     bs     'h'    'H'    bs     bs      C
+  036   'j'    'J'    nl     nl     'j'    'J'    nl     nl      C
+  037   'k'    'K'    vt     vt     'k'    'K'    vt     vt      C
+  038   'l'    'L'    ff     ff     'l'    'L'    ff     ff      C
+  039   233    233    nop    nop    246    214    nop    nop     C
+  040   224    224    nop    nop    '{'    196    nop    nop     C
+  041   '<'    '>'    nop    nop    nop    nop    nop    nop     O
+  042   lshift lshift lshift lshift lshift lshift lshift lshift  O
+  043   '$'    163    rs     rs     '}'    '}'    rs     rs      O
+  044   'y'    'Y'    em     em     'y'    'Y'    em     em      C
+  045   'x'    'X'    can    can    'x'    'X'    can    can     C
+  046   'c'    'C'    etx    etx    'c'    'C'    etx    etx     C
+  047   'v'    'V'    syn    syn    'v'    'V'    syn    syn     C
+  048   'b'    'B'    stx    stx    'b'    'B'    stx    stx     C
+  049   'n'    'N'    so     so     '~'    '~'    so     so      C
+  050   'm'    'M'    cr     cr     181    181    cr     cr      C
+  051   ','    ';'    nop    nop    ','    ';'    nop    nop     O
+  052   '.'    ':'    nop    nop    '.'    ':'    nop    nop     O
+  053   '-'    '_'    us     us     '-'    '_'    us     us      O
+  054   rshift rshift rshift rshift rshift rshift rshift rshift  O
+  055   '*'    '*'    '*'    '*'    '*'    '*'    '*'    '*'     O
+  056   lalt   lalt   lalt   lalt   lalt   lalt   lalt   lalt    O
+  057   ' '    ' '    nul    ' '    ' '    ' '    susp   ' '     O
+  058   clock  clock  clock  clock  clock  clock  clock  clock   O
+  059   fkey01 fkey13 fkey25 fkey37 scr01  scr11  scr01  scr11   O
+  060   fkey02 fkey14 fkey26 fkey38 scr02  scr12  scr02  scr12   O
+  061   fkey03 fkey15 fkey27 fkey39 scr03  scr13  scr03  scr13   O
+  062   fkey04 fkey16 fkey28 fkey40 scr04  scr14  scr04  scr14   O
+  063   fkey05 fkey17 fkey29 fkey41 scr05  scr15  scr05  scr15   O
+  064   fkey06 fkey18 fkey30 fkey42 scr06  scr16  scr06  scr16   O
+  065   fkey07 fkey19 fkey31 fkey43 scr07  scr07  scr07  scr07   O
+  066   fkey08 fkey20 fkey32 fkey44 scr08  scr08  scr08  scr08   O
+  067   fkey09 fkey21 fkey33 fkey45 scr09  scr09  scr09  scr09   O
+  068   fkey10 fkey22 fkey34 fkey46 scr10  scr10  scr10  scr10   O
+  069   nlock  nlock  nlock  nlock  nlock  nlock  nlock  nlock   O
+  070   slock  slock  slock  slock  slock  slock  slock  slock   O
+  071   fkey49 '7'    '7'    '7'    '7'    '7'    '7'    '7'     N
+  072   fkey50 '8'    '8'    '8'    '8'    '8'    '8'    '8'     N
+  073   fkey51 '9'    '9'    '9'    '9'    '9'    '9'    '9'     N
+  074   fkey52 '-'    '-'    '-'    '-'    '-'    '-'    '-'     N
+  075   fkey53 '4'    '4'    '4'    '4'    '4'    '4'    '4'     N
+  076   fkey54 '5'    '5'    '5'    '5'    '5'    '5'    '5'     N
+  077   fkey55 '6'    '6'    '6'    '6'    '6'    '6'    '6'     N
+  078   fkey56 '+'    '+'    '+'    '+'    '+'    '+'    '+'     N
+  079   fkey57 '1'    '1'    '1'    '1'    '1'    '1'    '1'     N
+  080   fkey58 '2'    '2'    '2'    '2'    '2'    '2'    '2'     N
+  081   fkey59 '3'    '3'    '3'    '3'    '3'    '3'    '3'     N
+  082   fkey60 '0'    '0'    '0'    '0'    '0'    '0'    '0'     N
+  083   del    '.'    '.'    '.'    '.'    '.'    boot   boot    N
+  084   nop    nop    nop    nop    nop    nop    nop    nop     O
+  085   nop    nop    nop    nop    nop    nop    nop    nop     O
+  086   '<'    '>'    nop    nop    '\'    '\'    nop    nop     O
+  087   fkey11 fkey23 fkey35 fkey47 scr11  scr11  scr11  scr11   O
+  088   fkey12 fkey24 fkey36 fkey48 scr12  scr12  scr12  scr12   O
+  089   cr     cr     nl     nl     cr     cr     nl     nl      O
+  090   rctrl  rctrl  rctrl  rctrl  rctrl  rctrl  rctrl  rctrl   O
+  091   '/'    '/'    '/'    '/'    '/'    '/'    '/'    '/'     N
+  092   nscr   pscr   debug  debug  nop    nop    nop    nop     O
+  093   ralt   ralt   ralt   ralt   ralt   ralt   ralt   ralt    O
+  094   fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49  O
+  095   fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50  O
+  096   fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51  O
+  097   fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53  O
+  098   fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55  O
+  099   fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57  O
+  100   fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58  O
+  101   fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59  O
+  102   fkey60 paste  fkey60 fkey60 fkey60 fkey60 fkey60 fkey60  O
+  103   fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot   fkey61  O
+  104   slock  saver  slock  saver  susp   nop    susp   nop     O
+  105   fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62  O
+  106   fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63  O
+  107   fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64  O
+  108   nop    nop    nop    nop    nop    nop    nop    nop     O
+
+  dacu  180  ( 'a' 225 ) ( 'A' 193 ) ( 'e' 233 ) ( 'E' 201 )
+             ( 'i' 237 ) ( 'I' 205 ) ( 'o' 243 ) ( 'O' 211 )
+             ( 'u' 250 ) ( 'U' 218 ) ( 'c' 231 ) ( 'C' 199 )
+             ( 'y' 253 ) ( 'Y' 221 )
+  dgra  '`'  ( 'a' 224 ) ( 'A' 192 ) ( 'e' 232 ) ( 'E' 200 )
+             ( 'i' 236 ) ( 'I' 204 ) ( 'o' 242 ) ( 'O' 210 )
+             ( 'u' 249 ) ( 'U' 217 )
+  dcir  '^'  ( 'a' 226 ) ( 'A' 194 ) ( 'e' 234 ) ( 'E' 202 )
+             ( 'i' 238 ) ( 'I' 206 ) ( 'o' 244 ) ( 'O' 212 )
+             ( 'u' 251 ) ( 'U' 219 )
+  dtil  '~'  ( 'a' 227 ) ( 'A' 195 ) ( 'o' 245 ) ( 'O' 213 )
+             ( 'n' 241 ) ( 'N' 209 )
+  duml  168  ( 'a' 228 ) ( 'A' 196 ) ( 'e' 235 ) ( 'E' 203 )
+             ( 'i' 239 ) ( 'I' 207 ) ( 'o' 246 ) ( 'O' 214 )
+             ( 'u' 252 ) ( 'U' 220 ) ( 'y' 255 )

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 17:10:07 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6D0B41065675;
	Sat,  7 Aug 2010 17:10:07 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3])
	by mx1.freebsd.org (Postfix) with ESMTP id 266098FC12;
	Sat,  7 Aug 2010 17:10:07 +0000 (UTC)
Received: from localhost (amavis.fra.cksoft.de [192.168.74.71])
	by mail.cksoft.de (Postfix) with ESMTP id 8120041C74D;
	Sat,  7 Aug 2010 19:10:06 +0200 (CEST)
X-Virus-Scanned: amavisd-new at cksoft.de
Received: from mail.cksoft.de ([192.168.74.103])
	by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new,
	port 10024)
	with ESMTP id f6c0UBNx1tCq; Sat,  7 Aug 2010 19:10:05 +0200 (CEST)
Received: by mail.cksoft.de (Postfix, from userid 66)
	id D451341C749; Sat,  7 Aug 2010 19:10:05 +0200 (CEST)
Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net
	[10.111.66.10])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.int.zabbadoz.net (Postfix) with ESMTP id 4C3794448EC;
	Sat,  7 Aug 2010 17:08:29 +0000 (UTC)
Date: Sat, 7 Aug 2010 17:08:29 +0000 (UTC)
From: "Bjoern A. Zeeb" 
X-X-Sender: bz@maildrop.int.zabbadoz.net
To: Jamie Gritton 
In-Reply-To: <201008062204.o76M4IvZ044635@svn.freebsd.org>
Message-ID: <20100807170607.S48418@maildrop.int.zabbadoz.net>
References: <201008062204.o76M4IvZ044635@svn.freebsd.org>
X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r210974 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 17:10:07 -0000

On Fri, 6 Aug 2010, Jamie Gritton wrote:

> Author: jamie
> Date: Fri Aug  6 22:04:18 2010
> New Revision: 210974
> URL: http://svn.freebsd.org/changeset/base/210974
>
> Log:
>  Implicitly make a new jail persistent if it's set not to attach.

I am not sure this is a good idea, especially to implement it in the
kernel.  This just means that if you accidentally mess up your command
line you are creating jails, possibly eating further resources most
likely without noticing.  Lot's of foot shooting potential.

What is the reason you need that?



>  MFC after:	3 days
>
> Modified:
>  head/sys/kern/kern_jail.c
>
> Modified: head/sys/kern/kern_jail.c
> ==============================================================================
> --- head/sys/kern/kern_jail.c	Fri Aug  6 21:58:53 2010	(r210973)
> +++ head/sys/kern/kern_jail.c	Fri Aug  6 22:04:18 2010	(r210974)
> @@ -599,6 +599,8 @@ kern_jail_set(struct thread *td, struct
> 		vfs_flagopt(opts, pr_flag_names[fi], &pr_flags, 1 << fi);
> 		vfs_flagopt(opts, pr_flag_nonames[fi], &ch_flags, 1 << fi);
> 	}
> +	if ((flags & (JAIL_CREATE | JAIL_UPDATE | JAIL_ATTACH)) == JAIL_CREATE)
> +	    pr_flags |= PR_PERSIST;
> 	ch_flags |= pr_flags;
> 	for (fi = 0; fi < sizeof(pr_flag_jailsys) / sizeof(pr_flag_jailsys[0]);
> 	    fi++) {
> @@ -628,12 +630,6 @@ kern_jail_set(struct thread *td, struct
> 		ch_flags |=
> 		    pr_flag_jailsys[fi].new | pr_flag_jailsys[fi].disable;
> 	}
> -	if ((flags & (JAIL_CREATE | JAIL_UPDATE | JAIL_ATTACH)) == JAIL_CREATE
> -	    && !(pr_flags & PR_PERSIST)) {
> -		error = EINVAL;
> -		vfs_opterror(opts, "new jail must persist or attach");
> -		goto done_errmsg;
> -	}
> #ifdef VIMAGE
> 	if ((flags & JAIL_UPDATE) && (ch_flags & PR_VNET)) {
> 		error = EINVAL;
>

-- 
Bjoern A. Zeeb                       This signature is about you not me.

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 17:57:59 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2B4FB106566B;
	Sat,  7 Aug 2010 17:57:59 +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 1A47F8FC16;
	Sat,  7 Aug 2010 17:57:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77HvxIN013565;
	Sat, 7 Aug 2010 17:57:59 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77HvwcO013563;
	Sat, 7 Aug 2010 17:57:58 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <201008071757.o77HvwcO013563@svn.freebsd.org>
From: Michael Tuexen 
Date: Sat, 7 Aug 2010 17:57:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211030 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 17:57:59 -0000

Author: tuexen
Date: Sat Aug  7 17:57:58 2010
New Revision: 211030
URL: http://svn.freebsd.org/changeset/base/211030

Log:
  Fix a bug where MSG_TRUNC was not returned in all necessary cases for
  SOCK_DGRAM socket. MSG_TRUNC was only returned when some mbufs could
  not be copied to the application. If some data was left in the last
  mbuf, it was correctly discarded, but MSG_TRUNC was not set.
  
  Reviewed by: bz
  MFC after: 3 weeks

Modified:
  head/sys/kern/uipc_socket.c

Modified: head/sys/kern/uipc_socket.c
==============================================================================
--- head/sys/kern/uipc_socket.c	Sat Aug  7 17:39:22 2010	(r211029)
+++ head/sys/kern/uipc_socket.c	Sat Aug  7 17:57:58 2010	(r211030)
@@ -2236,7 +2236,12 @@ soreceive_dgram(struct socket *so, struc
 			m_freem(m);
 			return (error);
 		}
-		m = m_free(m);
+		if (len == m->m_len)
+			m = m_free(m);
+		else {
+			m->m_data += len;
+			m->m_len -= len;
+		}
 	}
 	if (m != NULL)
 		flags |= MSG_TRUNC;

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 18:30:11 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 177CB106566B;
	Sat,  7 Aug 2010 18:30:11 +0000 (UTC)
	(envelope-from ivoras@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 066EA8FC1F;
	Sat,  7 Aug 2010 18:30:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77IUA31020770;
	Sat, 7 Aug 2010 18:30:10 GMT (envelope-from ivoras@svn.freebsd.org)
Received: (from ivoras@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77IUAbH020768;
	Sat, 7 Aug 2010 18:30:10 GMT (envelope-from ivoras@svn.freebsd.org)
Message-Id: <201008071830.o77IUAbH020768@svn.freebsd.org>
From: Ivan Voras 
Date: Sat, 7 Aug 2010 18:30:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211031 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 18:30:11 -0000

Author: ivoras
Date: Sat Aug  7 18:30:10 2010
New Revision: 211031
URL: http://svn.freebsd.org/changeset/base/211031

Log:
  To help with sequential read UFS performance on modern systems, increase
  the vfs.read_max default. For most systems this means going from 128 KiB
  to 256 KiB, which is still very conservative and lower than what most
  other operating systems use, but as a sane default should not
  interfere much with existing systems.
  
  For systems with RAID volumes and/or virtualization envirnments, where
  read performance is very important, increasing this sysctl tunable to 32
  or even more will demonstratively yield additional performance benefits.
  
  If MAXPHYS ever gets bumped up, it will probably be a good idea to slave
  read_max to it.

Modified:
  head/sys/kern/vfs_cluster.c

Modified: head/sys/kern/vfs_cluster.c
==============================================================================
--- head/sys/kern/vfs_cluster.c	Sat Aug  7 17:57:58 2010	(r211030)
+++ head/sys/kern/vfs_cluster.c	Sat Aug  7 18:30:10 2010	(r211031)
@@ -71,7 +71,7 @@ static int write_behind = 1;
 SYSCTL_INT(_vfs, OID_AUTO, write_behind, CTLFLAG_RW, &write_behind, 0,
     "Cluster write-behind; 0: disable, 1: enable, 2: backed off");
 
-static int read_max = 8;
+static int read_max = 16;
 SYSCTL_INT(_vfs, OID_AUTO, read_max, CTLFLAG_RW, &read_max, 0,
     "Cluster read-ahead max block count");
 

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 19:02:00 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4A0491065672;
	Sat,  7 Aug 2010 19:02:00 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 19B4A8FC0A;
	Sat,  7 Aug 2010 19:02:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77J207E027885;
	Sat, 7 Aug 2010 19:02:00 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77J1xPC027883;
	Sat, 7 Aug 2010 19:01:59 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201008071901.o77J1xPC027883@svn.freebsd.org>
From: Gavin Atkinson 
Date: Sat, 7 Aug 2010 19:01:59 +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: r211032 - stable/8/sys/dev/usb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 19:02:00 -0000

Author: gavin
Date: Sat Aug  7 19:01:59 2010
New Revision: 211032
URL: http://svn.freebsd.org/changeset/base/211032

Log:
  Merge r210575 from head:
  
    Provide descriptions for three vendors and four devices in usbdevs.  Use
    the official vendor listed for 0x076b, rather than Omnikey, as in the PR.
  
  PR:		usb/123351
  Submitted by:	Marcin Cieslak 

Modified:
  stable/8/sys/dev/usb/usbdevs
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/usb/usbdevs
==============================================================================
--- stable/8/sys/dev/usb/usbdevs	Sat Aug  7 18:30:10 2010	(r211031)
+++ stable/8/sys/dev/usb/usbdevs	Sat Aug  7 19:01:59 2010	(r211032)
@@ -373,6 +373,7 @@ vendor AUREAL		0x0755	Aureal Semiconduct
 vendor MIDIMAN		0x0763	Midiman
 vendor CYBERPOWER	0x0764	Cyber Power Systems, Inc.
 vendor SURECOM		0x0769	Surecom Technology
+vendor HIDGLOBAL	0x076b	HID Global
 vendor LINKSYS2		0x077b	Linksys
 vendor GRIFFIN		0x077d	Griffin Technology
 vendor SANDISK		0x0781	SanDisk
@@ -437,6 +438,7 @@ vendor BURRBROWN	0x08bb	Burr-Brown Japan
 vendor 2WIRE		0x08c8	2Wire
 vendor AIPTEK		0x08ca	AIPTEK International
 vendor SMARTBRIDGES	0x08d1	SmartBridges
+vendor FUJITSUSIEMENS	0x08d4	Fujitsu-Siemens
 vendor BILLIONTON	0x08dd	Billionton Systems
 vendor EXTENDED		0x08e9	Extended Systems
 vendor MSYSTEMS		0x08ec	M-Systems
@@ -512,6 +514,7 @@ vendor FSC		0x0bf8	Fujitsu Siemens Compu
 vendor AGATE		0x0c08	Agate Technologies
 vendor DMI		0x0c0b	DMI
 vendor CHICONY2		0x0c45	Chicony
+vendor REINERSCT	0x0c4b	Reiner-SCT
 vendor SEALEVEL		0x0c52	Sealevel System
 vendor LUWEN		0x0c76	Luwen
 vendor KYOCERA2		0x0c88	Kyocera Wireless Corp.
@@ -1548,6 +1551,9 @@ product FUJIPHOTO MASS0100	0x0100	Mass S
 /* Fujitsu protducts */
 product FUJITSU AH_F401U	0x105b	AH-F401U Air H device
 
+/* Fujitsu-Siemens protducts */
+product FUJITSUSIEMENS SCR	0x0009	Fujitsu-Siemens SCR USB Reader
+
 /* Garmin products */
 product GARMIN IQUE_3600	0x0004	iQue 3600
 
@@ -1642,6 +1648,10 @@ product HAWKING HWUN2		0x0009	HWUN2
 product HAWKING RT3070		0x000b	RT3070
 product HAWKING UF100		0x400c	10/100 USB Ethernet
 
+/* HID Global GmbH products */
+product HIDGLOBAL CM2020	0x0596	Omnikey Cardman 2020
+product HIDGLOBAL CM6020	0x1784	Omnikey Cardman 6020
+
 /* Hitachi, Ltd. products */
 product HITACHI DVDCAM_DZ_MV100A	0x0004	DVD-CAM DZ-MV100A Camcorder
 product HITACHI DVDCAM_USB	0x001e	DVDCAM USB HS Interface
@@ -2598,6 +2608,9 @@ product RICOH VGPVCC2_3		0x1834	VGP-VCC2
 product RICOH VGPVCC7		0x183a	VGP-VCC7 Camera
 product RICOH VGPVCC8		0x183b	VGP-VCC8 Camera
 
+/* Reiner-SCT products */
+product REINERSCT CYBERJACK_ECOM	0x0100	e-com cyberJack
+
 /* Roland products */
 product ROLAND UM1		0x0009	UM-1 MIDI I/F
 product ROLAND UM880N		0x0014	EDIROL UM-880 MIDI I/F (native)

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 19:08:40 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4EAC3106564A;
	Sat,  7 Aug 2010 19:08:40 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 224C18FC12;
	Sat,  7 Aug 2010 19:08:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77J8eAs029408;
	Sat, 7 Aug 2010 19:08:40 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77J8eNJ029405;
	Sat, 7 Aug 2010 19:08:40 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201008071908.o77J8eNJ029405@svn.freebsd.org>
From: Gavin Atkinson 
Date: Sat, 7 Aug 2010 19:08:39 +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: r211033 - in stable/8/sys/dev/usb: . serial
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 19:08:40 -0000

Author: gavin
Date: Sat Aug  7 19:08:39 2010
New Revision: 211033
URL: http://svn.freebsd.org/changeset/base/211033

Log:
  Merge r210534 from head:
  
    Add support for the Longcheer WM66 USB HSDPA Modem to u3g(4)
  
  PR:		usb/129945
  Submitted by:	Antonio Hilario 
  Committed from:	Bugathon #7

Modified:
  stable/8/sys/dev/usb/serial/u3g.c
  stable/8/sys/dev/usb/usbdevs
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (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/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/usb/serial/u3g.c
==============================================================================
--- stable/8/sys/dev/usb/serial/u3g.c	Sat Aug  7 19:01:59 2010	(r211032)
+++ stable/8/sys/dev/usb/serial/u3g.c	Sat Aug  7 19:08:39 2010	(r211033)
@@ -285,6 +285,7 @@ static const struct usb_device_id u3g_de
 	U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI),
 	U3G_DEV(KYOCERA2, CDMA_MSM_K, 0),
 	U3G_DEV(KYOCERA2, KPC680, 0),
+	U3G_DEV(LONGCHEER, WM66, U3GINIT_HUAWEI),
 	U3G_DEV(MERLIN, V620, 0),
 	U3G_DEV(NOVATEL, E725, 0),
 	U3G_DEV(NOVATEL, ES620, 0),

Modified: stable/8/sys/dev/usb/usbdevs
==============================================================================
--- stable/8/sys/dev/usb/usbdevs	Sat Aug  7 19:01:59 2010	(r211032)
+++ stable/8/sys/dev/usb/usbdevs	Sat Aug  7 19:08:39 2010	(r211033)
@@ -653,6 +653,7 @@ vendor STELERA		0x1a8d	Stelera Wireless
 vendor OVISLINK		0x1b75	OvisLink
 vendor TCTMOBILE	0x1bbb  TCT Mobile
 vendor TELIT		0x1bc7  Telit
+vendor LONGCHEER	0x1c9e	Longcheer Holdings, Ltd.
 vendor MPMAN		0x1cae	MpMan
 vendor DRESDENELEKTRONIK 0x1cf1 dresden elektronik
 vendor PEGATRON		0x1d4d	Pegatron
@@ -1996,6 +1997,9 @@ product LOGITEC RT2870_1	0x0162	RT2870
 product LOGITEC RT2870_2	0x0163	RT2870
 product LOGITEC RT2870_3	0x0164	RT2870
 
+/* Longcheer Holdings, Ltd. products */
+product LONGCHEER WM66		0x6061	Longcheer WM66 HSDPA USB modem
+
 /* Lucent products */
 product LUCENT EVALKIT		0x1001	USS-720 evaluation kit
 

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 19:27:50 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 169431065673;
	Sat,  7 Aug 2010 19:27:50 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DEBD48FC1C;
	Sat,  7 Aug 2010 19:27:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77JRn6v033710;
	Sat, 7 Aug 2010 19:27:49 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77JRnVQ033707;
	Sat, 7 Aug 2010 19:27:49 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201008071927.o77JRnVQ033707@svn.freebsd.org>
From: Gavin Atkinson 
Date: Sat, 7 Aug 2010 19:27:49 +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: r211035 - stable/7/sys/dev/usb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 19:27:50 -0000

Author: gavin
Date: Sat Aug  7 19:27:49 2010
New Revision: 211035
URL: http://svn.freebsd.org/changeset/base/211035

Log:
  Merge r210534 from head:
  
    Add support for the Longcheer WM66 USB HSDPA Modem to u3g(4)
  
  PR:		usb/129945
  Submitted by:	Antonio Hilario 

Modified:
  stable/7/sys/dev/usb/u3g.c
  stable/7/sys/dev/usb/usbdevs
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/usb/u3g.c
==============================================================================
--- stable/7/sys/dev/usb/u3g.c	Sat Aug  7 19:27:36 2010	(r211034)
+++ stable/7/sys/dev/usb/u3g.c	Sat Aug  7 19:27:49 2010	(r211035)
@@ -193,6 +193,8 @@ static const struct u3g_dev_type_s u3g_d
 	/* OEM: CMOTECH */
 	{{ USB_VENDOR_CMOTECH, USB_PRODUCT_CMOTECH_CGU628 },		U3GSP_HSDPA,	U3GINIT_CMOTECH },
 	{{ USB_VENDOR_CMOTECH, USB_PRODUCT_CMOTECH_DISK },		U3GSP_HSDPA,	U3GINIT_NONE },
+	/* OEM: Longcheer */
+	{ USB_VENDOR_LONGCHEER, USB_PRODUCT_LONGCHEER_WM66 },		U3GSP_HSDPA,	U3GINIT_HUAWEI },
 };
 #define u3g_lookup(v, p) ((const struct u3g_dev_type_s *)usb_lookup(u3g_devs, v, p))
 

Modified: stable/7/sys/dev/usb/usbdevs
==============================================================================
--- stable/7/sys/dev/usb/usbdevs	Sat Aug  7 19:27:36 2010	(r211034)
+++ stable/7/sys/dev/usb/usbdevs	Sat Aug  7 19:27:49 2010	(r211035)
@@ -627,6 +627,7 @@ vendor LINKSYS3		0x1915	Linksys
 vendor QUALCOMMINC	0x19d2	Qualcomm, Incorporated
 vendor MATRIXORBITAL	0x1b3d	Matrix Orbital
 vendor STELERA		0x1a8d	Stelera Wireless
+vendor LONGCHEER	0x1c9e	Longcheer Holdings, Ltd.
 vendor DRESDENELEKTRONIK 0x1cf1 dresden elektronik
 vendor METAGEEK2	0x1dd5	MetaGeek
 vendor DLINK		0x2001	D-Link
@@ -1667,6 +1668,9 @@ product LOGITECH QUICKCAMPRO2	0xd001	Qui
 product LOGITEC LDR_H443SU2	0x0033	DVD Multi-plus unit LDR-H443SU2
 product LOGITEC LDR_H443U2	0x00b3	DVD Multi-plus unit LDR-H443U2
 
+/* Longcheer Holdings, Ltd. products */
+product LONGCHEER WM66		0x6061	Longcheer WM66 HSDPA USB modem
+
 /* Lucent products */
 product LUCENT EVALKIT		0x1001	USS-720 evaluation kit
 

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 20:13:00 2010
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B9BB8106564A;
	Sat,  7 Aug 2010 20:13:00 +0000 (UTC)
	(envelope-from jamie@FreeBSD.org)
Received: from gritton.org (gritton.org [208.92.232.93])
	by mx1.freebsd.org (Postfix) with ESMTP id 7DA538FC14;
	Sat,  7 Aug 2010 20:13:00 +0000 (UTC)
Received: from glorfindel.gritton.org (c-67-177-8-107.hsd1.ut.comcast.net
	[67.177.8.107]) (authenticated bits=0)
	by gritton.org (8.14.3/8.14.3) with ESMTP id o77JwFRM016147;
	Sat, 7 Aug 2010 13:58:16 -0600 (MDT)
	(envelope-from jamie@FreeBSD.org)
Message-ID: <4C5DBAD5.5080407@FreeBSD.org>
Date: Sat, 07 Aug 2010 13:58:13 -0600
From: Jamie Gritton 
User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US;
	rv:1.9.1.10) Gecko/20100628 Thunderbird/3.0.5
MIME-Version: 1.0
To: src-committers@FreeBSD.org
References: <201008062204.o76M4IvZ044635@svn.freebsd.org>
	<20100807170607.S48418@maildrop.int.zabbadoz.net>
In-Reply-To: <20100807170607.S48418@maildrop.int.zabbadoz.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	"Bjoern A. Zeeb" 
Subject: Re: svn commit: r210974 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 20:13:00 -0000

On 08/07/10 11:08, Bjoern A. Zeeb wrote:
> On Fri, 6 Aug 2010, Jamie Gritton wrote:
>
>> Author: jamie
>> Date: Fri Aug 6 22:04:18 2010
>> New Revision: 210974
>> URL: http://svn.freebsd.org/changeset/base/210974
>>
>> Log:
>> Implicitly make a new jail persistent if it's set not to attach.
>
> I am not sure this is a good idea, especially to implement it in the
> kernel. This just means that if you accidentally mess up your command
> line you are creating jails, possibly eating further resources most
> likely without noticing. Lot's of foot shooting potential.
>
> What is the reason you need that?

This error has been bugging me for a while, and I've been thinking it's
more convenient not to need to explicitly specify "persist" for a jail
that doesn't run any commands. So it's a matter of safety versus
convenience. I suppose I should leave well enough alone and err on the
side of safety.

- Jamie

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 20:46:30 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C8B59106566C;
	Sat,  7 Aug 2010 20:46:30 +0000 (UTC)
	(envelope-from olli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B7EC58FC12;
	Sat,  7 Aug 2010 20:46:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77KkUTc051464;
	Sat, 7 Aug 2010 20:46:30 GMT (envelope-from olli@svn.freebsd.org)
Received: (from olli@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77KkUoD051462;
	Sat, 7 Aug 2010 20:46:30 GMT (envelope-from olli@svn.freebsd.org)
Message-Id: <201008072046.o77KkUoD051462@svn.freebsd.org>
From: Oliver Fromme 
Date: Sat, 7 Aug 2010 20:46:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211040 - head/usr.sbin/syslogd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 20:46:30 -0000

Author: olli
Date: Sat Aug  7 20:46:30 2010
New Revision: 211040
URL: http://svn.freebsd.org/changeset/base/211040

Log:
  jh pointed out that src/usr.sbin already has a global
  WARNS=6 setting in HEAD (unlike stable/8), so it's best
  to remove the line entirely.
  
  Pointed out by:	jh
  Approved by:	des (mentor)

Modified:
  head/usr.sbin/syslogd/Makefile

Modified: head/usr.sbin/syslogd/Makefile
==============================================================================
--- head/usr.sbin/syslogd/Makefile	Sat Aug  7 20:33:29 2010	(r211039)
+++ head/usr.sbin/syslogd/Makefile	Sat Aug  7 20:46:30 2010	(r211040)
@@ -12,8 +12,6 @@ SRCS=	syslogd.c ttymsg.c
 DPADD=	${LIBUTIL}
 LDADD=	-lutil
 
-WARNS?=	6
-
 .if ${MK_INET6_SUPPORT} != "no"
 CFLAGS+= -DINET6
 .endif

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 23:16:21 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DAA4A1065670;
	Sat,  7 Aug 2010 23:16:21 +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 C9D408FC0A;
	Sat,  7 Aug 2010 23:16:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77NGLF9086073;
	Sat, 7 Aug 2010 23:16:21 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77NGLOk086070;
	Sat, 7 Aug 2010 23:16:21 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201008072316.o77NGLOk086070@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Sat, 7 Aug 2010 23:16:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211046 - head/sys/dev/mii
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 23:16:22 -0000

Author: yongari
Date: Sat Aug  7 23:16:21 2010
New Revision: 211046
URL: http://svn.freebsd.org/changeset/base/211046

Log:
  Marvell model number 0x06 is 88E1101 PHY.

Modified:
  head/sys/dev/mii/e1000phy.c
  head/sys/dev/mii/miidevs

Modified: head/sys/dev/mii/e1000phy.c
==============================================================================
--- head/sys/dev/mii/e1000phy.c	Sat Aug  7 22:50:43 2010	(r211045)
+++ head/sys/dev/mii/e1000phy.c	Sat Aug  7 23:16:21 2010	(r211046)
@@ -103,7 +103,7 @@ static const struct mii_phydesc e1000phy
 	MII_PHY_DESC(MARVELL, E1000_3),
 	MII_PHY_DESC(MARVELL, E1000S),
 	MII_PHY_DESC(MARVELL, E1000_5),
-	MII_PHY_DESC(MARVELL, E1000_6),
+	MII_PHY_DESC(MARVELL, E1101),
 	MII_PHY_DESC(MARVELL, E3082),
 	MII_PHY_DESC(MARVELL, E1112),
 	MII_PHY_DESC(MARVELL, E1149),

Modified: head/sys/dev/mii/miidevs
==============================================================================
--- head/sys/dev/mii/miidevs	Sat Aug  7 22:50:43 2010	(r211045)
+++ head/sys/dev/mii/miidevs	Sat Aug  7 23:16:21 2010	(r211046)
@@ -238,7 +238,7 @@ model MARVELL E1011		0x0002 Marvell 88E1
 model MARVELL E1000_3		0x0003 Marvell 88E1000 Gigabit PHY
 model MARVELL E1000S		0x0004 Marvell 88E1000S Gigabit PHY
 model MARVELL E1000_5		0x0005 Marvell 88E1000 Gigabit PHY
-model MARVELL E1000_6		0x0006 Marvell 88E1000 Gigabit PHY
+model MARVELL E1101		0x0006 Marvell 88E1101 Gigabit PHY
 model MARVELL E3082		0x0008 Marvell 88E3082 10/100 Fast Ethernet PHY
 model MARVELL E1112		0x0009 Marvell 88E1112 Gigabit PHY
 model MARVELL E1149		0x000b Marvell 88E1149 Gigabit PHY

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 23:33:07 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2AAEF1065670;
	Sat,  7 Aug 2010 23:33:07 +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 189AE8FC15;
	Sat,  7 Aug 2010 23:33:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77NX6pw089961;
	Sat, 7 Aug 2010 23:33:06 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77NX6Rq089959;
	Sat, 7 Aug 2010 23:33:06 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201008072333.o77NX6Rq089959@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Sat, 7 Aug 2010 23:33:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211047 - head/sys/dev/alc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 23:33:07 -0000

Author: yongari
Date: Sat Aug  7 23:33:06 2010
New Revision: 211047
URL: http://svn.freebsd.org/changeset/base/211047

Log:
  Controller does not seem to support more than 1024 bytes DMA burst.
  Limit DMA burst size to be less than or equal to 1024 bytes.

Modified:
  head/sys/dev/alc/if_alc.c

Modified: head/sys/dev/alc/if_alc.c
==============================================================================
--- head/sys/dev/alc/if_alc.c	Sat Aug  7 23:16:21 2010	(r211046)
+++ head/sys/dev/alc/if_alc.c	Sat Aug  7 23:33:06 2010	(r211047)
@@ -610,6 +610,10 @@ alc_attach(device_t dev)
 			device_printf(dev, "TLP payload size : %u bytes.\n",
 			    alc_dma_burst[sc->alc_dma_wr_burst]);
 		}
+		if (alc_dma_burst[sc->alc_dma_rd_burst] > 1024)
+			sc->alc_dma_rd_burst = 3;
+		if (alc_dma_burst[sc->alc_dma_wr_burst] > 1024)
+			sc->alc_dma_wr_burst = 3;
 		/* Clear data link and flow-control protocol error. */
 		val = CSR_READ_4(sc, ALC_PEX_UNC_ERR_SEV);
 		val &= ~(PEX_UNC_ERR_SEV_DLP | PEX_UNC_ERR_SEV_FCP);

From owner-svn-src-all@FreeBSD.ORG  Sat Aug  7 23:41:46 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9547D106566C;
	Sat,  7 Aug 2010 23:41:46 +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 84A648FC13;
	Sat,  7 Aug 2010 23:41:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77Nfkai091886;
	Sat, 7 Aug 2010 23:41:46 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77NfkEQ091884;
	Sat, 7 Aug 2010 23:41:46 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201008072341.o77NfkEQ091884@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Sat, 7 Aug 2010 23:41:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211048 - head/sys/dev/alc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 07 Aug 2010 23:41:46 -0000

Author: yongari
Date: Sat Aug  7 23:41:46 2010
New Revision: 211048
URL: http://svn.freebsd.org/changeset/base/211048

Log:
  Do not touch CMB TX threshold register when CMB is not used.
  Note, alc(4) does not use CMB at all due to silicon bug.

Modified:
  head/sys/dev/alc/if_alc.c

Modified: head/sys/dev/alc/if_alc.c
==============================================================================
--- head/sys/dev/alc/if_alc.c	Sat Aug  7 23:33:06 2010	(r211047)
+++ head/sys/dev/alc/if_alc.c	Sat Aug  7 23:41:46 2010	(r211048)
@@ -2990,10 +2990,10 @@ alc_init_locked(struct alc_softc *sc)
 	 */
 	CSR_WRITE_4(sc, ALC_INTR_RETRIG_TIMER, ALC_USECS(0));
 	/* Configure CMB. */
-	CSR_WRITE_4(sc, ALC_CMB_TD_THRESH, 4);
-	if ((sc->alc_flags & ALC_FLAG_CMB_BUG) == 0)
+	if ((sc->alc_flags & ALC_FLAG_CMB_BUG) == 0) {
+		CSR_WRITE_4(sc, ALC_CMB_TD_THRESH, 4);
 		CSR_WRITE_4(sc, ALC_CMB_TX_TIMER, ALC_USECS(5000));
-	else
+	} else
 		CSR_WRITE_4(sc, ALC_CMB_TX_TIMER, ALC_USECS(0));
 	/*
 	 * Hardware can be configured to issue SMB interrupt based