From owner-svn-src-head@FreeBSD.ORG Sun Aug 1 03:09:17 2010 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Aug 1 08:06:59 2010 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Aug 1 09:03:11 2010 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG  Sun Aug  1 09:10:09 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 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-head@FreeBSD.ORG  Sun Aug  1 09:37:37 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 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-head@FreeBSD.ORG  Sun Aug  1 12:10:32 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 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-head@FreeBSD.ORG  Sun Aug  1 12:35:01 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 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-head@FreeBSD.ORG  Sun Aug  1 15:41:01 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 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-head@FreeBSD.ORG  Sun Aug  1 16:37:52 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 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-head@FreeBSD.ORG  Sun Aug  1 21:54:25 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 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-head@FreeBSD.ORG  Sun Aug  1 22:39:08 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sun, 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-head@FreeBSD.ORG  Mon Aug  2 10:26:15 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 10:30:50 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 10:57:56 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 10:59:24 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 11:02:00 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 12:15:22 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 13:05:13 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 13:11:27 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 13:11:36 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 13:11:42 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 13:40:19 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 13:40:53 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 15:15:24 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 15:33:16 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 16:01:46 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 16:18:41 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 17:01:24 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 17:20:59 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 17:31:49 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 17:35:01 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 17:40:25 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 18:06:49 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 18:12:30 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 21:33:39 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Mon Aug  2 22:26:08 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 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-head@FreeBSD.ORG  Tue Aug  3 01:49:28 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 09:10:49 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 09:21:13 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 09:23:53 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 11:21:18 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 11:23:45 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 13:46:26 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 15:32:09 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 15:40:42 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 16:02:58 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 16:09:00 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 16:21:48 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 16:30:57 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 17:37:09 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5E6DB1065676
	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 A6D408FC1B
	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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 17:40:10 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 18:29:58 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 19:08:02 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 19:09:43 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 808991065674
	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 0FD828FC0C
	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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 19:25:58 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 20:56:24 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Tue Aug  3 22:17:30 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 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-head@FreeBSD.ORG  Wed Aug  4 00:25:13 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 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-head@FreeBSD.ORG  Wed Aug  4 01:19:11 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 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-head@FreeBSD.ORG  Wed Aug  4 01:55:54 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 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-head@FreeBSD.ORG  Wed Aug  4 05:09:02 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 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-head@FreeBSD.ORG  Wed Aug  4 07:47:19 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 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-head@FreeBSD.ORG  Wed Aug  4 07:49:41 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 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-head@FreeBSD.ORG  Wed Aug  4 10:42:06 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 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-head@FreeBSD.ORG  Wed Aug  4 10:46:18 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 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-head@FreeBSD.ORG  Wed Aug  4 14:03:24 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 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-head@FreeBSD.ORG  Wed Aug  4 14:12:10 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 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-head@FreeBSD.ORG  Wed Aug  4 14:35:05 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 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-head@FreeBSD.ORG  Wed Aug  4 14:38:20 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 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-head@FreeBSD.ORG  Wed Aug  4 21:02:04 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 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-head@FreeBSD.ORG  Thu Aug  5 01:39:25 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 04:59:54 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 15:07:28 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 15:11:03 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 15:53:34 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 16:10:12 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 16:28:17 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 16:52:14 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 17:48:38 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 17:56:41 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 17:57:59 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 18:05:37 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 18:21:45 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 18:23:43 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 18:26:03 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 18:26:38 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 18:27:41 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 18:48:30 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 18:49:06 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 18:56:25 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 18:58:01 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 19:01:57 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 19:04:29 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 19:08:55 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 19:12:36 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 19:16:31 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 19:30:57 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 19:54:58 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Thu Aug  5 21:31:30 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 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-head@FreeBSD.ORG  Fri Aug  6 00:50:16 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 00:52:23 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 05:20:21 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 05:24:41 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 05:30:56 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 06:04:27 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 07:03:23 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 07:32:34 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 09:06:56 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 09:23:48 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 09:25:42 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 09:42:15 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 09:44:01 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 09:46:53 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 09:47:48 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 10:34:49 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 11:20:49 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 531D11065678
	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 EFE9F8FC25
	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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 12:38:30 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 12:39:55 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 13:45:16 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 14:21:49 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 14:24:00 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 14:33:43 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 15:04:02 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 15:04:40 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 15:09:21 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 15:15:27 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 15:24:37 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 15:37:00 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 15:57:40 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 15:59:00 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 16:50:49 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 17:21:32 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 17:27:00 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 18:44:07 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 18:46:28 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 18:49:54 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 18:59:34 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 19:16:21 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 19:16:49 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 19:18:19 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 19:19:14 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 19:20:36 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 19:22:43 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 19:35:40 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 20:13:36 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 20:18:17 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 20:46:26 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 20:48:10 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 20:51:39 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 20:55:49 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 21:02:54 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 21:06:05 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 21:53:50 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 21:56:32 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 21:57:12 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 21:58:53 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 22:04:19 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 22:06:12 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 22:13:14 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 23:11:19 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 23:35:33 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Fri Aug  6 23:58:54 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 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-head@FreeBSD.ORG  Sat Aug  7 01:49:45 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 03:45:46 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 04:05:59 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 05:46:04 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 08:08:14 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 08:31:33 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 10:23:54 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 11:13:50 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 11:32:17 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 11:48:32 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 11:53:39 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 11:57:13 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 13:26:08 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 13:36:34 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 16:08:38 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 16:14:40 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 16:20:13 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 17:02:36 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 17:10:07 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 17:57:59 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 18:30:11 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 20:13:00 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 20:46:30 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 23:16:21 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 23:33:07 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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-head@FreeBSD.ORG  Sat Aug  7 23:41:46 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 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