From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 00:43:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8B2A683; Sun, 16 Nov 2014 00:43:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4336D14; Sun, 16 Nov 2014 00:43:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG0hhiq033573; Sun, 16 Nov 2014 00:43:43 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG0hgQc033566; Sun, 16 Nov 2014 00:43:42 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201411160043.sAG0hgQc033566@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Sun, 16 Nov 2014 00:43:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r274557 - vendor/tzdata/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 00:43:43 -0000 Author: edwin Date: Sun Nov 16 00:43:41 2014 New Revision: 274557 URL: https://svnweb.freebsd.org/changeset/base/274557 Log: Vendor import of tzdata2014j: Release 2014j - 2014-11-10 17:37:11 -0800 Changes affecting current and future time stamps Turks & Caicos' switch from US eastern time to UTC-4 year-round did not occur on 2014-11-02 at 02:00. It's currently scheduled for 2015-11-01 at 02:00. (Thanks to Chris Walton.) Changes affecting past time stamps Many pre-1989 time stamps have been corrected for Asia/Seoul and Asia/Pyongyang, based on sources for the Korean-language Wikipedia entry for time in Korea. (Thanks to Sanghyuk Jung.) Also, no longer guess that Pyongyang mimicked Seoul time after World War II, as this is politically implausible. Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Africa/Addis_Ababa, Africa/Asmara, Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala, Africa/Mogadishu, Indian/Antananarivo, Indian/Comoro, and Indian/Mayotte. Changes affecting commentary The commentary is less enthusiastic about Shanks as a source, and is more careful to distinguish UT from UTC. Obtained from: ftp://ftp.iana.org/tz/releases/ Modified: vendor/tzdata/dist/africa vendor/tzdata/dist/asia vendor/tzdata/dist/australasia vendor/tzdata/dist/europe vendor/tzdata/dist/northamerica vendor/tzdata/dist/southamerica Modified: vendor/tzdata/dist/africa ============================================================================== --- vendor/tzdata/dist/africa Sat Nov 15 23:40:44 2014 (r274556) +++ vendor/tzdata/dist/africa Sun Nov 16 00:43:41 2014 (r274557) @@ -6,20 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-02-21): +# From Paul Eggert (2014-10-31): # -# A good source for time zone historical data outside the U.S. is +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which @@ -65,7 +64,6 @@ # 3:00 CAST Central Africa Summer Time (no longer used) # 3:00 SAST South Africa Summer Time (no longer used) # 3:00 EAT East Africa Time -# 4:00 EAST East Africa Summer Time (no longer used) # Algeria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -146,9 +144,7 @@ Zone Africa/Ndjamena 1:00:12 - LMT 1912 1:00 - WAT # Comoros -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Comoro 2:53:04 - LMT 1911 Jul # Moroni, Gran Comoro - 3:00 - EAT +# See Africa/Nairobi. # Democratic Republic of the Congo # See Africa/Lagos for the western part and Africa/Maputo for the eastern. @@ -172,9 +168,7 @@ Link Africa/Abidjan Africa/Sao_Tome # Sà Link Africa/Abidjan Atlantic/St_Helena # St Helena # Djibouti -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Djibouti 2:52:36 - LMT 1911 Jul - 3:00 - EAT +# See Africa/Nairobi. ############################################################################### @@ -387,27 +381,8 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct # See Africa/Lagos. # Eritrea -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Asmara 2:35:32 - LMT 1870 - 2:35:32 - AMT 1890 # Asmara Mean Time - 2:35:20 - ADMT 1936 May 5 # Adis Dera MT - 3:00 - EAT - # Ethiopia -# From Paul Eggert (2014-07-31): -# Like the Swahili of Kenya and Tanzania, many Ethiopians keep a -# 12-hour clock starting at our 06:00, so their "8 o'clock" is our -# 02:00 or 14:00. Keep this in mind when you ask the time in Amharic. -# -# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time -# zones between 1870 and 1890, that they merged to 38E50 (2:35:20) in -# 1890, and that they switched to 3:00 on 1936-05-05. Perhaps 38E50 -# was for Adis Dera. Quite likely the Shanks data entries are wrong -# anyway. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Addis_Ababa 2:34:48 - LMT 1870 - 2:35:20 - ADMT 1936 May 5 # Adis Dera MT - 3:00 - EAT +# See Africa/Nairobi. # Gabon # See Africa/Lagos. @@ -451,6 +426,15 @@ Zone Africa/Nairobi 2:27:16 - LMT 1928 J 2:30 - BEAT 1940 2:45 - BEAUT 1960 3:00 - EAT +Link Africa/Nairobi Africa/Addis_Ababa # Ethiopia +Link Africa/Nairobi Africa/Asmara # Eritrea +Link Africa/Nairobi Africa/Dar_es_Salaam # Tanzania +Link Africa/Nairobi Africa/Djibouti +Link Africa/Nairobi Africa/Kampala # Uganda +Link Africa/Nairobi Africa/Mogadishu # Somalia +Link Africa/Nairobi Indian/Antananarivo # Madagascar +Link Africa/Nairobi Indian/Comoro +Link Africa/Nairobi Indian/Mayotte # Lesotho # See Africa/Johannesburg. @@ -528,11 +512,7 @@ Zone Africa/Tripoli 0:52:44 - LMT 1920 2:00 - EET # Madagascar -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Antananarivo 3:10:04 - LMT 1911 Jul - 3:00 - EAT 1954 Feb 27 23:00s - 3:00 1:00 EAST 1954 May 29 23:00s - 3:00 - EAT +# See Africa/Nairobi. # Malawi # See Africa/Maputo. @@ -635,9 +615,7 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # no information; probably like Indian/Mauritius # Mayotte -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Mayotte 3:00:56 - LMT 1911 Jul # Mamoutzou - 3:00 - EAT +# See Africa/Nairobi. # Morocco # See the 'europe' file for Spanish Morocco (Africa/Ceuta). @@ -1049,11 +1027,7 @@ Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # See Africa/Abidjan. # Somalia -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Mogadishu 3:01:28 - LMT 1893 Nov - 3:00 - EAT 1931 - 2:30 - BEAT 1957 - 3:00 - EAT +# See Africa/Nairobi. # South Africa # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -1096,11 +1070,7 @@ Link Africa/Khartoum Africa/Juba # See Africa/Johannesburg. # Tanzania -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Dar_es_Salaam 2:37:08 - LMT 1931 - 3:00 - EAT 1948 - 2:45 - BEAUT 1961 - 3:00 - EAT +# See Africa/Nairobi. # Togo # See Africa/Abidjan. @@ -1206,12 +1176,7 @@ Zone Africa/Tunis 0:40:44 - LMT 1881 May 1:00 Tunisia CE%sT # Uganda -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Kampala 2:09:40 - LMT 1928 Jul - 3:00 - EAT 1930 - 2:30 - BEAT 1948 - 2:45 - BEAUT 1957 - 3:00 - EAT +# See Africa/Nairobi. # Zambia # Zimbabwe Modified: vendor/tzdata/dist/asia ============================================================================== --- vendor/tzdata/dist/asia Sat Nov 15 23:40:44 2014 (r274556) +++ vendor/tzdata/dist/asia Sun Nov 16 00:43:41 2014 (r274557) @@ -6,20 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-08-11): +# From Paul Eggert (2014-10-31): # -# A good source for time zone historical data outside the U.S. is +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which @@ -1663,44 +1662,70 @@ Zone Asia/Bishkek 4:58:24 - LMT 1924 May # Korea (North and South) # From Annie I. Bang (2006-07-10): -# http://www.koreaherald.co.kr/SITE/data/html_dir/2006/07/10/200607100012.asp -# The Ministry of Commerce, Industry and Energy has already -# commissioned a research project [to reintroduce DST] and has said -# the system may begin as early as 2008.... Korea ran a daylight -# saving program from 1949-61 but stopped it during the 1950-53 Korean War. - -# From Shanks & Pottenger: -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule ROK 1960 only - May 15 0:00 1:00 D -Rule ROK 1960 only - Sep 13 0:00 0 S -Rule ROK 1987 1988 - May Sun>=8 0:00 1:00 D -Rule ROK 1987 1988 - Oct Sun>=8 0:00 0 S - -# From Paul Eggert (2014-07-01): -# The following entries are from Shanks & Pottenger, except that I -# guessed that time zone abbreviations through 1945 followed the same +# http://www.koreaherald.com/view.php?ud=200607100012 +# Korea ran a daylight saving program from 1949-61 but stopped it +# during the 1950-53 Korean War. The system was temporarily enforced +# between 1987 and 1988 ... + +# From Sanghyuk Jung (2014-10-29): +# http://mm.icann.org/pipermail/tz/2014-October/021830.html +# According to the Korean Wikipedia +# http://ko.wikipedia.org/wiki/한국_표준시 +# [oldid=12896437 2014-09-04 08:03 UTC] +# DST in Republic of Korea was as follows.... And I checked old +# newspapers in Korean, all articles correspond with data in Wikipedia. +# For example, the article in 1948 (Korean Language) proved that DST +# started at June 1 in that year. For another example, the article in +# 1988 said that DST started at 2:00 AM in that year. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule ROK 1948 only - Jun 1 0:00 1:00 D +Rule ROK 1948 only - Sep 13 0:00 0 S +Rule ROK 1949 only - Apr 3 0:00 1:00 D +Rule ROK 1949 1951 - Sep Sun>=8 0:00 0 S +Rule ROK 1950 only - Apr 1 0:00 1:00 D +Rule ROK 1951 only - May 6 0:00 1:00 D +Rule ROK 1955 only - May 5 0:00 1:00 D +Rule ROK 1955 only - Sep 9 0:00 0 S +Rule ROK 1956 only - May 20 0:00 1:00 D +Rule ROK 1956 only - Sep 30 0:00 0 S +Rule ROK 1957 1960 - May Sun>=1 0:00 1:00 D +Rule ROK 1957 1960 - Sep Sun>=18 0:00 0 S +Rule ROK 1987 1988 - May Sun>=8 2:00 1:00 D +Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S + +# From Paul Eggert (2014-10-30): +# The Korean Wikipedia entry gives the following sources for UT offsets: +# +# 1908: Official Journal Article No. 3994 (Edict No. 5) +# 1912: Governor-General of Korea Official Gazette Issue No. 367 +# (Announcement No. 338) +# 1954: Presidential Decree No. 876 (1954-03-17) +# 1961: Law No. 676 (1961-08-07) +# 1987: Law No. 3919 (1986-12-31) +# +# The Wikipedia entry also has confusing information about a change +# to UT+9 in April 1910, but then what would be the point of the later change +# to UT+9 on 1912-01-01? Omit the 1910 change for now. +# +# I guessed that time zone abbreviations through 1945 followed the same # rules as discussed under Taiwan, with nominal switches from JST to KST # when the respective cities were taken over by the Allies after WWII. +# +# For Pyongyang we have no information; guess no changes since World War II. # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Seoul 8:27:52 - LMT 1890 - 8:30 - KST 1904 Dec - 9:00 - JCST 1928 - 8:30 - KST 1932 +Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1 + 8:30 - KST 1912 Jan 1 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Sep 8 9:00 - KST 1954 Mar 21 - 8:00 ROK K%sT 1961 Aug 10 - 8:30 - KST 1968 Oct + 8:30 ROK K%sT 1961 Aug 10 9:00 ROK K%sT -Zone Asia/Pyongyang 8:23:00 - LMT 1890 - 8:30 - KST 1904 Dec - 9:00 - JCST 1928 - 8:30 - KST 1932 +Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1 + 8:30 - KST 1912 Jan 1 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Aug 24 - 9:00 - KST 1954 Mar 21 - 8:00 - KST 1961 Aug 10 9:00 - KST ############################################################################### Modified: vendor/tzdata/dist/australasia ============================================================================== --- vendor/tzdata/dist/australasia Sat Nov 15 23:40:44 2014 (r274556) +++ vendor/tzdata/dist/australasia Sun Nov 16 00:43:41 2014 (r274557) @@ -797,19 +797,19 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-02-21): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which Modified: vendor/tzdata/dist/europe ============================================================================== --- vendor/tzdata/dist/europe Sat Nov 15 23:40:44 2014 (r274556) +++ vendor/tzdata/dist/europe Sun Nov 16 00:43:41 2014 (r274557) @@ -6,16 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-05-31): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). @@ -287,6 +290,14 @@ # "Timeball on the ballast office is down. Dunsink time." # -- James Joyce, Ulysses +# "Countess Markievicz ... claimed that the [1916] abolition of Dublin Mean Time +# was among various actions undertaken by the 'English' government that +# would 'put the whole country into the SF (Sinn Féin) camp'. She claimed +# Irish 'public feeling (was) outraged by forcing of English time on us'." +# -- Parsons M. Dublin lost its time zone - and 25 minutes - after 1916 Rising. +# Irish Times 2014-10-27. +# http://www.irishtimes.com/news/politics/dublin-lost-its-time-zone-and-25-minutes-after-1916-rising-1.1977411 + # From Joseph S. Myers (2005-01-26): # Irish laws are available online at . # These include various relating to legal time, for example: @@ -594,6 +605,7 @@ Rule Russia 1992 only - Sep lastSat 23: Rule Russia 1993 2010 - Mar lastSun 2:00s 1:00 S Rule Russia 1993 1995 - Sep lastSun 2:00s 0 - Rule Russia 1996 2010 - Oct lastSun 2:00s 0 - +# As described below, Russia's 2014 change affects Zone data, not Rule data. # From Alexander Krivenyshev (2011-06-14): # According to Kremlin press service, Russian President Dmitry Medvedev Modified: vendor/tzdata/dist/northamerica ============================================================================== --- vendor/tzdata/dist/northamerica Sat Nov 15 23:40:44 2014 (r274556) +++ vendor/tzdata/dist/northamerica Sun Nov 16 00:43:41 2014 (r274557) @@ -991,19 +991,19 @@ Zone America/Menominee -5:50:27 - LMT 18 ################################################################################ -# From Paul Eggert (2006-03-22): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Other sources occasionally used include: # @@ -3131,13 +3131,17 @@ Zone America/Miquelon -3:44:40 - LMT 191 # From Paul Eggert (2014-08-19): # The 2014-08-13 Cabinet meeting decided to stay on UTC-4 year-round. See: # http://tcweeklynews.com/daylight-savings-time-to-be-maintained-p5353-127.htm -# Model this as a switch from EST/EDT to AST on 2014-11-02 at 02:00. +# Model this as a switch from EST/EDT to AST ... +# From Chris Walton (2014-11-04): +# ... the TCI government appears to have delayed the switch to +# "permanent daylight saving time" by one year.... +# http://tcweeklynews.com/time-change-to-go-ahead-this-november-p5437-127.htm # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Grand_Turk -4:44:32 - LMT 1890 -5:07:11 - KMT 1912 Feb # Kingston Mean Time -5:00 - EST 1979 - -5:00 US E%sT 2014 Nov 2 2:00 + -5:00 US E%sT 2015 Nov Sun>=1 2:00 -4:00 - AST # British Virgin Is Modified: vendor/tzdata/dist/southamerica ============================================================================== --- vendor/tzdata/dist/southamerica Sat Nov 15 23:40:44 2014 (r274556) +++ vendor/tzdata/dist/southamerica Sun Nov 16 00:43:41 2014 (r274557) @@ -6,23 +6,23 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2006-03-22): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). -# -# For data circa 1899, a common source is: -# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. -# http://www.jstor.org/stable/1774359 +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# For data circa 1899, a common source is: +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. +# http://www.jstor.org/stable/1774359 # # Earlier editions of these tables used the North American style (e.g. ARST and # ARDT for Argentine Standard and Daylight Time), but the following quote From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 00:50:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C787806; Sun, 16 Nov 2014 00:50:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FDD6D38; Sun, 16 Nov 2014 00:50:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG0o32M034452; Sun, 16 Nov 2014 00:50:03 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG0o3pe034451; Sun, 16 Nov 2014 00:50:03 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201411160050.sAG0o3pe034451@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Sun, 16 Nov 2014 00:50:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r274558 - vendor/tzdata/tzdata2014j X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 00:50:03 -0000 Author: edwin Date: Sun Nov 16 00:50:02 2014 New Revision: 274558 URL: https://svnweb.freebsd.org/changeset/base/274558 Log: Tag of tzdata 2014j Added: vendor/tzdata/tzdata2014j/ - copied from r274557, vendor/tzdata/dist/ From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 01:00:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2B0BB1F; Sun, 16 Nov 2014 01:00:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DCEAE86; Sun, 16 Nov 2014 01:00:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG10fZL041559; Sun, 16 Nov 2014 01:00:41 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG10eSo041551; Sun, 16 Nov 2014 01:00:40 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201411160100.sAG10eSo041551@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Sun, 16 Nov 2014 01:00:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274559 - head/contrib/tzdata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 01:00:41 -0000 Author: edwin Date: Sun Nov 16 01:00:39 2014 New Revision: 274559 URL: https://svnweb.freebsd.org/changeset/base/274559 Log: MFV of 274557,tzdata{2014j} Release 2014j - 2014-11-10 17:37:11 -0800 Changes affecting current and future time stamps Turks & Caicos' switch from US eastern time to UTC-4 year-round did not occur on 2014-11-02 at 02:00. It's currently scheduled for 2015-11-01 at 02:00. (Thanks to Chris Walton.) Changes affecting past time stamps Many pre-1989 time stamps have been corrected for Asia/Seoul and Asia/Pyongyang, based on sources for the Korean-language Wikipedia entry for time in Korea. (Thanks to Sanghyuk Jung.) Also, no longer guess that Pyongyang mimicked Seoul time after World War II, as this is politically implausible. Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Africa/Addis_Ababa, Africa/Asmara, Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala, Africa/Mogadishu, Indian/Antananarivo, Indian/Comoro, and Indian/Mayotte. Changes affecting commentary The commentary is less enthusiastic about Shanks as a source, and is more careful to distinguish UT from UTC. Modified: head/contrib/tzdata/africa head/contrib/tzdata/asia head/contrib/tzdata/australasia head/contrib/tzdata/europe head/contrib/tzdata/northamerica head/contrib/tzdata/southamerica Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/africa ============================================================================== --- head/contrib/tzdata/africa Sun Nov 16 00:50:02 2014 (r274558) +++ head/contrib/tzdata/africa Sun Nov 16 01:00:39 2014 (r274559) @@ -6,20 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-02-21): +# From Paul Eggert (2014-10-31): # -# A good source for time zone historical data outside the U.S. is +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which @@ -65,7 +64,6 @@ # 3:00 CAST Central Africa Summer Time (no longer used) # 3:00 SAST South Africa Summer Time (no longer used) # 3:00 EAT East Africa Time -# 4:00 EAST East Africa Summer Time (no longer used) # Algeria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -146,9 +144,7 @@ Zone Africa/Ndjamena 1:00:12 - LMT 1912 1:00 - WAT # Comoros -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Comoro 2:53:04 - LMT 1911 Jul # Moroni, Gran Comoro - 3:00 - EAT +# See Africa/Nairobi. # Democratic Republic of the Congo # See Africa/Lagos for the western part and Africa/Maputo for the eastern. @@ -172,9 +168,7 @@ Link Africa/Abidjan Africa/Sao_Tome # Sà Link Africa/Abidjan Atlantic/St_Helena # St Helena # Djibouti -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Djibouti 2:52:36 - LMT 1911 Jul - 3:00 - EAT +# See Africa/Nairobi. ############################################################################### @@ -387,27 +381,8 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct # See Africa/Lagos. # Eritrea -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Asmara 2:35:32 - LMT 1870 - 2:35:32 - AMT 1890 # Asmara Mean Time - 2:35:20 - ADMT 1936 May 5 # Adis Dera MT - 3:00 - EAT - # Ethiopia -# From Paul Eggert (2014-07-31): -# Like the Swahili of Kenya and Tanzania, many Ethiopians keep a -# 12-hour clock starting at our 06:00, so their "8 o'clock" is our -# 02:00 or 14:00. Keep this in mind when you ask the time in Amharic. -# -# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time -# zones between 1870 and 1890, that they merged to 38E50 (2:35:20) in -# 1890, and that they switched to 3:00 on 1936-05-05. Perhaps 38E50 -# was for Adis Dera. Quite likely the Shanks data entries are wrong -# anyway. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Addis_Ababa 2:34:48 - LMT 1870 - 2:35:20 - ADMT 1936 May 5 # Adis Dera MT - 3:00 - EAT +# See Africa/Nairobi. # Gabon # See Africa/Lagos. @@ -451,6 +426,15 @@ Zone Africa/Nairobi 2:27:16 - LMT 1928 J 2:30 - BEAT 1940 2:45 - BEAUT 1960 3:00 - EAT +Link Africa/Nairobi Africa/Addis_Ababa # Ethiopia +Link Africa/Nairobi Africa/Asmara # Eritrea +Link Africa/Nairobi Africa/Dar_es_Salaam # Tanzania +Link Africa/Nairobi Africa/Djibouti +Link Africa/Nairobi Africa/Kampala # Uganda +Link Africa/Nairobi Africa/Mogadishu # Somalia +Link Africa/Nairobi Indian/Antananarivo # Madagascar +Link Africa/Nairobi Indian/Comoro +Link Africa/Nairobi Indian/Mayotte # Lesotho # See Africa/Johannesburg. @@ -528,11 +512,7 @@ Zone Africa/Tripoli 0:52:44 - LMT 1920 2:00 - EET # Madagascar -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Antananarivo 3:10:04 - LMT 1911 Jul - 3:00 - EAT 1954 Feb 27 23:00s - 3:00 1:00 EAST 1954 May 29 23:00s - 3:00 - EAT +# See Africa/Nairobi. # Malawi # See Africa/Maputo. @@ -635,9 +615,7 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # no information; probably like Indian/Mauritius # Mayotte -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Mayotte 3:00:56 - LMT 1911 Jul # Mamoutzou - 3:00 - EAT +# See Africa/Nairobi. # Morocco # See the 'europe' file for Spanish Morocco (Africa/Ceuta). @@ -1049,11 +1027,7 @@ Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # See Africa/Abidjan. # Somalia -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Mogadishu 3:01:28 - LMT 1893 Nov - 3:00 - EAT 1931 - 2:30 - BEAT 1957 - 3:00 - EAT +# See Africa/Nairobi. # South Africa # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -1096,11 +1070,7 @@ Link Africa/Khartoum Africa/Juba # See Africa/Johannesburg. # Tanzania -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Dar_es_Salaam 2:37:08 - LMT 1931 - 3:00 - EAT 1948 - 2:45 - BEAUT 1961 - 3:00 - EAT +# See Africa/Nairobi. # Togo # See Africa/Abidjan. @@ -1206,12 +1176,7 @@ Zone Africa/Tunis 0:40:44 - LMT 1881 May 1:00 Tunisia CE%sT # Uganda -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Kampala 2:09:40 - LMT 1928 Jul - 3:00 - EAT 1930 - 2:30 - BEAT 1948 - 2:45 - BEAUT 1957 - 3:00 - EAT +# See Africa/Nairobi. # Zambia # Zimbabwe Modified: head/contrib/tzdata/asia ============================================================================== --- head/contrib/tzdata/asia Sun Nov 16 00:50:02 2014 (r274558) +++ head/contrib/tzdata/asia Sun Nov 16 01:00:39 2014 (r274559) @@ -6,20 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-08-11): +# From Paul Eggert (2014-10-31): # -# A good source for time zone historical data outside the U.S. is +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which @@ -1663,44 +1662,70 @@ Zone Asia/Bishkek 4:58:24 - LMT 1924 May # Korea (North and South) # From Annie I. Bang (2006-07-10): -# http://www.koreaherald.co.kr/SITE/data/html_dir/2006/07/10/200607100012.asp -# The Ministry of Commerce, Industry and Energy has already -# commissioned a research project [to reintroduce DST] and has said -# the system may begin as early as 2008.... Korea ran a daylight -# saving program from 1949-61 but stopped it during the 1950-53 Korean War. - -# From Shanks & Pottenger: -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule ROK 1960 only - May 15 0:00 1:00 D -Rule ROK 1960 only - Sep 13 0:00 0 S -Rule ROK 1987 1988 - May Sun>=8 0:00 1:00 D -Rule ROK 1987 1988 - Oct Sun>=8 0:00 0 S - -# From Paul Eggert (2014-07-01): -# The following entries are from Shanks & Pottenger, except that I -# guessed that time zone abbreviations through 1945 followed the same +# http://www.koreaherald.com/view.php?ud=200607100012 +# Korea ran a daylight saving program from 1949-61 but stopped it +# during the 1950-53 Korean War. The system was temporarily enforced +# between 1987 and 1988 ... + +# From Sanghyuk Jung (2014-10-29): +# http://mm.icann.org/pipermail/tz/2014-October/021830.html +# According to the Korean Wikipedia +# http://ko.wikipedia.org/wiki/한국_표준시 +# [oldid=12896437 2014-09-04 08:03 UTC] +# DST in Republic of Korea was as follows.... And I checked old +# newspapers in Korean, all articles correspond with data in Wikipedia. +# For example, the article in 1948 (Korean Language) proved that DST +# started at June 1 in that year. For another example, the article in +# 1988 said that DST started at 2:00 AM in that year. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule ROK 1948 only - Jun 1 0:00 1:00 D +Rule ROK 1948 only - Sep 13 0:00 0 S +Rule ROK 1949 only - Apr 3 0:00 1:00 D +Rule ROK 1949 1951 - Sep Sun>=8 0:00 0 S +Rule ROK 1950 only - Apr 1 0:00 1:00 D +Rule ROK 1951 only - May 6 0:00 1:00 D +Rule ROK 1955 only - May 5 0:00 1:00 D +Rule ROK 1955 only - Sep 9 0:00 0 S +Rule ROK 1956 only - May 20 0:00 1:00 D +Rule ROK 1956 only - Sep 30 0:00 0 S +Rule ROK 1957 1960 - May Sun>=1 0:00 1:00 D +Rule ROK 1957 1960 - Sep Sun>=18 0:00 0 S +Rule ROK 1987 1988 - May Sun>=8 2:00 1:00 D +Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S + +# From Paul Eggert (2014-10-30): +# The Korean Wikipedia entry gives the following sources for UT offsets: +# +# 1908: Official Journal Article No. 3994 (Edict No. 5) +# 1912: Governor-General of Korea Official Gazette Issue No. 367 +# (Announcement No. 338) +# 1954: Presidential Decree No. 876 (1954-03-17) +# 1961: Law No. 676 (1961-08-07) +# 1987: Law No. 3919 (1986-12-31) +# +# The Wikipedia entry also has confusing information about a change +# to UT+9 in April 1910, but then what would be the point of the later change +# to UT+9 on 1912-01-01? Omit the 1910 change for now. +# +# I guessed that time zone abbreviations through 1945 followed the same # rules as discussed under Taiwan, with nominal switches from JST to KST # when the respective cities were taken over by the Allies after WWII. +# +# For Pyongyang we have no information; guess no changes since World War II. # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Seoul 8:27:52 - LMT 1890 - 8:30 - KST 1904 Dec - 9:00 - JCST 1928 - 8:30 - KST 1932 +Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1 + 8:30 - KST 1912 Jan 1 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Sep 8 9:00 - KST 1954 Mar 21 - 8:00 ROK K%sT 1961 Aug 10 - 8:30 - KST 1968 Oct + 8:30 ROK K%sT 1961 Aug 10 9:00 ROK K%sT -Zone Asia/Pyongyang 8:23:00 - LMT 1890 - 8:30 - KST 1904 Dec - 9:00 - JCST 1928 - 8:30 - KST 1932 +Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1 + 8:30 - KST 1912 Jan 1 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Aug 24 - 9:00 - KST 1954 Mar 21 - 8:00 - KST 1961 Aug 10 9:00 - KST ############################################################################### Modified: head/contrib/tzdata/australasia ============================================================================== --- head/contrib/tzdata/australasia Sun Nov 16 00:50:02 2014 (r274558) +++ head/contrib/tzdata/australasia Sun Nov 16 01:00:39 2014 (r274559) @@ -797,19 +797,19 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-02-21): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which Modified: head/contrib/tzdata/europe ============================================================================== --- head/contrib/tzdata/europe Sun Nov 16 00:50:02 2014 (r274558) +++ head/contrib/tzdata/europe Sun Nov 16 01:00:39 2014 (r274559) @@ -6,16 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-05-31): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). @@ -287,6 +290,14 @@ # "Timeball on the ballast office is down. Dunsink time." # -- James Joyce, Ulysses +# "Countess Markievicz ... claimed that the [1916] abolition of Dublin Mean Time +# was among various actions undertaken by the 'English' government that +# would 'put the whole country into the SF (Sinn Féin) camp'. She claimed +# Irish 'public feeling (was) outraged by forcing of English time on us'." +# -- Parsons M. Dublin lost its time zone - and 25 minutes - after 1916 Rising. +# Irish Times 2014-10-27. +# http://www.irishtimes.com/news/politics/dublin-lost-its-time-zone-and-25-minutes-after-1916-rising-1.1977411 + # From Joseph S. Myers (2005-01-26): # Irish laws are available online at . # These include various relating to legal time, for example: @@ -594,6 +605,7 @@ Rule Russia 1992 only - Sep lastSat 23: Rule Russia 1993 2010 - Mar lastSun 2:00s 1:00 S Rule Russia 1993 1995 - Sep lastSun 2:00s 0 - Rule Russia 1996 2010 - Oct lastSun 2:00s 0 - +# As described below, Russia's 2014 change affects Zone data, not Rule data. # From Alexander Krivenyshev (2011-06-14): # According to Kremlin press service, Russian President Dmitry Medvedev Modified: head/contrib/tzdata/northamerica ============================================================================== --- head/contrib/tzdata/northamerica Sun Nov 16 00:50:02 2014 (r274558) +++ head/contrib/tzdata/northamerica Sun Nov 16 01:00:39 2014 (r274559) @@ -991,19 +991,19 @@ Zone America/Menominee -5:50:27 - LMT 18 ################################################################################ -# From Paul Eggert (2006-03-22): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Other sources occasionally used include: # @@ -3131,13 +3131,17 @@ Zone America/Miquelon -3:44:40 - LMT 191 # From Paul Eggert (2014-08-19): # The 2014-08-13 Cabinet meeting decided to stay on UTC-4 year-round. See: # http://tcweeklynews.com/daylight-savings-time-to-be-maintained-p5353-127.htm -# Model this as a switch from EST/EDT to AST on 2014-11-02 at 02:00. +# Model this as a switch from EST/EDT to AST ... +# From Chris Walton (2014-11-04): +# ... the TCI government appears to have delayed the switch to +# "permanent daylight saving time" by one year.... +# http://tcweeklynews.com/time-change-to-go-ahead-this-november-p5437-127.htm # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Grand_Turk -4:44:32 - LMT 1890 -5:07:11 - KMT 1912 Feb # Kingston Mean Time -5:00 - EST 1979 - -5:00 US E%sT 2014 Nov 2 2:00 + -5:00 US E%sT 2015 Nov Sun>=1 2:00 -4:00 - AST # British Virgin Is Modified: head/contrib/tzdata/southamerica ============================================================================== --- head/contrib/tzdata/southamerica Sun Nov 16 00:50:02 2014 (r274558) +++ head/contrib/tzdata/southamerica Sun Nov 16 01:00:39 2014 (r274559) @@ -6,23 +6,23 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2006-03-22): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). -# -# For data circa 1899, a common source is: -# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. -# http://www.jstor.org/stable/1774359 +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# For data circa 1899, a common source is: +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. +# http://www.jstor.org/stable/1774359 # # Earlier editions of these tables used the North American style (e.g. ARST and # ARDT for Argentine Standard and Daylight Time), but the following quote From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 01:18:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DB0FE6E; Sun, 16 Nov 2014 01:18:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E822F95; Sun, 16 Nov 2014 01:18:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG1Igc4048215; Sun, 16 Nov 2014 01:18:42 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG1IfUh048213; Sun, 16 Nov 2014 01:18:41 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201411160118.sAG1IfUh048213@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Sun, 16 Nov 2014 01:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274560 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 01:18:42 -0000 Author: jmg Date: Sun Nov 16 01:18:41 2014 New Revision: 274560 URL: https://svnweb.freebsd.org/changeset/base/274560 Log: prevent doing filter ops locking for staticly compiled filter ops... This significantly reduces lock contention when adding/removing knotes on busy multi-kq system... Next step is to cache these references per kq.. i.e. kq refs it once and keeps a local ref count so that the same refs don't get accessed by many cpus... only allocate a knote when we might use it... Add a new flag, _FORCEONESHOT.. This allows a thread to force the delivery of another event in a safe manner, say waking up an idle http connection to force it to be reaped... If we are _DISABLE'ing a knote, don't bother to call f_event on it, it's disabled, so won't be delivered anyways.. Tested by: adrian Modified: head/sys/kern/kern_event.c head/sys/sys/event.h Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Sun Nov 16 01:00:39 2014 (r274559) +++ head/sys/kern/kern_event.c Sun Nov 16 01:18:41 2014 (r274560) @@ -281,19 +281,20 @@ MTX_SYSINIT(kqueue_filterops, &filterops MTX_DEF); static struct { struct filterops *for_fop; + int for_nolock; int for_refcnt; } sysfilt_ops[EVFILT_SYSCOUNT] = { - { &file_filtops }, /* EVFILT_READ */ - { &file_filtops }, /* EVFILT_WRITE */ + { &file_filtops, 1 }, /* EVFILT_READ */ + { &file_filtops, 1 }, /* EVFILT_WRITE */ { &null_filtops }, /* EVFILT_AIO */ - { &file_filtops }, /* EVFILT_VNODE */ - { &proc_filtops }, /* EVFILT_PROC */ - { &sig_filtops }, /* EVFILT_SIGNAL */ - { &timer_filtops }, /* EVFILT_TIMER */ - { &file_filtops }, /* EVFILT_PROCDESC */ - { &fs_filtops }, /* EVFILT_FS */ + { &file_filtops, 1 }, /* EVFILT_VNODE */ + { &proc_filtops, 1 }, /* EVFILT_PROC */ + { &sig_filtops, 1 }, /* EVFILT_SIGNAL */ + { &timer_filtops, 1 }, /* EVFILT_TIMER */ + { &file_filtops, 1 }, /* EVFILT_PROCDESC */ + { &fs_filtops, 1 }, /* EVFILT_FS */ { &null_filtops }, /* EVFILT_LIO */ - { &user_filtops }, /* EVFILT_USER */ + { &user_filtops, 1 }, /* EVFILT_USER */ { &null_filtops }, /* EVFILT_SENDFILE */ }; @@ -465,6 +466,10 @@ knote_fork(struct knlist *list, int pid) list->kl_lock(list->kl_lockarg); SLIST_FOREACH(kn, &list->kl_list, kn_selnext) { + /* + * XXX - Why do we skip the kn if it is _INFLUX? Does this + * mean we will not properly wake up some notes? + */ if ((kn->kn_status & KN_INFLUX) == KN_INFLUX) continue; kq = kn->kn_kq; @@ -1002,6 +1007,9 @@ kqueue_fo_find(int filt) if (filt > 0 || filt + EVFILT_SYSCOUNT < 0) return NULL; + if (sysfilt_ops[~filt].for_nolock) + return sysfilt_ops[~filt].for_fop; + mtx_lock(&filterops_lock); sysfilt_ops[~filt].for_refcnt++; if (sysfilt_ops[~filt].for_fop == NULL) @@ -1018,6 +1026,9 @@ kqueue_fo_release(int filt) if (filt > 0 || filt + EVFILT_SYSCOUNT < 0) return; + if (sysfilt_ops[~filt].for_nolock) + return; + mtx_lock(&filterops_lock); KASSERT(sysfilt_ops[~filt].for_refcnt > 0, ("filter object refcount not valid on release")); @@ -1051,7 +1062,10 @@ kqueue_register(struct kqueue *kq, struc if (fops == NULL) return EINVAL; - tkn = knote_alloc(waitok); /* prevent waiting with locks */ + if (kev->flags & EV_ADD) + tkn = knote_alloc(waitok); /* prevent waiting with locks */ + else + tkn = NULL; findkn: if (fops->f_isfd) { @@ -1162,7 +1176,7 @@ findkn: kev->data = 0; kn->kn_kevent = *kev; kn->kn_kevent.flags &= ~(EV_ADD | EV_DELETE | - EV_ENABLE | EV_DISABLE); + EV_ENABLE | EV_DISABLE | EV_FORCEONESHOT); kn->kn_status = KN_INFLUX|KN_DETACHED; error = knote_attach(kn, kq); @@ -1195,6 +1209,11 @@ findkn: goto done; } + if (kev->flags & EV_FORCEONESHOT) { + kn->kn_flags |= EV_ONESHOT; + KNOTE_ACTIVATE(kn, 1); + } + /* * The user may change some filter values after the initial EV_ADD, * but doing so will not reset any filter which has already been @@ -1219,18 +1238,21 @@ findkn: * kn_knlist. */ done_ev_add: - event = kn->kn_fop->f_event(kn, 0); + if ((kev->flags & EV_DISABLE) && + ((kn->kn_status & KN_DISABLED) == 0)) { + kn->kn_status |= KN_DISABLED; + } + + if ((kn->kn_status & KN_DISABLED) == 0) + event = kn->kn_fop->f_event(kn, 0); + else + event = 0; KQ_LOCK(kq); if (event) KNOTE_ACTIVATE(kn, 1); kn->kn_status &= ~(KN_INFLUX | KN_SCAN); KN_LIST_UNLOCK(kn); - if ((kev->flags & EV_DISABLE) && - ((kn->kn_status & KN_DISABLED) == 0)) { - kn->kn_status |= KN_DISABLED; - } - if ((kev->flags & EV_ENABLE) && (kn->kn_status & KN_DISABLED)) { kn->kn_status &= ~KN_DISABLED; if ((kn->kn_status & KN_ACTIVE) && Modified: head/sys/sys/event.h ============================================================================== --- head/sys/sys/event.h Sun Nov 16 01:00:39 2014 (r274559) +++ head/sys/sys/event.h Sun Nov 16 01:18:41 2014 (r274560) @@ -69,6 +69,7 @@ struct kevent { #define EV_DELETE 0x0002 /* delete event from kq */ #define EV_ENABLE 0x0004 /* enable event */ #define EV_DISABLE 0x0008 /* disable event (not reported) */ +#define EV_FORCEONESHOT 0x0100 /* enable _ONESHOT and force trigger */ /* flags */ #define EV_ONESHOT 0x0010 /* only report one occurrence */ From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 01:29:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF0BAFF4; Sun, 16 Nov 2014 01:29:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA487AB; Sun, 16 Nov 2014 01:29:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG1TLGv053068; Sun, 16 Nov 2014 01:29:21 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG1TJsC053053; Sun, 16 Nov 2014 01:29:19 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201411160129.sAG1TJsC053053@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 16 Nov 2014 01:29:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274561 - in stable/10/tools/tools/nanobsd: . dhcpd rescue X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 01:29:21 -0000 Author: imp Date: Sun Nov 16 01:29:18 2014 New Revision: 274561 URL: https://svnweb.freebsd.org/changeset/base/274561 Log: MFC from the last few months: Note: didn't merge r274331 removing gif/faith on purpose. r268246 | mr | use mkimg and build into separate directories r269355 | imp | Fix typo in example script r269362 | imp | use rm -x on 10 and newer r269363 | imp | NANO_OBJ shouldn't end with '/' r269423 | imp | -K to suppress installkernel r269424 | imp | sort usage r269425 | imp | sort switch r269983 | imp | only install bootloader if it exists r269984 | imp | create_diskimage since it never was $ARCH dependent r270162 | imp | Add support for -X which instales cross native tools Added: stable/10/tools/tools/nanobsd/rescue/R32 - copied unchanged from r268246, head/tools/tools/nanobsd/rescue/R32 stable/10/tools/tools/nanobsd/rescue/R64 - copied unchanged from r268246, head/tools/tools/nanobsd/rescue/R64 Modified: stable/10/tools/tools/nanobsd/dhcpd/README stable/10/tools/tools/nanobsd/dhcpd/common stable/10/tools/tools/nanobsd/nanobsd.sh stable/10/tools/tools/nanobsd/rescue/build.sh stable/10/tools/tools/nanobsd/rescue/common stable/10/tools/tools/nanobsd/rescue/merge.sh stable/10/tools/tools/nanobsd/rescue/rescue_amd64.conf stable/10/tools/tools/nanobsd/rescue/rescue_i386.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/tools/nanobsd/dhcpd/README ============================================================================== --- stable/10/tools/tools/nanobsd/dhcpd/README Sun Nov 16 01:18:41 2014 (r274560) +++ stable/10/tools/tools/nanobsd/dhcpd/README Sun Nov 16 01:29:18 2014 (r274561) @@ -9,6 +9,6 @@ and DHCPd. This is a work in progress. Generally, to build this you should cd tools/tools/nanobsd/dhcpd - sudo sh ../nandobsd.sh -C os-base + sudo sh ../nanobsd.sh -C os-base but do be careful if things are interrupted. There may still be bugs lurking that cause your entire FreeBSD tree to disappear. Modified: stable/10/tools/tools/nanobsd/dhcpd/common ============================================================================== --- stable/10/tools/tools/nanobsd/dhcpd/common Sun Nov 16 01:18:41 2014 (r274560) +++ stable/10/tools/tools/nanobsd/dhcpd/common Sun Nov 16 01:29:18 2014 (r274561) @@ -261,11 +261,6 @@ die() exit 1 } -create_amd64_diskimage() -{ - create_i386_diskimage "$*" -} - # Automatically include the packaging port here so it is always first so it # builds the port and adds the package so we can add other packages. add_port ports-mgmt/pkg Modified: stable/10/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- stable/10/tools/tools/nanobsd/nanobsd.sh Sun Nov 16 01:18:41 2014 (r274560) +++ stable/10/tools/tools/nanobsd/nanobsd.sh Sun Nov 16 01:29:18 2014 (r274561) @@ -178,6 +178,15 @@ SRCCONF=${SRCCONF:=/dev/null} # ####################################################################### +# rm doesn't know -x prior to FreeBSD 10, so cope with a variety of build +# hosts for now. +nano_rm ( ) { + case $(uname -r) in + 7*|8*|9*) rm $* ;; + *) rm -x $* ;; + esac +} + # run in the world chroot, errors fatal CR() { @@ -200,9 +209,9 @@ nano_cleanup ( ) ( clean_build ( ) ( pprint 2 "Clean and create object directory (${MAKEOBJDIRPREFIX})" - if ! rm -xrf ${MAKEOBJDIRPREFIX}/ > /dev/null 2>&1 ; then + if ! nano_rm -rf ${MAKEOBJDIRPREFIX}/ > /dev/null 2>&1 ; then chflags -R noschg ${MAKEOBJDIRPREFIX}/ - rm -xr ${MAKEOBJDIRPREFIX}/ + nano_rm -r ${MAKEOBJDIRPREFIX}/ fi mkdir -p ${MAKEOBJDIRPREFIX} printenv > ${MAKEOBJDIRPREFIX}/_.env @@ -256,17 +265,17 @@ build_kernel ( ) ( clean_world ( ) ( if [ "${NANO_OBJ}" != "${MAKEOBJDIRPREFIX}" ]; then pprint 2 "Clean and create object directory (${NANO_OBJ})" - if ! rm -rxf ${NANO_OBJ}/ > /dev/null 2>&1 ; then + if ! nano_rm -rf ${NANO_OBJ}/ > /dev/null 2>&1 ; then chflags -R noschg ${NANO_OBJ} - rm -xr ${NANO_OBJ}/ + nano_rm -r ${NANO_OBJ}/ fi mkdir -p ${NANO_OBJ} ${NANO_WORLDDIR} printenv > ${NANO_OBJ}/_.env else pprint 2 "Clean and create world directory (${NANO_WORLDDIR})" - if ! rm -rxf ${NANO_WORLDDIR}/ > /dev/null 2>&1 ; then + if ! nano_rm -rf ${NANO_WORLDDIR}/ > /dev/null 2>&1 ; then chflags -R noschg ${NANO_WORLDDIR} - rm -rxf ${NANO_WORLDDIR}/ + nano_rm -rf ${NANO_WORLDDIR}/ fi mkdir -p ${NANO_WORLDDIR} fi @@ -338,6 +347,18 @@ install_kernel ( ) ( ) > ${NANO_OBJ}/_.ik 2>&1 ) +native_xtools ( ) ( + print 2 "Installing the optimized native build tools for cross env" + pprint 3 "log: ${NANO_OBJ}/_.native_xtools" + + cd ${NANO_SRC} + env TARGET_ARCH=${NANO_ARCH} \ + ${NANO_MAKE} SRCCONF=${SRCCONF} \ + __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} native-xtools \ + DESTDIR=${NANO_WORLDDIR} \ + > ${NANO_OBJ}/_.native_xtools 2>&1 +) + run_customize() ( pprint 2 "run customize scripts" @@ -378,7 +399,7 @@ setup_nanobsd ( ) ( cd usr/local/etc find . -print | cpio -dumpl ../../../etc/local cd .. - rm -rf etc + nano_rm -rf etc ln -s ../../etc/local etc ) fi @@ -400,7 +421,7 @@ setup_nanobsd ( ) ( echo "mount -o ro /dev/${NANO_DRIVE}s3" > conf/default/etc/remount # Put /tmp on the /var ramdisk (could be symlink already) - test -d tmp && rmdir tmp || rm -f tmp + test -d tmp && rmdir tmp || nano_rm -f tmp ln -s var/tmp tmp ) > ${NANO_OBJ}/_.dl 2>&1 @@ -478,7 +499,7 @@ populate_data_slice ( ) ( populate_slice "$1" "$2" "$3" "$4" ) -create_i386_diskimage ( ) ( +create_diskimage ( ) ( pprint 2 "build diskimage" pprint 3 "log: ${NANO_OBJ}/_.di" @@ -560,7 +581,7 @@ create_i386_diskimage ( ) ( -y ${NANO_HEADS}` else echo "Creating md backing file..." - rm -f ${IMG} + nano_rm -f ${IMG} dd if=/dev/zero of=${IMG} seek=${NANO_MEDIASIZE} count=0 MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ -y ${NANO_HEADS}` @@ -572,8 +593,14 @@ create_i386_diskimage ( ) ( fdisk ${MD} # XXX: params # XXX: pick up cached boot* files, they may not be in image anymore. - boot0cfg -B -b ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ${NANO_BOOT0CFG} ${MD} - bsdlabel -w -B -b ${NANO_WORLDDIR}/boot/boot ${MD}s1 + if [ -f ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ]; then + boot0cfg -B -b ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ${NANO_BOOT0CFG} ${MD} + fi + if [ -f ${NANO_WORLDDIR}/boot/boot ]; then + bsdlabel -w -B -b ${NANO_WORLDDIR}/boot/boot ${MD}s1 + else + bsdlabel -w ${MD}s1 + fi bsdlabel ${MD}s1 # Create first image @@ -634,11 +661,6 @@ create_i386_diskimage ( ) ( ) > ${NANO_OBJ}/_.di 2>&1 ) -# i386 and amd64 are identical for disk images -create_amd64_diskimage ( ) ( - create_i386_diskimage -) - last_orders () ( # Redefine this function with any last orders you may have # after the build completed, for instance to copy the finished @@ -785,7 +807,7 @@ cust_pkg () ( exit 2 fi done - rm -rxf ${NANO_WORLDDIR}/Pkg + nano_rm -rf ${NANO_WORLDDIR}/Pkg ) cust_pkgng () ( @@ -820,7 +842,7 @@ cust_pkgng () ( echo "FAILED: pkg bootstrapping faied" exit 2 fi - rm -f ${NANO_WORLDDIR}/Pkg/pkg-* + nano_rm -f ${NANO_WORLDDIR}/Pkg/pkg-* # Count & report how many we have to install todo=`ls ${NANO_WORLDDIR}/Pkg | /usr/bin/wc -l` @@ -849,7 +871,7 @@ cust_pkgng () ( exit 2 fi done - rm -rxf ${NANO_WORLDDIR}/Pkg + nano_rm -rf ${NANO_WORLDDIR}/Pkg ) ####################################################################### @@ -886,8 +908,10 @@ pprint() ( usage () { ( - echo "Usage: $0 [-bfiknqvw] [-c config_file]" + echo "Usage: $0 [-bfiKknqvw] [-c config_file]" + echo " -K suppress installkernel" echo " -b suppress builds (both kernel and world)" + echo " -c specify config file" echo " -f suppress code slice extraction" echo " -i suppress disk image build" echo " -k suppress buildkernel" @@ -895,7 +919,6 @@ usage () { echo " -q make output more quiet" echo " -v make output more verbose" echo " -w suppress buildworld" - echo " -c specify config file" ) 1>&2 exit 2 } @@ -905,12 +928,14 @@ usage () { do_clean=true do_kernel=true +do_installkernel=true do_world=true do_image=true do_copyout_partition=true +do_native_xtools=false set +e -args=`getopt bc:fhiknqvw $*` +args=`getopt KXbc:fhiknqvw $*` if [ $? -ne 0 ] ; then usage exit 2 @@ -922,12 +947,16 @@ for i do case "$i" in - -b) - do_world=false - do_kernel=false + -K) + do_installkernel=false shift ;; - -k) + -X) + do_native_xtools=true + shift + ;; + -b) + do_world=false do_kernel=false shift ;; @@ -951,6 +980,10 @@ do do_image=false shift ;; + -k) + do_kernel=false + shift + ;; -n) do_clean=false shift @@ -983,7 +1016,7 @@ trap nano_cleanup EXIT ####################################################################### # Setup and Export Internal variables # -test -n "${NANO_OBJ}" || NANO_OBJ=/usr/obj/nanobsd.${NANO_NAME}/ +test -n "${NANO_OBJ}" || NANO_OBJ=/usr/obj/nanobsd.${NANO_NAME} test -n "${MAKEOBJDIRPREFIX}" || MAKEOBJDIRPREFIX=${NANO_OBJ} test -n "${NANO_DISKIMGDIR}" || NANO_DISKIMGDIR=${NANO_OBJ} @@ -1073,15 +1106,22 @@ clean_world make_conf_install install_world install_etc +if $do_native_xtools ; then + native_xtools +fi setup_nanobsd_etc -install_kernel +if $do_installkernel ; then + install_kernel +else + pprint 2 "Skipping installkernel (as instructed)" +fi run_customize setup_nanobsd prune_usr run_late_customize if $do_image ; then - create_${NANO_ARCH}_diskimage + create_diskimage else pprint 2 "Skipping image build (as instructed)" fi Copied: stable/10/tools/tools/nanobsd/rescue/R32 (from r268246, head/tools/tools/nanobsd/rescue/R32) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/tools/nanobsd/rescue/R32 Sun Nov 16 01:29:18 2014 (r274561, copy of r268246, head/tools/tools/nanobsd/rescue/R32) @@ -0,0 +1,14 @@ +# +# R32 -- Generic kernel configuration file with modifications for rescue. +# +# $FreeBSD$ + +include GENERIC + +ident R32 + +nooptions INVARIANTS +nooptions INVARIANT_SUPPORT +nooptions WITNESS +nooptions WITNESS_SKIPSPIN +nooptions MALLOC_DEBUG_MAXZONES Copied: stable/10/tools/tools/nanobsd/rescue/R64 (from r268246, head/tools/tools/nanobsd/rescue/R64) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/tools/nanobsd/rescue/R64 Sun Nov 16 01:29:18 2014 (r274561, copy of r268246, head/tools/tools/nanobsd/rescue/R64) @@ -0,0 +1,14 @@ +# +# R64 -- Generic kernel configuration file with modifications for rescue. +# +# $FreeBSD$ + +include GENERIC + +ident R64 + +nooptions INVARIANTS +nooptions INVARIANT_SUPPORT +nooptions WITNESS +nooptions WITNESS_SKIPSPIN +nooptions MALLOC_DEBUG_MAXZONES Modified: stable/10/tools/tools/nanobsd/rescue/build.sh ============================================================================== --- stable/10/tools/tools/nanobsd/rescue/build.sh Sun Nov 16 01:18:41 2014 (r274560) +++ stable/10/tools/tools/nanobsd/rescue/build.sh Sun Nov 16 01:29:18 2014 (r274561) @@ -3,6 +3,8 @@ # $FreeBSD$ # +today=`date '+%Y%m%d'` + if [ -z "${1}" -o \! -f "${1}" ]; then echo "Usage: $0 cfg_file [-bhiknw]" echo "-i : skip image build" @@ -15,4 +17,26 @@ fi CFG="${1}" shift; +if [ \! -d /usr/obj/Rescue ]; then + mkdir -p /usr/obj/Rescue +fi + sh ../nanobsd.sh $* -c ${CFG} + +F32="/usr/obj/Rescue/rescue_${today}_x32" +D32="/usr/obj/nanobsd.rescue_i386" +if [ -f "${D32}/_.disk.full" ]; then + mv "${D32}/_.disk.full" "${F32}.img" +fi +if [ -f "${D32}/_.disk.iso" ]; then + mv "${D32}/_.disk.iso" "${F32}.iso" +fi + +F64="/usr/obj/Rescue/rescue_${today}_x64" +D64="/usr/obj/nanobsd.rescue_amd64" +if [ -f "${D64}/_.disk.full" ]; then + mv "${D64}/_.disk.full" "${F64}.img" +fi +if [ -f "${D64}/_.disk.iso" ]; then + mv "${D64}/_.disk.iso" "${F64}.iso" +fi Modified: stable/10/tools/tools/nanobsd/rescue/common ============================================================================== --- stable/10/tools/tools/nanobsd/rescue/common Sun Nov 16 01:18:41 2014 (r274560) +++ stable/10/tools/tools/nanobsd/rescue/common Sun Nov 16 01:29:18 2014 (r274561) @@ -3,7 +3,7 @@ # NANO_TOOLS=`pwd` NANO_PACKAGE_DIR=`pwd`/Pkg -NANO_RAM_TMPVARSIZE=20480 +NANO_RAM_TMPVARSIZE=40960 NANO_PMAKE="make -j 8" NANO_LABEL="rescue" NANO_RAM_TMPVARSIZE=40960 @@ -68,6 +68,7 @@ cust_etc_cfg () ( echo "#ifconfig_fxp0=\"AUTO\"" >> etc/rc.conf echo "#sshd_enable=\"YES\"" >> etc/rc.conf echo "/dev/ufs/${NANO_LABEL}s1a / ufs ro,noatime 0 0" > etc/fstab + echo "/dev/${NANO_DRIVE}s3 /cfg ufs rw,noauto 2 2" >> etc/fstab echo "tmpfs /boot/zfs tmpfs rw,size=1048576,mode=777 0 0" >> etc/fstab echo "ports:/usr/ports /usr/ports nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0" >> etc/fstab # echo "/dev/ad1s1a /scratch ufs rw,noauto,noatime 0 0" >> etc/fstab @@ -100,16 +101,8 @@ last_orders () ( touch conf/default/etc/.keepme touch conf/default/var/.keepme cd .. - mkisofs -quiet -r -J -no-emul-boot \ - -V ${NANO_LABEL} \ - -b boot/cdboot -o _.disk.iso _.w/ + makefs -t cd9660 -o rockridge \ + -o label="${NANO_LABEL}" -o publisher="RMX" \ + -o bootimage="i386;_.w/boot/cdboot" -o no-emul-boot _.disk.iso _.w/ ) ) - -#create_i386_diskimage () { -# #currently not used -#} - -#create_amd64_diskimage () { -# create_i386_diskimage -#} Modified: stable/10/tools/tools/nanobsd/rescue/merge.sh ============================================================================== --- stable/10/tools/tools/nanobsd/rescue/merge.sh Sun Nov 16 01:18:41 2014 (r274560) +++ stable/10/tools/tools/nanobsd/rescue/merge.sh Sun Nov 16 01:29:18 2014 (r274561) @@ -1,18 +1,28 @@ #!/bin/sh # $FreeBSD$ -D1="/usr/obj/nanobsd.rescue_i386" -D2="/usr/obj/nanobsd.rescue_amd64" +today=`date '+%Y%m%d'` -MD=`mdconfig -a -t vnode -f ${D1}/_.disk.full` +I32="/usr/obj/Rescue/rescue_${today}_x32.img" +I64="/usr/obj/Rescue/rescue_${today}_x64.img" +IAL="/usr/obj/Rescue/rescue_${today}_xal.img" +D64="/usr/obj/nanobsd.rescue_amd64" +MNT="/usr/obj/Rescue/_mnt" + +if [ \! -d "$MNT" ]; then + mkdir "$MNT" +fi -dd if=${D2}/_.disk.image of=/dev/${MD}s2 bs=128k +dd if=${I32} of=${IAL} bs=128k +MD=`mdconfig -a -t vnode -f ${IAL}` + +dd if=${D64}/_.disk.image of=/dev/${MD}s2 bs=128k tunefs -L rescues2a /dev/${MD}s2a -mount /dev/${MD}s2a ${D1}/_.mnt +mount /dev/${MD}s2a ${MNT} -sed -i "" -e 's/rescues1/rescues2/' ${D1}/_.mnt/conf/base/etc/fstab -sed -i "" -e 's/rescues1/rescues2/' ${D1}/_.mnt/etc/fstab +sed -i "" -e 's/rescues1/rescues2/' ${MNT}/conf/base/etc/fstab +sed -i "" -e 's/rescues1/rescues2/' ${MNT}/etc/fstab -umount ${D1}/_.mnt +umount ${MNT} mdconfig -d -u ${MD} Modified: stable/10/tools/tools/nanobsd/rescue/rescue_amd64.conf ============================================================================== --- stable/10/tools/tools/nanobsd/rescue/rescue_amd64.conf Sun Nov 16 01:18:41 2014 (r274560) +++ stable/10/tools/tools/nanobsd/rescue/rescue_amd64.conf Sun Nov 16 01:29:18 2014 (r274561) @@ -1,7 +1,7 @@ # # $FreeBSD$ # -NANO_KERNEL=GENERIC +NANO_KERNEL=R64 NANO_ARCH=amd64 TARGET_ARCH=amd64; export TARGET_ARCH #TARGET_CPUTYPE=amd64; export TARGET_CPUTYPE Modified: stable/10/tools/tools/nanobsd/rescue/rescue_i386.conf ============================================================================== --- stable/10/tools/tools/nanobsd/rescue/rescue_i386.conf Sun Nov 16 01:18:41 2014 (r274560) +++ stable/10/tools/tools/nanobsd/rescue/rescue_i386.conf Sun Nov 16 01:29:18 2014 (r274561) @@ -1,7 +1,7 @@ # # $FreeBSD$ # -NANO_KERNEL=GENERIC +NANO_KERNEL=R32 NANO_ARCH=i386 TARGET_ARCH=i386; export TARGET_ARCH #TARGET_CPUTYPE=i386; export TARGET_CPUTYPE From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 01:47:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51BFD772; Sun, 16 Nov 2014 01:47:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23E37240; Sun, 16 Nov 2014 01:47:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG1liDl062212; Sun, 16 Nov 2014 01:47:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG1lhKj062210; Sun, 16 Nov 2014 01:47:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201411160147.sAG1lhKj062210@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 16 Nov 2014 01:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274562 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 01:47:44 -0000 Author: mav Date: Sun Nov 16 01:47:43 2014 New Revision: 274562 URL: https://svnweb.freebsd.org/changeset/base/274562 Log: MFC r274333: Handle PREEMPT AND ABORT service action equal to PREEMPT. With command serialization used in CTL, there are no other commands to abort when PREEMPT AND ABORT gets to run, so it is practically equal to PREEMPT. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_cmd_table.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Sun Nov 16 01:29:18 2014 (r274561) +++ stable/10/sys/cam/ctl/ctl.c Sun Nov 16 01:47:43 2014 (r274562) @@ -8691,7 +8691,8 @@ ctl_persistent_reserve_out(struct ctl_sc } break; - case SPRO_PREEMPT: { + case SPRO_PREEMPT: + case SPRO_PRE_ABO: { int nretval; nretval = ctl_pro_preempt(softc, lun, res_key, sa_res_key, type, Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Sun Nov 16 01:29:18 2014 (r274561) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Sun Nov 16 01:47:43 2014 (r274562) @@ -180,7 +180,16 @@ const struct ctl_cmd_entry ctl_cmd_table 10, { 0x04, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}}, /* 05 PREEMPT AND ABORT */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_persistent_reserve_out, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV | + CTL_CMD_FLAG_OK_ON_BOTH | + CTL_CMD_FLAG_OK_ON_STOPPED | + CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_OFFLINE | + CTL_CMD_FLAG_OK_ON_SECONDARY | + CTL_FLAG_DATA_OUT | + CTL_CMD_FLAG_ALLOW_ON_PR_RESV, + CTL_LUN_PAT_NONE, + 10, { 0x05, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}}, /* 06 REGISTER AND IGNORE EXISTING KEY */ {ctl_persistent_reserve_out, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV | From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 04:02:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A83DFEB; Sun, 16 Nov 2014 04:02:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65DC4D4; Sun, 16 Nov 2014 04:02:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG42qu9026920; Sun, 16 Nov 2014 04:02:52 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG42ols026913; Sun, 16 Nov 2014 04:02:50 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201411160402.sAG42ols026913@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Sun, 16 Nov 2014 04:02:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274563 - stable/10/contrib/tzdata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 04:02:52 -0000 Author: edwin Date: Sun Nov 16 04:02:50 2014 New Revision: 274563 URL: https://svnweb.freebsd.org/changeset/base/274563 Log: MFC of 274559,tzdata2014j Release 2014j - 2014-11-10 17:37:11 -0800 Changes affecting current and future time stamps Turks & Caicos' switch from US eastern time to UTC-4 year-round did not occur on 2014-11-02 at 02:00. It's currently scheduled for 2015-11-01 at 02:00. (Thanks to Chris Walton.) Changes affecting past time stamps Many pre-1989 time stamps have been corrected for Asia/Seoul and Asia/Pyongyang, based on sources for the Korean-language Wikipedia entry for time in Korea. (Thanks to Sanghyuk Jung.) Also, no longer guess that Pyongyang mimicked Seoul time after World War II, as this is politically implausible. Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Africa/Addis_Ababa, Africa/Asmara, Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala, Africa/Mogadishu, Indian/Antananarivo, Indian/Comoro, and Indian/Mayotte. Changes affecting commentary The commentary is less enthusiastic about Shanks as a source, and is more careful to distinguish UT from UTC. Modified: stable/10/contrib/tzdata/africa stable/10/contrib/tzdata/asia stable/10/contrib/tzdata/australasia stable/10/contrib/tzdata/europe stable/10/contrib/tzdata/northamerica stable/10/contrib/tzdata/southamerica Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/tzdata/africa ============================================================================== --- stable/10/contrib/tzdata/africa Sun Nov 16 01:47:43 2014 (r274562) +++ stable/10/contrib/tzdata/africa Sun Nov 16 04:02:50 2014 (r274563) @@ -6,20 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-02-21): +# From Paul Eggert (2014-10-31): # -# A good source for time zone historical data outside the U.S. is +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which @@ -65,7 +64,6 @@ # 3:00 CAST Central Africa Summer Time (no longer used) # 3:00 SAST South Africa Summer Time (no longer used) # 3:00 EAT East Africa Time -# 4:00 EAST East Africa Summer Time (no longer used) # Algeria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -146,9 +144,7 @@ Zone Africa/Ndjamena 1:00:12 - LMT 1912 1:00 - WAT # Comoros -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Comoro 2:53:04 - LMT 1911 Jul # Moroni, Gran Comoro - 3:00 - EAT +# See Africa/Nairobi. # Democratic Republic of the Congo # See Africa/Lagos for the western part and Africa/Maputo for the eastern. @@ -172,9 +168,7 @@ Link Africa/Abidjan Africa/Sao_Tome # Sà Link Africa/Abidjan Atlantic/St_Helena # St Helena # Djibouti -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Djibouti 2:52:36 - LMT 1911 Jul - 3:00 - EAT +# See Africa/Nairobi. ############################################################################### @@ -387,27 +381,8 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct # See Africa/Lagos. # Eritrea -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Asmara 2:35:32 - LMT 1870 - 2:35:32 - AMT 1890 # Asmara Mean Time - 2:35:20 - ADMT 1936 May 5 # Adis Dera MT - 3:00 - EAT - # Ethiopia -# From Paul Eggert (2014-07-31): -# Like the Swahili of Kenya and Tanzania, many Ethiopians keep a -# 12-hour clock starting at our 06:00, so their "8 o'clock" is our -# 02:00 or 14:00. Keep this in mind when you ask the time in Amharic. -# -# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time -# zones between 1870 and 1890, that they merged to 38E50 (2:35:20) in -# 1890, and that they switched to 3:00 on 1936-05-05. Perhaps 38E50 -# was for Adis Dera. Quite likely the Shanks data entries are wrong -# anyway. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Addis_Ababa 2:34:48 - LMT 1870 - 2:35:20 - ADMT 1936 May 5 # Adis Dera MT - 3:00 - EAT +# See Africa/Nairobi. # Gabon # See Africa/Lagos. @@ -451,6 +426,15 @@ Zone Africa/Nairobi 2:27:16 - LMT 1928 J 2:30 - BEAT 1940 2:45 - BEAUT 1960 3:00 - EAT +Link Africa/Nairobi Africa/Addis_Ababa # Ethiopia +Link Africa/Nairobi Africa/Asmara # Eritrea +Link Africa/Nairobi Africa/Dar_es_Salaam # Tanzania +Link Africa/Nairobi Africa/Djibouti +Link Africa/Nairobi Africa/Kampala # Uganda +Link Africa/Nairobi Africa/Mogadishu # Somalia +Link Africa/Nairobi Indian/Antananarivo # Madagascar +Link Africa/Nairobi Indian/Comoro +Link Africa/Nairobi Indian/Mayotte # Lesotho # See Africa/Johannesburg. @@ -528,11 +512,7 @@ Zone Africa/Tripoli 0:52:44 - LMT 1920 2:00 - EET # Madagascar -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Antananarivo 3:10:04 - LMT 1911 Jul - 3:00 - EAT 1954 Feb 27 23:00s - 3:00 1:00 EAST 1954 May 29 23:00s - 3:00 - EAT +# See Africa/Nairobi. # Malawi # See Africa/Maputo. @@ -635,9 +615,7 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # no information; probably like Indian/Mauritius # Mayotte -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Mayotte 3:00:56 - LMT 1911 Jul # Mamoutzou - 3:00 - EAT +# See Africa/Nairobi. # Morocco # See the 'europe' file for Spanish Morocco (Africa/Ceuta). @@ -1049,11 +1027,7 @@ Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # See Africa/Abidjan. # Somalia -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Mogadishu 3:01:28 - LMT 1893 Nov - 3:00 - EAT 1931 - 2:30 - BEAT 1957 - 3:00 - EAT +# See Africa/Nairobi. # South Africa # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -1096,11 +1070,7 @@ Link Africa/Khartoum Africa/Juba # See Africa/Johannesburg. # Tanzania -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Dar_es_Salaam 2:37:08 - LMT 1931 - 3:00 - EAT 1948 - 2:45 - BEAUT 1961 - 3:00 - EAT +# See Africa/Nairobi. # Togo # See Africa/Abidjan. @@ -1206,12 +1176,7 @@ Zone Africa/Tunis 0:40:44 - LMT 1881 May 1:00 Tunisia CE%sT # Uganda -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Kampala 2:09:40 - LMT 1928 Jul - 3:00 - EAT 1930 - 2:30 - BEAT 1948 - 2:45 - BEAUT 1957 - 3:00 - EAT +# See Africa/Nairobi. # Zambia # Zimbabwe Modified: stable/10/contrib/tzdata/asia ============================================================================== --- stable/10/contrib/tzdata/asia Sun Nov 16 01:47:43 2014 (r274562) +++ stable/10/contrib/tzdata/asia Sun Nov 16 04:02:50 2014 (r274563) @@ -6,20 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-08-11): +# From Paul Eggert (2014-10-31): # -# A good source for time zone historical data outside the U.S. is +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which @@ -1663,44 +1662,70 @@ Zone Asia/Bishkek 4:58:24 - LMT 1924 May # Korea (North and South) # From Annie I. Bang (2006-07-10): -# http://www.koreaherald.co.kr/SITE/data/html_dir/2006/07/10/200607100012.asp -# The Ministry of Commerce, Industry and Energy has already -# commissioned a research project [to reintroduce DST] and has said -# the system may begin as early as 2008.... Korea ran a daylight -# saving program from 1949-61 but stopped it during the 1950-53 Korean War. - -# From Shanks & Pottenger: -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule ROK 1960 only - May 15 0:00 1:00 D -Rule ROK 1960 only - Sep 13 0:00 0 S -Rule ROK 1987 1988 - May Sun>=8 0:00 1:00 D -Rule ROK 1987 1988 - Oct Sun>=8 0:00 0 S - -# From Paul Eggert (2014-07-01): -# The following entries are from Shanks & Pottenger, except that I -# guessed that time zone abbreviations through 1945 followed the same +# http://www.koreaherald.com/view.php?ud=200607100012 +# Korea ran a daylight saving program from 1949-61 but stopped it +# during the 1950-53 Korean War. The system was temporarily enforced +# between 1987 and 1988 ... + +# From Sanghyuk Jung (2014-10-29): +# http://mm.icann.org/pipermail/tz/2014-October/021830.html +# According to the Korean Wikipedia +# http://ko.wikipedia.org/wiki/한국_표준시 +# [oldid=12896437 2014-09-04 08:03 UTC] +# DST in Republic of Korea was as follows.... And I checked old +# newspapers in Korean, all articles correspond with data in Wikipedia. +# For example, the article in 1948 (Korean Language) proved that DST +# started at June 1 in that year. For another example, the article in +# 1988 said that DST started at 2:00 AM in that year. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule ROK 1948 only - Jun 1 0:00 1:00 D +Rule ROK 1948 only - Sep 13 0:00 0 S +Rule ROK 1949 only - Apr 3 0:00 1:00 D +Rule ROK 1949 1951 - Sep Sun>=8 0:00 0 S +Rule ROK 1950 only - Apr 1 0:00 1:00 D +Rule ROK 1951 only - May 6 0:00 1:00 D +Rule ROK 1955 only - May 5 0:00 1:00 D +Rule ROK 1955 only - Sep 9 0:00 0 S +Rule ROK 1956 only - May 20 0:00 1:00 D +Rule ROK 1956 only - Sep 30 0:00 0 S +Rule ROK 1957 1960 - May Sun>=1 0:00 1:00 D +Rule ROK 1957 1960 - Sep Sun>=18 0:00 0 S +Rule ROK 1987 1988 - May Sun>=8 2:00 1:00 D +Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S + +# From Paul Eggert (2014-10-30): +# The Korean Wikipedia entry gives the following sources for UT offsets: +# +# 1908: Official Journal Article No. 3994 (Edict No. 5) +# 1912: Governor-General of Korea Official Gazette Issue No. 367 +# (Announcement No. 338) +# 1954: Presidential Decree No. 876 (1954-03-17) +# 1961: Law No. 676 (1961-08-07) +# 1987: Law No. 3919 (1986-12-31) +# +# The Wikipedia entry also has confusing information about a change +# to UT+9 in April 1910, but then what would be the point of the later change +# to UT+9 on 1912-01-01? Omit the 1910 change for now. +# +# I guessed that time zone abbreviations through 1945 followed the same # rules as discussed under Taiwan, with nominal switches from JST to KST # when the respective cities were taken over by the Allies after WWII. +# +# For Pyongyang we have no information; guess no changes since World War II. # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Seoul 8:27:52 - LMT 1890 - 8:30 - KST 1904 Dec - 9:00 - JCST 1928 - 8:30 - KST 1932 +Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1 + 8:30 - KST 1912 Jan 1 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Sep 8 9:00 - KST 1954 Mar 21 - 8:00 ROK K%sT 1961 Aug 10 - 8:30 - KST 1968 Oct + 8:30 ROK K%sT 1961 Aug 10 9:00 ROK K%sT -Zone Asia/Pyongyang 8:23:00 - LMT 1890 - 8:30 - KST 1904 Dec - 9:00 - JCST 1928 - 8:30 - KST 1932 +Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1 + 8:30 - KST 1912 Jan 1 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Aug 24 - 9:00 - KST 1954 Mar 21 - 8:00 - KST 1961 Aug 10 9:00 - KST ############################################################################### Modified: stable/10/contrib/tzdata/australasia ============================================================================== --- stable/10/contrib/tzdata/australasia Sun Nov 16 01:47:43 2014 (r274562) +++ stable/10/contrib/tzdata/australasia Sun Nov 16 04:02:50 2014 (r274563) @@ -797,19 +797,19 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-02-21): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which Modified: stable/10/contrib/tzdata/europe ============================================================================== --- stable/10/contrib/tzdata/europe Sun Nov 16 01:47:43 2014 (r274562) +++ stable/10/contrib/tzdata/europe Sun Nov 16 04:02:50 2014 (r274563) @@ -6,16 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-05-31): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). @@ -287,6 +290,14 @@ # "Timeball on the ballast office is down. Dunsink time." # -- James Joyce, Ulysses +# "Countess Markievicz ... claimed that the [1916] abolition of Dublin Mean Time +# was among various actions undertaken by the 'English' government that +# would 'put the whole country into the SF (Sinn Féin) camp'. She claimed +# Irish 'public feeling (was) outraged by forcing of English time on us'." +# -- Parsons M. Dublin lost its time zone - and 25 minutes - after 1916 Rising. +# Irish Times 2014-10-27. +# http://www.irishtimes.com/news/politics/dublin-lost-its-time-zone-and-25-minutes-after-1916-rising-1.1977411 + # From Joseph S. Myers (2005-01-26): # Irish laws are available online at . # These include various relating to legal time, for example: @@ -594,6 +605,7 @@ Rule Russia 1992 only - Sep lastSat 23: Rule Russia 1993 2010 - Mar lastSun 2:00s 1:00 S Rule Russia 1993 1995 - Sep lastSun 2:00s 0 - Rule Russia 1996 2010 - Oct lastSun 2:00s 0 - +# As described below, Russia's 2014 change affects Zone data, not Rule data. # From Alexander Krivenyshev (2011-06-14): # According to Kremlin press service, Russian President Dmitry Medvedev Modified: stable/10/contrib/tzdata/northamerica ============================================================================== --- stable/10/contrib/tzdata/northamerica Sun Nov 16 01:47:43 2014 (r274562) +++ stable/10/contrib/tzdata/northamerica Sun Nov 16 04:02:50 2014 (r274563) @@ -991,19 +991,19 @@ Zone America/Menominee -5:50:27 - LMT 18 ################################################################################ -# From Paul Eggert (2006-03-22): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Other sources occasionally used include: # @@ -3131,13 +3131,17 @@ Zone America/Miquelon -3:44:40 - LMT 191 # From Paul Eggert (2014-08-19): # The 2014-08-13 Cabinet meeting decided to stay on UTC-4 year-round. See: # http://tcweeklynews.com/daylight-savings-time-to-be-maintained-p5353-127.htm -# Model this as a switch from EST/EDT to AST on 2014-11-02 at 02:00. +# Model this as a switch from EST/EDT to AST ... +# From Chris Walton (2014-11-04): +# ... the TCI government appears to have delayed the switch to +# "permanent daylight saving time" by one year.... +# http://tcweeklynews.com/time-change-to-go-ahead-this-november-p5437-127.htm # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Grand_Turk -4:44:32 - LMT 1890 -5:07:11 - KMT 1912 Feb # Kingston Mean Time -5:00 - EST 1979 - -5:00 US E%sT 2014 Nov 2 2:00 + -5:00 US E%sT 2015 Nov Sun>=1 2:00 -4:00 - AST # British Virgin Is Modified: stable/10/contrib/tzdata/southamerica ============================================================================== --- stable/10/contrib/tzdata/southamerica Sun Nov 16 01:47:43 2014 (r274562) +++ stable/10/contrib/tzdata/southamerica Sun Nov 16 04:02:50 2014 (r274563) @@ -6,23 +6,23 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2006-03-22): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). -# -# For data circa 1899, a common source is: -# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. -# http://www.jstor.org/stable/1774359 +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# For data circa 1899, a common source is: +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. +# http://www.jstor.org/stable/1774359 # # Earlier editions of these tables used the North American style (e.g. ARST and # ARDT for Argentine Standard and Daylight Time), but the following quote From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 04:07:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 547701C9; Sun, 16 Nov 2014 04:07:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41671F6; Sun, 16 Nov 2014 04:07:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG47slC027583; Sun, 16 Nov 2014 04:07:54 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG47sIU027582; Sun, 16 Nov 2014 04:07:54 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201411160407.sAG47sIU027582@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 16 Nov 2014 04:07:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274564 - head/cddl/contrib/opensolaris/tools/ctf/cvt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 04:07:54 -0000 Author: markj Date: Sun Nov 16 04:07:53 2014 New Revision: 274564 URL: https://svnweb.freebsd.org/changeset/base/274564 Log: Fix a couple of bugs around the handling of structs and unions of size zero. These would cause ctfconvert(1) to return an error when attempting to resolve valid C types. Reviewed by: Robert Mustacchi MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c ============================================================================== --- head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sun Nov 16 04:02:50 2014 (r274563) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sun Nov 16 04:07:53 2014 (r274564) @@ -766,7 +766,8 @@ die_array_resolve(tdesc_t *tdp, tdesc_t debug(3, "trying to resolve array %d (cont %d)\n", tdp->t_id, tdp->t_ardef->ad_contents->t_id); - if ((sz = tdesc_size(tdp->t_ardef->ad_contents)) == 0) { + if ((sz = tdesc_size(tdp->t_ardef->ad_contents)) == 0 && + (tdp->t_ardef->ad_contents->t_flags & TDESC_F_RESOLVED) == 0) { debug(3, "unable to resolve array %s (%d) contents %d\n", tdesc_name(tdp), tdp->t_id, tdp->t_ardef->ad_contents->t_id); @@ -1138,12 +1139,17 @@ die_sou_resolve(tdesc_t *tdp, tdesc_t ** /* * For empty members, or GCC/C99 flexible array - * members, a size of 0 is correct. + * members, a size of 0 is correct. Structs and unions + * consisting of flexible array members will also have + * size 0. */ if (mt->t_members == NULL) continue; if (mt->t_type == ARRAY && mt->t_ardef->ad_nelems == 0) continue; + if ((mt->t_flags & TDESC_F_RESOLVED) != 0 && + (mt->t_type == STRUCT || mt->t_type == UNION)) + continue; dw->dw_nunres++; return (1); From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 04:10:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34C58318; Sun, 16 Nov 2014 04:10:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21620103; Sun, 16 Nov 2014 04:10:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG4ANYi030218; Sun, 16 Nov 2014 04:10:23 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG4AN9e030198; Sun, 16 Nov 2014 04:10:23 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201411160410.sAG4AN9e030198@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 16 Nov 2014 04:10:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274565 - head/cddl/contrib/opensolaris/tools/ctf/cvt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 04:10:24 -0000 Author: markj Date: Sun Nov 16 04:10:23 2014 New Revision: 274565 URL: https://svnweb.freebsd.org/changeset/base/274565 Log: Remove an incorrect optimization. The type IDs of each member of a struct or union must be checked when determine whether two types are equivalent. This bug could cause ctfmerge(1) to incorrectly merge distinct types. Reviewed by: Robert Mustacchi MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c ============================================================================== --- head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Sun Nov 16 04:07:53 2014 (r274564) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Sun Nov 16 04:10:23 2014 (r274565) @@ -287,19 +287,11 @@ equiv_su(tdesc_t *stdp, tdesc_t *ttdp, e while (ml1 && ml2) { if (ml1->ml_offset != ml2->ml_offset || - strcmp(ml1->ml_name, ml2->ml_name) != 0) + strcmp(ml1->ml_name, ml2->ml_name) != 0 || + ml1->ml_size != ml2->ml_size || + !equiv_node(ml1->ml_type, ml2->ml_type, ed)) return (0); - /* - * Don't do the recursive equivalency checking more than - * we have to. - */ - if (olm1 == NULL || olm1->ml_type->t_id != ml1->ml_type->t_id) { - if (ml1->ml_size != ml2->ml_size || - !equiv_node(ml1->ml_type, ml2->ml_type, ed)) - return (0); - } - olm1 = ml1; ml1 = ml1->ml_next; ml2 = ml2->ml_next; From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 04:11:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1907467; Sun, 16 Nov 2014 04:11:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD56D10F; Sun, 16 Nov 2014 04:11:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG4BdJs031597; Sun, 16 Nov 2014 04:11:39 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG4Bc1v031588; Sun, 16 Nov 2014 04:11:38 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201411160411.sAG4Bc1v031588@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Sun, 16 Nov 2014 04:11:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r274566 - stable/9/contrib/tzdata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 04:11:39 -0000 Author: edwin Date: Sun Nov 16 04:11:37 2014 New Revision: 274566 URL: https://svnweb.freebsd.org/changeset/base/274566 Log: MFC of 274559,tzdata9: Release 2014j - 2014-11-10 17:37:11 -0800 Changes affecting current and future time stamps Turks & Caicos' switch from US eastern time to UTC-4 year-round did not occur on 2014-11-02 at 02:00. It's currently scheduled for 2015-11-01 at 02:00. (Thanks to Chris Walton.) Changes affecting past time stamps Many pre-1989 time stamps have been corrected for Asia/Seoul and Asia/Pyongyang, based on sources for the Korean-language Wikipedia entry for time in Korea. (Thanks to Sanghyuk Jung.) Also, no longer guess that Pyongyang mimicked Seoul time after World War II, as this is politically implausible. Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Africa/Addis_Ababa, Africa/Asmara, Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala, Africa/Mogadishu, Indian/Antananarivo, Indian/Comoro, and Indian/Mayotte. Changes affecting commentary The commentary is less enthusiastic about Shanks as a source, and is more careful to distinguish UT from UTC. Modified: stable/9/contrib/tzdata/africa stable/9/contrib/tzdata/asia stable/9/contrib/tzdata/australasia stable/9/contrib/tzdata/europe stable/9/contrib/tzdata/northamerica stable/9/contrib/tzdata/southamerica Directory Properties: stable/9/contrib/tzdata/ (props changed) Modified: stable/9/contrib/tzdata/africa ============================================================================== --- stable/9/contrib/tzdata/africa Sun Nov 16 04:10:23 2014 (r274565) +++ stable/9/contrib/tzdata/africa Sun Nov 16 04:11:37 2014 (r274566) @@ -6,20 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-02-21): +# From Paul Eggert (2014-10-31): # -# A good source for time zone historical data outside the U.S. is +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which @@ -65,7 +64,6 @@ # 3:00 CAST Central Africa Summer Time (no longer used) # 3:00 SAST South Africa Summer Time (no longer used) # 3:00 EAT East Africa Time -# 4:00 EAST East Africa Summer Time (no longer used) # Algeria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -146,9 +144,7 @@ Zone Africa/Ndjamena 1:00:12 - LMT 1912 1:00 - WAT # Comoros -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Comoro 2:53:04 - LMT 1911 Jul # Moroni, Gran Comoro - 3:00 - EAT +# See Africa/Nairobi. # Democratic Republic of the Congo # See Africa/Lagos for the western part and Africa/Maputo for the eastern. @@ -172,9 +168,7 @@ Link Africa/Abidjan Africa/Sao_Tome # Sà Link Africa/Abidjan Atlantic/St_Helena # St Helena # Djibouti -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Djibouti 2:52:36 - LMT 1911 Jul - 3:00 - EAT +# See Africa/Nairobi. ############################################################################### @@ -387,27 +381,8 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct # See Africa/Lagos. # Eritrea -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Asmara 2:35:32 - LMT 1870 - 2:35:32 - AMT 1890 # Asmara Mean Time - 2:35:20 - ADMT 1936 May 5 # Adis Dera MT - 3:00 - EAT - # Ethiopia -# From Paul Eggert (2014-07-31): -# Like the Swahili of Kenya and Tanzania, many Ethiopians keep a -# 12-hour clock starting at our 06:00, so their "8 o'clock" is our -# 02:00 or 14:00. Keep this in mind when you ask the time in Amharic. -# -# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time -# zones between 1870 and 1890, that they merged to 38E50 (2:35:20) in -# 1890, and that they switched to 3:00 on 1936-05-05. Perhaps 38E50 -# was for Adis Dera. Quite likely the Shanks data entries are wrong -# anyway. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Addis_Ababa 2:34:48 - LMT 1870 - 2:35:20 - ADMT 1936 May 5 # Adis Dera MT - 3:00 - EAT +# See Africa/Nairobi. # Gabon # See Africa/Lagos. @@ -451,6 +426,15 @@ Zone Africa/Nairobi 2:27:16 - LMT 1928 J 2:30 - BEAT 1940 2:45 - BEAUT 1960 3:00 - EAT +Link Africa/Nairobi Africa/Addis_Ababa # Ethiopia +Link Africa/Nairobi Africa/Asmara # Eritrea +Link Africa/Nairobi Africa/Dar_es_Salaam # Tanzania +Link Africa/Nairobi Africa/Djibouti +Link Africa/Nairobi Africa/Kampala # Uganda +Link Africa/Nairobi Africa/Mogadishu # Somalia +Link Africa/Nairobi Indian/Antananarivo # Madagascar +Link Africa/Nairobi Indian/Comoro +Link Africa/Nairobi Indian/Mayotte # Lesotho # See Africa/Johannesburg. @@ -528,11 +512,7 @@ Zone Africa/Tripoli 0:52:44 - LMT 1920 2:00 - EET # Madagascar -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Antananarivo 3:10:04 - LMT 1911 Jul - 3:00 - EAT 1954 Feb 27 23:00s - 3:00 1:00 EAST 1954 May 29 23:00s - 3:00 - EAT +# See Africa/Nairobi. # Malawi # See Africa/Maputo. @@ -635,9 +615,7 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # no information; probably like Indian/Mauritius # Mayotte -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Mayotte 3:00:56 - LMT 1911 Jul # Mamoutzou - 3:00 - EAT +# See Africa/Nairobi. # Morocco # See the 'europe' file for Spanish Morocco (Africa/Ceuta). @@ -1049,11 +1027,7 @@ Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # See Africa/Abidjan. # Somalia -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Mogadishu 3:01:28 - LMT 1893 Nov - 3:00 - EAT 1931 - 2:30 - BEAT 1957 - 3:00 - EAT +# See Africa/Nairobi. # South Africa # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -1096,11 +1070,7 @@ Link Africa/Khartoum Africa/Juba # See Africa/Johannesburg. # Tanzania -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Dar_es_Salaam 2:37:08 - LMT 1931 - 3:00 - EAT 1948 - 2:45 - BEAUT 1961 - 3:00 - EAT +# See Africa/Nairobi. # Togo # See Africa/Abidjan. @@ -1206,12 +1176,7 @@ Zone Africa/Tunis 0:40:44 - LMT 1881 May 1:00 Tunisia CE%sT # Uganda -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Kampala 2:09:40 - LMT 1928 Jul - 3:00 - EAT 1930 - 2:30 - BEAT 1948 - 2:45 - BEAUT 1957 - 3:00 - EAT +# See Africa/Nairobi. # Zambia # Zimbabwe Modified: stable/9/contrib/tzdata/asia ============================================================================== --- stable/9/contrib/tzdata/asia Sun Nov 16 04:10:23 2014 (r274565) +++ stable/9/contrib/tzdata/asia Sun Nov 16 04:11:37 2014 (r274566) @@ -6,20 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-08-11): +# From Paul Eggert (2014-10-31): # -# A good source for time zone historical data outside the U.S. is +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which @@ -1663,44 +1662,70 @@ Zone Asia/Bishkek 4:58:24 - LMT 1924 May # Korea (North and South) # From Annie I. Bang (2006-07-10): -# http://www.koreaherald.co.kr/SITE/data/html_dir/2006/07/10/200607100012.asp -# The Ministry of Commerce, Industry and Energy has already -# commissioned a research project [to reintroduce DST] and has said -# the system may begin as early as 2008.... Korea ran a daylight -# saving program from 1949-61 but stopped it during the 1950-53 Korean War. - -# From Shanks & Pottenger: -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule ROK 1960 only - May 15 0:00 1:00 D -Rule ROK 1960 only - Sep 13 0:00 0 S -Rule ROK 1987 1988 - May Sun>=8 0:00 1:00 D -Rule ROK 1987 1988 - Oct Sun>=8 0:00 0 S - -# From Paul Eggert (2014-07-01): -# The following entries are from Shanks & Pottenger, except that I -# guessed that time zone abbreviations through 1945 followed the same +# http://www.koreaherald.com/view.php?ud=200607100012 +# Korea ran a daylight saving program from 1949-61 but stopped it +# during the 1950-53 Korean War. The system was temporarily enforced +# between 1987 and 1988 ... + +# From Sanghyuk Jung (2014-10-29): +# http://mm.icann.org/pipermail/tz/2014-October/021830.html +# According to the Korean Wikipedia +# http://ko.wikipedia.org/wiki/한국_표준시 +# [oldid=12896437 2014-09-04 08:03 UTC] +# DST in Republic of Korea was as follows.... And I checked old +# newspapers in Korean, all articles correspond with data in Wikipedia. +# For example, the article in 1948 (Korean Language) proved that DST +# started at June 1 in that year. For another example, the article in +# 1988 said that DST started at 2:00 AM in that year. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule ROK 1948 only - Jun 1 0:00 1:00 D +Rule ROK 1948 only - Sep 13 0:00 0 S +Rule ROK 1949 only - Apr 3 0:00 1:00 D +Rule ROK 1949 1951 - Sep Sun>=8 0:00 0 S +Rule ROK 1950 only - Apr 1 0:00 1:00 D +Rule ROK 1951 only - May 6 0:00 1:00 D +Rule ROK 1955 only - May 5 0:00 1:00 D +Rule ROK 1955 only - Sep 9 0:00 0 S +Rule ROK 1956 only - May 20 0:00 1:00 D +Rule ROK 1956 only - Sep 30 0:00 0 S +Rule ROK 1957 1960 - May Sun>=1 0:00 1:00 D +Rule ROK 1957 1960 - Sep Sun>=18 0:00 0 S +Rule ROK 1987 1988 - May Sun>=8 2:00 1:00 D +Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S + +# From Paul Eggert (2014-10-30): +# The Korean Wikipedia entry gives the following sources for UT offsets: +# +# 1908: Official Journal Article No. 3994 (Edict No. 5) +# 1912: Governor-General of Korea Official Gazette Issue No. 367 +# (Announcement No. 338) +# 1954: Presidential Decree No. 876 (1954-03-17) +# 1961: Law No. 676 (1961-08-07) +# 1987: Law No. 3919 (1986-12-31) +# +# The Wikipedia entry also has confusing information about a change +# to UT+9 in April 1910, but then what would be the point of the later change +# to UT+9 on 1912-01-01? Omit the 1910 change for now. +# +# I guessed that time zone abbreviations through 1945 followed the same # rules as discussed under Taiwan, with nominal switches from JST to KST # when the respective cities were taken over by the Allies after WWII. +# +# For Pyongyang we have no information; guess no changes since World War II. # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Seoul 8:27:52 - LMT 1890 - 8:30 - KST 1904 Dec - 9:00 - JCST 1928 - 8:30 - KST 1932 +Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1 + 8:30 - KST 1912 Jan 1 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Sep 8 9:00 - KST 1954 Mar 21 - 8:00 ROK K%sT 1961 Aug 10 - 8:30 - KST 1968 Oct + 8:30 ROK K%sT 1961 Aug 10 9:00 ROK K%sT -Zone Asia/Pyongyang 8:23:00 - LMT 1890 - 8:30 - KST 1904 Dec - 9:00 - JCST 1928 - 8:30 - KST 1932 +Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1 + 8:30 - KST 1912 Jan 1 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Aug 24 - 9:00 - KST 1954 Mar 21 - 8:00 - KST 1961 Aug 10 9:00 - KST ############################################################################### Modified: stable/9/contrib/tzdata/australasia ============================================================================== --- stable/9/contrib/tzdata/australasia Sun Nov 16 04:10:23 2014 (r274565) +++ stable/9/contrib/tzdata/australasia Sun Nov 16 04:11:37 2014 (r274566) @@ -797,19 +797,19 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-02-21): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which Modified: stable/9/contrib/tzdata/europe ============================================================================== --- stable/9/contrib/tzdata/europe Sun Nov 16 04:10:23 2014 (r274565) +++ stable/9/contrib/tzdata/europe Sun Nov 16 04:11:37 2014 (r274566) @@ -6,16 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-05-31): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). @@ -287,6 +290,14 @@ # "Timeball on the ballast office is down. Dunsink time." # -- James Joyce, Ulysses +# "Countess Markievicz ... claimed that the [1916] abolition of Dublin Mean Time +# was among various actions undertaken by the 'English' government that +# would 'put the whole country into the SF (Sinn Féin) camp'. She claimed +# Irish 'public feeling (was) outraged by forcing of English time on us'." +# -- Parsons M. Dublin lost its time zone - and 25 minutes - after 1916 Rising. +# Irish Times 2014-10-27. +# http://www.irishtimes.com/news/politics/dublin-lost-its-time-zone-and-25-minutes-after-1916-rising-1.1977411 + # From Joseph S. Myers (2005-01-26): # Irish laws are available online at . # These include various relating to legal time, for example: @@ -594,6 +605,7 @@ Rule Russia 1992 only - Sep lastSat 23: Rule Russia 1993 2010 - Mar lastSun 2:00s 1:00 S Rule Russia 1993 1995 - Sep lastSun 2:00s 0 - Rule Russia 1996 2010 - Oct lastSun 2:00s 0 - +# As described below, Russia's 2014 change affects Zone data, not Rule data. # From Alexander Krivenyshev (2011-06-14): # According to Kremlin press service, Russian President Dmitry Medvedev Modified: stable/9/contrib/tzdata/northamerica ============================================================================== --- stable/9/contrib/tzdata/northamerica Sun Nov 16 04:10:23 2014 (r274565) +++ stable/9/contrib/tzdata/northamerica Sun Nov 16 04:11:37 2014 (r274566) @@ -991,19 +991,19 @@ Zone America/Menominee -5:50:27 - LMT 18 ################################################################################ -# From Paul Eggert (2006-03-22): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Other sources occasionally used include: # @@ -3131,13 +3131,17 @@ Zone America/Miquelon -3:44:40 - LMT 191 # From Paul Eggert (2014-08-19): # The 2014-08-13 Cabinet meeting decided to stay on UTC-4 year-round. See: # http://tcweeklynews.com/daylight-savings-time-to-be-maintained-p5353-127.htm -# Model this as a switch from EST/EDT to AST on 2014-11-02 at 02:00. +# Model this as a switch from EST/EDT to AST ... +# From Chris Walton (2014-11-04): +# ... the TCI government appears to have delayed the switch to +# "permanent daylight saving time" by one year.... +# http://tcweeklynews.com/time-change-to-go-ahead-this-november-p5437-127.htm # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Grand_Turk -4:44:32 - LMT 1890 -5:07:11 - KMT 1912 Feb # Kingston Mean Time -5:00 - EST 1979 - -5:00 US E%sT 2014 Nov 2 2:00 + -5:00 US E%sT 2015 Nov Sun>=1 2:00 -4:00 - AST # British Virgin Is Modified: stable/9/contrib/tzdata/southamerica ============================================================================== --- stable/9/contrib/tzdata/southamerica Sun Nov 16 04:10:23 2014 (r274565) +++ stable/9/contrib/tzdata/southamerica Sun Nov 16 04:11:37 2014 (r274566) @@ -6,23 +6,23 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2006-03-22): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). -# -# For data circa 1899, a common source is: -# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. -# http://www.jstor.org/stable/1774359 +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# For data circa 1899, a common source is: +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. +# http://www.jstor.org/stable/1774359 # # Earlier editions of these tables used the North American style (e.g. ARST and # ARDT for Argentine Standard and Daylight Time), but the following quote From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 04:12:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E462B5A4; Sun, 16 Nov 2014 04:12:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D05701A8; Sun, 16 Nov 2014 04:12:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG4CRMv031809; Sun, 16 Nov 2014 04:12:27 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG4CQuU031796; Sun, 16 Nov 2014 04:12:26 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201411160412.sAG4CQuU031796@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Sun, 16 Nov 2014 04:12:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r274567 - stable/8/share/zoneinfo X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 04:12:28 -0000 Author: edwin Date: Sun Nov 16 04:12:25 2014 New Revision: 274567 URL: https://svnweb.freebsd.org/changeset/base/274567 Log: MFC of 274559,tzdata8: Release 2014j - 2014-11-10 17:37:11 -0800 Changes affecting current and future time stamps Turks & Caicos' switch from US eastern time to UTC-4 year-round did not occur on 2014-11-02 at 02:00. It's currently scheduled for 2015-11-01 at 02:00. (Thanks to Chris Walton.) Changes affecting past time stamps Many pre-1989 time stamps have been corrected for Asia/Seoul and Asia/Pyongyang, based on sources for the Korean-language Wikipedia entry for time in Korea. (Thanks to Sanghyuk Jung.) Also, no longer guess that Pyongyang mimicked Seoul time after World War II, as this is politically implausible. Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Africa/Addis_Ababa, Africa/Asmara, Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala, Africa/Mogadishu, Indian/Antananarivo, Indian/Comoro, and Indian/Mayotte. Changes affecting commentary The commentary is less enthusiastic about Shanks as a source, and is more careful to distinguish UT from UTC. Modified: stable/8/share/zoneinfo/africa stable/8/share/zoneinfo/asia stable/8/share/zoneinfo/australasia stable/8/share/zoneinfo/europe stable/8/share/zoneinfo/northamerica stable/8/share/zoneinfo/southamerica Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/africa ============================================================================== --- stable/8/share/zoneinfo/africa Sun Nov 16 04:11:37 2014 (r274566) +++ stable/8/share/zoneinfo/africa Sun Nov 16 04:12:25 2014 (r274567) @@ -6,20 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-02-21): +# From Paul Eggert (2014-10-31): # -# A good source for time zone historical data outside the U.S. is +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which @@ -65,7 +64,6 @@ # 3:00 CAST Central Africa Summer Time (no longer used) # 3:00 SAST South Africa Summer Time (no longer used) # 3:00 EAT East Africa Time -# 4:00 EAST East Africa Summer Time (no longer used) # Algeria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -146,9 +144,7 @@ Zone Africa/Ndjamena 1:00:12 - LMT 1912 1:00 - WAT # Comoros -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Comoro 2:53:04 - LMT 1911 Jul # Moroni, Gran Comoro - 3:00 - EAT +# See Africa/Nairobi. # Democratic Republic of the Congo # See Africa/Lagos for the western part and Africa/Maputo for the eastern. @@ -172,9 +168,7 @@ Link Africa/Abidjan Africa/Sao_Tome # Sà Link Africa/Abidjan Atlantic/St_Helena # St Helena # Djibouti -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Djibouti 2:52:36 - LMT 1911 Jul - 3:00 - EAT +# See Africa/Nairobi. ############################################################################### @@ -387,27 +381,8 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct # See Africa/Lagos. # Eritrea -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Asmara 2:35:32 - LMT 1870 - 2:35:32 - AMT 1890 # Asmara Mean Time - 2:35:20 - ADMT 1936 May 5 # Adis Dera MT - 3:00 - EAT - # Ethiopia -# From Paul Eggert (2014-07-31): -# Like the Swahili of Kenya and Tanzania, many Ethiopians keep a -# 12-hour clock starting at our 06:00, so their "8 o'clock" is our -# 02:00 or 14:00. Keep this in mind when you ask the time in Amharic. -# -# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time -# zones between 1870 and 1890, that they merged to 38E50 (2:35:20) in -# 1890, and that they switched to 3:00 on 1936-05-05. Perhaps 38E50 -# was for Adis Dera. Quite likely the Shanks data entries are wrong -# anyway. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Addis_Ababa 2:34:48 - LMT 1870 - 2:35:20 - ADMT 1936 May 5 # Adis Dera MT - 3:00 - EAT +# See Africa/Nairobi. # Gabon # See Africa/Lagos. @@ -451,6 +426,15 @@ Zone Africa/Nairobi 2:27:16 - LMT 1928 J 2:30 - BEAT 1940 2:45 - BEAUT 1960 3:00 - EAT +Link Africa/Nairobi Africa/Addis_Ababa # Ethiopia +Link Africa/Nairobi Africa/Asmara # Eritrea +Link Africa/Nairobi Africa/Dar_es_Salaam # Tanzania +Link Africa/Nairobi Africa/Djibouti +Link Africa/Nairobi Africa/Kampala # Uganda +Link Africa/Nairobi Africa/Mogadishu # Somalia +Link Africa/Nairobi Indian/Antananarivo # Madagascar +Link Africa/Nairobi Indian/Comoro +Link Africa/Nairobi Indian/Mayotte # Lesotho # See Africa/Johannesburg. @@ -528,11 +512,7 @@ Zone Africa/Tripoli 0:52:44 - LMT 1920 2:00 - EET # Madagascar -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Antananarivo 3:10:04 - LMT 1911 Jul - 3:00 - EAT 1954 Feb 27 23:00s - 3:00 1:00 EAST 1954 May 29 23:00s - 3:00 - EAT +# See Africa/Nairobi. # Malawi # See Africa/Maputo. @@ -635,9 +615,7 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # no information; probably like Indian/Mauritius # Mayotte -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Mayotte 3:00:56 - LMT 1911 Jul # Mamoutzou - 3:00 - EAT +# See Africa/Nairobi. # Morocco # See the 'europe' file for Spanish Morocco (Africa/Ceuta). @@ -1049,11 +1027,7 @@ Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # See Africa/Abidjan. # Somalia -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Mogadishu 3:01:28 - LMT 1893 Nov - 3:00 - EAT 1931 - 2:30 - BEAT 1957 - 3:00 - EAT +# See Africa/Nairobi. # South Africa # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -1096,11 +1070,7 @@ Link Africa/Khartoum Africa/Juba # See Africa/Johannesburg. # Tanzania -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Dar_es_Salaam 2:37:08 - LMT 1931 - 3:00 - EAT 1948 - 2:45 - BEAUT 1961 - 3:00 - EAT +# See Africa/Nairobi. # Togo # See Africa/Abidjan. @@ -1206,12 +1176,7 @@ Zone Africa/Tunis 0:40:44 - LMT 1881 May 1:00 Tunisia CE%sT # Uganda -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Kampala 2:09:40 - LMT 1928 Jul - 3:00 - EAT 1930 - 2:30 - BEAT 1948 - 2:45 - BEAUT 1957 - 3:00 - EAT +# See Africa/Nairobi. # Zambia # Zimbabwe Modified: stable/8/share/zoneinfo/asia ============================================================================== --- stable/8/share/zoneinfo/asia Sun Nov 16 04:11:37 2014 (r274566) +++ stable/8/share/zoneinfo/asia Sun Nov 16 04:12:25 2014 (r274567) @@ -6,20 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-08-11): +# From Paul Eggert (2014-10-31): # -# A good source for time zone historical data outside the U.S. is +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which @@ -1663,44 +1662,70 @@ Zone Asia/Bishkek 4:58:24 - LMT 1924 May # Korea (North and South) # From Annie I. Bang (2006-07-10): -# http://www.koreaherald.co.kr/SITE/data/html_dir/2006/07/10/200607100012.asp -# The Ministry of Commerce, Industry and Energy has already -# commissioned a research project [to reintroduce DST] and has said -# the system may begin as early as 2008.... Korea ran a daylight -# saving program from 1949-61 but stopped it during the 1950-53 Korean War. - -# From Shanks & Pottenger: -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule ROK 1960 only - May 15 0:00 1:00 D -Rule ROK 1960 only - Sep 13 0:00 0 S -Rule ROK 1987 1988 - May Sun>=8 0:00 1:00 D -Rule ROK 1987 1988 - Oct Sun>=8 0:00 0 S - -# From Paul Eggert (2014-07-01): -# The following entries are from Shanks & Pottenger, except that I -# guessed that time zone abbreviations through 1945 followed the same +# http://www.koreaherald.com/view.php?ud=200607100012 +# Korea ran a daylight saving program from 1949-61 but stopped it +# during the 1950-53 Korean War. The system was temporarily enforced +# between 1987 and 1988 ... + +# From Sanghyuk Jung (2014-10-29): +# http://mm.icann.org/pipermail/tz/2014-October/021830.html +# According to the Korean Wikipedia +# http://ko.wikipedia.org/wiki/한국_표준시 +# [oldid=12896437 2014-09-04 08:03 UTC] +# DST in Republic of Korea was as follows.... And I checked old +# newspapers in Korean, all articles correspond with data in Wikipedia. +# For example, the article in 1948 (Korean Language) proved that DST +# started at June 1 in that year. For another example, the article in +# 1988 said that DST started at 2:00 AM in that year. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule ROK 1948 only - Jun 1 0:00 1:00 D +Rule ROK 1948 only - Sep 13 0:00 0 S +Rule ROK 1949 only - Apr 3 0:00 1:00 D +Rule ROK 1949 1951 - Sep Sun>=8 0:00 0 S +Rule ROK 1950 only - Apr 1 0:00 1:00 D +Rule ROK 1951 only - May 6 0:00 1:00 D +Rule ROK 1955 only - May 5 0:00 1:00 D +Rule ROK 1955 only - Sep 9 0:00 0 S +Rule ROK 1956 only - May 20 0:00 1:00 D +Rule ROK 1956 only - Sep 30 0:00 0 S +Rule ROK 1957 1960 - May Sun>=1 0:00 1:00 D +Rule ROK 1957 1960 - Sep Sun>=18 0:00 0 S +Rule ROK 1987 1988 - May Sun>=8 2:00 1:00 D +Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S + +# From Paul Eggert (2014-10-30): +# The Korean Wikipedia entry gives the following sources for UT offsets: +# +# 1908: Official Journal Article No. 3994 (Edict No. 5) +# 1912: Governor-General of Korea Official Gazette Issue No. 367 +# (Announcement No. 338) +# 1954: Presidential Decree No. 876 (1954-03-17) +# 1961: Law No. 676 (1961-08-07) +# 1987: Law No. 3919 (1986-12-31) +# +# The Wikipedia entry also has confusing information about a change +# to UT+9 in April 1910, but then what would be the point of the later change +# to UT+9 on 1912-01-01? Omit the 1910 change for now. +# +# I guessed that time zone abbreviations through 1945 followed the same # rules as discussed under Taiwan, with nominal switches from JST to KST # when the respective cities were taken over by the Allies after WWII. +# +# For Pyongyang we have no information; guess no changes since World War II. # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Seoul 8:27:52 - LMT 1890 - 8:30 - KST 1904 Dec - 9:00 - JCST 1928 - 8:30 - KST 1932 +Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1 + 8:30 - KST 1912 Jan 1 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Sep 8 9:00 - KST 1954 Mar 21 - 8:00 ROK K%sT 1961 Aug 10 - 8:30 - KST 1968 Oct + 8:30 ROK K%sT 1961 Aug 10 9:00 ROK K%sT -Zone Asia/Pyongyang 8:23:00 - LMT 1890 - 8:30 - KST 1904 Dec - 9:00 - JCST 1928 - 8:30 - KST 1932 +Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1 + 8:30 - KST 1912 Jan 1 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Aug 24 - 9:00 - KST 1954 Mar 21 - 8:00 - KST 1961 Aug 10 9:00 - KST ############################################################################### Modified: stable/8/share/zoneinfo/australasia ============================================================================== --- stable/8/share/zoneinfo/australasia Sun Nov 16 04:11:37 2014 (r274566) +++ stable/8/share/zoneinfo/australasia Sun Nov 16 04:12:25 2014 (r274567) @@ -797,19 +797,19 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-02-21): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which Modified: stable/8/share/zoneinfo/europe ============================================================================== --- stable/8/share/zoneinfo/europe Sun Nov 16 04:11:37 2014 (r274566) +++ stable/8/share/zoneinfo/europe Sun Nov 16 04:12:25 2014 (r274567) @@ -6,16 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-05-31): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). @@ -287,6 +290,14 @@ # "Timeball on the ballast office is down. Dunsink time." # -- James Joyce, Ulysses +# "Countess Markievicz ... claimed that the [1916] abolition of Dublin Mean Time +# was among various actions undertaken by the 'English' government that +# would 'put the whole country into the SF (Sinn Féin) camp'. She claimed +# Irish 'public feeling (was) outraged by forcing of English time on us'." +# -- Parsons M. Dublin lost its time zone - and 25 minutes - after 1916 Rising. +# Irish Times 2014-10-27. +# http://www.irishtimes.com/news/politics/dublin-lost-its-time-zone-and-25-minutes-after-1916-rising-1.1977411 + # From Joseph S. Myers (2005-01-26): # Irish laws are available online at . # These include various relating to legal time, for example: @@ -594,6 +605,7 @@ Rule Russia 1992 only - Sep lastSat 23: Rule Russia 1993 2010 - Mar lastSun 2:00s 1:00 S Rule Russia 1993 1995 - Sep lastSun 2:00s 0 - Rule Russia 1996 2010 - Oct lastSun 2:00s 0 - +# As described below, Russia's 2014 change affects Zone data, not Rule data. # From Alexander Krivenyshev (2011-06-14): # According to Kremlin press service, Russian President Dmitry Medvedev Modified: stable/8/share/zoneinfo/northamerica ============================================================================== --- stable/8/share/zoneinfo/northamerica Sun Nov 16 04:11:37 2014 (r274566) +++ stable/8/share/zoneinfo/northamerica Sun Nov 16 04:12:25 2014 (r274567) @@ -991,19 +991,19 @@ Zone America/Menominee -5:50:27 - LMT 18 ################################################################################ -# From Paul Eggert (2006-03-22): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Other sources occasionally used include: # @@ -3131,13 +3131,17 @@ Zone America/Miquelon -3:44:40 - LMT 191 # From Paul Eggert (2014-08-19): # The 2014-08-13 Cabinet meeting decided to stay on UTC-4 year-round. See: # http://tcweeklynews.com/daylight-savings-time-to-be-maintained-p5353-127.htm -# Model this as a switch from EST/EDT to AST on 2014-11-02 at 02:00. +# Model this as a switch from EST/EDT to AST ... +# From Chris Walton (2014-11-04): +# ... the TCI government appears to have delayed the switch to +# "permanent daylight saving time" by one year.... +# http://tcweeklynews.com/time-change-to-go-ahead-this-november-p5437-127.htm # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Grand_Turk -4:44:32 - LMT 1890 -5:07:11 - KMT 1912 Feb # Kingston Mean Time -5:00 - EST 1979 - -5:00 US E%sT 2014 Nov 2 2:00 + -5:00 US E%sT 2015 Nov Sun>=1 2:00 -4:00 - AST # British Virgin Is Modified: stable/8/share/zoneinfo/southamerica ============================================================================== --- stable/8/share/zoneinfo/southamerica Sun Nov 16 04:11:37 2014 (r274566) +++ stable/8/share/zoneinfo/southamerica Sun Nov 16 04:12:25 2014 (r274567) @@ -6,23 +6,23 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2006-03-22): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). -# -# For data circa 1899, a common source is: -# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. -# http://www.jstor.org/stable/1774359 +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# For data circa 1899, a common source is: +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. +# http://www.jstor.org/stable/1774359 # # Earlier editions of these tables used the North American style (e.g. ARST and # ARDT for Argentine Standard and Daylight Time), but the following quote From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 04:13:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA1196DF; Sun, 16 Nov 2014 04:13:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5E571B2; Sun, 16 Nov 2014 04:13:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG4DBQl031959; Sun, 16 Nov 2014 04:13:11 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG4DAtw031950; Sun, 16 Nov 2014 04:13:10 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201411160413.sAG4DAtw031950@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Sun, 16 Nov 2014 04:13:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r274568 - stable/7/share/zoneinfo X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 04:13:12 -0000 Author: edwin Date: Sun Nov 16 04:13:09 2014 New Revision: 274568 URL: https://svnweb.freebsd.org/changeset/base/274568 Log: MFC of 274559,tzdata7: Release 2014j - 2014-11-10 17:37:11 -0800 Changes affecting current and future time stamps Turks & Caicos' switch from US eastern time to UTC-4 year-round did not occur on 2014-11-02 at 02:00. It's currently scheduled for 2015-11-01 at 02:00. (Thanks to Chris Walton.) Changes affecting past time stamps Many pre-1989 time stamps have been corrected for Asia/Seoul and Asia/Pyongyang, based on sources for the Korean-language Wikipedia entry for time in Korea. (Thanks to Sanghyuk Jung.) Also, no longer guess that Pyongyang mimicked Seoul time after World War II, as this is politically implausible. Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Africa/Addis_Ababa, Africa/Asmara, Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala, Africa/Mogadishu, Indian/Antananarivo, Indian/Comoro, and Indian/Mayotte. Changes affecting commentary The commentary is less enthusiastic about Shanks as a source, and is more careful to distinguish UT from UTC. Modified: stable/7/share/zoneinfo/africa stable/7/share/zoneinfo/asia stable/7/share/zoneinfo/australasia stable/7/share/zoneinfo/europe stable/7/share/zoneinfo/northamerica stable/7/share/zoneinfo/southamerica Directory Properties: stable/7/share/zoneinfo/ (props changed) Modified: stable/7/share/zoneinfo/africa ============================================================================== --- stable/7/share/zoneinfo/africa Sun Nov 16 04:12:25 2014 (r274567) +++ stable/7/share/zoneinfo/africa Sun Nov 16 04:13:09 2014 (r274568) @@ -6,20 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-02-21): +# From Paul Eggert (2014-10-31): # -# A good source for time zone historical data outside the U.S. is +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which @@ -65,7 +64,6 @@ # 3:00 CAST Central Africa Summer Time (no longer used) # 3:00 SAST South Africa Summer Time (no longer used) # 3:00 EAT East Africa Time -# 4:00 EAST East Africa Summer Time (no longer used) # Algeria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -146,9 +144,7 @@ Zone Africa/Ndjamena 1:00:12 - LMT 1912 1:00 - WAT # Comoros -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Comoro 2:53:04 - LMT 1911 Jul # Moroni, Gran Comoro - 3:00 - EAT +# See Africa/Nairobi. # Democratic Republic of the Congo # See Africa/Lagos for the western part and Africa/Maputo for the eastern. @@ -172,9 +168,7 @@ Link Africa/Abidjan Africa/Sao_Tome # Sà Link Africa/Abidjan Atlantic/St_Helena # St Helena # Djibouti -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Djibouti 2:52:36 - LMT 1911 Jul - 3:00 - EAT +# See Africa/Nairobi. ############################################################################### @@ -387,27 +381,8 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct # See Africa/Lagos. # Eritrea -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Asmara 2:35:32 - LMT 1870 - 2:35:32 - AMT 1890 # Asmara Mean Time - 2:35:20 - ADMT 1936 May 5 # Adis Dera MT - 3:00 - EAT - # Ethiopia -# From Paul Eggert (2014-07-31): -# Like the Swahili of Kenya and Tanzania, many Ethiopians keep a -# 12-hour clock starting at our 06:00, so their "8 o'clock" is our -# 02:00 or 14:00. Keep this in mind when you ask the time in Amharic. -# -# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time -# zones between 1870 and 1890, that they merged to 38E50 (2:35:20) in -# 1890, and that they switched to 3:00 on 1936-05-05. Perhaps 38E50 -# was for Adis Dera. Quite likely the Shanks data entries are wrong -# anyway. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Addis_Ababa 2:34:48 - LMT 1870 - 2:35:20 - ADMT 1936 May 5 # Adis Dera MT - 3:00 - EAT +# See Africa/Nairobi. # Gabon # See Africa/Lagos. @@ -451,6 +426,15 @@ Zone Africa/Nairobi 2:27:16 - LMT 1928 J 2:30 - BEAT 1940 2:45 - BEAUT 1960 3:00 - EAT +Link Africa/Nairobi Africa/Addis_Ababa # Ethiopia +Link Africa/Nairobi Africa/Asmara # Eritrea +Link Africa/Nairobi Africa/Dar_es_Salaam # Tanzania +Link Africa/Nairobi Africa/Djibouti +Link Africa/Nairobi Africa/Kampala # Uganda +Link Africa/Nairobi Africa/Mogadishu # Somalia +Link Africa/Nairobi Indian/Antananarivo # Madagascar +Link Africa/Nairobi Indian/Comoro +Link Africa/Nairobi Indian/Mayotte # Lesotho # See Africa/Johannesburg. @@ -528,11 +512,7 @@ Zone Africa/Tripoli 0:52:44 - LMT 1920 2:00 - EET # Madagascar -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Antananarivo 3:10:04 - LMT 1911 Jul - 3:00 - EAT 1954 Feb 27 23:00s - 3:00 1:00 EAST 1954 May 29 23:00s - 3:00 - EAT +# See Africa/Nairobi. # Malawi # See Africa/Maputo. @@ -635,9 +615,7 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # no information; probably like Indian/Mauritius # Mayotte -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Mayotte 3:00:56 - LMT 1911 Jul # Mamoutzou - 3:00 - EAT +# See Africa/Nairobi. # Morocco # See the 'europe' file for Spanish Morocco (Africa/Ceuta). @@ -1049,11 +1027,7 @@ Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # See Africa/Abidjan. # Somalia -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Mogadishu 3:01:28 - LMT 1893 Nov - 3:00 - EAT 1931 - 2:30 - BEAT 1957 - 3:00 - EAT +# See Africa/Nairobi. # South Africa # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -1096,11 +1070,7 @@ Link Africa/Khartoum Africa/Juba # See Africa/Johannesburg. # Tanzania -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Dar_es_Salaam 2:37:08 - LMT 1931 - 3:00 - EAT 1948 - 2:45 - BEAUT 1961 - 3:00 - EAT +# See Africa/Nairobi. # Togo # See Africa/Abidjan. @@ -1206,12 +1176,7 @@ Zone Africa/Tunis 0:40:44 - LMT 1881 May 1:00 Tunisia CE%sT # Uganda -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Kampala 2:09:40 - LMT 1928 Jul - 3:00 - EAT 1930 - 2:30 - BEAT 1948 - 2:45 - BEAUT 1957 - 3:00 - EAT +# See Africa/Nairobi. # Zambia # Zimbabwe Modified: stable/7/share/zoneinfo/asia ============================================================================== --- stable/7/share/zoneinfo/asia Sun Nov 16 04:12:25 2014 (r274567) +++ stable/7/share/zoneinfo/asia Sun Nov 16 04:13:09 2014 (r274568) @@ -6,20 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-08-11): +# From Paul Eggert (2014-10-31): # -# A good source for time zone historical data outside the U.S. is +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which @@ -1663,44 +1662,70 @@ Zone Asia/Bishkek 4:58:24 - LMT 1924 May # Korea (North and South) # From Annie I. Bang (2006-07-10): -# http://www.koreaherald.co.kr/SITE/data/html_dir/2006/07/10/200607100012.asp -# The Ministry of Commerce, Industry and Energy has already -# commissioned a research project [to reintroduce DST] and has said -# the system may begin as early as 2008.... Korea ran a daylight -# saving program from 1949-61 but stopped it during the 1950-53 Korean War. - -# From Shanks & Pottenger: -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule ROK 1960 only - May 15 0:00 1:00 D -Rule ROK 1960 only - Sep 13 0:00 0 S -Rule ROK 1987 1988 - May Sun>=8 0:00 1:00 D -Rule ROK 1987 1988 - Oct Sun>=8 0:00 0 S - -# From Paul Eggert (2014-07-01): -# The following entries are from Shanks & Pottenger, except that I -# guessed that time zone abbreviations through 1945 followed the same +# http://www.koreaherald.com/view.php?ud=200607100012 +# Korea ran a daylight saving program from 1949-61 but stopped it +# during the 1950-53 Korean War. The system was temporarily enforced +# between 1987 and 1988 ... + +# From Sanghyuk Jung (2014-10-29): +# http://mm.icann.org/pipermail/tz/2014-October/021830.html +# According to the Korean Wikipedia +# http://ko.wikipedia.org/wiki/한국_표준시 +# [oldid=12896437 2014-09-04 08:03 UTC] +# DST in Republic of Korea was as follows.... And I checked old +# newspapers in Korean, all articles correspond with data in Wikipedia. +# For example, the article in 1948 (Korean Language) proved that DST +# started at June 1 in that year. For another example, the article in +# 1988 said that DST started at 2:00 AM in that year. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule ROK 1948 only - Jun 1 0:00 1:00 D +Rule ROK 1948 only - Sep 13 0:00 0 S +Rule ROK 1949 only - Apr 3 0:00 1:00 D +Rule ROK 1949 1951 - Sep Sun>=8 0:00 0 S +Rule ROK 1950 only - Apr 1 0:00 1:00 D +Rule ROK 1951 only - May 6 0:00 1:00 D +Rule ROK 1955 only - May 5 0:00 1:00 D +Rule ROK 1955 only - Sep 9 0:00 0 S +Rule ROK 1956 only - May 20 0:00 1:00 D +Rule ROK 1956 only - Sep 30 0:00 0 S +Rule ROK 1957 1960 - May Sun>=1 0:00 1:00 D +Rule ROK 1957 1960 - Sep Sun>=18 0:00 0 S +Rule ROK 1987 1988 - May Sun>=8 2:00 1:00 D +Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S + +# From Paul Eggert (2014-10-30): +# The Korean Wikipedia entry gives the following sources for UT offsets: +# +# 1908: Official Journal Article No. 3994 (Edict No. 5) +# 1912: Governor-General of Korea Official Gazette Issue No. 367 +# (Announcement No. 338) +# 1954: Presidential Decree No. 876 (1954-03-17) +# 1961: Law No. 676 (1961-08-07) +# 1987: Law No. 3919 (1986-12-31) +# +# The Wikipedia entry also has confusing information about a change +# to UT+9 in April 1910, but then what would be the point of the later change +# to UT+9 on 1912-01-01? Omit the 1910 change for now. +# +# I guessed that time zone abbreviations through 1945 followed the same # rules as discussed under Taiwan, with nominal switches from JST to KST # when the respective cities were taken over by the Allies after WWII. +# +# For Pyongyang we have no information; guess no changes since World War II. # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Seoul 8:27:52 - LMT 1890 - 8:30 - KST 1904 Dec - 9:00 - JCST 1928 - 8:30 - KST 1932 +Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1 + 8:30 - KST 1912 Jan 1 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Sep 8 9:00 - KST 1954 Mar 21 - 8:00 ROK K%sT 1961 Aug 10 - 8:30 - KST 1968 Oct + 8:30 ROK K%sT 1961 Aug 10 9:00 ROK K%sT -Zone Asia/Pyongyang 8:23:00 - LMT 1890 - 8:30 - KST 1904 Dec - 9:00 - JCST 1928 - 8:30 - KST 1932 +Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1 + 8:30 - KST 1912 Jan 1 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Aug 24 - 9:00 - KST 1954 Mar 21 - 8:00 - KST 1961 Aug 10 9:00 - KST ############################################################################### Modified: stable/7/share/zoneinfo/australasia ============================================================================== --- stable/7/share/zoneinfo/australasia Sun Nov 16 04:12:25 2014 (r274567) +++ stable/7/share/zoneinfo/australasia Sun Nov 16 04:13:09 2014 (r274568) @@ -797,19 +797,19 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-02-21): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which Modified: stable/7/share/zoneinfo/europe ============================================================================== --- stable/7/share/zoneinfo/europe Sun Nov 16 04:12:25 2014 (r274567) +++ stable/7/share/zoneinfo/europe Sun Nov 16 04:13:09 2014 (r274568) @@ -6,16 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-05-31): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). @@ -287,6 +290,14 @@ # "Timeball on the ballast office is down. Dunsink time." # -- James Joyce, Ulysses +# "Countess Markievicz ... claimed that the [1916] abolition of Dublin Mean Time +# was among various actions undertaken by the 'English' government that +# would 'put the whole country into the SF (Sinn Féin) camp'. She claimed +# Irish 'public feeling (was) outraged by forcing of English time on us'." +# -- Parsons M. Dublin lost its time zone - and 25 minutes - after 1916 Rising. +# Irish Times 2014-10-27. +# http://www.irishtimes.com/news/politics/dublin-lost-its-time-zone-and-25-minutes-after-1916-rising-1.1977411 + # From Joseph S. Myers (2005-01-26): # Irish laws are available online at . # These include various relating to legal time, for example: @@ -594,6 +605,7 @@ Rule Russia 1992 only - Sep lastSat 23: Rule Russia 1993 2010 - Mar lastSun 2:00s 1:00 S Rule Russia 1993 1995 - Sep lastSun 2:00s 0 - Rule Russia 1996 2010 - Oct lastSun 2:00s 0 - +# As described below, Russia's 2014 change affects Zone data, not Rule data. # From Alexander Krivenyshev (2011-06-14): # According to Kremlin press service, Russian President Dmitry Medvedev Modified: stable/7/share/zoneinfo/northamerica ============================================================================== --- stable/7/share/zoneinfo/northamerica Sun Nov 16 04:12:25 2014 (r274567) +++ stable/7/share/zoneinfo/northamerica Sun Nov 16 04:13:09 2014 (r274568) @@ -991,19 +991,19 @@ Zone America/Menominee -5:50:27 - LMT 18 ################################################################################ -# From Paul Eggert (2006-03-22): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Other sources occasionally used include: # @@ -3131,13 +3131,17 @@ Zone America/Miquelon -3:44:40 - LMT 191 # From Paul Eggert (2014-08-19): # The 2014-08-13 Cabinet meeting decided to stay on UTC-4 year-round. See: # http://tcweeklynews.com/daylight-savings-time-to-be-maintained-p5353-127.htm -# Model this as a switch from EST/EDT to AST on 2014-11-02 at 02:00. +# Model this as a switch from EST/EDT to AST ... +# From Chris Walton (2014-11-04): +# ... the TCI government appears to have delayed the switch to +# "permanent daylight saving time" by one year.... +# http://tcweeklynews.com/time-change-to-go-ahead-this-november-p5437-127.htm # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Grand_Turk -4:44:32 - LMT 1890 -5:07:11 - KMT 1912 Feb # Kingston Mean Time -5:00 - EST 1979 - -5:00 US E%sT 2014 Nov 2 2:00 + -5:00 US E%sT 2015 Nov Sun>=1 2:00 -4:00 - AST # British Virgin Is Modified: stable/7/share/zoneinfo/southamerica ============================================================================== --- stable/7/share/zoneinfo/southamerica Sun Nov 16 04:12:25 2014 (r274567) +++ stable/7/share/zoneinfo/southamerica Sun Nov 16 04:13:09 2014 (r274568) @@ -6,23 +6,23 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2006-03-22): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). -# -# For data circa 1899, a common source is: -# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. -# http://www.jstor.org/stable/1774359 +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# For data circa 1899, a common source is: +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. +# http://www.jstor.org/stable/1774359 # # Earlier editions of these tables used the North American style (e.g. ARST and # ARDT for Argentine Standard and Daylight Time), but the following quote From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 04:13:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5F29819; Sun, 16 Nov 2014 04:13:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B344E1BB; Sun, 16 Nov 2014 04:13:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG4DhrU032073; Sun, 16 Nov 2014 04:13:43 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG4DhbG032072; Sun, 16 Nov 2014 04:13:43 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201411160413.sAG4DhbG032072@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 16 Nov 2014 04:13:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274569 - head/cddl/contrib/opensolaris/tools/ctf/cvt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 04:13:43 -0000 Author: markj Date: Sun Nov 16 04:13:42 2014 New Revision: 274569 URL: https://svnweb.freebsd.org/changeset/base/274569 Log: Only compare visitation counters if they've both been set for the current type graph walk. Reviewed by: Robert Mustacchi MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c ============================================================================== --- head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Sun Nov 16 04:13:09 2014 (r274568) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Sun Nov 16 04:13:42 2014 (r274569) @@ -349,7 +349,7 @@ equiv_node(tdesc_t *ctdp, tdesc_t *mtdp, int (*equiv)(tdesc_t *, tdesc_t *, equiv_data_t *); int mapping; - if (ctdp->t_emark > ed->ed_clear_mark || + if (ctdp->t_emark > ed->ed_clear_mark && mtdp->t_emark > ed->ed_clear_mark) return (ctdp->t_emark == mtdp->t_emark); From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 04:13:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB412951; Sun, 16 Nov 2014 04:13:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C33681BC; Sun, 16 Nov 2014 04:13:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG4DkId032131; Sun, 16 Nov 2014 04:13:46 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG4Djmd032121; Sun, 16 Nov 2014 04:13:45 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201411160413.sAG4Djmd032121@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Sun, 16 Nov 2014 04:13:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r274570 - stable/6/share/zoneinfo X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 04:13:47 -0000 Author: edwin Date: Sun Nov 16 04:13:44 2014 New Revision: 274570 URL: https://svnweb.freebsd.org/changeset/base/274570 Log: MFC of 274559,tzdata6: Release 2014j - 2014-11-10 17:37:11 -0800 Changes affecting current and future time stamps Turks & Caicos' switch from US eastern time to UTC-4 year-round did not occur on 2014-11-02 at 02:00. It's currently scheduled for 2015-11-01 at 02:00. (Thanks to Chris Walton.) Changes affecting past time stamps Many pre-1989 time stamps have been corrected for Asia/Seoul and Asia/Pyongyang, based on sources for the Korean-language Wikipedia entry for time in Korea. (Thanks to Sanghyuk Jung.) Also, no longer guess that Pyongyang mimicked Seoul time after World War II, as this is politically implausible. Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Africa/Addis_Ababa, Africa/Asmara, Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala, Africa/Mogadishu, Indian/Antananarivo, Indian/Comoro, and Indian/Mayotte. Changes affecting commentary The commentary is less enthusiastic about Shanks as a source, and is more careful to distinguish UT from UTC. Modified: stable/6/share/zoneinfo/africa stable/6/share/zoneinfo/asia stable/6/share/zoneinfo/australasia stable/6/share/zoneinfo/europe stable/6/share/zoneinfo/northamerica stable/6/share/zoneinfo/southamerica Directory Properties: stable/6/share/zoneinfo/ (props changed) Modified: stable/6/share/zoneinfo/africa ============================================================================== --- stable/6/share/zoneinfo/africa Sun Nov 16 04:13:42 2014 (r274569) +++ stable/6/share/zoneinfo/africa Sun Nov 16 04:13:44 2014 (r274570) @@ -6,20 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-02-21): +# From Paul Eggert (2014-10-31): # -# A good source for time zone historical data outside the U.S. is +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which @@ -65,7 +64,6 @@ # 3:00 CAST Central Africa Summer Time (no longer used) # 3:00 SAST South Africa Summer Time (no longer used) # 3:00 EAT East Africa Time -# 4:00 EAST East Africa Summer Time (no longer used) # Algeria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -146,9 +144,7 @@ Zone Africa/Ndjamena 1:00:12 - LMT 1912 1:00 - WAT # Comoros -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Comoro 2:53:04 - LMT 1911 Jul # Moroni, Gran Comoro - 3:00 - EAT +# See Africa/Nairobi. # Democratic Republic of the Congo # See Africa/Lagos for the western part and Africa/Maputo for the eastern. @@ -172,9 +168,7 @@ Link Africa/Abidjan Africa/Sao_Tome # Sà Link Africa/Abidjan Atlantic/St_Helena # St Helena # Djibouti -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Djibouti 2:52:36 - LMT 1911 Jul - 3:00 - EAT +# See Africa/Nairobi. ############################################################################### @@ -387,27 +381,8 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct # See Africa/Lagos. # Eritrea -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Asmara 2:35:32 - LMT 1870 - 2:35:32 - AMT 1890 # Asmara Mean Time - 2:35:20 - ADMT 1936 May 5 # Adis Dera MT - 3:00 - EAT - # Ethiopia -# From Paul Eggert (2014-07-31): -# Like the Swahili of Kenya and Tanzania, many Ethiopians keep a -# 12-hour clock starting at our 06:00, so their "8 o'clock" is our -# 02:00 or 14:00. Keep this in mind when you ask the time in Amharic. -# -# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time -# zones between 1870 and 1890, that they merged to 38E50 (2:35:20) in -# 1890, and that they switched to 3:00 on 1936-05-05. Perhaps 38E50 -# was for Adis Dera. Quite likely the Shanks data entries are wrong -# anyway. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Addis_Ababa 2:34:48 - LMT 1870 - 2:35:20 - ADMT 1936 May 5 # Adis Dera MT - 3:00 - EAT +# See Africa/Nairobi. # Gabon # See Africa/Lagos. @@ -451,6 +426,15 @@ Zone Africa/Nairobi 2:27:16 - LMT 1928 J 2:30 - BEAT 1940 2:45 - BEAUT 1960 3:00 - EAT +Link Africa/Nairobi Africa/Addis_Ababa # Ethiopia +Link Africa/Nairobi Africa/Asmara # Eritrea +Link Africa/Nairobi Africa/Dar_es_Salaam # Tanzania +Link Africa/Nairobi Africa/Djibouti +Link Africa/Nairobi Africa/Kampala # Uganda +Link Africa/Nairobi Africa/Mogadishu # Somalia +Link Africa/Nairobi Indian/Antananarivo # Madagascar +Link Africa/Nairobi Indian/Comoro +Link Africa/Nairobi Indian/Mayotte # Lesotho # See Africa/Johannesburg. @@ -528,11 +512,7 @@ Zone Africa/Tripoli 0:52:44 - LMT 1920 2:00 - EET # Madagascar -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Antananarivo 3:10:04 - LMT 1911 Jul - 3:00 - EAT 1954 Feb 27 23:00s - 3:00 1:00 EAST 1954 May 29 23:00s - 3:00 - EAT +# See Africa/Nairobi. # Malawi # See Africa/Maputo. @@ -635,9 +615,7 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # no information; probably like Indian/Mauritius # Mayotte -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Mayotte 3:00:56 - LMT 1911 Jul # Mamoutzou - 3:00 - EAT +# See Africa/Nairobi. # Morocco # See the 'europe' file for Spanish Morocco (Africa/Ceuta). @@ -1049,11 +1027,7 @@ Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # See Africa/Abidjan. # Somalia -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Mogadishu 3:01:28 - LMT 1893 Nov - 3:00 - EAT 1931 - 2:30 - BEAT 1957 - 3:00 - EAT +# See Africa/Nairobi. # South Africa # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -1096,11 +1070,7 @@ Link Africa/Khartoum Africa/Juba # See Africa/Johannesburg. # Tanzania -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Dar_es_Salaam 2:37:08 - LMT 1931 - 3:00 - EAT 1948 - 2:45 - BEAUT 1961 - 3:00 - EAT +# See Africa/Nairobi. # Togo # See Africa/Abidjan. @@ -1206,12 +1176,7 @@ Zone Africa/Tunis 0:40:44 - LMT 1881 May 1:00 Tunisia CE%sT # Uganda -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Kampala 2:09:40 - LMT 1928 Jul - 3:00 - EAT 1930 - 2:30 - BEAT 1948 - 2:45 - BEAUT 1957 - 3:00 - EAT +# See Africa/Nairobi. # Zambia # Zimbabwe Modified: stable/6/share/zoneinfo/asia ============================================================================== --- stable/6/share/zoneinfo/asia Sun Nov 16 04:13:42 2014 (r274569) +++ stable/6/share/zoneinfo/asia Sun Nov 16 04:13:44 2014 (r274570) @@ -6,20 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-08-11): +# From Paul Eggert (2014-10-31): # -# A good source for time zone historical data outside the U.S. is +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which @@ -1663,44 +1662,70 @@ Zone Asia/Bishkek 4:58:24 - LMT 1924 May # Korea (North and South) # From Annie I. Bang (2006-07-10): -# http://www.koreaherald.co.kr/SITE/data/html_dir/2006/07/10/200607100012.asp -# The Ministry of Commerce, Industry and Energy has already -# commissioned a research project [to reintroduce DST] and has said -# the system may begin as early as 2008.... Korea ran a daylight -# saving program from 1949-61 but stopped it during the 1950-53 Korean War. - -# From Shanks & Pottenger: -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule ROK 1960 only - May 15 0:00 1:00 D -Rule ROK 1960 only - Sep 13 0:00 0 S -Rule ROK 1987 1988 - May Sun>=8 0:00 1:00 D -Rule ROK 1987 1988 - Oct Sun>=8 0:00 0 S - -# From Paul Eggert (2014-07-01): -# The following entries are from Shanks & Pottenger, except that I -# guessed that time zone abbreviations through 1945 followed the same +# http://www.koreaherald.com/view.php?ud=200607100012 +# Korea ran a daylight saving program from 1949-61 but stopped it +# during the 1950-53 Korean War. The system was temporarily enforced +# between 1987 and 1988 ... + +# From Sanghyuk Jung (2014-10-29): +# http://mm.icann.org/pipermail/tz/2014-October/021830.html +# According to the Korean Wikipedia +# http://ko.wikipedia.org/wiki/한국_표준시 +# [oldid=12896437 2014-09-04 08:03 UTC] +# DST in Republic of Korea was as follows.... And I checked old +# newspapers in Korean, all articles correspond with data in Wikipedia. +# For example, the article in 1948 (Korean Language) proved that DST +# started at June 1 in that year. For another example, the article in +# 1988 said that DST started at 2:00 AM in that year. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule ROK 1948 only - Jun 1 0:00 1:00 D +Rule ROK 1948 only - Sep 13 0:00 0 S +Rule ROK 1949 only - Apr 3 0:00 1:00 D +Rule ROK 1949 1951 - Sep Sun>=8 0:00 0 S +Rule ROK 1950 only - Apr 1 0:00 1:00 D +Rule ROK 1951 only - May 6 0:00 1:00 D +Rule ROK 1955 only - May 5 0:00 1:00 D +Rule ROK 1955 only - Sep 9 0:00 0 S +Rule ROK 1956 only - May 20 0:00 1:00 D +Rule ROK 1956 only - Sep 30 0:00 0 S +Rule ROK 1957 1960 - May Sun>=1 0:00 1:00 D +Rule ROK 1957 1960 - Sep Sun>=18 0:00 0 S +Rule ROK 1987 1988 - May Sun>=8 2:00 1:00 D +Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S + +# From Paul Eggert (2014-10-30): +# The Korean Wikipedia entry gives the following sources for UT offsets: +# +# 1908: Official Journal Article No. 3994 (Edict No. 5) +# 1912: Governor-General of Korea Official Gazette Issue No. 367 +# (Announcement No. 338) +# 1954: Presidential Decree No. 876 (1954-03-17) +# 1961: Law No. 676 (1961-08-07) +# 1987: Law No. 3919 (1986-12-31) +# +# The Wikipedia entry also has confusing information about a change +# to UT+9 in April 1910, but then what would be the point of the later change +# to UT+9 on 1912-01-01? Omit the 1910 change for now. +# +# I guessed that time zone abbreviations through 1945 followed the same # rules as discussed under Taiwan, with nominal switches from JST to KST # when the respective cities were taken over by the Allies after WWII. +# +# For Pyongyang we have no information; guess no changes since World War II. # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Seoul 8:27:52 - LMT 1890 - 8:30 - KST 1904 Dec - 9:00 - JCST 1928 - 8:30 - KST 1932 +Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1 + 8:30 - KST 1912 Jan 1 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Sep 8 9:00 - KST 1954 Mar 21 - 8:00 ROK K%sT 1961 Aug 10 - 8:30 - KST 1968 Oct + 8:30 ROK K%sT 1961 Aug 10 9:00 ROK K%sT -Zone Asia/Pyongyang 8:23:00 - LMT 1890 - 8:30 - KST 1904 Dec - 9:00 - JCST 1928 - 8:30 - KST 1932 +Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1 + 8:30 - KST 1912 Jan 1 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Aug 24 - 9:00 - KST 1954 Mar 21 - 8:00 - KST 1961 Aug 10 9:00 - KST ############################################################################### Modified: stable/6/share/zoneinfo/australasia ============================================================================== --- stable/6/share/zoneinfo/australasia Sun Nov 16 04:13:42 2014 (r274569) +++ stable/6/share/zoneinfo/australasia Sun Nov 16 04:13:44 2014 (r274570) @@ -797,19 +797,19 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2013-02-21): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Another source occasionally used is Edward W. Whitman, World Time Differences, # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which Modified: stable/6/share/zoneinfo/europe ============================================================================== --- stable/6/share/zoneinfo/europe Sun Nov 16 04:13:42 2014 (r274569) +++ stable/6/share/zoneinfo/europe Sun Nov 16 04:13:44 2014 (r274570) @@ -6,16 +6,19 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-05-31): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). @@ -287,6 +290,14 @@ # "Timeball on the ballast office is down. Dunsink time." # -- James Joyce, Ulysses +# "Countess Markievicz ... claimed that the [1916] abolition of Dublin Mean Time +# was among various actions undertaken by the 'English' government that +# would 'put the whole country into the SF (Sinn Féin) camp'. She claimed +# Irish 'public feeling (was) outraged by forcing of English time on us'." +# -- Parsons M. Dublin lost its time zone - and 25 minutes - after 1916 Rising. +# Irish Times 2014-10-27. +# http://www.irishtimes.com/news/politics/dublin-lost-its-time-zone-and-25-minutes-after-1916-rising-1.1977411 + # From Joseph S. Myers (2005-01-26): # Irish laws are available online at . # These include various relating to legal time, for example: @@ -594,6 +605,7 @@ Rule Russia 1992 only - Sep lastSat 23: Rule Russia 1993 2010 - Mar lastSun 2:00s 1:00 S Rule Russia 1993 1995 - Sep lastSun 2:00s 0 - Rule Russia 1996 2010 - Oct lastSun 2:00s 0 - +# As described below, Russia's 2014 change affects Zone data, not Rule data. # From Alexander Krivenyshev (2011-06-14): # According to Kremlin press service, Russian President Dmitry Medvedev Modified: stable/6/share/zoneinfo/northamerica ============================================================================== --- stable/6/share/zoneinfo/northamerica Sun Nov 16 04:13:42 2014 (r274569) +++ stable/6/share/zoneinfo/northamerica Sun Nov 16 04:13:44 2014 (r274570) @@ -991,19 +991,19 @@ Zone America/Menominee -5:50:27 - LMT 18 ################################################################################ -# From Paul Eggert (2006-03-22): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. -# -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # # Other sources occasionally used include: # @@ -3131,13 +3131,17 @@ Zone America/Miquelon -3:44:40 - LMT 191 # From Paul Eggert (2014-08-19): # The 2014-08-13 Cabinet meeting decided to stay on UTC-4 year-round. See: # http://tcweeklynews.com/daylight-savings-time-to-be-maintained-p5353-127.htm -# Model this as a switch from EST/EDT to AST on 2014-11-02 at 02:00. +# Model this as a switch from EST/EDT to AST ... +# From Chris Walton (2014-11-04): +# ... the TCI government appears to have delayed the switch to +# "permanent daylight saving time" by one year.... +# http://tcweeklynews.com/time-change-to-go-ahead-this-november-p5437-127.htm # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Grand_Turk -4:44:32 - LMT 1890 -5:07:11 - KMT 1912 Feb # Kingston Mean Time -5:00 - EST 1979 - -5:00 US E%sT 2014 Nov 2 2:00 + -5:00 US E%sT 2015 Nov Sun>=1 2:00 -4:00 - AST # British Virgin Is Modified: stable/6/share/zoneinfo/southamerica ============================================================================== --- stable/6/share/zoneinfo/southamerica Sun Nov 16 04:13:42 2014 (r274569) +++ stable/6/share/zoneinfo/southamerica Sun Nov 16 04:13:44 2014 (r274570) @@ -6,23 +6,23 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2006-03-22): -# A good source for time zone historical data outside the U.S. is +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). -# -# For data circa 1899, a common source is: -# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. -# http://www.jstor.org/stable/1774359 +# Unfortunately this book contains many errors and cites no sources. # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries -# of the IATA's data after 1990. +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. # -# Except where otherwise noted, Shanks & Pottenger is the source for -# entries through 1990, and IATA SSIM is the source for entries afterwards. +# For data circa 1899, a common source is: +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. +# http://www.jstor.org/stable/1774359 # # Earlier editions of these tables used the North American style (e.g. ARST and # ARDT for Argentine Standard and Daylight Time), but the following quote From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 05:05:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92CD1C49; Sun, 16 Nov 2014 05:05:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8058A7DE; Sun, 16 Nov 2014 05:05:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG55Jmi055206; Sun, 16 Nov 2014 05:05:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG55JRP055205; Sun, 16 Nov 2014 05:05:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411160505.sAG55JRP055205@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 05:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274571 - head/contrib/netbsd-tests/lib/libpthread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 05:05:19 -0000 Author: ngie Date: Sun Nov 16 05:05:18 2014 New Revision: 274571 URL: https://svnweb.freebsd.org/changeset/base/274571 Log: Use _exit instead of exit so the file descriptors aren't flushed twice in the child processes Submitted by: pho Modified: head/contrib/netbsd-tests/lib/libpthread/t_fork.c Modified: head/contrib/netbsd-tests/lib/libpthread/t_fork.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/t_fork.c Sun Nov 16 04:13:44 2014 (r274570) +++ head/contrib/netbsd-tests/lib/libpthread/t_fork.c Sun Nov 16 05:05:18 2014 (r274571) @@ -61,7 +61,11 @@ print_pid(void *arg) thread_survived = 1; if (parent != getpid()) { +#ifdef __FreeBSD__ + _exit(1); +#else exit(1); +#endif } return NULL; } @@ -95,7 +99,11 @@ ATF_TC_BODY(fork, tc) ATF_REQUIRE_EQ_MSG(WEXITSTATUS(status), 0, "thread survived in child"); } else { sleep(5); +#ifdef __FreeBSD__ + _exit(thread_survived ? 1 : 0); +#else exit(thread_survived ? 1 : 0); +#endif } } From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 05:06:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29838D94; Sun, 16 Nov 2014 05:06:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0C587EF; Sun, 16 Nov 2014 05:06:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG56ZLk055392; Sun, 16 Nov 2014 05:06:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG56ZJd055391; Sun, 16 Nov 2014 05:06:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411160506.sAG56ZJd055391@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 05:06:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274572 - head/contrib/netbsd-tests/lib/libpthread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 05:06:36 -0000 Author: ngie Date: Sun Nov 16 05:06:35 2014 New Revision: 274572 URL: https://svnweb.freebsd.org/changeset/base/274572 Log: Only expect timeouts on powerpc with NetBSD Submitted by: pho Modified: head/contrib/netbsd-tests/lib/libpthread/t_mutex.c Modified: head/contrib/netbsd-tests/lib/libpthread/t_mutex.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/t_mutex.c Sun Nov 16 05:05:18 2014 (r274571) +++ head/contrib/netbsd-tests/lib/libpthread/t_mutex.c Sun Nov 16 05:06:35 2014 (r274572) @@ -117,9 +117,11 @@ ATF_TC(mutex2); ATF_TC_HEAD(mutex2, tc) { atf_tc_set_md_var(tc, "descr", "Checks mutexes"); +#ifdef __NetBSD__ #if defined(__powerpc__) atf_tc_set_md_var(tc, "timeout", "40"); #endif +#endif } ATF_TC_BODY(mutex2, tc) { @@ -129,9 +131,11 @@ ATF_TC_BODY(mutex2, tc) printf("1: Mutex-test 2\n"); +#ifdef __NetBSD__ #if defined(__powerpc__) atf_tc_expect_timeout("PR port-powerpc/44387"); #endif +#endif PTHREAD_REQUIRE(pthread_mutex_init(&mutex, NULL)); @@ -158,6 +162,7 @@ ATF_TC_BODY(mutex2, tc) global_x, (long)joinval); ATF_REQUIRE_EQ(global_x, 20000000); +#ifdef __NetBSD__ #if defined(__powerpc__) /* XXX force a timeout in ppc case since an un-triggered race otherwise looks like a "failure" */ @@ -165,6 +170,7 @@ ATF_TC_BODY(mutex2, tc) complain about unexpected success */ sleep(41); #endif +#endif } static void * @@ -188,9 +194,11 @@ ATF_TC_HEAD(mutex3, tc) { atf_tc_set_md_var(tc, "descr", "Checks mutexes using a static " "initializer"); +#ifdef __NetBSD__ #if defined(__powerpc__) atf_tc_set_md_var(tc, "timeout", "40"); #endif +#endif } ATF_TC_BODY(mutex3, tc) { @@ -200,9 +208,11 @@ ATF_TC_BODY(mutex3, tc) printf("1: Mutex-test 3\n"); +#ifdef __NetBSD__ #if defined(__powerpc__) atf_tc_expect_timeout("PR port-powerpc/44387"); #endif +#endif global_x = 0; count = count2 = 10000000; @@ -227,6 +237,7 @@ ATF_TC_BODY(mutex3, tc) global_x, (long)joinval); ATF_REQUIRE_EQ(global_x, 20000000); +#ifdef __NetBSD__ #if defined(__powerpc__) /* XXX force a timeout in ppc case since an un-triggered race otherwise looks like a "failure" */ @@ -234,6 +245,7 @@ ATF_TC_BODY(mutex3, tc) complain about unexpected success */ sleep(41); #endif +#endif } static void * From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 05:08:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07D99F11; Sun, 16 Nov 2014 05:08:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E922A805; Sun, 16 Nov 2014 05:08:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG58JCJ055638; Sun, 16 Nov 2014 05:08:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG58JdG055637; Sun, 16 Nov 2014 05:08:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411160508.sAG58JdG055637@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 05:08:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274573 - head/contrib/netbsd-tests/lib/libpthread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 05:08:20 -0000 Author: ngie Date: Sun Nov 16 05:08:19 2014 New Revision: 274573 URL: https://svnweb.freebsd.org/changeset/base/274573 Log: Expect :pthread_detach to fail with EINVAL instead of ESRCH on FreeBSD PR: 191906 In collaboration with: pho Modified: head/contrib/netbsd-tests/lib/libpthread/t_detach.c Modified: head/contrib/netbsd-tests/lib/libpthread/t_detach.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/t_detach.c Sun Nov 16 05:06:35 2014 (r274572) +++ head/contrib/netbsd-tests/lib/libpthread/t_detach.c Sun Nov 16 05:08:19 2014 (r274573) @@ -75,6 +75,10 @@ ATF_TC_BODY(pthread_detach, tc) rv = pthread_join(t, NULL); ATF_REQUIRE(rv == EINVAL); +#if defined(__FreeBSD__) + atf_tc_expect_fail("PR # 191906: fails with EINVAL, not ESRCH"); +#endif + /* * As usual, ESRCH should follow if * we try to detach an invalid thread. From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 05:09:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1F07115; Sun, 16 Nov 2014 05:09:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F033813; Sun, 16 Nov 2014 05:09:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG59OFc055814; Sun, 16 Nov 2014 05:09:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG59Os9055813; Sun, 16 Nov 2014 05:09:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411160509.sAG59Os9055813@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 05:09:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274574 - head/contrib/netbsd-tests/lib/libpthread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 05:09:24 -0000 Author: ngie Date: Sun Nov 16 05:09:23 2014 New Revision: 274574 URL: https://svnweb.freebsd.org/changeset/base/274574 Log: Add pthread_np.h #include and initialize the pthread attribute on FreeBSD Submitted by: pho Modified: head/contrib/netbsd-tests/lib/libpthread/t_join.c Modified: head/contrib/netbsd-tests/lib/libpthread/t_join.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/t_join.c Sun Nov 16 05:08:19 2014 (r274573) +++ head/contrib/netbsd-tests/lib/libpthread/t_join.c Sun Nov 16 05:09:23 2014 (r274574) @@ -37,6 +37,10 @@ __RCSID("$NetBSD: t_join.c,v 1.8 2012/03 #include +#ifdef __FreeBSD__ +#include +#endif + #include "h_common.h" #ifdef CHECK_STACK_ALIGNMENT @@ -152,6 +156,9 @@ threadfunc2(void *arg) j = (uintptr_t)arg; +#ifdef __FreeBSD__ + pthread_attr_init(&attr); +#endif ATF_REQUIRE(pthread_attr_get_np(pthread_self(), &attr) == 0); ATF_REQUIRE(pthread_attr_getstacksize(&attr, &stacksize) == 0); ATF_REQUIRE(stacksize == STACKSIZE * (j + 1)); From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 05:11:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37C3B25A; Sun, 16 Nov 2014 05:11:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24A1C8A7; Sun, 16 Nov 2014 05:11:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG5B8Rn057214; Sun, 16 Nov 2014 05:11:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG5B8wt057213; Sun, 16 Nov 2014 05:11:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411160511.sAG5B8wt057213@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 05:11:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274575 - head/contrib/netbsd-tests/lib/libpthread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 05:11:08 -0000 Author: ngie Date: Sun Nov 16 05:11:07 2014 New Revision: 274575 URL: https://svnweb.freebsd.org/changeset/base/274575 Log: #ifdef out a printf on !NetBSD that causes the testcase to fail when comparing the output from the helper program Submitted by: pho Modified: head/contrib/netbsd-tests/lib/libpthread/h_cancel.c Modified: head/contrib/netbsd-tests/lib/libpthread/h_cancel.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/h_cancel.c Sun Nov 16 05:09:23 2014 (r274574) +++ head/contrib/netbsd-tests/lib/libpthread/h_cancel.c Sun Nov 16 05:11:07 2014 (r274575) @@ -42,7 +42,9 @@ main(void) char str1[] = "You should see this.\n"; char str2[] = "You should not see this.\n"; +#ifdef __NetBSD__ printf("Cancellation test: Self-cancellation and disabling.\n"); +#endif pthread_cancel(pthread_self()); From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 05:13:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C12173CA; Sun, 16 Nov 2014 05:13:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94F718B3; Sun, 16 Nov 2014 05:13:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG5DBXU059780; Sun, 16 Nov 2014 05:13:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG5DB13059779; Sun, 16 Nov 2014 05:13:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411160513.sAG5DB13059779@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 05:13:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274576 - head/contrib/netbsd-tests/lib/libpthread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 05:13:11 -0000 Author: ngie Date: Sun Nov 16 05:13:10 2014 New Revision: 274576 URL: https://svnweb.freebsd.org/changeset/base/274576 Log: Port helper program to FreeBSD, similar to ../../lib/libc/stdlib/h_atexit.c Submitted by: pho In collaboration with: kib Modified: head/contrib/netbsd-tests/lib/libpthread/h_atexit.c Modified: head/contrib/netbsd-tests/lib/libpthread/h_atexit.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/h_atexit.c Sun Nov 16 05:11:07 2014 (r274575) +++ head/contrib/netbsd-tests/lib/libpthread/h_atexit.c Sun Nov 16 05:13:10 2014 (r274576) @@ -47,9 +47,19 @@ __RCSID("$NetBSD: h_atexit.c,v 1.1 2010/ extern int __cxa_atexit(void (*func)(void *), void *, void *); extern void __cxa_finalize(void *); +#ifdef __FreeBSD__ +/* + * See comments in ../../lib/libc/stdlib/h_atexit.c about the deviation + * between FreeBSD and NetBSD with this helper program + */ +static void *dso_handle_1 = (void *)1; +static void *dso_handle_2 = (void *)2; +static void *dso_handle_3 = (void *)3; +#else static int dso_handle_1; static int dso_handle_2; static int dso_handle_3; +#endif static int arg_1; static int arg_2; @@ -170,8 +180,17 @@ main(int argc, char *argv[]) exiting_state = 5; +#if defined(__FreeBSD__) ASSERT(0 == atexit(normal_handler_0)); ASSERT(0 == atexit(normal_handler_1)); + ASSERT(0 == __cxa_atexit(cxa_handler_4, &arg_1, dso_handle_1)); + ASSERT(0 == __cxa_atexit(cxa_handler_5, &arg_1, dso_handle_1)); + ASSERT(0 == __cxa_atexit(cxa_handler_3, &arg_2, dso_handle_2)); + ASSERT(0 == __cxa_atexit(cxa_handler_2, &arg_3, dso_handle_3)); + + __cxa_finalize(dso_handle_1); + __cxa_finalize(dso_handle_2); +#else ASSERT(0 == __cxa_atexit(cxa_handler_4, &arg_1, &dso_handle_1)); ASSERT(0 == __cxa_atexit(cxa_handler_5, &arg_1, &dso_handle_1)); ASSERT(0 == __cxa_atexit(cxa_handler_3, &arg_2, &dso_handle_2)); @@ -179,5 +198,6 @@ main(int argc, char *argv[]) __cxa_finalize(&dso_handle_1); __cxa_finalize(&dso_handle_2); +#endif exit(0); } From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 05:13:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1EFC850C; Sun, 16 Nov 2014 05:13:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BEE18B9; Sun, 16 Nov 2014 05:13:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG5Deuw059876; Sun, 16 Nov 2014 05:13:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG5DeLb059872; Sun, 16 Nov 2014 05:13:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411160513.sAG5DeLb059872@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 05:13:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274577 - head/contrib/netbsd-tests/lib/libpthread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 05:13:41 -0000 Author: ngie Date: Sun Nov 16 05:13:39 2014 New Revision: 274577 URL: https://svnweb.freebsd.org/changeset/base/274577 Log: Add missing sys/time.h #include for timespecsub macro in lib/libnetbsd/sys/time.h Modified: head/contrib/netbsd-tests/lib/libpthread/t_condwait.c head/contrib/netbsd-tests/lib/libpthread/t_once.c head/contrib/netbsd-tests/lib/libpthread/t_sem.c Modified: head/contrib/netbsd-tests/lib/libpthread/t_condwait.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/t_condwait.c Sun Nov 16 05:13:10 2014 (r274576) +++ head/contrib/netbsd-tests/lib/libpthread/t_condwait.c Sun Nov 16 05:13:39 2014 (r274577) @@ -40,6 +40,10 @@ __RCSID("$NetBSD: t_condwait.c,v 1.4 201 #include "isqemu.h" +#ifdef __FreeBSD__ +#include +#endif + #define WAITTIME 2 /* Timeout wait secound */ static const int debug = 1; Modified: head/contrib/netbsd-tests/lib/libpthread/t_once.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/t_once.c Sun Nov 16 05:13:10 2014 (r274576) +++ head/contrib/netbsd-tests/lib/libpthread/t_once.c Sun Nov 16 05:13:39 2014 (r274577) @@ -46,6 +46,10 @@ static int x; #define NTHREADS 25 +#ifdef __FreeBSD__ +#include +#endif + static void ofunc(void) { Modified: head/contrib/netbsd-tests/lib/libpthread/t_sem.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/t_sem.c Sun Nov 16 05:13:10 2014 (r274576) +++ head/contrib/netbsd-tests/lib/libpthread/t_sem.c Sun Nov 16 05:13:39 2014 (r274577) @@ -111,6 +111,10 @@ __RCSID("$NetBSD: t_sem.c,v 1.8 2014/11/ static sem_t sem; +#ifdef __FreeBSD__ +#include +#endif + ATF_TC(named); ATF_TC_HEAD(named, tc) { From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 05:20:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 427146BC; Sun, 16 Nov 2014 05:20:00 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 2FF898E4; Sun, 16 Nov 2014 05:19:59 +0000 (UTC) Received: from AlfredMacbookAir.local (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id 0E1B3341F852; Sat, 15 Nov 2014 21:19:59 -0800 (PST) Message-ID: <546833FE.9060904@freebsd.org> Date: Sat, 15 Nov 2014 21:19:58 -0800 From: Alfred Perlstein Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r274573 - head/contrib/netbsd-tests/lib/libpthread References: <201411160508.sAG58JdG055637@svn.freebsd.org> In-Reply-To: <201411160508.sAG58JdG055637@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 05:20:00 -0000 This looks easy enough to fix under _thr_find_thread() in libthread. Any interest in fixing it? Might be worth hacking _thr_find_thread() to take an ERRNO to return based on NULL until we chase down all the paths into it just in case EINVAL is a valid ptr. Also, just wondering what happens on other platforms, does it elicit a crash? Ie. is NULL a safe value to pass in on other platforms? -Alfred On 11/15/14, 9:08 PM, Garrett Cooper wrote: > Author: ngie > Date: Sun Nov 16 05:08:19 2014 > New Revision: 274573 > URL: https://svnweb.freebsd.org/changeset/base/274573 > > Log: > Expect :pthread_detach to fail with EINVAL instead of ESRCH on FreeBSD > > PR: 191906 > In collaboration with: pho > > Modified: > head/contrib/netbsd-tests/lib/libpthread/t_detach.c > > Modified: head/contrib/netbsd-tests/lib/libpthread/t_detach.c > ============================================================================== > --- head/contrib/netbsd-tests/lib/libpthread/t_detach.c Sun Nov 16 05:06:35 2014 (r274572) > +++ head/contrib/netbsd-tests/lib/libpthread/t_detach.c Sun Nov 16 05:08:19 2014 (r274573) > @@ -75,6 +75,10 @@ ATF_TC_BODY(pthread_detach, tc) > rv = pthread_join(t, NULL); > ATF_REQUIRE(rv == EINVAL); > > +#if defined(__FreeBSD__) > + atf_tc_expect_fail("PR # 191906: fails with EINVAL, not ESRCH"); > +#endif > + > /* > * As usual, ESRCH should follow if > * we try to detach an invalid thread. > From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 05:22:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 521E7823; Sun, 16 Nov 2014 05:22:30 +0000 (UTC) Received: from mail-pd0-x235.google.com (mail-pd0-x235.google.com [IPv6:2607:f8b0:400e:c02::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 19963987; Sun, 16 Nov 2014 05:22:30 +0000 (UTC) Received: by mail-pd0-f181.google.com with SMTP id z10so1871219pdj.12 for ; Sat, 15 Nov 2014 21:22:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=stlMvgWO5+uttI9pxzGJxk8fLp+DEhf3z7jzWGn5Gdc=; b=FXkhkz1jK1kmMLL9zfwVGo9g4q9T5j7r+nNDzygmBzQn9lxhGtBifIOw98fcMntBZf f+qk0npBUpclW/IRjRaIawjMA+NhaRff+JxsOyNdwKiEAhIZ8TLV/peCEoKOZiml90Xw yIw+ZUROBMPaKQ6e2ysUt7Tuqd0QwM8gr4vox/45Ya9MJYjVoaCcraVi89Xy4F2JUVj8 PfY2tYkQw0nNbOIGfNeMw6GdQ10ESago+lRECsJ6eQx/UlWJD4ggNOOtDEnUDY8ltFzm dFQB/4eRG9duE3yvJiBQiJvjWcVKoEeDLj/Ks0il3DaDtX8qQ7x/lLNonkqsW9RiKd6s un0A== X-Received: by 10.68.209.230 with SMTP id mp6mr20812399pbc.27.1416115349582; Sat, 15 Nov 2014 21:22:29 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:29f3:7219:6a42:c3? ([2601:8:ab80:7d6:29f3:7219:6a42:c3]) by mx.google.com with ESMTPSA id eb5sm8121331pbd.5.2014.11.15.21.22.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 15 Nov 2014 21:22:29 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_63F81ADA-A815-41A3-BF1D-6A55904D5EA7"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r274573 - head/contrib/netbsd-tests/lib/libpthread From: Garrett Cooper In-Reply-To: <546833FE.9060904@freebsd.org> Date: Sat, 15 Nov 2014 21:22:27 -0800 Message-Id: <45B1482F-352E-4874-8A89-1EC225A32E93@gmail.com> References: <201411160508.sAG58JdG055637@svn.freebsd.org> <546833FE.9060904@freebsd.org> To: Alfred Perlstein X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 05:22:30 -0000 --Apple-Mail=_63F81ADA-A815-41A3-BF1D-6A55904D5EA7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Nov 15, 2014, at 21:19, Alfred Perlstein wrote: > This looks easy enough to fix under _thr_find_thread() in libthread. >=20 > Any interest in fixing it? Yes, if it=92s POSIXly correct and doesn=92t break everything else. > Might be worth hacking _thr_find_thread() to take an ERRNO to return = based on NULL until we chase down all the paths into it just in case = EINVAL is a valid ptr. K. Thanks for the hint! > Also, just wondering what happens on other platforms, does it elicit a = crash? Ie. is NULL a safe value to pass in on other platforms? I wish I knew what happened on !x86 platforms=85 I honestly don=92t have = access to ARM/MIPS/PowerPC, so I can=92t say :/. Thanks! --Apple-Mail=_63F81ADA-A815-41A3-BF1D-6A55904D5EA7 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUaDSTAAoJEMZr5QU6S73endAH+waK3sgNyS3a1P63IL8QHLN9 JJJDeHhZTN3NiJDca+ulsudhSvfgy01Ms505Zm82QqUZcet4bz6c94gX0udyNu14 CfE6c1fV2jEt1Az2n7fPBR9ILY8fJMz+XaPyzut2V5JFzwW5bnuH8WJuWkk/MVR/ nGRXkhSQPVpnD45NnWSWyXkBecpObhCpTZc/Lrp0K6hmH7jjlOT6I08MEzUp0qkY 1ULZYUqh/8KYOHGNFYak2dEx5fVWC/QYWSRR9ltZsl2epocbDhP8e9jeEC02UvfD 2F+98HVHIkB1IX1drgYiM7xab0o5ErtdVhXk4CFXzFiN6BkhT9vxnPGlasHvU14= =6TSV -----END PGP SIGNATURE----- --Apple-Mail=_63F81ADA-A815-41A3-BF1D-6A55904D5EA7-- From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 05:24:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8FDC9EA; Sun, 16 Nov 2014 05:24:25 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id C4A4E9A3; Sun, 16 Nov 2014 05:24:25 +0000 (UTC) Received: from AlfredMacbookAir.local (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id EA0F5341F84E; Sat, 15 Nov 2014 21:24:24 -0800 (PST) Message-ID: <54683508.3030104@freebsd.org> Date: Sat, 15 Nov 2014 21:24:24 -0800 From: Alfred Perlstein Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Garrett Cooper Subject: Re: svn commit: r274573 - head/contrib/netbsd-tests/lib/libpthread References: <201411160508.sAG58JdG055637@svn.freebsd.org> <546833FE.9060904@freebsd.org> <45B1482F-352E-4874-8A89-1EC225A32E93@gmail.com> In-Reply-To: <45B1482F-352E-4874-8A89-1EC225A32E93@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 05:24:26 -0000 On 11/15/14, 9:22 PM, Garrett Cooper wrote: > On Nov 15, 2014, at 21:19, Alfred Perlstein wrote: > >> This looks easy enough to fix under _thr_find_thread() in libthread. >> >> Any interest in fixing it? > Yes, if it’s POSIXly correct and doesn’t break everything else. > >> Might be worth hacking _thr_find_thread() to take an ERRNO to return based on NULL until we chase down all the paths into it just in case EINVAL is a valid ptr. > K. Thanks for the hint! > >> Also, just wondering what happens on other platforms, does it elicit a crash? Ie. is NULL a safe value to pass in on other platforms? > I wish I knew what happened on !x86 platforms… I honestly don’t have access to ARM/MIPS/PowerPC, so I can’t say :/. > > Thanks! Oh, I meant Linux and Solaris, or even other BSD. -Alfred From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 05:26:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7E37B39; Sun, 16 Nov 2014 05:26:10 +0000 (UTC) Received: from mail-pd0-x231.google.com (mail-pd0-x231.google.com [IPv6:2607:f8b0:400e:c02::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE4A49AF; Sun, 16 Nov 2014 05:26:10 +0000 (UTC) Received: by mail-pd0-f177.google.com with SMTP id v10so19025242pde.22 for ; Sat, 15 Nov 2014 21:26:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=Uq/r9+i4JjqdkBH+wIIbVylW0NO75d7K5tRnBYQ9rqQ=; b=WtfTrnowUp+viIEENgcL7BUbLUDbZeV/ORvgEjpqg0S/1oQR6LL8fFXSLgs+0F9zKU wuGyrX+QUmoXWY5VALPZDwdwNRRDS//3Nr7aoo9VNd4vNejztYqh6HK1eEFjyps3vVAP HI1trmaM92Yqukj4SPVwj1SeS95MTFWaat8Pi2COkCx3HSI+cRjN7VtmPwnS3ikPU3I/ pm2gO3jjIp26Goctpm+iqhJIwJgslnBmVbw/1fOxm3YWKC48wZZK5KuIbGfg58AEmfTx kcnbaQYjukwFIi4hwYG0oPypYVcx4EWei3oEeUtKzhE5/j5En0xJGRZ+B/vWoPe8Fk/c Xd5A== X-Received: by 10.66.188.167 with SMTP id gb7mr20948485pac.23.1416115570240; Sat, 15 Nov 2014 21:26:10 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:29f3:7219:6a42:c3? ([2601:8:ab80:7d6:29f3:7219:6a42:c3]) by mx.google.com with ESMTPSA id yc4sm31757736pab.27.2014.11.15.21.26.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 15 Nov 2014 21:26:09 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_F8772231-BC84-4605-BE87-DB4A39B987D2"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r274573 - head/contrib/netbsd-tests/lib/libpthread From: Garrett Cooper In-Reply-To: <54683508.3030104@freebsd.org> Date: Sat, 15 Nov 2014 21:26:08 -0800 Message-Id: References: <201411160508.sAG58JdG055637@svn.freebsd.org> <546833FE.9060904@freebsd.org> <45B1482F-352E-4874-8A89-1EC225A32E93@gmail.com> <54683508.3030104@freebsd.org> To: Alfred Perlstein X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 05:26:11 -0000 --Apple-Mail=_F8772231-BC84-4605-BE87-DB4A39B987D2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Nov 15, 2014, at 21:24, Alfred Perlstein wrote: > On 11/15/14, 9:22 PM, Garrett Cooper wrote: >> On Nov 15, 2014, at 21:19, Alfred Perlstein = wrote: >>=20 >>> This looks easy enough to fix under _thr_find_thread() in libthread. >>>=20 >>> Any interest in fixing it? >> Yes, if it=92s POSIXly correct and doesn=92t break everything else. >>=20 >>> Might be worth hacking _thr_find_thread() to take an ERRNO to return = based on NULL until we chase down all the paths into it just in case = EINVAL is a valid ptr. >> K. Thanks for the hint! >>=20 >>> Also, just wondering what happens on other platforms, does it elicit = a crash? Ie. is NULL a safe value to pass in on other platforms? >> I wish I knew what happened on !x86 platforms=85 I honestly don=92t = have access to ARM/MIPS/PowerPC, so I can=92t say :/. >>=20 >> Thanks! >=20 > Oh, I meant Linux and Solaris, or even other BSD. Ah, good question. pho@ ran some of the tests in contrib/netbsd-tests on = Linux/OSX before to do a side-by-side comparison, but I haven=92t setup = the necessary environment to do that testing [yet]. --Apple-Mail=_F8772231-BC84-4605-BE87-DB4A39B987D2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUaDVwAAoJEMZr5QU6S73e+V0H/0e+fH3FN4BfXneSMSd57va3 bw33x/Mp7LfsCBtRuTzXdO3zdkNxWFgih5N62TM8VhAzkvzHoVXg7dl+/BZrVkwL eDROZTikq+1T1iTmJTkm4piYjoJAAU6pAENF2+XFGocEgeqhaa3SDv/Pyks/sGSw vOSV1EeX0eeM0F5vfw6NRe58tSi8aeV5kTu/fLEMJ6+afH+WJ/k/dfGVt08HXqUJ mm++jTSbciBXBmSvLiyfAV5M9zr1rbFQhbATYIQoLKhq2xM2Z5yOMGosLSkrmdty rX/UxzEXs7LvYKzvGwO3u99VEYo52wGvGIy5fC8zfUCPu8nNrD38a50rqfsB8Sw= =DJfS -----END PGP SIGNATURE----- --Apple-Mail=_F8772231-BC84-4605-BE87-DB4A39B987D2-- From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 05:31:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD59ACC4; Sun, 16 Nov 2014 05:31:33 +0000 (UTC) Received: from mail-ie0-x231.google.com (mail-ie0-x231.google.com [IPv6:2607:f8b0:4001:c03::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A955A59; Sun, 16 Nov 2014 05:31:33 +0000 (UTC) Received: by mail-ie0-f177.google.com with SMTP id tr6so1203479ieb.36 for ; Sat, 15 Nov 2014 21:31:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=TdBGAsENA7go24V9/9/eOtMIqevOmg8dWBOFfulTHik=; b=pyS3D0PdsrFp/34NxdmgtvUyjCfk8zeDhIBrkok9o8JW/dL6nH+nWDE9QVQ7XXHhsy 6djGU2SaKAIkzH5R1HHVjn8UNsLcWcJrCd02NkaDfnXJeoDdCt1TCIVtTq2hQvhBaCmM DK0TYL+NKYLONk6yWl+4HeAiszl6YuBQMywi9o1zP5n1xOb0hsTI6epmzT/l13xRg4Ps tD+JK9RmeDdbONyYQri5jVRx3b3dHwaOqAvJuvumA2j17gvDlZBEwGZtz6fv88CN7YSC C2XVxyyEw0TicXhl1KX93ydOkfEsKOxFBkL+Ls+ELY8ouqXceGUTHPvFlarrdB/RD0Xr HeRg== X-Received: by 10.107.164.75 with SMTP id n72mr12884836ioe.17.1416115892973; Sat, 15 Nov 2014 21:31:32 -0800 (PST) Received: from [192.168.20.5] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id p5sm3907763iga.5.2014.11.15.21.31.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 15 Nov 2014 21:31:32 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_F1B63001-3EAE-475F-B42B-FC9EF821AD8D"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r274573 - head/contrib/netbsd-tests/lib/libpthread From: Garrett Cooper In-Reply-To: Date: Sat, 15 Nov 2014 21:31:25 -0800 Message-Id: <22C52F4A-B9EC-4C32-9D26-474B7EF0CEF2@gmail.com> References: <201411160508.sAG58JdG055637@svn.freebsd.org> <546833FE.9060904@freebsd.org> <45B1482F-352E-4874-8A89-1EC225A32E93@gmail.com> <54683508.3030104@freebsd.org> To: Alfred Perlstein X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 05:31:34 -0000 --Apple-Mail=_F1B63001-3EAE-475F-B42B-FC9EF821AD8D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Nov 15, 2014, at 21:26, Garrett Cooper wrote: > On Nov 15, 2014, at 21:24, Alfred Perlstein = wrote: >=20 >> On 11/15/14, 9:22 PM, Garrett Cooper wrote: >>> On Nov 15, 2014, at 21:19, Alfred Perlstein = wrote: >>>=20 >>>> This looks easy enough to fix under _thr_find_thread() in = libthread. >>>>=20 >>>> Any interest in fixing it? >>> Yes, if it=92s POSIXly correct and doesn=92t break everything else. >>>=20 >>>> Might be worth hacking _thr_find_thread() to take an ERRNO to = return based on NULL until we chase down all the paths into it just in = case EINVAL is a valid ptr. >>> K. Thanks for the hint! >>>=20 >>>> Also, just wondering what happens on other platforms, does it = elicit a crash? Ie. is NULL a safe value to pass in on other platforms? >>> I wish I knew what happened on !x86 platforms=85 I honestly don=92t = have access to ARM/MIPS/PowerPC, so I can=92t say :/. >>>=20 >>> Thanks! >>=20 >> Oh, I meant Linux and Solaris, or even other BSD. >=20 > Ah, good question. pho@ ran some of the tests in contrib/netbsd-tests = on Linux/OSX before to do a side-by-side comparison, but I haven=92t = setup the necessary environment to do that testing [yet]. FWIW, there=92s some weirdness with one of the testcases that was never = fully integrated in at Isilon where it blocks on a random mutex in = libthr=85 trying to figure out what=92s causing it to do that, but this = might be related... --Apple-Mail=_F1B63001-3EAE-475F-B42B-FC9EF821AD8D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUaDatAAoJEMZr5QU6S73eZy8IAK9A6R+XfpGWKPSqYT/cjDtp UupQUnew12ZiipVGl5MSDQBfGyl+ns16+JYmg3ZVsm/BY6XkeBhszhcr5ZNzCxxT fV1wLI7adeaEyKSe+R0kgV8NAgrcEHMm3OXk2ourHqtmuudnlBdwmjIUTQU018VS q5Gf+N++b3vftpp1H90nydIWzsusELoGg+OdlqB6JY3nudVhKpaOYT9IRBlKcT3q TGRYWq217sORjJHzgr5v4bljmmsTpFNaluKJKMe90GM3SYRcY4yTPCGM1c5nsEl+ tg4bEGsuRZskvbgEACK1d+lWkp1xPEnwt4BMKRzVJ6Wh5ABc2UY6mOVoVub9R4k= =ITZU -----END PGP SIGNATURE----- --Apple-Mail=_F1B63001-3EAE-475F-B42B-FC9EF821AD8D-- From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 06:35:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D73AEE6; Sun, 16 Nov 2014 06:35:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2F28F96; Sun, 16 Nov 2014 06:35:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG6ZM4e096835; Sun, 16 Nov 2014 06:35:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG6ZLFL096822; Sun, 16 Nov 2014 06:35:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411160635.sAG6ZLFL096822@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 06:35:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274578 - in head: etc/mtree lib/libthr lib/libthr/tests lib/libthr/tests/dlopen lib/libthr/tests/dlopen/dso X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 06:35:23 -0000 Author: ngie Date: Sun Nov 16 06:35:20 2014 New Revision: 274578 URL: https://svnweb.freebsd.org/changeset/base/274578 Log: Add reachover Makefiles for contrib/netbsd-tests/lib/libpthread as lib/libthr/tests A variant of this code has been tested on amd64/i386 for some time by EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the code will remain off until it's proven it works on virtual hardware or real hardware on other architectures Original work by: pho Sponsored by: EMC / Isilon Storage Division Added: head/lib/libthr/Makefile.amd64 (contents, props changed) head/lib/libthr/Makefile.i386 (contents, props changed) head/lib/libthr/tests/ head/lib/libthr/tests/Makefile (contents, props changed) head/lib/libthr/tests/dlopen/ head/lib/libthr/tests/dlopen/Makefile (contents, props changed) head/lib/libthr/tests/dlopen/dso/ head/lib/libthr/tests/dlopen/dso/Makefile (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/lib/libthr/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sun Nov 16 05:13:39 2014 (r274577) +++ head/etc/mtree/BSD.tests.dist Sun Nov 16 06:35:20 2014 (r274578) @@ -149,6 +149,10 @@ .. libproc .. + libthr + dlopen + .. + .. libutil .. .. Modified: head/lib/libthr/Makefile ============================================================================== --- head/lib/libthr/Makefile Sun Nov 16 05:13:39 2014 (r274577) +++ head/lib/libthr/Makefile Sun Nov 16 06:35:20 2014 (r274578) @@ -64,4 +64,6 @@ SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpth CFLAGS+=-DSYSCALL_COMPAT .endif +.include + .include Added: head/lib/libthr/Makefile.amd64 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libthr/Makefile.amd64 Sun Nov 16 06:35:20 2014 (r274578) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + Added: head/lib/libthr/Makefile.i386 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libthr/Makefile.i386 Sun Nov 16 06:35:20 2014 (r274578) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + Added: head/lib/libthr/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libthr/tests/Makefile Sun Nov 16 06:35:20 2014 (r274578) @@ -0,0 +1,58 @@ +# $FreeBSD$ + +OBJTOP= ${.OBJDIR:H:H:H} +SRCTOP= ${.CURDIR:H:H:H} +TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread + +TESTSDIR= ${TESTSBASE}/lib/libthr + +# TODO: t_name (missing pthread_getname_np support in FreeBSD) +NETBSD_ATF_TESTS_C= barrier_test +NETBSD_ATF_TESTS_C+= cond_test +NETBSD_ATF_TESTS_C+= condwait_test +NETBSD_ATF_TESTS_C+= detach_test +NETBSD_ATF_TESTS_C+= equal_test +NETBSD_ATF_TESTS_C+= fork_test +NETBSD_ATF_TESTS_C+= fpu_test +NETBSD_ATF_TESTS_C+= join_test +NETBSD_ATF_TESTS_C+= kill_test +NETBSD_ATF_TESTS_C+= mutex_test +NETBSD_ATF_TESTS_C+= once_test +NETBSD_ATF_TESTS_C+= preempt_test +NETBSD_ATF_TESTS_C+= rwlock_test +NETBSD_ATF_TESTS_C+= sem_test +NETBSD_ATF_TESTS_C+= sigmask_test +NETBSD_ATF_TESTS_C+= sigsuspend_test +NETBSD_ATF_TESTS_C+= siglongjmp_test +NETBSD_ATF_TESTS_C+= sleep_test +NETBSD_ATF_TESTS_C+= swapcontext_test + +NETBSD_ATF_TESTS_SH= atexit_test +NETBSD_ATF_TESTS_SH+= cancel_test +NETBSD_ATF_TESTS_SH+= exit_test +NETBSD_ATF_TESTS_SH+= resolv_test + +DPADD+= ${LIBPTHREAD} +LDADD+= -lpthread +DPADD.fpu_test+= ${LIBM} +LDADD.fpu_test+= -lm +DPADD.sem_test+= ${LIBRT} +LDADD.sem_test+= -lrt + +BINDIR= ${TESTSDIR} + +PROGS= h_atexit +PROGS+= h_cancel +PROGS+= h_exit +PROGS+= h_resolv + +FILESDIR= ${TESTSDIR} +FILES= d_mach + +TESTS_SUBDIRS= dlopen + +.include + +CFLAGS.condwait_test+= -I${SRCTOP}/contrib/netbsd-tests/lib/libc/gen + +.include Added: head/lib/libthr/tests/dlopen/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libthr/tests/dlopen/Makefile Sun Nov 16 06:35:20 2014 (r274578) @@ -0,0 +1,30 @@ +# $FreeBSD$ + +OBJTOP= ${.OBJDIR:H:H:H:H} +SRCTOP= ${.CURDIR:H:H:H:H} +TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread/dlopen + +.include + +TESTSDIR= ${TESTSBASE}/lib/libthr/dlopen + +CFLAGS+= -DTESTDIR=\"${TESTSDIR:Q}/\" +LDFLAGS+= -L${.OBJDIR}/dso -Wl,-rpath=${TESTDIR} + +.if !defined(NO_PIC) +SUBDIR+= dso + +NETBSD_ATF_TESTS_C= dlopen_test +NETBSD_ATF_TESTS_C+= main_pthread_create_test +# XXX: this blocks running the testcase +#NETBSD_ATF_TESTS_C+= dso_pthread_create_test + +.for t in dlopen_test main_pthread_create_test +DPADD.$t+= ${LIBPTHREAD} +LDADD.$t+= -lpthread +.endfor +.endif + +.include + +.include Added: head/lib/libthr/tests/dlopen/dso/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libthr/tests/dlopen/dso/Makefile Sun Nov 16 06:35:20 2014 (r274578) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +OBJTOP= ${.OBJDIR:H:H:H:H:H} +SRCTOP= ${.CURDIR:H:H:H:H:H} +TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread/dlopen/dso + +SHLIB= h_pthread_dlopen +SHLIB_MAJOR= 1 +SHLIB_NAME= h_pthread_dlopen.so.${SHLIB_MAJOR} +SRCS= h_pthread_dlopen.c + +DPADD+= ${LIBPTHREAD} +LDADD+= -lpthread + +LIBDIR= ${TESTSBASE}/lib/libthr/dlopen + +.include + +.include From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 06:59:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80C4C31F; Sun, 16 Nov 2014 06:59:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D1DC196; Sun, 16 Nov 2014 06:59:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG6xx5W006662; Sun, 16 Nov 2014 06:59:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG6xxda006661; Sun, 16 Nov 2014 06:59:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411160659.sAG6xxda006661@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 06:59:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274579 - head/contrib/netbsd-tests/lib/librt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 06:59:59 -0000 Author: ngie Date: Sun Nov 16 06:59:58 2014 New Revision: 274579 URL: https://svnweb.freebsd.org/changeset/base/274579 Log: Call sem_unlink on semaphores before attempting to create them Due to the lack of uniqueness in the semaphore name, and the fact that the tests don't have cleanup routines, an interrupted test can leave a semaphore "laying around", causing all subsequent attempts to run the test to fail I will file a NetBSD PR for this issue soon Modified: head/contrib/netbsd-tests/lib/librt/t_sem.c Modified: head/contrib/netbsd-tests/lib/librt/t_sem.c ============================================================================== --- head/contrib/netbsd-tests/lib/librt/t_sem.c Sun Nov 16 06:35:20 2014 (r274578) +++ head/contrib/netbsd-tests/lib/librt/t_sem.c Sun Nov 16 06:59:58 2014 (r274579) @@ -86,6 +86,9 @@ ATF_TC_BODY(basic, tc) if (sysconf(_SC_SEMAPHORES) == -1) atf_tc_skip("POSIX semaphores not supported"); +#ifdef __FreeBSD__ + sem_unlink("/sem_b"); +#endif sem_b = sem_open("/sem_b", O_CREAT | O_EXCL, 0644, 0); ATF_REQUIRE(sem_b != SEM_FAILED); @@ -127,6 +130,9 @@ ATF_TC_BODY(child, tc) if (sysconf(_SC_SEMAPHORES) == -1) atf_tc_skip("POSIX semaphores not supported"); +#ifdef __FreeBSD__ + sem_unlink("/sem_a"); +#endif sem_a = sem_open("/sem_a", O_CREAT | O_EXCL, 0644, 0); ATF_REQUIRE(sem_a != SEM_FAILED); From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 07:03:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EADB7470; Sun, 16 Nov 2014 07:03:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBF00234; Sun, 16 Nov 2014 07:03:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG73L4h010640; Sun, 16 Nov 2014 07:03:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG73KLR010633; Sun, 16 Nov 2014 07:03:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411160703.sAG73KLR010633@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 07:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274580 - in head: etc/mtree lib/librt lib/librt/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 07:03:22 -0000 Author: ngie Date: Sun Nov 16 07:03:19 2014 New Revision: 274580 URL: https://svnweb.freebsd.org/changeset/base/274580 Log: Add reachover Makefiles for contrib/netbsd-tests/lib/librt A variant of this code has been tested on amd64/i386 for some time by EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the code will remain off until it's proven it works on virtual hardware or real hardware on other architectures Sponsored by: EMC / Isilon Storage Division Added: head/lib/librt/Makefile.amd64 (contents, props changed) head/lib/librt/Makefile.i386 (contents, props changed) head/lib/librt/tests/ head/lib/librt/tests/Makefile (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/lib/librt/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sun Nov 16 06:59:58 2014 (r274579) +++ head/etc/mtree/BSD.tests.dist Sun Nov 16 07:03:19 2014 (r274580) @@ -149,6 +149,8 @@ .. libproc .. + librt + .. libthr dlopen .. Modified: head/lib/librt/Makefile ============================================================================== --- head/lib/librt/Makefile Sun Nov 16 06:59:58 2014 (r274579) +++ head/lib/librt/Makefile Sun Nov 16 07:03:19 2014 (r274580) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB=rt SHLIB_MAJOR= 1 CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR} @@ -18,4 +20,6 @@ PRECIOUSLIB= VERSION_MAP= ${.CURDIR}/Version.map +.include + .include Added: head/lib/librt/Makefile.amd64 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/librt/Makefile.amd64 Sun Nov 16 07:03:19 2014 (r274580) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + Added: head/lib/librt/Makefile.i386 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/librt/Makefile.i386 Sun Nov 16 07:03:19 2014 (r274580) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + Added: head/lib/librt/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/librt/tests/Makefile Sun Nov 16 07:03:19 2014 (r274580) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +OBJTOP= ${.OBJDIR:H:H:H} +SRCTOP= ${.CURDIR:H:H:H} +TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/librt + +TESTSDIR= ${TESTSBASE}/lib/librt + +DPADD+= ${LIBRT} +LDADD+= -lrt + +NETBSD_ATF_TESTS_C= sched_test +NETBSD_ATF_TESTS_C+= sem_test + +.include + +.include From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 07:55:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C9149F7; Sun, 16 Nov 2014 07:55:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D5D988E; Sun, 16 Nov 2014 07:55:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG7tTrT033875; Sun, 16 Nov 2014 07:55:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG7tTKR033873; Sun, 16 Nov 2014 07:55:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411160755.sAG7tTKR033873@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 07:55:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274581 - in head: lib/libc/tests/gen tools/regression/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 07:55:29 -0000 Author: ngie Date: Sun Nov 16 07:55:28 2014 New Revision: 274581 URL: https://svnweb.freebsd.org/changeset/base/274581 Log: Convert tools/regression/lib/libc/gen/test-arc4random into an ATF testcase and rename as lib/libc/gen/arc4random_test Sponsored by: EMC / Isilon Storage Division Added: head/lib/libc/tests/gen/arc4random_test.c - copied, changed from r274390, head/tools/regression/lib/libc/gen/test-arc4random.c Deleted: head/tools/regression/lib/libc/gen/test-arc4random.c Modified: head/lib/libc/tests/gen/Makefile Modified: head/lib/libc/tests/gen/Makefile ============================================================================== --- head/lib/libc/tests/gen/Makefile Sun Nov 16 07:03:19 2014 (r274580) +++ head/lib/libc/tests/gen/Makefile Sun Nov 16 07:55:28 2014 (r274581) @@ -4,6 +4,8 @@ TESTSDIR= ${TESTSBASE}/lib/libc/gen +ATF_TESTS_C= arc4random_test + # TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid, t_sleep # TODO: t_siginfo (fixes require further inspection) # TODO: t_sethostname_test (consistently screws up the hostname) Copied and modified: head/lib/libc/tests/gen/arc4random_test.c (from r274390, head/tools/regression/lib/libc/gen/test-arc4random.c) ============================================================================== --- head/tools/regression/lib/libc/gen/test-arc4random.c Tue Nov 11 18:15:05 2014 (r274390, copy source) +++ head/lib/libc/tests/gen/arc4random_test.c Sun Nov 16 07:55:28 2014 (r274581) @@ -27,13 +27,14 @@ #include __FBSDID("$FreeBSD$"); -#include #include +#include #include #include #include #include #include +#include /* * BUFSIZE is the number of bytes of rc4 output to compare. The probability @@ -45,7 +46,9 @@ __FBSDID("$FreeBSD$"); * Test whether arc4random_buf() returns the same sequence of bytes in both * parent and child processes. (Hint: It shouldn't.) */ -int main(int argc, char *argv[]) { +ATF_TC_WITHOUT_HEAD(test_arc4random); +ATF_TC_BODY(test_arc4random, tc) +{ struct shared_page { char parentbuf[BUFSIZE]; char childbuf[BUFSIZE]; @@ -65,10 +68,7 @@ int main(int argc, char *argv[]) { arc4random_buf(&c, 1); pid = fork(); - if (pid < 0) { - printf("fail 1 - fork\n"); - exit(1); - } + ATF_REQUIRE(0 <= pid); if (pid == 0) { /* child */ arc4random_buf(page->childbuf, BUFSIZE); @@ -79,11 +79,14 @@ int main(int argc, char *argv[]) { arc4random_buf(page->parentbuf, BUFSIZE); wait(&status); } - if (memcmp(page->parentbuf, page->childbuf, BUFSIZE) == 0) { - printf("fail 1 - sequences are the same\n"); - exit(1); - } + ATF_CHECK_MSG(memcmp(page->parentbuf, page->childbuf, BUFSIZE) != 0, + "sequences are the same"); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, test_arc4random); - printf("ok 1 - sequences are different\n"); - exit(0); + return (atf_no_error()); } From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 07:58:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AEAFC35; Sun, 16 Nov 2014 07:58:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 677528AD; Sun, 16 Nov 2014 07:58:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG7w7v4034344; Sun, 16 Nov 2014 07:58:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG7w7IR034343; Sun, 16 Nov 2014 07:58:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411160758.sAG7w7IR034343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 07:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274582 - head/tools/regression/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 07:58:07 -0000 Author: ngie Date: Sun Nov 16 07:58:06 2014 New Revision: 274582 URL: https://svnweb.freebsd.org/changeset/base/274582 Log: Remove test-arc4random from this Makefile so others can continue to use this as-is for the time being Modified: head/tools/regression/lib/libc/gen/Makefile Modified: head/tools/regression/lib/libc/gen/Makefile ============================================================================== --- head/tools/regression/lib/libc/gen/Makefile Sun Nov 16 07:55:28 2014 (r274581) +++ head/tools/regression/lib/libc/gen/Makefile Sun Nov 16 07:58:06 2014 (r274582) @@ -1,6 +1,6 @@ # $FreeBSD$ -TESTS= test-arc4random test-fmtcheck test-fmtmsg test-fnmatch \ +TESTS= test-fmtcheck test-fmtmsg test-fnmatch \ test-fpclassify test-ftw test-popen test-posix_spawn test-wordexp .PHONY: tests From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 09:44:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 930B8D38; Sun, 16 Nov 2014 09:44:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65001177; Sun, 16 Nov 2014 09:44:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG9iVM5084772; Sun, 16 Nov 2014 09:44:31 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG9iUTJ084769; Sun, 16 Nov 2014 09:44:30 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201411160944.sAG9iUTJ084769@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 16 Nov 2014 09:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274583 - head/usr.sbin/watchdogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 09:44:31 -0000 Author: delphij Date: Sun Nov 16 09:44:30 2014 New Revision: 274583 URL: https://svnweb.freebsd.org/changeset/base/274583 Log: Default to use 10 seconds as nap interval instead of 1. Previously, we have a nap interval of 1 second while we have a timeout of 128 seconds by default, which could be an overkill, and for some hardware the patting action may be expensive. Note that the choice of nap interval is still arbitrary. We preferred a safe value where even when the system is very heavily loaded, the watchdog should not shoot the system down if it's not really hung. According to the manual page of Linux's watchdog daemon, the nap interval time of theirs is 10 seconds, which seems to be a reasonable value -- according to Intel documentation AP-725 (Document Number: 292273-001), ICH5's maximum timeout is about 37.5 seconds, which the ichwd(4) driver would set when we requested 128 seconds (although it should probably feed back this as an error and do not set the timeout). Since that's the shortest maximum value, 10 seconds seems to be a right choice for us too. Discussed with: alfred MFC after: 1 month Modified: head/usr.sbin/watchdogd/watchdogd.8 head/usr.sbin/watchdogd/watchdogd.c Modified: head/usr.sbin/watchdogd/watchdogd.8 ============================================================================== --- head/usr.sbin/watchdogd/watchdogd.8 Sun Nov 16 07:58:06 2014 (r274582) +++ head/usr.sbin/watchdogd/watchdogd.8 Sun Nov 16 09:44:30 2014 (r274583) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 18, 2014 +.Dd November 16, 2014 .Dt WATCHDOGD 8 .Os .Sh NAME @@ -79,7 +79,7 @@ reboot if there are problems with the sc The .Fl s Ar sleep argument can be used to control the sleep period between each execution -of the check and defaults to one second. +of the check and defaults to 10 seconds. .Pp The .Fl t Ar timeout Modified: head/usr.sbin/watchdogd/watchdogd.c ============================================================================== --- head/usr.sbin/watchdogd/watchdogd.c Sun Nov 16 07:58:06 2014 (r274582) +++ head/usr.sbin/watchdogd/watchdogd.c Sun Nov 16 09:44:30 2014 (r274583) @@ -87,7 +87,7 @@ static int is_dry_run = 0; /* do not ar static int do_timedog = 0; static int do_syslog = 1; static int fd = -1; -static int nap = 1; +static int nap = 10; static int carp_thresh_seconds = -1; static char *test_cmd = NULL; From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 14:56:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 500BE1D2; Sun, 16 Nov 2014 14:56:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C651C4; Sun, 16 Nov 2014 14:56:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGEuWU2029738; Sun, 16 Nov 2014 14:56:32 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGEuWVj029737; Sun, 16 Nov 2014 14:56:32 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201411161456.sAGEuWVj029737@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 16 Nov 2014 14:56:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274585 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 14:56:32 -0000 Author: melifaro Date: Sun Nov 16 14:56:31 2014 New Revision: 274585 URL: https://svnweb.freebsd.org/changeset/base/274585 Log: Make witness happy: destroy rte lock before free. MFC after: 2 weeks Modified: head/sys/net/route.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Sun Nov 16 13:57:53 2014 (r274584) +++ head/sys/net/route.c Sun Nov 16 14:56:31 2014 (r274585) @@ -517,6 +517,7 @@ rtfree(struct rtentry *rt) /* * and the rtentry itself of course */ + RT_LOCK_DESTROY(rt); uma_zfree(V_rtzone, rt); return; } From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 17:53:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7780A7D; Sun, 16 Nov 2014 17:53:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C30EA2AE; Sun, 16 Nov 2014 17:53:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGHrmx5012728; Sun, 16 Nov 2014 17:53:48 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGHrmfA012727; Sun, 16 Nov 2014 17:53:48 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201411161753.sAGHrmfA012727@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Sun, 16 Nov 2014 17:53:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274587 - head/sys/dev/drm2/radeon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 17:53:48 -0000 Author: dumbbell Date: Sun Nov 16 17:53:48 2014 New Revision: 274587 URL: https://svnweb.freebsd.org/changeset/base/274587 Log: drm/radeon: Lower priority of a message related to invalid EDID Like in r259717, the prority goes from "error" to "debug" to avoid spamming logs when the connectors are polled. PR: 194770 Submitted by: Larry Rosenman MFC after: 1 week Modified: head/sys/dev/drm2/radeon/radeon_connectors.c Modified: head/sys/dev/drm2/radeon/radeon_connectors.c ============================================================================== --- head/sys/dev/drm2/radeon/radeon_connectors.c Sun Nov 16 15:31:49 2014 (r274586) +++ head/sys/dev/drm2/radeon/radeon_connectors.c Sun Nov 16 17:53:48 2014 (r274587) @@ -954,7 +954,7 @@ radeon_dvi_detect(struct drm_connector * radeon_connector->edid = drm_get_edid(&radeon_connector->base, radeon_connector->ddc_bus->adapter); if (!radeon_connector->edid) { - DRM_ERROR("%s: probed a monitor but no|invalid EDID\n", + DRM_DEBUG_KMS("%s: probed a monitor but no|invalid EDID\n", drm_get_connector_name(connector)); /* rs690 seems to have a problem with connectors not existing and always * return a block of 0's. If we see this just stop polling on this output */ From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 18:08:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD307DD1; Sun, 16 Nov 2014 18:08:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C965C3CB; Sun, 16 Nov 2014 18:08:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGI81iO018210; Sun, 16 Nov 2014 18:08:01 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGI81RG018208; Sun, 16 Nov 2014 18:08:01 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201411161808.sAGI81RG018208@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 16 Nov 2014 18:08:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274588 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 18:08:02 -0000 Author: melifaro Date: Sun Nov 16 18:08:00 2014 New Revision: 274588 URL: https://svnweb.freebsd.org/changeset/base/274588 Log: Fix r273112: do not turn DROP_EN by default. Due to adapter->hw.fc.requested_mode is filled with default value after ixgbe_initialize_receive_units(), this leads to enabling DROP_EN in most cases. Tested by: ae MFC after: 1 week Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Sun Nov 16 17:53:48 2014 (r274587) +++ head/sys/dev/ixgbe/ixgbe.c Sun Nov 16 18:08:00 2014 (r274588) @@ -4385,7 +4385,7 @@ ixgbe_initialize_receive_units(struct ad * this code is moved elsewhere. */ if (adapter->num_queues > 1 && - adapter->hw.fc.requested_mode == ixgbe_fc_none) { + adapter->fc == ixgbe_fc_none) { srrctl |= IXGBE_SRRCTL_DROP_EN; } else { srrctl &= ~IXGBE_SRRCTL_DROP_EN; From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 18:15:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BE871A2; Sun, 16 Nov 2014 18:15:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 285CC68F; Sun, 16 Nov 2014 18:15:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGIFOip022642; Sun, 16 Nov 2014 18:15:24 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGIFO9C022641; Sun, 16 Nov 2014 18:15:24 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201411161815.sAGIFO9C022641@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 16 Nov 2014 18:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274589 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 18:15:24 -0000 Author: melifaro Date: Sun Nov 16 18:15:23 2014 New Revision: 274589 URL: https://svnweb.freebsd.org/changeset/base/274589 Log: Revert r274585: rte lock is properly destroyed in uma dtor callback. Pointed by: glebius Modified: head/sys/net/route.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Sun Nov 16 18:08:00 2014 (r274588) +++ head/sys/net/route.c Sun Nov 16 18:15:23 2014 (r274589) @@ -517,7 +517,6 @@ rtfree(struct rtentry *rt) /* * and the rtentry itself of course */ - RT_LOCK_DESTROY(rt); uma_zfree(V_rtzone, rt); return; } From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 18:26:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 519B2AE9; Sun, 16 Nov 2014 18:26:12 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F13377DB; Sun, 16 Nov 2014 18:26:11 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.82 (FreeBSD)) (envelope-from ) id 1Xq4EQ-000Afs-PY; Sun, 16 Nov 2014 22:07:26 +0400 Date: Sun, 16 Nov 2014 22:07:26 +0400 From: Slawa Olhovchenkov To: Xin LI Subject: Re: svn commit: r274337 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/zstreamdump cddl/contrib/opensolaris... Message-ID: <20141116180726.GA40905@zxy.spb.ru> References: <201411100820.sAA8KMSO019943@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201411100820.sAA8KMSO019943@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 18:26:12 -0000 On Mon, Nov 10, 2014 at 08:20:22AM +0000, Xin LI wrote: > Author: delphij > Date: Mon Nov 10 08:20:21 2014 > New Revision: 274337 > URL: https://svnweb.freebsd.org/changeset/base/274337 > > Log: > MFV r274273: > > ZFS large block support. > > Please note that booting from datasets that have recordsize greater > than 128KB is not supported (but it's Okay to enable the feature on > the pool). This *may* remain unchanged because of memory constraint. > > Limited safety belt is provided for mounted root filesystem but use > caution is advised. > > Illumos issue: > 5027 zfs large block support > > MFC after: 1 month Thanks! Please, add tunnable and sysctl for modify dsl_dataset.c:zfs_max_recordsize From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 19:47:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B2A3E11; Sun, 16 Nov 2014 19:47:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC0D7F3C; Sun, 16 Nov 2014 19:47:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGJlTfi065419; Sun, 16 Nov 2014 19:47:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGJlTGW065418; Sun, 16 Nov 2014 19:47:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411161947.sAGJlTGW065418@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 19:47:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274591 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 19:47:30 -0000 Author: ngie Date: Sun Nov 16 19:47:29 2014 New Revision: 274591 URL: https://svnweb.freebsd.org/changeset/base/274591 Log: Add freebsd-testing and myself to MAINTAINERS for contrib/netbsd-tests and contrib/pjdfstest Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Sun Nov 16 18:44:46 2014 (r274590) +++ head/MAINTAINERS Sun Nov 16 19:47:29 2014 (r274591) @@ -80,6 +80,8 @@ contrib/pf glebius Pre-commit review rec file obrien Insists to keep file blocked from other's unapproved commits contrib/bzip2 obrien Pre-commit review required. +contrib/netbsd-tests freebsd-testing,ngie Pre-commit review requested. +contrib/pjdfstest freebsd-testing,ngie Pre-commit review requested. geom_concat pjd Pre-commit review preferred. geom_eli pjd Pre-commit review preferred. geom_gate pjd Pre-commit review preferred. From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 19:57:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C38EBAC; Sun, 16 Nov 2014 19:57:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7733E86; Sun, 16 Nov 2014 19:57:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGJvmSZ070112; Sun, 16 Nov 2014 19:57:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGJvlFj070108; Sun, 16 Nov 2014 19:57:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411161957.sAGJvlFj070108@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 19:57:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274592 - in head: lib/libc/tests/stdio tools/regression/lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 19:57:48 -0000 Author: ngie Date: Sun Nov 16 19:57:47 2014 New Revision: 274592 URL: https://svnweb.freebsd.org/changeset/base/274592 Log: Convert tools/regression/lib/libc/stdio/test-fmemopen into an ATF testcase and rename as lib/libc/stdio/fmemopen2_test Sponsored by: EMC / Isilon Storage Division Added: head/lib/libc/tests/stdio/fmemopen2_test.c - copied, changed from r274390, head/tools/regression/lib/libc/stdio/test-fmemopen.c Deleted: head/tools/regression/lib/libc/stdio/test-fmemopen.c Modified: head/lib/libc/tests/stdio/Makefile head/tools/regression/lib/libc/stdio/Makefile Modified: head/lib/libc/tests/stdio/Makefile ============================================================================== --- head/lib/libc/tests/stdio/Makefile Sun Nov 16 19:47:29 2014 (r274591) +++ head/lib/libc/tests/stdio/Makefile Sun Nov 16 19:57:47 2014 (r274592) @@ -2,6 +2,8 @@ TESTSDIR= ${TESTSBASE}/lib/libc/stdio +ATF_TESTS_C= fmemopen2_test + NETBSD_ATF_TESTS_C= clearerr_test NETBSD_ATF_TESTS_C+= fflush_test NETBSD_ATF_TESTS_C+= fmemopen_test Copied and modified: head/lib/libc/tests/stdio/fmemopen2_test.c (from r274390, head/tools/regression/lib/libc/stdio/test-fmemopen.c) ============================================================================== --- head/tools/regression/lib/libc/stdio/test-fmemopen.c Tue Nov 11 18:15:05 2014 (r274390, copy source) +++ head/lib/libc/tests/stdio/fmemopen2_test.c Sun Nov 16 19:57:47 2014 (r274592) @@ -31,14 +31,14 @@ SUCH DAMAGE. #include __FBSDID("$FreeBSD$"); -#include #include #include #include #include +#include -void -test_preexisting() +ATF_TC_WITHOUT_HEAD(test_preexisting); +ATF_TC_BODY(test_preexisting, tc) { /* * Use a pre-existing buffer. @@ -55,55 +55,55 @@ test_preexisting() /* Open a FILE * using fmemopen. */ fp = fmemopen(buf, sizeof(buf), "w"); - assert(fp != NULL); + ATF_REQUIRE(fp != NULL); /* Write to the buffer. */ nofw = fwrite(str, 1, sizeof(str), fp); - assert(nofw == sizeof(str)); + ATF_REQUIRE(nofw == sizeof(str)); /* Close the FILE *. */ rc = fclose(fp); - assert(rc == 0); + ATF_REQUIRE(rc == 0); /* Re-open the FILE * to read back the data. */ fp = fmemopen(buf, sizeof(buf), "r"); - assert(fp != NULL); + ATF_REQUIRE(fp != NULL); /* Read from the buffer. */ bzero(buf2, sizeof(buf2)); nofr = fread(buf2, 1, sizeof(buf2), fp); - assert(nofr == sizeof(buf2)); + ATF_REQUIRE(nofr == sizeof(buf2)); /* * Since a write on a FILE * retrieved by fmemopen * will add a '\0' (if there's space), we can check * the strings for equality. */ - assert(strcmp(str, buf2) == 0); + ATF_REQUIRE(strcmp(str, buf2) == 0); /* Close the FILE *. */ rc = fclose(fp); - assert(rc == 0); + ATF_REQUIRE(rc == 0); /* Now open a FILE * on the first 4 bytes of the string. */ fp = fmemopen(str, 4, "w"); - assert(fp != NULL); + ATF_REQUIRE(fp != NULL); /* * Try to write more bytes than we shoud, we'll get a short count (4). */ nofw = fwrite(str2, 1, sizeof(str2), fp); - assert(nofw == 4); + ATF_REQUIRE(nofw == 4); /* Close the FILE *. */ rc = fclose(fp); /* Check that the string was not modified after the first 4 bytes. */ - assert(strcmp(str, str3) == 0); + ATF_REQUIRE(strcmp(str, str3) == 0); } -void -test_autoalloc() +ATF_TC_WITHOUT_HEAD(test_autoalloc); +ATF_TC_BODY(test_autoalloc, tc) { /* * Let fmemopen allocate the buffer. @@ -117,38 +117,38 @@ test_autoalloc() /* Open a FILE * using fmemopen. */ fp = fmemopen(NULL, 512, "w+"); - assert(fp != NULL); + ATF_REQUIRE(fp != NULL); /* fill the buffer */ for (i = 0; i < 512; i++) { nofw = fwrite("a", 1, 1, fp); - assert(nofw == 1); + ATF_REQUIRE(nofw == 1); } /* Get the current position into the stream. */ pos = ftell(fp); - assert(pos == 512); + ATF_REQUIRE(pos == 512); /* * Try to write past the end, we should get a short object count (0) */ nofw = fwrite("a", 1, 1, fp); - assert(nofw == 0); + ATF_REQUIRE(nofw == 0); /* Close the FILE *. */ rc = fclose(fp); - assert(rc == 0); + ATF_REQUIRE(rc == 0); /* Open a FILE * using a wrong mode */ fp = fmemopen(NULL, 512, "r"); - assert(fp == NULL); + ATF_REQUIRE(fp == NULL); fp = fmemopen(NULL, 512, "w"); - assert(fp == NULL); + ATF_REQUIRE(fp == NULL); } -void -test_data_length() +ATF_TC_WITHOUT_HEAD(test_data_length); +ATF_TC_BODY(test_data_length, tc) { /* * Here we test that a read operation doesn't go past the end of the @@ -166,56 +166,56 @@ test_data_length() /* Open a FILE * for updating our buffer. */ fp = fmemopen(buf, sizeof(buf), "w+"); - assert(fp != NULL); + ATF_REQUIRE(fp != NULL); /* Write our string into the buffer. */ nofw = fwrite(str, 1, sizeof(str), fp); - assert(nofw == sizeof(str)); + ATF_REQUIRE(nofw == sizeof(str)); /* * Now seek to the end and check that ftell * gives us sizeof(str). */ rc = fseek(fp, 0, SEEK_END); - assert(rc == 0); + ATF_REQUIRE(rc == 0); pos = ftell(fp); - assert(pos == sizeof(str)); + ATF_REQUIRE(pos == sizeof(str)); /* Close the FILE *. */ rc = fclose(fp); - assert(rc == 0); + ATF_REQUIRE(rc == 0); /* Reopen the buffer for appending. */ fp = fmemopen(buf, sizeof(buf), "a+"); - assert(fp != NULL); + ATF_REQUIRE(fp != NULL); /* We should now be writing after the first string. */ nofw = fwrite(str2, 1, sizeof(str2), fp); - assert(nofw == sizeof(str2)); + ATF_REQUIRE(nofw == sizeof(str2)); /* Rewind the FILE *. */ rc = fseek(fp, 0, SEEK_SET); - assert(rc == 0); + ATF_REQUIRE(rc == 0); /* Make sure we're at the beginning. */ pos = ftell(fp); - assert(pos == 0); + ATF_REQUIRE(pos == 0); /* Read the whole buffer. */ nofr = fread(str3, 1, sizeof(buf), fp); - assert(nofr == sizeof(str3)); + ATF_REQUIRE(nofr == sizeof(str3)); /* Make sure the two strings are there. */ - assert(strncmp(str3, str, sizeof(str) - 1) == 0); - assert(strncmp(str3 + sizeof(str) - 1, str2, sizeof(str2)) == 0); + ATF_REQUIRE(strncmp(str3, str, sizeof(str) - 1) == 0); + ATF_REQUIRE(strncmp(str3 + sizeof(str) - 1, str2, sizeof(str2)) == 0); /* Close the FILE *. */ rc = fclose(fp); - assert(rc == 0); + ATF_REQUIRE(rc == 0); } -void -test_binary() +ATF_TC_WITHOUT_HEAD(test_binary); +ATF_TC_BODY(test_binary, tc) { /* * Make sure that NULL bytes are never appended when opening a buffer @@ -233,23 +233,23 @@ test_binary() /* Open a FILE * in binary mode. */ fp = fmemopen(buf, sizeof(buf), "w+b"); - assert(fp != NULL); + ATF_REQUIRE(fp != NULL); /* Write some data into it. */ nofw = fwrite(str, 1, strlen(str), fp); - assert(nofw == strlen(str)); + ATF_REQUIRE(nofw == strlen(str)); /* Make sure that the buffer doesn't contain any NULL bytes. */ for (i = 0; i < sizeof(buf); i++) - assert(buf[i] != '\0'); + ATF_REQUIRE(buf[i] != '\0'); /* Close the FILE *. */ rc = fclose(fp); - assert(rc == 0); + ATF_REQUIRE(rc == 0); } -void -test_append_binary_pos() +ATF_TC_WITHOUT_HEAD(test_append_binary_pos); +ATF_TC_BODY(test_append_binary_pos, tc) { /* * For compatibility with other implementations (glibc), we set the @@ -260,7 +260,7 @@ test_append_binary_pos() FILE *fp; fp = fmemopen(NULL, 16, "ab+"); - assert(ftell(fp) == 0L); + ATF_REQUIRE(ftell(fp) == 0L); fclose(fp); /* @@ -268,12 +268,12 @@ test_append_binary_pos() */ char buf[] = "Hello"; fp = fmemopen(buf, sizeof(buf), "ab+"); - assert(ftell(fp) == strlen(buf)); + ATF_REQUIRE(ftell(fp) == strlen(buf)); fclose(fp); } -void -test_size_0() +ATF_TC_WITHOUT_HEAD(test_size_0); +ATF_TC_BODY(test_size_0, tc) { /* * POSIX mandates that we return EINVAL if size is 0. @@ -282,18 +282,19 @@ test_size_0() FILE *fp; fp = fmemopen(NULL, 0, "r+"); - assert(fp == NULL); - assert(errno == EINVAL); + ATF_REQUIRE(fp == NULL); + ATF_REQUIRE(errno == EINVAL); } -int -main(void) +ATF_TP_ADD_TCS(tp) { - test_autoalloc(); - test_preexisting(); - test_data_length(); - test_binary(); - test_append_binary_pos(); - test_size_0(); - return (0); + + ATF_TP_ADD_TC(tp, test_autoalloc); + ATF_TP_ADD_TC(tp, test_preexisting); + ATF_TP_ADD_TC(tp, test_data_length); + ATF_TP_ADD_TC(tp, test_binary); + ATF_TP_ADD_TC(tp, test_append_binary_pos); + ATF_TP_ADD_TC(tp, test_size_0); + + return (atf_no_error()); } Modified: head/tools/regression/lib/libc/stdio/Makefile ============================================================================== --- head/tools/regression/lib/libc/stdio/Makefile Sun Nov 16 19:47:29 2014 (r274591) +++ head/tools/regression/lib/libc/stdio/Makefile Sun Nov 16 19:57:47 2014 (r274592) @@ -1,7 +1,6 @@ # $FreeBSD$ TESTS= test-fdopen \ - test-fmemopen \ test-fopen \ test-freopen \ test-getdelim \ From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 20:10:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4D53783; Sun, 16 Nov 2014 20:10:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8818E19A; Sun, 16 Nov 2014 20:10:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGKAc08075446; Sun, 16 Nov 2014 20:10:38 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGKAcsj075445; Sun, 16 Nov 2014 20:10:38 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201411162010.sAGKAcsj075445@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 16 Nov 2014 20:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274593 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 20:10:38 -0000 Author: sbruno Date: Sun Nov 16 20:10:37 2014 New Revision: 274593 URL: https://svnweb.freebsd.org/changeset/base/274593 Log: Flush out many more static binaries that can be used in a jail for building pkgs via poudriere. This removes a significant amount of emulation speeding up run times. Phabric: D1172 Reviewed by: imp MFC after: 2 weeks Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Nov 16 19:57:47 2014 (r274592) +++ head/Makefile.inc1 Sun Nov 16 20:10:37 2014 (r274593) @@ -1455,8 +1455,20 @@ native-xtools: .MAKE mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${OBJTREE}/nxb-bin/usr/include >/dev/null .for _tool in \ + bin/cat \ + bin/chmod \ + bin/cp \ bin/csh \ + bin/expr \ + bin/ln \ + bin/ls \ + bin/mkdir \ + bin/ps \ + bin/realpath \ + bin/rm \ + bin/rmdir \ bin/sh \ + bin/sleep \ ${_clang_tblgen} \ usr.bin/ar \ ${_binutils} \ @@ -1465,18 +1477,38 @@ native-xtools: .MAKE ${_clang_libs} \ ${_clang} \ sbin/md5 \ + sbin/sysctl \ + gnu/usr.bin/diff \ usr.bin/awk \ + usr.bin/basename \ usr.bin/bmake \ usr.bin/bzip2 \ + usr.bin/cmp \ + usr.bin/dirname \ + usr.bin/env \ usr.bin/fetch \ + usr.bin/find \ + usr.bin/grep \ usr.bin/gzip \ + usr.bin/id \ usr.bin/lex \ usr.bin/lorder \ + usr.bin/mktemp \ + usr.bin/mt \ + usr.bin/patch \ usr.bin/sed \ + usr.bin/sort \ usr.bin/tar \ + usr.bin/touch \ + usr.bin/tr \ + usr.bin/true \ + usr.bin/uniq \ usr.bin/unzip \ + usr.bin/xargs \ + usr.bin/xinstall \ usr.bin/xz \ - usr.bin/yacc + usr.bin/yacc \ + usr.sbin/chown ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool} && \ ${NXBMAKE} DIRPRFX=${_tool}/ obj && \ From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 20:14:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AD80B77; Sun, 16 Nov 2014 20:14:16 +0000 (UTC) Received: from mail-pd0-x22d.google.com (mail-pd0-x22d.google.com [IPv6:2607:f8b0:400e:c02::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 12B85260; Sun, 16 Nov 2014 20:14:16 +0000 (UTC) Received: by mail-pd0-f173.google.com with SMTP id v10so19893653pde.32 for ; Sun, 16 Nov 2014 12:14:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=NB9qMkUycPhUh0FoQYbdLhO6o0f4rtAh8pwpe1S5XSA=; b=XQbPSkgdeLnSJc45k0aIz4K9EjGnu7wgL/DCHR3Cvc0sbioOkUX5sDOBlX2adyoYpv dgdZ7QSlEwK7YXqTW7zB6yf7zA7/9EqOOd3urbKzzB85t7E8c2FBmiajLwlmyELLhYKA WoYuLRsayIlpCTJK/A3wc9bXwgdxUmvuGq3uGM1XcGjd9aEHUTcXkVPuy281McnOdQEU pyTHaZGV2vpCWbk38+fdV/0B8iA0vcGL7E6KJV9IlnTFZCQ1AgHf9/kBbZwSqPret417 o93GwqiJ6bXUFYrrRSfgaQAUHq6GBu6Ic3jw+uNdWKOmoAy3pInNvbgi6Xmxoqi8JG7v YwHw== X-Received: by 10.66.65.168 with SMTP id y8mr25326011pas.48.1416168855563; Sun, 16 Nov 2014 12:14:15 -0800 (PST) Received: from [192.168.20.5] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id ra4sm33259086pab.33.2014.11.16.12.14.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 16 Nov 2014 12:14:15 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_F6257969-704D-407E-A954-26B041EB66E6"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r274593 - head From: Garrett Cooper In-Reply-To: <201411162010.sAGKAcsj075445@svn.freebsd.org> Date: Sun, 16 Nov 2014 12:14:13 -0800 Message-Id: References: <201411162010.sAGKAcsj075445@svn.freebsd.org> To: Sean Bruno X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 20:14:16 -0000 --Apple-Mail=_F6257969-704D-407E-A954-26B041EB66E6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Nov 16, 2014, at 12:10, Sean Bruno wrote: > Author: sbruno > Date: Sun Nov 16 20:10:37 2014 > New Revision: 274593 > URL: https://svnweb.freebsd.org/changeset/base/274593 >=20 > Log: > Flush out many more static binaries that can be used in a jail for = building > pkgs via poudriere. This removes a significant amount of emulation = speeding > up run times. >=20 > Phabric: D1172 > Reviewed by: imp > MFC after: 2 weeks Hi Sean! I=92m wondering if you=92d be interested in reviewing some of = the changes I have in my =93faster-build=94 branch up on github: = https://github.com/yaneurabeya/freebsd/tree/faster-build . I=92m = basically looking at building just the native and cross-compiler = toolchain piece of clang, parallelizing this portion of the build, etc. = I haven=92t resolved the building of the native compiler piece, but I=92ve= parallelized some things around here. Thanks! --Apple-Mail=_F6257969-704D-407E-A954-26B041EB66E6 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUaQWVAAoJEMZr5QU6S73ehF0H/AiQK5mmuTiu3tSR4oRAkU+S gB7XJndv1H2taWHggLPyEVYXhT8Rtxg0CWU/QxP9Nv89Cg+PMSIIk77XLtEMbK/+ PgKWZStTkjxbRdvaWrb10mmI6YRZtgCxLlgmZMhcBdDstowuJQ8rGDx1Gy5iNguq nGxMBWCQnWjohkDbxIyyb5OVkqx95y2XRKtQ2Wfk7DAnYIazb5xE8WCtZyTTMVRK qf4NL2CK5Y2KRluJjSrdqliavWZMm0Xoa7Vb/7c6U+wP4edhAk296MAC0r+hxK0H 6ngF95Gg5HbmE91rUh9HP6c3eXAZgxuVMVA/fioD5ZuDCxEqJHxrnwcHQUQEq0o= =Dvx2 -----END PGP SIGNATURE----- --Apple-Mail=_F6257969-704D-407E-A954-26B041EB66E6-- From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 20:29:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6637767B; Sun, 16 Nov 2014 20:29:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 470273A6; Sun, 16 Nov 2014 20:29:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGKTxwe084626; Sun, 16 Nov 2014 20:29:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGKTw7n084622; Sun, 16 Nov 2014 20:29:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411162029.sAGKTw7n084622@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 20:29:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274595 - in head: lib/libc/tests/gen tools/regression/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 20:29:59 -0000 Author: ngie Date: Sun Nov 16 20:29:57 2014 New Revision: 274595 URL: https://svnweb.freebsd.org/changeset/base/274595 Log: Convert tools/regression/lib/libc/stdio/test-fpclassify into an ATF testcase and Rename as lib/libc/stdio/fpclassify2_test Sponsored by: EMC / Isilon Storage Division Added: head/lib/libc/tests/gen/fpclassify2_test.c - copied, changed from r274390, head/tools/regression/lib/libc/gen/test-fpclassify.c Deleted: head/tools/regression/lib/libc/gen/test-fpclassify.c Modified: head/lib/libc/tests/gen/Makefile head/tools/regression/lib/libc/gen/Makefile Modified: head/lib/libc/tests/gen/Makefile ============================================================================== --- head/lib/libc/tests/gen/Makefile Sun Nov 16 20:12:49 2014 (r274594) +++ head/lib/libc/tests/gen/Makefile Sun Nov 16 20:29:57 2014 (r274595) @@ -5,6 +5,7 @@ TESTSDIR= ${TESTSBASE}/lib/libc/gen ATF_TESTS_C= arc4random_test +ATF_TESTS_C+= fpclassify2_test # TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid, t_sleep # TODO: t_siginfo (fixes require further inspection) Copied and modified: head/lib/libc/tests/gen/fpclassify2_test.c (from r274390, head/tools/regression/lib/libc/gen/test-fpclassify.c) ============================================================================== --- head/tools/regression/lib/libc/gen/test-fpclassify.c Tue Nov 11 18:15:05 2014 (r274390, copy source) +++ head/lib/libc/tests/gen/fpclassify2_test.c Sun Nov 16 20:29:57 2014 (r274595) @@ -26,51 +26,47 @@ * $FreeBSD$ */ -#include #include #include #include +#include -int -main(void) +ATF_TC_WITHOUT_HEAD(test_fpclassify); +ATF_TC_BODY(test_fpclassify, tc) { - assert(fpclassify((float)0) == FP_ZERO); - assert(fpclassify((float)-0.0) == FP_ZERO); - assert(fpclassify((float)1) == FP_NORMAL); - assert(fpclassify((float)1000) == FP_NORMAL); -#ifndef __alpha__ - assert(fpclassify(0x1.2p-150f) == FP_SUBNORMAL); -#endif - assert(fpclassify(HUGE_VALF) == FP_INFINITE); - assert(fpclassify((float)HUGE_VAL) == FP_INFINITE); - assert(fpclassify((float)HUGE_VALL) == FP_INFINITE); - assert(fpclassify(NAN) == FP_NAN); - - assert(fpclassify((double)0) == FP_ZERO); - assert(fpclassify((double)-0) == FP_ZERO); - assert(fpclassify((double)1) == FP_NORMAL); - assert(fpclassify((double)1000) == FP_NORMAL); -#ifndef __alpha__ - assert(fpclassify(0x1.2p-1075) == FP_SUBNORMAL); -#endif - assert(fpclassify(HUGE_VAL) == FP_INFINITE); - assert(fpclassify((double)HUGE_VALF) == FP_INFINITE); - assert(fpclassify((double)HUGE_VALL) == FP_INFINITE); - assert(fpclassify((double)NAN) == FP_NAN); - - assert(fpclassify((long double)0) == FP_ZERO); - assert(fpclassify((long double)-0.0) == FP_ZERO); - assert(fpclassify((long double)1) == FP_NORMAL); - assert(fpclassify((long double)1000) == FP_NORMAL); -#ifndef __alpha__ - assert(fpclassify(0x1.2p-16383L) == FP_SUBNORMAL); -#endif - assert(fpclassify(HUGE_VALL) == FP_INFINITE); - assert(fpclassify((long double)HUGE_VALF) == FP_INFINITE); - assert(fpclassify((long double)HUGE_VAL) == FP_INFINITE); - assert(fpclassify((long double)NAN) == FP_NAN); + ATF_CHECK(fpclassify((float)0) == FP_ZERO); + ATF_CHECK(fpclassify((float)-0.0) == FP_ZERO); + ATF_CHECK(fpclassify((float)1) == FP_NORMAL); + ATF_CHECK(fpclassify((float)1000) == FP_NORMAL); + ATF_CHECK(fpclassify(HUGE_VALF) == FP_INFINITE); + ATF_CHECK(fpclassify((float)HUGE_VAL) == FP_INFINITE); + ATF_CHECK(fpclassify((float)HUGE_VALL) == FP_INFINITE); + ATF_CHECK(fpclassify(NAN) == FP_NAN); + + ATF_CHECK(fpclassify((double)0) == FP_ZERO); + ATF_CHECK(fpclassify((double)-0) == FP_ZERO); + ATF_CHECK(fpclassify((double)1) == FP_NORMAL); + ATF_CHECK(fpclassify((double)1000) == FP_NORMAL); + ATF_CHECK(fpclassify(HUGE_VAL) == FP_INFINITE); + ATF_CHECK(fpclassify((double)HUGE_VALF) == FP_INFINITE); + ATF_CHECK(fpclassify((double)HUGE_VALL) == FP_INFINITE); + ATF_CHECK(fpclassify((double)NAN) == FP_NAN); + + ATF_CHECK(fpclassify((long double)0) == FP_ZERO); + ATF_CHECK(fpclassify((long double)-0.0) == FP_ZERO); + ATF_CHECK(fpclassify((long double)1) == FP_NORMAL); + ATF_CHECK(fpclassify((long double)1000) == FP_NORMAL); + ATF_CHECK(fpclassify(HUGE_VALL) == FP_INFINITE); + ATF_CHECK(fpclassify((long double)HUGE_VALF) == FP_INFINITE); + ATF_CHECK(fpclassify((long double)HUGE_VAL) == FP_INFINITE); + ATF_CHECK(fpclassify((long double)NAN) == FP_NAN); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, test_fpclassify); - printf("PASS fpclassify()\n"); - exit(0); + return (atf_no_error()); } Modified: head/tools/regression/lib/libc/gen/Makefile ============================================================================== --- head/tools/regression/lib/libc/gen/Makefile Sun Nov 16 20:12:49 2014 (r274594) +++ head/tools/regression/lib/libc/gen/Makefile Sun Nov 16 20:29:57 2014 (r274595) @@ -1,7 +1,7 @@ # $FreeBSD$ TESTS= test-fmtcheck test-fmtmsg test-fnmatch \ - test-fpclassify test-ftw test-popen test-posix_spawn test-wordexp + test-ftw test-popen test-posix_spawn test-wordexp .PHONY: tests tests: ${TESTS} From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 20:34:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C97D2CC7; Sun, 16 Nov 2014 20:34:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6034654; Sun, 16 Nov 2014 20:34:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGKYEJ4088654; Sun, 16 Nov 2014 20:34:14 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGKYEwt088653; Sun, 16 Nov 2014 20:34:14 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201411162034.sAGKYEwt088653@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 16 Nov 2014 20:34:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274596 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 20:34:14 -0000 Author: ian Date: Sun Nov 16 20:34:14 2014 New Revision: 274596 URL: https://svnweb.freebsd.org/changeset/base/274596 Log: Indent a couple lines properly and expand a comment. No functional changes. Modified: head/sys/arm/arm/busdma_machdep-v6.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Sun Nov 16 20:29:57 2014 (r274595) +++ head/sys/arm/arm/busdma_machdep-v6.c Sun Nov 16 20:34:14 2014 (r274596) @@ -1336,7 +1336,7 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus (void *)bpage->vaddr, bpage->datacount); cpu_dcache_wb_range((vm_offset_t)bpage->vaddr, - bpage->datacount); + bpage->datacount); l2cache_wb_range((vm_offset_t)bpage->vaddr, (vm_offset_t)bpage->busaddr, bpage->datacount); @@ -1390,12 +1390,16 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus /* * For COHERENT memory no cache maintenance is necessary, but ensure all - * writes have reached memory for the PREWRITE case. + * writes have reached memory for the PREWRITE case. No action is + * needed for a PREREAD without PREWRITE also set, because that would + * imply that the cpu had written to the COHERENT buffer and expected + * the dma device to see that change, and by definition a PREWRITE sync + * is required to make that happen. */ if (map->flags & DMAMAP_COHERENT) { if (op & BUS_DMASYNC_PREWRITE) { - dsb(); - cpu_l2cache_drain_writebuf(); + dsb(); + cpu_l2cache_drain_writebuf(); } return; } From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 20:34:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 237A1E53; Sun, 16 Nov 2014 20:34:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F89D660; Sun, 16 Nov 2014 20:34:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGKYkiB088759; Sun, 16 Nov 2014 20:34:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGKYkXv088758; Sun, 16 Nov 2014 20:34:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411162034.sAGKYkXv088758@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 20:34:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274597 - head/contrib/netbsd-tests/lib/libm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 20:34:47 -0000 Author: ngie Date: Sun Nov 16 20:34:46 2014 New Revision: 274597 URL: https://svnweb.freebsd.org/changeset/base/274597 Log: Skip the long-double epsilon checks on FreeBSD/i386 Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libm/t_precision.c Modified: head/contrib/netbsd-tests/lib/libm/t_precision.c ============================================================================== --- head/contrib/netbsd-tests/lib/libm/t_precision.c Sun Nov 16 20:34:14 2014 (r274596) +++ head/contrib/netbsd-tests/lib/libm/t_precision.c Sun Nov 16 20:34:46 2014 (r274597) @@ -58,6 +58,7 @@ ATF_TC_BODY(t_precision, tc) x += DBL_EPSILON; ATF_CHECK(x == 2.0); +#if !defined(__FreeBSD__) || !defined(__i386__) y += LDBL_EPSILON; ATF_CHECK(y != 1.0L); y -= 1; @@ -65,6 +66,7 @@ ATF_TC_BODY(t_precision, tc) y = 2; y += LDBL_EPSILON; ATF_CHECK(y == 2.0L); +#endif } ATF_TP_ADD_TCS(tp) From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 20:35:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 308241AE; Sun, 16 Nov 2014 20:35:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CA9466B; Sun, 16 Nov 2014 20:35:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGKZW1O088944; Sun, 16 Nov 2014 20:35:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGKZWRV088943; Sun, 16 Nov 2014 20:35:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411162035.sAGKZWRV088943@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 20:35:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274598 - head/contrib/netbsd-tests/lib/libm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 20:35:33 -0000 Author: ngie Date: Sun Nov 16 20:35:32 2014 New Revision: 274598 URL: https://svnweb.freebsd.org/changeset/base/274598 Log: Reset errno to 0 before running scalbn to be sure that the tested errno is valid Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libm/t_scalbn.c Modified: head/contrib/netbsd-tests/lib/libm/t_scalbn.c ============================================================================== --- head/contrib/netbsd-tests/lib/libm/t_scalbn.c Sun Nov 16 20:34:46 2014 (r274597) +++ head/contrib/netbsd-tests/lib/libm/t_scalbn.c Sun Nov 16 20:35:32 2014 (r274598) @@ -81,6 +81,9 @@ ATF_TC_BODY(scalbn_val, tc) double rv; for (i = 0; i < tcnt; i++) { +#ifdef __FreeBSD__ + errno = 0; +#endif rv = scalbn(tests[i].inval, tests[i].exp); ATF_CHECK_EQ_MSG(errno, tests[i].error, "test %zu: errno %d instead of %d", i, errno, From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 20:37:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE5B033C; Sun, 16 Nov 2014 20:37:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAA3B689; Sun, 16 Nov 2014 20:37:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGKbkn6089248; Sun, 16 Nov 2014 20:37:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGKbkju089247; Sun, 16 Nov 2014 20:37:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411162037.sAGKbkju089247@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 20:37:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274599 - head/contrib/netbsd-tests/lib/libm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 20:37:47 -0000 Author: ngie Date: Sun Nov 16 20:37:46 2014 New Revision: 274599 URL: https://svnweb.freebsd.org/changeset/base/274599 Log: Alias isinff to isinf on FreeBSD isinf on FreeBSD automatically picks the appropriate type per math.h Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libm/t_pow.c Modified: head/contrib/netbsd-tests/lib/libm/t_pow.c ============================================================================== --- head/contrib/netbsd-tests/lib/libm/t_pow.c Sun Nov 16 20:35:32 2014 (r274598) +++ head/contrib/netbsd-tests/lib/libm/t_pow.c Sun Nov 16 20:37:46 2014 (r274599) @@ -34,6 +34,10 @@ __RCSID("$NetBSD: t_pow.c,v 1.3 2014/03/ #include #include +#ifdef __FreeBSD__ +#define isinff isinf +#endif + /* * pow(3) */ From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 20:39:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4CAC48B; Sun, 16 Nov 2014 20:39:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1646696; Sun, 16 Nov 2014 20:39:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGKdB8u089471; Sun, 16 Nov 2014 20:39:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGKdBgL089470; Sun, 16 Nov 2014 20:39:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411162039.sAGKdBgL089470@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 20:39:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274600 - head/contrib/netbsd-tests/lib/libm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 20:39:11 -0000 Author: ngie Date: Sun Nov 16 20:39:11 2014 New Revision: 274600 URL: https://svnweb.freebsd.org/changeset/base/274600 Log: - Expect exp2_powers to fail on FreeBSD/i386 - Expect exp2_values to fail on FreeBSD due to the small epsilon Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libm/t_exp.c Modified: head/contrib/netbsd-tests/lib/libm/t_exp.c ============================================================================== --- head/contrib/netbsd-tests/lib/libm/t_exp.c Sun Nov 16 20:37:46 2014 (r274599) +++ head/contrib/netbsd-tests/lib/libm/t_exp.c Sun Nov 16 20:39:11 2014 (r274600) @@ -131,6 +131,10 @@ ATF_LIBM_TEST(exp2_powers, "Test exp2(x) }; unsigned int i; +#if defined(__FreeBSD__) && defined(__i386__) + atf_tc_expect_fail("a number of the assertions fail on i386"); +#endif + for (i = 0; i < __arraycount(v); i++) { T_LIBM_CHECK(i, exp2, v[i].x, v[i].d_y, 0.0); T_LIBM_CHECK(i, exp2f, v[i].x, v[i].f_y, 0.0); @@ -173,6 +177,11 @@ ATF_LIBM_TEST(exp2_values, "Test exp2(x) }; unsigned int i; +#ifdef __FreeBSD__ + atf_tc_expect_fail("Some of the cases produce failures on FreeBSD " + "due to the error epsilon being so small"); +#endif + for (i = 0; i < __arraycount(v); i++) { T_LIBM_CHECK(i, exp2, v[i].x, v[i].y, v[i].d_eps); if (i > 1) From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 20:42:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CB155F9; Sun, 16 Nov 2014 20:42:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4B50797; Sun, 16 Nov 2014 20:42:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGKgUeW093370; Sun, 16 Nov 2014 20:42:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGKgU6i093369; Sun, 16 Nov 2014 20:42:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411162042.sAGKgU6i093369@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 20:42:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274601 - head/contrib/netbsd-tests/lib/libm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 20:42:31 -0000 Author: ngie Date: Sun Nov 16 20:42:30 2014 New Revision: 274601 URL: https://svnweb.freebsd.org/changeset/base/274601 Log: - Skip over the testcases that call cbrtl on platforms where LDBL_PREC == 53 (arm, mips, powerpc). This fixes the build on these platforms, based on some ad hoc tinderbox runs I did a while ago - Skip cast the arguments to powl as long double so powl properly interprets those arugments at compile-time when picking the type Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libm/t_cbrt.c Modified: head/contrib/netbsd-tests/lib/libm/t_cbrt.c ============================================================================== --- head/contrib/netbsd-tests/lib/libm/t_cbrt.c Sun Nov 16 20:39:11 2014 (r274600) +++ head/contrib/netbsd-tests/lib/libm/t_cbrt.c Sun Nov 16 20:42:30 2014 (r274601) @@ -237,6 +237,7 @@ ATF_TC_BODY(cbrtf_zero_pos, tc) atf_tc_fail_nonfatal("cbrtf(+0.0) != +0.0"); } +#if !defined(__FreeBSD__) || LDBL_PREC != 53 /* * cbrtl(3) */ @@ -270,7 +271,11 @@ ATF_TC_BODY(cbrtl_powl, tc) for (i = 0; i < __arraycount(x); i++) { y = cbrtl(x[i]); +#ifdef __FreeBSD__ + z = powl(x[i], (long double)1.0 / 3.0); +#else z = powl(x[i], 1.0 / 3.0); +#endif if (fabsl(y - z) > eps * fabsl(1 + x[i])) atf_tc_fail_nonfatal("cbrtl(%0.03Lf) != " @@ -337,6 +342,7 @@ ATF_TC_BODY(cbrtl_zero_pos, tc) if (fabsl(y) > 0.0 || signbit(y) != 0) atf_tc_fail_nonfatal("cbrtl(+0.0) != +0.0"); } +#endif ATF_TP_ADD_TCS(tp) { @@ -355,12 +361,14 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, cbrtf_zero_neg); ATF_TP_ADD_TC(tp, cbrtf_zero_pos); +#if !defined(__FreeBSD__) || LDBL_PREC != 53 ATF_TP_ADD_TC(tp, cbrtl_nan); ATF_TP_ADD_TC(tp, cbrtl_powl); ATF_TP_ADD_TC(tp, cbrtl_inf_neg); ATF_TP_ADD_TC(tp, cbrtl_inf_pos); ATF_TP_ADD_TC(tp, cbrtl_zero_neg); ATF_TP_ADD_TC(tp, cbrtl_zero_pos); +#endif return atf_no_error(); } From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 20:55:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3995DC7B; Sun, 16 Nov 2014 20:55:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2629F880; Sun, 16 Nov 2014 20:55:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGKtquP098429; Sun, 16 Nov 2014 20:55:52 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGKtqC0098428; Sun, 16 Nov 2014 20:55:52 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201411162055.sAGKtqC0098428@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 16 Nov 2014 20:55:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274602 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 20:55:52 -0000 Author: ian Date: Sun Nov 16 20:55:51 2014 New Revision: 274602 URL: https://svnweb.freebsd.org/changeset/base/274602 Log: Do not do a cache invalidate on a PREREAD sync that is also a PREWRITE sync. The PREWRITE handling does a writeback of any dirty cachelines, so there's no danger of an eviction during the DMA corrupting the buffer. There will be an invalidate done during POSTREAD, so doing it before the read too is wasted time. Modified: head/sys/arm/arm/busdma_machdep-v6.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Sun Nov 16 20:42:30 2014 (r274601) +++ head/sys/arm/arm/busdma_machdep-v6.c Sun Nov 16 20:55:51 2014 (r274602) @@ -1345,7 +1345,7 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus dmat->bounce_zone->total_bounced++; } - if (op & BUS_DMASYNC_PREREAD) { + if ((op & BUS_DMASYNC_PREREAD) && !(op & BUS_DMASYNC_PREWRITE)) { bpage = STAILQ_FIRST(&map->bpages); while (bpage != NULL) { cpu_dcache_inv_range((vm_offset_t)bpage->vaddr, From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 20:59:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27B50F77; Sun, 16 Nov 2014 20:59:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13DB78AB; Sun, 16 Nov 2014 20:59:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGKxROH098887; Sun, 16 Nov 2014 20:59:27 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGKxRAe098886; Sun, 16 Nov 2014 20:59:27 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201411162059.sAGKxRAe098886@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 16 Nov 2014 20:59:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274603 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 20:59:28 -0000 Author: ian Date: Sun Nov 16 20:59:27 2014 New Revision: 274603 URL: https://svnweb.freebsd.org/changeset/base/274603 Log: Do the cache invalidate sequence from the outermost to innermost, required for correct operation. Submitted by: Michal Meloun Modified: head/sys/arm/arm/busdma_machdep-v6.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Sun Nov 16 20:55:51 2014 (r274602) +++ head/sys/arm/arm/busdma_machdep-v6.c Sun Nov 16 20:59:27 2014 (r274603) @@ -1372,8 +1372,8 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus len = (len - (len & arm_dcache_align_mask)) + arm_dcache_align; - cpu_dcache_inv_range(startv, len); l2cache_inv_range(startv, startp, len); + cpu_dcache_inv_range(startv, len); if (bpage->datavaddr != 0) bcopy((void *)bpage->vaddr, (void *)bpage->datavaddr, From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 21:22:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86460AEE; Sun, 16 Nov 2014 21:22:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A211BB1; Sun, 16 Nov 2014 21:22:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGLMhWv012137; Sun, 16 Nov 2014 21:22:43 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGLMhZh012136; Sun, 16 Nov 2014 21:22:43 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201411162122.sAGLMhZh012136@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 16 Nov 2014 21:22:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274604 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 21:22:43 -0000 Author: ian Date: Sun Nov 16 21:22:42 2014 New Revision: 274604 URL: https://svnweb.freebsd.org/changeset/base/274604 Log: Correct the sequence of busdma sync ops involved with PRE/POSTREAD syncs. We used to invalidate the cache for PREREAD alone, or writeback+invalidate for PREREAD with PREWRITE, then treat POSTREAD as a no-op. Prefetching on modern systems can lead to parts of a DMA buffer getting pulled into the caches while DMA is in progress (due to access of "nearby" data), so it's mandatory to invalidate during the POSTREAD sync even if a PREREAD invalidate also happened. In the PREREAD case the invalidate is done to ensure that there are no dirty cache lines that might get automatically evicted during the DMA, corrupting the buffer. In a PREREAD+PREWRITE case the writeback which is required for PREWRITE handling is suffficient to avoid corruption caused by eviction and no invalidate need be done until POSTREAD time. Submitted by: Michal Meloun Modified: head/sys/arm/arm/busdma_machdep-v6.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Sun Nov 16 20:59:27 2014 (r274603) +++ head/sys/arm/arm/busdma_machdep-v6.c Sun Nov 16 21:22:42 2014 (r274604) @@ -1416,6 +1416,7 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus switch (op) { case BUS_DMASYNC_PREWRITE: + case BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD: while (sl != end) { cpu_dcache_wb_range(sl->vaddr, sl->datacount); l2cache_wb_range(sl->vaddr, sl->busaddr, @@ -1433,19 +1434,19 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus } break; - case BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD: - while (sl != end) { - cpu_dcache_wbinv_range(sl->vaddr, sl->datacount); - l2cache_wbinv_range(sl->vaddr, - sl->busaddr, sl->datacount); - sl++; - } + case BUS_DMASYNC_POSTWRITE: break; case BUS_DMASYNC_POSTREAD: - case BUS_DMASYNC_POSTWRITE: case BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE: + while (sl != end) { + l2cache_inv_range(sl->vaddr, sl->busaddr, + sl->datacount); + cpu_dcache_inv_range(sl->vaddr, sl->datacount); + sl++; + } break; + default: panic("unsupported combination of sync operations: 0x%08x\n", op); break; From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 21:39:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB5142A4; Sun, 16 Nov 2014 21:39:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7D1ACCE; Sun, 16 Nov 2014 21:39:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGLduwQ017565; Sun, 16 Nov 2014 21:39:56 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGLduHO017564; Sun, 16 Nov 2014 21:39:56 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201411162139.sAGLduHO017564@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 16 Nov 2014 21:39:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274605 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 21:39:57 -0000 Author: ian Date: Sun Nov 16 21:39:56 2014 New Revision: 274605 URL: https://svnweb.freebsd.org/changeset/base/274605 Log: No functional changes. Remove a couple outdated or inane comments and add new comment blocks describing why the cache maintenance sequences are done in the order they are for each case. Modified: head/sys/arm/arm/busdma_machdep-v6.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Sun Nov 16 21:22:42 2014 (r274604) +++ head/sys/arm/arm/busdma_machdep-v6.c Sun Nov 16 21:39:56 2014 (r274605) @@ -1314,17 +1314,20 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus /* * If the buffer was from user space, it is possible that this is not * the same vm map, especially on a POST operation. It's not clear that - * dma on userland buffers can work at all right now, certainly not if a - * partial cacheline flush has to be handled. To be safe, until we're - * able to test direct userland dma, panic on a map mismatch. + * dma on userland buffers can work at all right now. To be safe, until + * we're able to test direct userland dma, panic on a map mismatch. */ if ((bpage = STAILQ_FIRST(&map->bpages)) != NULL) { if (!pmap_dmap_iscurrent(map->pmap)) panic("_bus_dmamap_sync: wrong user map for bounce sync."); - /* Handle data bouncing. */ + CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x op 0x%x " "performing bounce", __func__, dmat, dmat->flags, op); + /* + * For PREWRITE do a writeback. Clean the caches from the + * innermost to the outermost levels. + */ if (op & BUS_DMASYNC_PREWRITE) { while (bpage != NULL) { if (bpage->datavaddr != 0) @@ -1345,6 +1348,17 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus dmat->bounce_zone->total_bounced++; } + /* + * Do an invalidate for PREREAD unless a writeback was already + * done above due to PREWRITE also being set. The reason for a + * PREREAD invalidate is to prevent dirty lines currently in the + * cache from being evicted during the DMA. If a writeback was + * done due to PREWRITE also being set there will be no dirty + * lines and the POSTREAD invalidate handles the rest. The + * invalidate is done from the innermost to outermost level. If + * L2 were done first, a dirty cacheline could be automatically + * evicted from L1 before we invalidated it, re-dirtying the L2. + */ if ((op & BUS_DMASYNC_PREREAD) && !(op & BUS_DMASYNC_PREWRITE)) { bpage = STAILQ_FIRST(&map->bpages); while (bpage != NULL) { @@ -1356,6 +1370,16 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus bpage = STAILQ_NEXT(bpage, links); } } + + /* + * Re-invalidate the caches on a POSTREAD, even though they were + * already invalidated at PREREAD time. Aggressive prefetching + * due to accesses to other data near the dma buffer could have + * brought buffer data into the caches which is now stale. The + * caches are invalidated from the outermost to innermost; the + * prefetches could be happening right now, and if L1 were + * invalidated first, stale L2 data could be prefetched into L1. + */ if (op & BUS_DMASYNC_POSTREAD) { while (bpage != NULL) { vm_offset_t startv; @@ -1404,10 +1428,16 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus return; } + /* + * Cache maintenance for normal (non-COHERENT non-bounce) buffers. All + * the comments about the sequences for flushing cache levels in the + * bounce buffer code above apply here as well. In particular, the fact + * that the sequence is inner-to-outer for PREREAD invalidation and + * outer-to-inner for POSTREAD invalidation is not a mistake. + */ if (map->sync_count != 0) { if (!pmap_dmap_iscurrent(map->pmap)) panic("_bus_dmamap_sync: wrong user map for sync."); - /* ARM caches are not self-snooping for dma */ sl = &map->slist[0]; end = &map->slist[map->sync_count]; From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 21:46:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6915B66A; Sun, 16 Nov 2014 21:46:54 +0000 (UTC) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D145DAE; Sun, 16 Nov 2014 21:46:54 +0000 (UTC) Received: by mail-wi0-f174.google.com with SMTP id h11so4014376wiw.1 for ; Sun, 16 Nov 2014 13:46:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=sz1YznBWxlhN7YE3i/TWkQ//vymTHcWK2tQMlAXcWaQ=; b=xosIKVz5X3i3ejIqXNEPG1tXXH3UlcAyVxktbmE4ZIeZ4v7D4/H78dUCO+oOoL3zF7 ZgNn/uLRW2XnhRRrOr6KhSlSLOOQb6khFPYYM2DQrWx+EsZeVhHRi1/iWmWcrmoPNPNq zoYyNaUmEIGfTvkA0rlQ6SAcbYPPY+qW0PfVU4znxXBbalpxoW05JMuXS2eAspZ3hb4k D0oTgC1mYFcuYVJcty34hV7655ZPObuqffifz9EOV5nvskjuh/uqVcgojdubFJo6cO0M onzgbrWJ3eVCAbBZFM1w0zlCeoJ30KtruqWuED6eqWbYIXr3+M7SgMlehgBvc1Lu9Q/O ACAg== MIME-Version: 1.0 X-Received: by 10.194.248.195 with SMTP id yo3mr32698209wjc.60.1416174412493; Sun, 16 Nov 2014 13:46:52 -0800 (PST) Received: by 10.27.179.168 with HTTP; Sun, 16 Nov 2014 13:46:52 -0800 (PST) In-Reply-To: <201411160944.sAG9iUTJ084769@svn.freebsd.org> References: <201411160944.sAG9iUTJ084769@svn.freebsd.org> Date: Sun, 16 Nov 2014 16:46:52 -0500 Message-ID: Subject: Re: svn commit: r274583 - head/usr.sbin/watchdogd From: Benjamin Kaduk To: Xin LI Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 21:46:54 -0000 On Sun, Nov 16, 2014 at 4:44 AM, Xin LI wrote: > Author: delphij > Date: Sun Nov 16 09:44:30 2014 > New Revision: 274583 > URL: https://svnweb.freebsd.org/changeset/base/274583 > > Log: > Default to use 10 seconds as nap interval instead of 1. > > Previously, we have a nap interval of 1 second while we have a timeout of > 128 seconds by default, which could be an overkill, and for some hardware > the patting action may be expensive. > > Note that the choice of nap interval is still arbitrary. We preferred > a safe value where even when the system is very heavily loaded, the > watchdog should not shoot the system down if it's not really hung. > According to the manual page of Linux's watchdog daemon, the nap interval > time of theirs is 10 seconds, which seems to be a reasonable value -- > according to Intel documentation AP-725 (Document Number: 292273-001), > ICH5's maximum timeout is about 37.5 seconds, which the ichwd(4) driver > would set when we requested 128 seconds (although it should probably > feed back this as an error and do not set the timeout). Since that's > the shortest maximum value, 10 seconds seems to be a right choice for > us too. > > Discussed with: alfred > MFC after: 1 month > relnotes: yes? -Ben From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 23:02:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E150680A; Sun, 16 Nov 2014 23:02:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C23E07A4; Sun, 16 Nov 2014 23:02:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGN2Xq6059684; Sun, 16 Nov 2014 23:02:33 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGN2WRr059677; Sun, 16 Nov 2014 23:02:32 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201411162302.sAGN2WRr059677@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 16 Nov 2014 23:02:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274606 - in stable/10: share/man/man9 sys/kern sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 23:02:34 -0000 Author: kib Date: Sun Nov 16 23:02:32 2014 New Revision: 274606 URL: https://svnweb.freebsd.org/changeset/base/274606 Log: MFC r273966: Fix two issues with lockmgr(9) LK_CAN_SHARE() test, related to the exclusive locker starvation. MFC r273986: Fix the build with ADAPTIVE_LOCKMGRS kernel option. Modified: stable/10/share/man/man9/lock.9 stable/10/sys/kern/kern_lock.c stable/10/sys/kern/vfs_lookup.c stable/10/sys/sys/lockmgr.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/lock.9 ============================================================================== --- stable/10/share/man/man9/lock.9 Sun Nov 16 21:39:56 2014 (r274605) +++ stable/10/share/man/man9/lock.9 Sun Nov 16 23:02:32 2014 (r274606) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 6, 2013 +.Dd November 2, 2014 .Dt LOCK 9 .Os .Sh NAME @@ -145,7 +145,7 @@ Their arguments are: A pointer to the lock to manipulate. .It Fa flags Flags indicating what action is to be taken. -.Bl -tag -width ".Dv LK_CANRECURSE" +.Bl -tag -width ".Dv LK_NODDLKTREAT" .It Dv LK_SHARED Acquire a shared lock. If an exclusive lock is currently held, @@ -199,6 +199,29 @@ Allow recursion on an exclusive lock. For every lock there must be a release. .It Dv LK_INTERLOCK Unlock the interlock (which should be locked already). +.It Dv LK_NODDLKTREAT +Normally, +.Fn lockmgr +postpones serving further shared requests for shared-locked lock if there is +exclusive waiter, to avoid exclusive lock starvation. +But, if the thread requesting the shared lock already owns a shared lockmgr +lock, the request is granted even in presence of the parallel exclusive lock +request, which is done to avoid deadlocks with recursive shared acquisition. +.Pp +The +.Dv LK_NODDLKTREAT +flag can only be used by code which requests shared non-recursive lock. +The flag allows exclusive requests to preempt the current shared request +even if the current thread owns shared locks. +This is safe since shared lock is guaranteed to not recurse, and is used +when thread is known to held unrelated shared locks, to not cause +unneccessary starvation. An example is +.Dv vp +locking in VFS +.Xr lookup 9 , +when +.Dv dvp +is already locked. .El .It Fa ilk An interlock mutex for controlling group access to the lock. Modified: stable/10/sys/kern/kern_lock.c ============================================================================== --- stable/10/sys/kern/kern_lock.c Sun Nov 16 21:39:56 2014 (r274605) +++ stable/10/sys/kern/kern_lock.c Sun Nov 16 23:02:32 2014 (r274606) @@ -116,10 +116,11 @@ CTASSERT(LK_UNLOCKED == (LK_UNLOCKED & } \ } while (0) -#define LK_CAN_SHARE(x) \ - (((x) & LK_SHARE) && (((x) & LK_EXCLUSIVE_WAITERS) == 0 || \ - ((x) & LK_EXCLUSIVE_SPINNERS) == 0 || \ - curthread->td_lk_slocks || (curthread->td_pflags & TDP_DEADLKTREAT))) +#define LK_CAN_SHARE(x, flags) \ + (((x) & LK_SHARE) && \ + (((x) & (LK_EXCLUSIVE_WAITERS | LK_EXCLUSIVE_SPINNERS)) == 0 || \ + (curthread->td_lk_slocks != 0 && !(flags & LK_NODDLKTREAT)) || \ + (curthread->td_pflags & TDP_DEADLKTREAT))) #define LK_TRYOP(x) \ ((x) & LK_NOWAIT) @@ -531,7 +532,7 @@ __lockmgr_args(struct lock *lk, u_int fl * waiters, if we fail to acquire the shared lock * loop back and retry. */ - if (LK_CAN_SHARE(x)) { + if (LK_CAN_SHARE(x, flags)) { if (atomic_cmpset_acq_ptr(&lk->lk_lock, x, x + LK_ONE_SHARER)) break; @@ -615,7 +616,7 @@ __lockmgr_args(struct lock *lk, u_int fl __func__, lk, spintries, i); x = lk->lk_lock; if ((x & LK_SHARE) == 0 || - LK_CAN_SHARE(x) != 0) + LK_CAN_SHARE(x, flags) != 0) break; cpu_spinwait(); } @@ -636,7 +637,7 @@ __lockmgr_args(struct lock *lk, u_int fl * if the lock can be acquired in shared mode, try * again. */ - if (LK_CAN_SHARE(x)) { + if (LK_CAN_SHARE(x, flags)) { sleepq_release(&lk->lock_object); continue; } Modified: stable/10/sys/kern/vfs_lookup.c ============================================================================== --- stable/10/sys/kern/vfs_lookup.c Sun Nov 16 21:39:56 2014 (r274605) +++ stable/10/sys/kern/vfs_lookup.c Sun Nov 16 23:02:32 2014 (r274606) @@ -392,6 +392,7 @@ compute_cn_lkflags(struct mount *mp, int lkflags &= ~LK_SHARED; lkflags |= LK_EXCLUSIVE; } + lkflags |= LK_NODDLKTREAT; return (lkflags); } Modified: stable/10/sys/sys/lockmgr.h ============================================================================== --- stable/10/sys/sys/lockmgr.h Sun Nov 16 21:39:56 2014 (r274605) +++ stable/10/sys/sys/lockmgr.h Sun Nov 16 23:02:32 2014 (r274606) @@ -158,6 +158,7 @@ _lockmgr_args_rw(struct lock *lk, u_int #define LK_RETRY 0x000400 #define LK_SLEEPFAIL 0x000800 #define LK_TIMELOCK 0x001000 +#define LK_NODDLKTREAT 0x002000 /* * Operations for lockmgr(). From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 23:31:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 084203A9; Sun, 16 Nov 2014 23:31:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E91FE9DC; Sun, 16 Nov 2014 23:31:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAGNVNFh073088; Sun, 16 Nov 2014 23:31:23 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAGNVNiS073087; Sun, 16 Nov 2014 23:31:23 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201411162331.sAGNVNiS073087@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 16 Nov 2014 23:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274607 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 23:31:24 -0000 Author: sbruno Date: Sun Nov 16 23:31:23 2014 New Revision: 274607 URL: https://svnweb.freebsd.org/changeset/base/274607 Log: Add mv, echo and hostname to the native-xtools target. Missed these when profiling. MFC after: 2 weeks Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Nov 16 23:02:32 2014 (r274606) +++ head/Makefile.inc1 Sun Nov 16 23:31:23 2014 (r274607) @@ -1459,10 +1459,13 @@ native-xtools: .MAKE bin/chmod \ bin/cp \ bin/csh \ + bin/echo \ bin/expr \ + bin/hostname \ bin/ln \ bin/ls \ bin/mkdir \ + bin/mv \ bin/ps \ bin/realpath \ bin/rm \ From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 00:57:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98858DDD; Mon, 17 Nov 2014 00:57:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84C8D1E7; Mon, 17 Nov 2014 00:57:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAH0vYV1013121; Mon, 17 Nov 2014 00:57:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAH0vYXQ013120; Mon, 17 Nov 2014 00:57:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201411170057.sAH0vYXQ013120@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 17 Nov 2014 00:57:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274608 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 00:57:34 -0000 Author: kib Date: Mon Nov 17 00:57:33 2014 New Revision: 274608 URL: https://svnweb.freebsd.org/changeset/base/274608 Log: MFC r274040 and r274084. The result is removal of agp_intel.c from the static amd64 kernel when agp is configured. Modified: stable/10/sys/conf/files.amd64 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files.amd64 ============================================================================== --- stable/10/sys/conf/files.amd64 Sun Nov 16 23:31:23 2014 (r274607) +++ stable/10/sys/conf/files.amd64 Mon Nov 17 00:57:33 2014 (r274608) @@ -154,7 +154,6 @@ dev/acpica/acpi_if.m standard dev/acpi_support/acpi_wmi_if.m standard dev/agp/agp_amd64.c optional agp dev/agp/agp_i810.c optional agp -dev/agp/agp_intel.c optional agp dev/agp/agp_via.c optional agp dev/amdsbwd/amdsbwd.c optional amdsbwd dev/amdtemp/amdtemp.c optional amdtemp From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 00:59:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D008F1A; Mon, 17 Nov 2014 00:59:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 496BF1F1; Mon, 17 Nov 2014 00:59:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAH0xkVc013439; Mon, 17 Nov 2014 00:59:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAH0xk8H013438; Mon, 17 Nov 2014 00:59:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201411170059.sAH0xk8H013438@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 17 Nov 2014 00:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274609 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 00:59:46 -0000 Author: kib Date: Mon Nov 17 00:59:45 2014 New Revision: 274609 URL: https://svnweb.freebsd.org/changeset/base/274609 Log: MFC r274023: When other end of the pipe closed during the write, but some bytes were written, return short write instead of EPIPE. Modified: stable/10/sys/kern/sys_pipe.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sys_pipe.c ============================================================================== --- stable/10/sys/kern/sys_pipe.c Mon Nov 17 00:57:33 2014 (r274608) +++ stable/10/sys/kern/sys_pipe.c Mon Nov 17 00:59:45 2014 (r274609) @@ -1293,13 +1293,13 @@ pipe_write(fp, uio, active_cred, flags, } /* - * Don't return EPIPE if I/O was successful + * Don't return EPIPE if any byte was written. + * EINTR and other interrupts are handled by generic I/O layer. + * Do not pretend that I/O succeeded for obvious user error + * like EFAULT. */ - if ((wpipe->pipe_buffer.cnt == 0) && - (uio->uio_resid == 0) && - (error == EPIPE)) { + if (uio->uio_resid != orig_resid && error == EPIPE) error = 0; - } if (error == 0) vfs_timestamp(&wpipe->pipe_mtime); From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 01:01:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4743DEA; Mon, 17 Nov 2014 01:01:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3430D20A; Mon, 17 Nov 2014 01:01:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAH11knC017287; Mon, 17 Nov 2014 01:01:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAH11j0N017285; Mon, 17 Nov 2014 01:01:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201411170101.sAH11j0N017285@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 17 Nov 2014 01:01:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274610 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 01:01:46 -0000 Author: kib Date: Mon Nov 17 01:01:45 2014 New Revision: 274610 URL: https://svnweb.freebsd.org/changeset/base/274610 Log: MFC r274343: When sleeping waiting for the profiling stop, always set P_STOPPROF before dropping process lock. Clear P_STOPPROF when doing wakeup. Modified: stable/10/sys/kern/kern_clock.c stable/10/sys/kern/subr_prof.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_clock.c ============================================================================== --- stable/10/sys/kern/kern_clock.c Mon Nov 17 00:59:45 2014 (r274609) +++ stable/10/sys/kern/kern_clock.c Mon Nov 17 01:01:45 2014 (r274610) @@ -669,11 +669,11 @@ stopprofclock(p) PROC_LOCK_ASSERT(p, MA_OWNED); if (p->p_flag & P_PROFIL) { if (p->p_profthreads != 0) { - p->p_flag |= P_STOPPROF; - while (p->p_profthreads != 0) + while (p->p_profthreads != 0) { + p->p_flag |= P_STOPPROF; msleep(&p->p_profthreads, &p->p_mtx, PPAUSE, "stopprof", 0); - p->p_flag &= ~P_STOPPROF; + } } if ((p->p_flag & P_PROFIL) == 0) return; Modified: stable/10/sys/kern/subr_prof.c ============================================================================== --- stable/10/sys/kern/subr_prof.c Mon Nov 17 00:59:45 2014 (r274609) +++ stable/10/sys/kern/subr_prof.c Mon Nov 17 01:01:45 2014 (r274610) @@ -533,6 +533,7 @@ out: if (--p->p_profthreads == 0) { if (p->p_flag & P_STOPPROF) { wakeup(&p->p_profthreads); + p->p_flag &= ~P_STOPPROF; stop = 0; } } From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 01:05:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A13924F; Mon, 17 Nov 2014 01:05:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2509B2DB; Mon, 17 Nov 2014 01:05:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAH15Wxa017797; Mon, 17 Nov 2014 01:05:32 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAH15Ugb017789; Mon, 17 Nov 2014 01:05:30 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201411170105.sAH15Ugb017789@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 17 Nov 2014 01:05:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274611 - in head: sbin/route sys/net sys/netinet sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 01:05:32 -0000 Author: melifaro Date: Mon Nov 17 01:05:29 2014 New Revision: 274611 URL: https://svnweb.freebsd.org/changeset/base/274611 Log: Finish r274175: do control plane MTU tracking. Update route MTU in case of ifnet MTU change. Add new RTF_FIXEDMTU to track explicitly specified MTU. Old behavior: ifconfig em0 mtu 1500->9000 -> all routes traversing em0 do not change MTU. User has to manually update all routes. ifconfig em0 mtu 9000->1500 -> all routes traversing em0 do not change MTU. However, if ip[6]_output finds route with rt_mtu > interface mtu, rt_mtu gets updated. New behavior: ifconfig em0 mtu 1500->9000 -> all interface routes in all fibs gets updated with new MTU unless RTF_FIXEDMTU flag set on them. ifconfig em0 mtu 9000->1500 -> all routes in all fibs gets updated with new MTU unless RTF_FIXEDMTU flag set on them AND rt_mtu is less than ifp mtu. route add ... -mtu XXX automatically sets RTF_FIXEDMTU flag. route change .. -mtu 0 automatically removes RTF_FIXEDMTU flag. PR: 194238 MFC after: 1 month CR: D1125 Modified: head/sbin/route/route.c head/sys/net/if.c head/sys/net/route.c head/sys/net/route.h head/sys/netinet/ip_output.c head/sys/netinet6/ip6_output.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Mon Nov 17 01:01:45 2014 (r274610) +++ head/sbin/route/route.c Mon Nov 17 01:05:29 2014 (r274611) @@ -1587,7 +1587,7 @@ static const char routeflags[] = "\1UP\2GATEWAY\3HOST\4REJECT\5DYNAMIC\6MODIFIED\7DONE" "\012XRESOLVE\013LLINFO\014STATIC\015BLACKHOLE" "\017PROTO2\020PROTO1\021PRCLONING\022WASCLONED\023PROTO3" - "\025PINNED\026LOCAL\027BROADCAST\030MULTICAST\035STICKY"; + "\024FIXEDMTU\025PINNED\026LOCAL\027BROADCAST\030MULTICAST\035STICKY"; static const char ifnetflags[] = "\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5PTP\6b6\7RUNNING\010NOARP" "\011PPROMISC\012ALLMULTI\013OACTIVE\014SIMPLEX\015LINK0\016LINK1" Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Mon Nov 17 01:01:45 2014 (r274610) +++ head/sys/net/if.c Mon Nov 17 01:05:29 2014 (r274611) @@ -2494,6 +2494,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, #ifdef INET6 nd6_setmtu(ifp); #endif + rt_updatemtu(ifp); } break; } Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Mon Nov 17 01:01:45 2014 (r274610) +++ head/sys/net/route.c Mon Nov 17 01:05:29 2014 (r274611) @@ -141,6 +141,14 @@ static int rtrequest1_fib_change(struct struct rtentry **, u_int); static void rt_setmetrics(const struct rt_addrinfo *, struct rtentry *); +struct if_mtuinfo +{ + struct ifnet *ifp; + int mtu; +}; + +static int if_updatemtu_cb(struct radix_node *, void *); + /* * handler for net.my_fibnum */ @@ -947,6 +955,70 @@ bad: return (error); } +static int +if_updatemtu_cb(struct radix_node *rn, void *arg) +{ + struct rtentry *rt; + struct if_mtuinfo *ifmtu; + + rt = (struct rtentry *)rn; + ifmtu = (struct if_mtuinfo *)arg; + + if (rt->rt_ifp != ifmtu->ifp) + return (0); + + if (rt->rt_mtu >= ifmtu->mtu) { + /* We have to decrease mtu regardless of flags */ + rt->rt_mtu = ifmtu->mtu; + return (0); + } + + /* + * New MTU is bigger. Check if are allowed to alter it + */ + if ((rt->rt_flags & (RTF_FIXEDMTU | RTF_GATEWAY | RTF_HOST)) != 0) { + + /* + * Skip routes with user-supplied MTU and + * non-interface routes + */ + return (0); + } + + /* We are safe to update route MTU */ + rt->rt_mtu = ifmtu->mtu; + + return (0); +} + +void +rt_updatemtu(struct ifnet *ifp) +{ + struct if_mtuinfo ifmtu; + struct radix_node_head *rnh; + int i, j; + + ifmtu.ifp = ifp; + + /* + * Try to update rt_mtu for all routes using this interface + * Unfortunately the only way to do this is to traverse all + * routing tables in all fibs/domains. + */ + for (i = 1; i <= AF_MAX; i++) { + ifmtu.mtu = if_getmtu_family(ifp, i); + for (j = 0; j < rt_numfibs; j++) { + rnh = rt_tables_get_rnh(j, i); + if (rnh == NULL) + continue; + RADIX_NODE_HEAD_LOCK(rnh); + rnh->rnh_walktree(rnh, if_updatemtu_cb, &ifmtu); + RADIX_NODE_HEAD_UNLOCK(rnh); + } + } +} + + #if 0 int p_sockaddr(char *buf, int buflen, struct sockaddr *s); int rt_print(char *buf, int buflen, struct rtentry *rt); @@ -1408,6 +1480,7 @@ rtrequest1_fib_change(struct radix_node_ int error = 0; int free_ifa = 0; int family, mtu; + struct if_mtuinfo ifmtu; rt = (struct rtentry *)rnh->rnh_lookup(info->rti_info[RTAX_DST], info->rti_info[RTAX_NETMASK], rnh); @@ -1478,12 +1551,19 @@ rtrequest1_fib_change(struct radix_node_ if (rt->rt_ifa && rt->rt_ifa->ifa_rtrequest != NULL) rt->rt_ifa->ifa_rtrequest(RTM_ADD, rt, info); - /* Ensure route MTU is not bigger than interface MTU */ + /* Alter route MTU if necessary */ if (rt->rt_ifp != NULL) { family = info->rti_info[RTAX_DST]->sa_family; mtu = if_getmtu_family(rt->rt_ifp, family); - if (rt->rt_mtu > mtu) + /* Set default MTU */ + if (rt->rt_mtu == 0) rt->rt_mtu = mtu; + if (rt->rt_mtu != mtu) { + /* Check if we really need to update */ + ifmtu.ifp = rt->rt_ifp; + ifmtu.mtu = mtu; + if_updatemtu_cb(rt->rt_nodes, &ifmtu); + } } if (ret_nrt) { @@ -1501,8 +1581,24 @@ static void rt_setmetrics(const struct rt_addrinfo *info, struct rtentry *rt) { - if (info->rti_mflags & RTV_MTU) + if (info->rti_mflags & RTV_MTU) { + if (info->rti_rmx->rmx_mtu != 0) { + + /* + * MTU was explicitly provided by user. + * Keep it. + */ + rt->rt_flags |= RTF_FIXEDMTU; + } else { + + /* + * User explicitly sets MTU to 0. + * Assume rollback to default. + */ + rt->rt_flags &= ~RTF_FIXEDMTU; + } rt->rt_mtu = info->rti_rmx->rmx_mtu; + } if (info->rti_mflags & RTV_WEIGHT) rt->rt_weight = info->rti_rmx->rmx_weight; /* Kernel -> userland timebase conversion. */ Modified: head/sys/net/route.h ============================================================================== --- head/sys/net/route.h Mon Nov 17 01:01:45 2014 (r274610) +++ head/sys/net/route.h Mon Nov 17 01:05:29 2014 (r274611) @@ -151,7 +151,7 @@ struct rtentry { /* 0x10000 unused, was RTF_PRCLONING */ /* 0x20000 unused, was RTF_WASCLONED */ #define RTF_PROTO3 0x40000 /* protocol specific routing flag */ -/* 0x80000 unused */ +#define RTF_FIXEDMTU 0x80000 /* MTU was explicitly specified */ #define RTF_PINNED 0x100000 /* route is immutable */ #define RTF_LOCAL 0x200000 /* route represents a local address */ #define RTF_BROADCAST 0x400000 /* route represents a bcast address */ @@ -378,6 +378,7 @@ int rtsock_routemsg(int, struct ifnet *i int rt_expunge(struct radix_node_head *, struct rtentry *); void rtfree(struct rtentry *); int rt_check(struct rtentry **, struct rtentry **, struct sockaddr *); +void rt_updatemtu(struct ifnet *); /* XXX MRT COMPAT VERSIONS THAT SET UNIVERSE to 0 */ /* Thes are used by old code not yet converted to use multiple FIBS */ Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Mon Nov 17 01:01:45 2014 (r274610) +++ head/sys/netinet/ip_output.c Mon Nov 17 01:05:29 2014 (r274611) @@ -322,20 +322,10 @@ again: * Calculate MTU. If we have a route that is up, use that, * otherwise use the interface's MTU. */ - if (rte != NULL && (rte->rt_flags & (RTF_UP|RTF_HOST))) { - /* - * This case can happen if the user changed the MTU - * of an interface after enabling IP on it. Because - * most netifs don't keep track of routes pointing to - * them, there is no way for one to update all its - * routes when the MTU is changed. - */ - if (rte->rt_mtu > ifp->if_mtu) - rte->rt_mtu = ifp->if_mtu; + if (rte != NULL && (rte->rt_flags & (RTF_UP|RTF_HOST))) mtu = rte->rt_mtu; - } else { + else mtu = ifp->if_mtu; - } /* Catch a possible divide by zero later. */ KASSERT(mtu > 0, ("%s: mtu %d <= 0, rte=%p (rt_flags=0x%08x) ifp=%p", __func__, mtu, rte, (rte != NULL) ? rte->rt_flags : 0, ifp)); Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Mon Nov 17 01:01:45 2014 (r274610) +++ head/sys/netinet6/ip6_output.c Mon Nov 17 01:05:29 2014 (r274611) @@ -1275,17 +1275,6 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, s */ alwaysfrag = 1; mtu = IPV6_MMTU; - } else if (mtu > ifmtu) { - /* - * The MTU on the route is larger than the MTU on - * the interface! This shouldn't happen, unless the - * MTU of the interface has been changed after the - * interface was brought up. Change the MTU in the - * route to match the interface MTU (as long as the - * field isn't locked). - */ - mtu = ifmtu; - ro_pmtu->ro_rt->rt_mtu = mtu; } } else if (ifp) { mtu = IN6_LINKMTU(ifp); From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 06:03:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A0A3472; Mon, 17 Nov 2014 06:03:18 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D385FD; Mon, 17 Nov 2014 06:03:17 +0000 (UTC) Received: from Xins-MBP.home.us.delphij.net (c-24-5-244-32.hsd1.ca.comcast.net [24.5.244.32]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 7F31C22216; Sun, 16 Nov 2014 22:03:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1416204197; x=1416218597; bh=5hjFPw4ssNzTR3umGLcmLAspSLoVqzPKfXc68aTwBoY=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=ssA7asV9RJfSjqDxRuzuOaPQw4WiEAJhrUoaePYBldf48Tl7OxAxwuGYJeEODquv1 U3uPwkffI34zVM+Fzl/YyFmRf937TE8b2tm1EDy0QtFnkFYbfVvLP8M7vbQl4+ffSQ JXgl/LZ2uFjFBoAUaqI4QR2iTgqfljXOCPFPkqtY= Message-ID: <54698F93.2030700@delphij.net> Date: Sun, 16 Nov 2014 22:02:59 -0800 From: Xin Li User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Benjamin Kaduk , Xin LI Subject: Re: svn commit: r274583 - head/usr.sbin/watchdogd References: <201411160944.sAG9iUTJ084769@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 06:03:18 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 11/16/14 13:46, Benjamin Kaduk wrote: > On Sun, Nov 16, 2014 at 4:44 AM, Xin LI > wrote: > > Author: delphij Date: Sun Nov 16 09:44:30 2014 New Revision: > 274583 URL: https://svnweb.freebsd.org/changeset/base/274583 > > Log: Default to use 10 seconds as nap interval instead of 1. > > relnotes: yes? I'm not sure -- no objection but is this noteworthy? Cheers, -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJUaY+QAAoJEJW2GBstM+nsdsQP/18qHXBq9VwCy+in+0zF3aeO xz+O81ocujGv0+ne5efOdm/WtZk6ZKa9v7NASluwaoks7nxsRR9xIZi6foz3J7Zb Aa0uQSAx9Upq78/1GggVBr1hJKH+DkwUgKCKiSbUGvlL+gXgBWxL86hOdpPpixJj LMUrFmsEjs+yS6wxKDgAw4w89vzYyNGooiveK0Wlgvr/6RSx9zDW6fAgJKOItLDN jirmhVRfFn5EtZISaP/tpdQx+yXZNo6s41LPUauMXpPzYHTc3D+fW4bNhTzIDuFB s8dHKEwrFNOWWmxRYTSQ7pC0Nr9RvUJUHjGuwK71jLDkVbRvjj0Smz1ewRVJXCTn Nh81kdQqv2xbS3cONe7+geklXy5/diccDP7c+unZCYzHyHDG0yWjRgy/rB/4vugy QF8KBi8JExmOjWpB2vREIF3I9dGaJJ2+P5vLdNzDYUTdZeNobtexPiZd5YX3KLsz js42uOx64JXwEsR7rbnqizn79zbTBZ1I4Zi9gyYN1FvRn2vHWeAr64CRyLxvVYUc Cfdh5ONmW1x2Y+YMQovJgsdv0cSUGFjbLfG9ScH9QjQvUK/U5p2PeojaI2hixqH7 RpGSvBwoJFwTu+4sR0B05Z0ex9EDkJbFhHreDYr6y2QXCWjK0CCrdXro03PZj4jt 6KbV/k3XTsYQwuXDNZZ7 =A2Zm -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 07:20:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B21B7497; Mon, 17 Nov 2014 07:20:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D9CB9A8; Mon, 17 Nov 2014 07:20:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAH7K54f088594; Mon, 17 Nov 2014 07:20:05 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAH7K46K088588; Mon, 17 Nov 2014 07:20:04 GMT (envelope-from np@FreeBSD.org) Message-Id: <201411170720.sAH7K46K088588@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 17 Nov 2014 07:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274612 - stable/10/sys/dev/cxgbe/firmware X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 07:20:05 -0000 Author: np Date: Mon Nov 17 07:20:03 2014 New Revision: 274612 URL: https://svnweb.freebsd.org/changeset/base/274612 Log: MFC r274351: cxgbe(4): adjust PMRX and PMTX parameters. Modified: stable/10/sys/dev/cxgbe/firmware/t4fw_cfg.txt stable/10/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt stable/10/sys/dev/cxgbe/firmware/t5fw_cfg.txt stable/10/sys/dev/cxgbe/firmware/t5fw_cfg_fpga.txt stable/10/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/firmware/t4fw_cfg.txt ============================================================================== --- stable/10/sys/dev/cxgbe/firmware/t4fw_cfg.txt Mon Nov 17 01:05:29 2014 (r274611) +++ stable/10/sys/dev/cxgbe/firmware/t4fw_cfg.txt Mon Nov 17 07:20:03 2014 (r274612) @@ -28,8 +28,8 @@ tp_ntxch = 0 # TP rx and tx payload memory (% of the total EDRAM + DDR3). - tp_pmrx = 38 - tp_pmtx = 60 + tp_pmrx = 38, 512 + tp_pmtx = 60, 512 tp_pmrx_pagesize = 64K tp_pmtx_pagesize = 64K @@ -160,7 +160,7 @@ [fini] version = 0x1 - checksum = 0x6a1f8858 + checksum = 0xb4168add # # $FreeBSD$ # Modified: stable/10/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt ============================================================================== --- stable/10/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt Mon Nov 17 01:05:29 2014 (r274611) +++ stable/10/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt Mon Nov 17 07:20:03 2014 (r274612) @@ -125,7 +125,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP RX payload - tp_pmrx = 34 + tp_pmrx = 34, 512 # TP RX payload page size tp_pmrx_pagesize = 64K @@ -135,7 +135,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP TX payload - tp_pmtx = 32 + tp_pmtx = 32, 512 # TP TX payload page size tp_pmtx_pagesize = 64K @@ -544,7 +544,7 @@ [fini] version = 0x14250012 - checksum = 0xd9ae0325 + checksum = 0x22f592a9 # Total resources used by above allocations: # Virtual Interfaces: 104 Modified: stable/10/sys/dev/cxgbe/firmware/t5fw_cfg.txt ============================================================================== --- stable/10/sys/dev/cxgbe/firmware/t5fw_cfg.txt Mon Nov 17 01:05:29 2014 (r274611) +++ stable/10/sys/dev/cxgbe/firmware/t5fw_cfg.txt Mon Nov 17 07:20:03 2014 (r274612) @@ -37,8 +37,8 @@ tp_ntxch = 0 # TP rx and tx payload memory (% of the total EDRAM + DDR3). - tp_pmrx = 38 - tp_pmtx = 60 + tp_pmrx = 38, 512 + tp_pmtx = 60, 512 tp_pmrx_pagesize = 64K tp_pmtx_pagesize = 64K @@ -173,7 +173,7 @@ [fini] version = 0x1 - checksum = 0xa0ee1715 + checksum = 0x4f45e608 # # $FreeBSD$ # Modified: stable/10/sys/dev/cxgbe/firmware/t5fw_cfg_fpga.txt ============================================================================== --- stable/10/sys/dev/cxgbe/firmware/t5fw_cfg_fpga.txt Mon Nov 17 01:05:29 2014 (r274611) +++ stable/10/sys/dev/cxgbe/firmware/t5fw_cfg_fpga.txt Mon Nov 17 07:20:03 2014 (r274612) @@ -149,7 +149,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP RX payload - tp_pmrx = 30 + tp_pmrx = 30, 512 # TP RX payload page size tp_pmrx_pagesize = 64K @@ -159,7 +159,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP TX payload - tp_pmtx = 50 + tp_pmtx = 50, 512 # TP TX payload page size tp_pmtx_pagesize = 64K @@ -463,7 +463,7 @@ [fini] version = 0x1425000d - checksum = 0xe56cb999 + checksum = 0x22f1530b # Total resources used by above allocations: # Virtual Interfaces: 104 Modified: stable/10/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt ============================================================================== --- stable/10/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt Mon Nov 17 01:05:29 2014 (r274611) +++ stable/10/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt Mon Nov 17 07:20:03 2014 (r274612) @@ -153,7 +153,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP RX payload - tp_pmrx = 30 + tp_pmrx = 30, 512 # TP RX payload page size tp_pmrx_pagesize = 64K @@ -163,7 +163,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP TX payload - tp_pmtx = 50 + tp_pmtx = 50, 512 # TP TX payload page size tp_pmtx_pagesize = 64K @@ -587,7 +587,7 @@ [fini] version = 0x14250016 - checksum = 0x5d740273 + checksum = 0xafaf8723 # Total resources used by above allocations: # Virtual Interfaces: 104 From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 07:20:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 760775C5; Mon, 17 Nov 2014 07:20:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61B46A39; Mon, 17 Nov 2014 07:20:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAH7KZZm089299; Mon, 17 Nov 2014 07:20:35 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAH7KYpa088901; Mon, 17 Nov 2014 07:20:34 GMT (envelope-from np@FreeBSD.org) Message-Id: <201411170720.sAH7KYpa088901@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 17 Nov 2014 07:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r274613 - stable/9/sys/dev/cxgbe/firmware X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 07:20:35 -0000 Author: np Date: Mon Nov 17 07:20:33 2014 New Revision: 274613 URL: https://svnweb.freebsd.org/changeset/base/274613 Log: MFC r274351: cxgbe(4): adjust PMRX and PMTX parameters. Modified: stable/9/sys/dev/cxgbe/firmware/t4fw_cfg.txt stable/9/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt stable/9/sys/dev/cxgbe/firmware/t5fw_cfg.txt stable/9/sys/dev/cxgbe/firmware/t5fw_cfg_fpga.txt stable/9/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/firmware/t4fw_cfg.txt ============================================================================== --- stable/9/sys/dev/cxgbe/firmware/t4fw_cfg.txt Mon Nov 17 07:20:03 2014 (r274612) +++ stable/9/sys/dev/cxgbe/firmware/t4fw_cfg.txt Mon Nov 17 07:20:33 2014 (r274613) @@ -28,8 +28,8 @@ tp_ntxch = 0 # TP rx and tx payload memory (% of the total EDRAM + DDR3). - tp_pmrx = 38 - tp_pmtx = 60 + tp_pmrx = 38, 512 + tp_pmtx = 60, 512 tp_pmrx_pagesize = 64K tp_pmtx_pagesize = 64K @@ -160,7 +160,7 @@ [fini] version = 0x1 - checksum = 0x6a1f8858 + checksum = 0xb4168add # # $FreeBSD$ # Modified: stable/9/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt ============================================================================== --- stable/9/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt Mon Nov 17 07:20:03 2014 (r274612) +++ stable/9/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt Mon Nov 17 07:20:33 2014 (r274613) @@ -125,7 +125,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP RX payload - tp_pmrx = 34 + tp_pmrx = 34, 512 # TP RX payload page size tp_pmrx_pagesize = 64K @@ -135,7 +135,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP TX payload - tp_pmtx = 32 + tp_pmtx = 32, 512 # TP TX payload page size tp_pmtx_pagesize = 64K @@ -544,7 +544,7 @@ [fini] version = 0x14250012 - checksum = 0xd9ae0325 + checksum = 0x22f592a9 # Total resources used by above allocations: # Virtual Interfaces: 104 Modified: stable/9/sys/dev/cxgbe/firmware/t5fw_cfg.txt ============================================================================== --- stable/9/sys/dev/cxgbe/firmware/t5fw_cfg.txt Mon Nov 17 07:20:03 2014 (r274612) +++ stable/9/sys/dev/cxgbe/firmware/t5fw_cfg.txt Mon Nov 17 07:20:33 2014 (r274613) @@ -37,8 +37,8 @@ tp_ntxch = 0 # TP rx and tx payload memory (% of the total EDRAM + DDR3). - tp_pmrx = 38 - tp_pmtx = 60 + tp_pmrx = 38, 512 + tp_pmtx = 60, 512 tp_pmrx_pagesize = 64K tp_pmtx_pagesize = 64K @@ -173,7 +173,7 @@ [fini] version = 0x1 - checksum = 0xa0ee1715 + checksum = 0x4f45e608 # # $FreeBSD$ # Modified: stable/9/sys/dev/cxgbe/firmware/t5fw_cfg_fpga.txt ============================================================================== --- stable/9/sys/dev/cxgbe/firmware/t5fw_cfg_fpga.txt Mon Nov 17 07:20:03 2014 (r274612) +++ stable/9/sys/dev/cxgbe/firmware/t5fw_cfg_fpga.txt Mon Nov 17 07:20:33 2014 (r274613) @@ -149,7 +149,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP RX payload - tp_pmrx = 30 + tp_pmrx = 30, 512 # TP RX payload page size tp_pmrx_pagesize = 64K @@ -159,7 +159,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP TX payload - tp_pmtx = 50 + tp_pmtx = 50, 512 # TP TX payload page size tp_pmtx_pagesize = 64K @@ -463,7 +463,7 @@ [fini] version = 0x1425000d - checksum = 0xe56cb999 + checksum = 0x22f1530b # Total resources used by above allocations: # Virtual Interfaces: 104 Modified: stable/9/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt ============================================================================== --- stable/9/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt Mon Nov 17 07:20:03 2014 (r274612) +++ stable/9/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt Mon Nov 17 07:20:33 2014 (r274613) @@ -153,7 +153,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP RX payload - tp_pmrx = 30 + tp_pmrx = 30, 512 # TP RX payload page size tp_pmrx_pagesize = 64K @@ -163,7 +163,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP TX payload - tp_pmtx = 50 + tp_pmtx = 50, 512 # TP TX payload page size tp_pmtx_pagesize = 64K @@ -587,7 +587,7 @@ [fini] version = 0x14250016 - checksum = 0x5d740273 + checksum = 0xafaf8723 # Total resources used by above allocations: # Virtual Interfaces: 104 From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 07:20:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 650AD6F4; Mon, 17 Nov 2014 07:20:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50FB7A3E; Mon, 17 Nov 2014 07:20:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAH7KtoS089380; Mon, 17 Nov 2014 07:20:55 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAH7KsJc089375; Mon, 17 Nov 2014 07:20:54 GMT (envelope-from np@FreeBSD.org) Message-Id: <201411170720.sAH7KsJc089375@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 17 Nov 2014 07:20:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r274614 - stable/8/sys/dev/cxgbe/firmware X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 07:20:55 -0000 Author: np Date: Mon Nov 17 07:20:53 2014 New Revision: 274614 URL: https://svnweb.freebsd.org/changeset/base/274614 Log: MFC r274351: cxgbe(4): adjust PMRX and PMTX parameters. Modified: stable/8/sys/dev/cxgbe/firmware/t4fw_cfg.txt stable/8/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt stable/8/sys/dev/cxgbe/firmware/t5fw_cfg.txt stable/8/sys/dev/cxgbe/firmware/t5fw_cfg_fpga.txt stable/8/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/cxgbe/ (props changed) Modified: stable/8/sys/dev/cxgbe/firmware/t4fw_cfg.txt ============================================================================== --- stable/8/sys/dev/cxgbe/firmware/t4fw_cfg.txt Mon Nov 17 07:20:33 2014 (r274613) +++ stable/8/sys/dev/cxgbe/firmware/t4fw_cfg.txt Mon Nov 17 07:20:53 2014 (r274614) @@ -28,8 +28,8 @@ tp_ntxch = 0 # TP rx and tx payload memory (% of the total EDRAM + DDR3). - tp_pmrx = 38 - tp_pmtx = 60 + tp_pmrx = 38, 512 + tp_pmtx = 60, 512 tp_pmrx_pagesize = 64K tp_pmtx_pagesize = 64K @@ -160,7 +160,7 @@ [fini] version = 0x1 - checksum = 0x6a1f8858 + checksum = 0xb4168add # # $FreeBSD$ # Modified: stable/8/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt ============================================================================== --- stable/8/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt Mon Nov 17 07:20:33 2014 (r274613) +++ stable/8/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt Mon Nov 17 07:20:53 2014 (r274614) @@ -125,7 +125,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP RX payload - tp_pmrx = 34 + tp_pmrx = 34, 512 # TP RX payload page size tp_pmrx_pagesize = 64K @@ -135,7 +135,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP TX payload - tp_pmtx = 32 + tp_pmtx = 32, 512 # TP TX payload page size tp_pmtx_pagesize = 64K @@ -544,7 +544,7 @@ [fini] version = 0x14250012 - checksum = 0xd9ae0325 + checksum = 0x22f592a9 # Total resources used by above allocations: # Virtual Interfaces: 104 Modified: stable/8/sys/dev/cxgbe/firmware/t5fw_cfg.txt ============================================================================== --- stable/8/sys/dev/cxgbe/firmware/t5fw_cfg.txt Mon Nov 17 07:20:33 2014 (r274613) +++ stable/8/sys/dev/cxgbe/firmware/t5fw_cfg.txt Mon Nov 17 07:20:53 2014 (r274614) @@ -37,8 +37,8 @@ tp_ntxch = 0 # TP rx and tx payload memory (% of the total EDRAM + DDR3). - tp_pmrx = 38 - tp_pmtx = 60 + tp_pmrx = 38, 512 + tp_pmtx = 60, 512 tp_pmrx_pagesize = 64K tp_pmtx_pagesize = 64K @@ -173,7 +173,7 @@ [fini] version = 0x1 - checksum = 0xa0ee1715 + checksum = 0x4f45e608 # # $FreeBSD$ # Modified: stable/8/sys/dev/cxgbe/firmware/t5fw_cfg_fpga.txt ============================================================================== --- stable/8/sys/dev/cxgbe/firmware/t5fw_cfg_fpga.txt Mon Nov 17 07:20:33 2014 (r274613) +++ stable/8/sys/dev/cxgbe/firmware/t5fw_cfg_fpga.txt Mon Nov 17 07:20:53 2014 (r274614) @@ -149,7 +149,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP RX payload - tp_pmrx = 30 + tp_pmrx = 30, 512 # TP RX payload page size tp_pmrx_pagesize = 64K @@ -159,7 +159,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP TX payload - tp_pmtx = 50 + tp_pmtx = 50, 512 # TP TX payload page size tp_pmtx_pagesize = 64K @@ -463,7 +463,7 @@ [fini] version = 0x1425000d - checksum = 0xe56cb999 + checksum = 0x22f1530b # Total resources used by above allocations: # Virtual Interfaces: 104 Modified: stable/8/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt ============================================================================== --- stable/8/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt Mon Nov 17 07:20:33 2014 (r274613) +++ stable/8/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt Mon Nov 17 07:20:53 2014 (r274614) @@ -153,7 +153,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP RX payload - tp_pmrx = 30 + tp_pmrx = 30, 512 # TP RX payload page size tp_pmrx_pagesize = 64K @@ -163,7 +163,7 @@ # Percentage of dynamic memory (in either the EDRAM or external MEM) # to use for TP TX payload - tp_pmtx = 50 + tp_pmtx = 50, 512 # TP TX payload page size tp_pmtx_pagesize = 64K @@ -587,7 +587,7 @@ [fini] version = 0x14250016 - checksum = 0x5d740273 + checksum = 0xafaf8723 # Total resources used by above allocations: # Virtual Interfaces: 104 From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 07:37:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8C9FB49; Mon, 17 Nov 2014 07:37:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94B9FB8D; Mon, 17 Nov 2014 07:37:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAH7bgde097201; Mon, 17 Nov 2014 07:37:42 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAH7bga7097200; Mon, 17 Nov 2014 07:37:42 GMT (envelope-from np@FreeBSD.org) Message-Id: <201411170737.sAH7bga7097200@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 17 Nov 2014 07:37:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274615 - stable/10/tools/tools/cxgbetool X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 07:37:42 -0000 Author: np Date: Mon Nov 17 07:37:41 2014 New Revision: 274615 URL: https://svnweb.freebsd.org/changeset/base/274615 Log: MFC r273360: One of MAP_ANON, MAP_PRIVATE, MAP_SHARED, or MAP_STACK must be specified. Modified: stable/10/tools/tools/cxgbetool/cxgbetool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- stable/10/tools/tools/cxgbetool/cxgbetool.c Mon Nov 17 07:20:53 2014 (r274614) +++ stable/10/tools/tools/cxgbetool/cxgbetool.c Mon Nov 17 07:37:41 2014 (r274615) @@ -1462,7 +1462,7 @@ loadfw(int argc, const char *argv[]) } data.len = st.st_size; - data.data = mmap(0, data.len, PROT_READ, 0, fd, 0); + data.data = mmap(0, data.len, PROT_READ, MAP_PRIVATE, fd, 0); if (data.data == MAP_FAILED) { warn("mmap"); close(fd); From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 07:37:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F14AEC75; Mon, 17 Nov 2014 07:37:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD739B90; Mon, 17 Nov 2014 07:37:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAH7buUa097266; Mon, 17 Nov 2014 07:37:56 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAH7buho097265; Mon, 17 Nov 2014 07:37:56 GMT (envelope-from np@FreeBSD.org) Message-Id: <201411170737.sAH7buho097265@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 17 Nov 2014 07:37:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r274616 - stable/9/tools/tools/cxgbetool X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 07:37:57 -0000 Author: np Date: Mon Nov 17 07:37:56 2014 New Revision: 274616 URL: https://svnweb.freebsd.org/changeset/base/274616 Log: MFC r273360: One of MAP_ANON, MAP_PRIVATE, MAP_SHARED, or MAP_STACK must be specified. Modified: stable/9/tools/tools/cxgbetool/cxgbetool.c Directory Properties: stable/9/tools/tools/cxgbetool/ (props changed) Modified: stable/9/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- stable/9/tools/tools/cxgbetool/cxgbetool.c Mon Nov 17 07:37:41 2014 (r274615) +++ stable/9/tools/tools/cxgbetool/cxgbetool.c Mon Nov 17 07:37:56 2014 (r274616) @@ -1459,7 +1459,7 @@ loadfw(int argc, const char *argv[]) } data.len = st.st_size; - data.data = mmap(0, data.len, PROT_READ, 0, fd, 0); + data.data = mmap(0, data.len, PROT_READ, MAP_PRIVATE, fd, 0); if (data.data == MAP_FAILED) { warn("mmap"); close(fd); From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 07:38:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 705B9DAB; Mon, 17 Nov 2014 07:38:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CA0EB97; Mon, 17 Nov 2014 07:38:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAH7cOV0097398; Mon, 17 Nov 2014 07:38:24 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAH7cOYS097397; Mon, 17 Nov 2014 07:38:24 GMT (envelope-from np@FreeBSD.org) Message-Id: <201411170738.sAH7cOYS097397@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 17 Nov 2014 07:38:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r274617 - stable/8/tools/tools/cxgbetool X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 07:38:24 -0000 Author: np Date: Mon Nov 17 07:38:23 2014 New Revision: 274617 URL: https://svnweb.freebsd.org/changeset/base/274617 Log: MFC r273360: One of MAP_ANON, MAP_PRIVATE, MAP_SHARED, or MAP_STACK must be specified. Modified: stable/8/tools/tools/cxgbetool/cxgbetool.c Directory Properties: stable/8/tools/tools/cxgbetool/ (props changed) Modified: stable/8/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- stable/8/tools/tools/cxgbetool/cxgbetool.c Mon Nov 17 07:37:56 2014 (r274616) +++ stable/8/tools/tools/cxgbetool/cxgbetool.c Mon Nov 17 07:38:23 2014 (r274617) @@ -1459,7 +1459,7 @@ loadfw(int argc, const char *argv[]) } data.len = st.st_size; - data.data = mmap(0, data.len, PROT_READ, 0, fd, 0); + data.data = mmap(0, data.len, PROT_READ, MAP_PRIVATE, fd, 0); if (data.data == MAP_FAILED) { warn("mmap"); close(fd); From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 09:19:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60EAC340; Mon, 17 Nov 2014 09:19:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CFD9860; Mon, 17 Nov 2014 09:19:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAH9JBa5043266; Mon, 17 Nov 2014 09:19:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAH9JAEc043258; Mon, 17 Nov 2014 09:19:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411170919.sAH9JAEc043258@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 17 Nov 2014 09:19:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274618 - in head: etc/mtree lib/msun lib/msun/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 09:19:11 -0000 Author: ngie Date: Mon Nov 17 09:19:09 2014 New Revision: 274618 URL: https://svnweb.freebsd.org/changeset/base/274618 Log: Add reachover Makefiles for contrib/netbsd-tests/lib/librt A variant of this code has been tested on amd64/i386 for some time by EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the code will remain off until it's proven it works on virtual hardware or real hardware on other architectures Sponsored by: EMC / Isilon Storage Division Added: head/lib/msun/Makefile.amd64 (contents, props changed) head/lib/msun/Makefile.i386 (contents, props changed) head/lib/msun/tests/ head/lib/msun/tests/Makefile (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/lib/msun/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Mon Nov 17 07:38:23 2014 (r274617) +++ head/etc/mtree/BSD.tests.dist Mon Nov 17 09:19:09 2014 (r274618) @@ -157,6 +157,8 @@ .. libutil .. + msun + .. .. libexec atf Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Mon Nov 17 07:38:23 2014 (r274617) +++ head/lib/msun/Makefile Mon Nov 17 09:19:09 2014 (r274618) @@ -219,4 +219,8 @@ MLINKS+=tan.3 tanf.3 tan.3 tanl.3 MLINKS+=tanh.3 tanhf.3 tanh.3 tanhl.3 MLINKS+=trunc.3 truncf.3 trunc.3 truncl.3 +.include + +.include + .include Added: head/lib/msun/Makefile.amd64 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/Makefile.amd64 Mon Nov 17 09:19:09 2014 (r274618) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + Added: head/lib/msun/Makefile.i386 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/Makefile.i386 Mon Nov 17 09:19:09 2014 (r274618) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + Added: head/lib/msun/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/tests/Makefile Mon Nov 17 09:19:09 2014 (r274618) @@ -0,0 +1,63 @@ +# $FreeBSD$ + +OBJTOP= ${.OBJDIR:H:H:H} +SRCTOP= ${.CURDIR:H:H:H} +TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libm + +TESTSDIR= ${TESTSBASE}/lib/msun + +.if ${MACHINE} == "sparc" || ${MACHINE} == "i386" \ + || ${MACHINE} == "amd64" || ${MACHINE_CPU} == "arm" \ + || ${MACHINE} == "sparc64" +CFLAGS+= -DHAVE_FENV_H +.endif + +.if ${MACHINE} == "amd64" || ${MACHINE} == "i386" +CFLAGS+= -D__HAVE_LONG_DOUBLE +.endif + +NETBSD_ATF_TESTS_C= acos_test +NETBSD_ATF_TESTS_C+= asin_test +NETBSD_ATF_TESTS_C+= atan_test +NETBSD_ATF_TESTS_C+= cbrt_test +NETBSD_ATF_TESTS_C+= ceil_test +NETBSD_ATF_TESTS_C+= cos_test +NETBSD_ATF_TESTS_C+= cosh_test +NETBSD_ATF_TESTS_C+= erf_test +NETBSD_ATF_TESTS_C+= exp_test +NETBSD_ATF_TESTS_C+= fmod_test +NETBSD_ATF_TESTS_C+= infinity_test +NETBSD_ATF_TESTS_C+= ldexp_test +NETBSD_ATF_TESTS_C+= log_test +NETBSD_ATF_TESTS_C+= pow_test +NETBSD_ATF_TESTS_C+= precision_test +NETBSD_ATF_TESTS_C+= round_test +NETBSD_ATF_TESTS_C+= scalbn_test +NETBSD_ATF_TESTS_C+= sin_test +NETBSD_ATF_TESTS_C+= sinh_test +NETBSD_ATF_TESTS_C+= sqrt_test +NETBSD_ATF_TESTS_C+= tan_test +NETBSD_ATF_TESTS_C+= tanh_test + +CSTD= c99 + +LDADD+= -lm +DPADD+= ${LIBM} +#COPTS+= -Wfloat-equal + +# Copied from lib/msun/Makefile +.if ${MACHINE_CPUARCH} == "i386" +ARCH_SUBDIR= i387 +.else +ARCH_SUBDIR= ${MACHINE_CPUARCH} +.endif + +.include "../${ARCH_SUBDIR}/Makefile.inc" + +# XXX: for some odd reason float.h doesn't tell the full story about what the +# precision is. +CFLAGS+= -DLDBL_PREC=${LDBL_PREC} + +.include + +.include From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 09:20:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3E60486; Mon, 17 Nov 2014 09:20:05 +0000 (UTC) Received: from mail-pd0-x231.google.com (mail-pd0-x231.google.com [IPv6:2607:f8b0:400e:c02::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B1D086A; Mon, 17 Nov 2014 09:20:05 +0000 (UTC) Received: by mail-pd0-f177.google.com with SMTP id v10so20784692pde.36 for ; Mon, 17 Nov 2014 01:20:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=FBj4xnAheMQ8gHyNlztLTUCL4fDKCzIufDs+1QK6XLw=; b=lXuow+n8+4+lHJgudaz7Tc3BWbje4g3qE/YTy6X0qlqYqiHpfwKiZmKxFa1lr7F4Qr yIO5mNtnhCnu+8uoBku3tU4vlZvi12E6D+Tj4K4TY6wgqI8ekEyzBNJlwNNroZ58ZGyd YgzuPiO1i11Uw2lZOKHRQLnzhaigRB3Qxu0qwbcGA20GdCPZt/Ndr0SWeIL31QTlnI21 gWDMWdFXDqxTnvDl7GO2QKoaS0hEMNsN+nQVx6+KgchBms3UmxtYvw6i5OuHWz9gTSV+ vLUNSuay4+L21r5rjJR3ja3Gw0VbqjwGb+2J+hvbDW9c/PzyLxV6MXBuAtKH/SV5Vjas On1Q== X-Received: by 10.70.92.169 with SMTP id cn9mr8499068pdb.117.1416216005233; Mon, 17 Nov 2014 01:20:05 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:59da:de8a:308b:f2b? ([2601:8:ab80:7d6:59da:de8a:308b:f2b]) by mx.google.com with ESMTPSA id hy15sm8315564pad.11.2014.11.17.01.19.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Nov 2014 01:20:04 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_40396BBD-8ECF-4627-B008-A1064682398B"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r274618 - in head: etc/mtree lib/msun lib/msun/tests From: Garrett Cooper In-Reply-To: <201411170919.sAH9JAEc043258@svn.freebsd.org> Date: Mon, 17 Nov 2014 01:19:56 -0800 Message-Id: <38F8B193-2F8C-42E7-809C-55A2970B0006@gmail.com> References: <201411170919.sAH9JAEc043258@svn.freebsd.org> To: Garrett Cooper X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 09:20:06 -0000 --Apple-Mail=_40396BBD-8ECF-4627-B008-A1064682398B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Nov 17, 2014, at 1:19, Garrett Cooper wrote: > Author: ngie > Date: Mon Nov 17 09:19:09 2014 > New Revision: 274618 > URL: https://svnweb.freebsd.org/changeset/base/274618 >=20 > Log: > Add reachover Makefiles for contrib/netbsd-tests/lib/librt >=20 > A variant of this code has been tested on amd64/i386 for some time by > EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, = but the > code will remain off until it's proven it works on virtual hardware = or real > hardware on other architectures >=20 > Sponsored by: EMC / Isilon Storage Division Sorry. Copy-pasted the wrong commit message. It should have read=85 =93=94" Add reachover Makefiles for contrib/netbsd-tests/lib/libm as = lib/msun/tests A variant of this code has been tested on amd64/i386 for some time by EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, = but the code will remain off until it's proven it works on virtual hardware or = real hardware on other architectures Sponsored by: EMC / Isilon Storage Division =93=94" --Apple-Mail=_40396BBD-8ECF-4627-B008-A1064682398B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUab28AAoJEMZr5QU6S73eW3oH/RkLxAd6ZQMv0iOeI7JynYft lv2yemFXikUYVxjKQKC+Cjj8TpmYfCu7TlkDulReOcyubYZhul/V/ioo5Ykx+Mzm uTY7WiPLV3qfvqE7dZWdGTtLi1BWOK/vPxzljyqhLSuVEtJkTAByrQKOEoZLXYm5 X/MGIvAKoiwopMWoNoJZ2KEvlSRh7V8lF5xZz/GP/LGKuo58a2g4i/+Zn0OXiDNp AzbJm1MfawQIwxE0w+BGFgaqN3cygicL1wlBhVhDLouN1j3P8ryaQtQmJSr1xixz nh0H9JD68uXUt1hn83KWbOwUx++1GQaAIYng6I+fAPkcsECyV8+XM9CmqbOn6/A= =Dnlc -----END PGP SIGNATURE----- --Apple-Mail=_40396BBD-8ECF-4627-B008-A1064682398B-- From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 11:32:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D310A1BB; Mon, 17 Nov 2014 11:32:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2ADC829; Mon, 17 Nov 2014 11:32:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHBWCnn006786; Mon, 17 Nov 2014 11:32:12 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHBWBMU006778; Mon, 17 Nov 2014 11:32:11 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201411171132.sAHBWBMU006778@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 17 Nov 2014 11:32:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274619 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 11:32:12 -0000 Author: smh Date: Mon Nov 17 11:32:10 2014 New Revision: 274619 URL: https://svnweb.freebsd.org/changeset/base/274619 Log: Disable TRIM on file backed ZFS vdevs and fix TRIM on init After r265152 TRIM requests are ZIO_TYPE_FREE instead of ZIO_TYPE_IOCTL this meant file backed vdevs to attempted to process the ZIO as a write causing a panic. We now disable TRIM on file backed vdevs and ASSERT the ZIO types supported by each vdev type to ensure we explicity support the ZIO type being processed. Also ensure that TRIM on init is not procesed for devices which declare they didn't support TRIM via vdev_notrim. PR: 195061, 194976, 191573 Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Mon Nov 17 09:19:09 2014 (r274618) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Mon Nov 17 11:32:10 2014 (r274619) @@ -146,10 +146,8 @@ trim_map_create(vdev_t *vd) { trim_map_t *tm; - ASSERT(vd->vdev_ops->vdev_op_leaf); - - if (!zfs_trim_enabled) - return; + ASSERT(zfs_trim_enabled && !vd->vdev_notrim && + vd->vdev_ops->vdev_op_leaf); tm = kmem_zalloc(sizeof (*tm), KM_SLEEP); mutex_init(&tm->tm_lock, NULL, MUTEX_DEFAULT, NULL); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Nov 17 09:19:09 2014 (r274618) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Nov 17 11:32:10 2014 (r274619) @@ -1223,6 +1223,7 @@ vdev_open(vdev_t *vd) vd->vdev_stat.vs_aux = VDEV_AUX_NONE; vd->vdev_cant_read = B_FALSE; vd->vdev_cant_write = B_FALSE; + vd->vdev_notrim = B_FALSE; vd->vdev_min_asize = vdev_get_min_asize(vd); /* @@ -1292,10 +1293,8 @@ vdev_open(vdev_t *vd) if (vd->vdev_ishole || vd->vdev_ops == &vdev_missing_ops) return (0); - if (vd->vdev_ops->vdev_op_leaf) { - vd->vdev_notrim = B_FALSE; + if (zfs_trim_enabled && !vd->vdev_notrim && vd->vdev_ops->vdev_op_leaf) trim_map_create(vd); - } for (int c = 0; c < vd->vdev_children; c++) { if (vd->vdev_child[c]->vdev_state != VDEV_STATE_HEALTHY) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Mon Nov 17 09:19:09 2014 (r274618) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Mon Nov 17 11:32:10 2014 (r274619) @@ -796,6 +796,8 @@ vdev_disk_io_start(zio_t *zio) return; } + ASSERT(zio->io_type == ZIO_TYPE_READ || zio->io_type == ZIO_TYPE_WRITE); + vb = kmem_alloc(sizeof (vdev_buf_t), KM_SLEEP); vb->vb_io = zio; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Mon Nov 17 09:19:09 2014 (r274618) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Mon Nov 17 11:32:10 2014 (r274619) @@ -129,6 +129,8 @@ skip_open: return (error); } + vd->vdev_notrim = B_TRUE; + *max_psize = *psize = vattr.va_size; *logical_ashift = SPA_MINBLOCKSHIFT; *physical_ashift = SPA_MINBLOCKSHIFT; @@ -185,6 +187,8 @@ vdev_file_io_start(zio_t *zio) return; } + ASSERT(zio->io_type == ZIO_TYPE_READ || zio->io_type == ZIO_TYPE_WRITE); + zio->io_error = vn_rdwr(zio->io_type == ZIO_TYPE_READ ? UIO_READ : UIO_WRITE, vp, zio->io_data, zio->io_size, zio->io_offset, UIO_SYSSPACE, 0, RLIM64_INFINITY, kcred, &resid); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon Nov 17 09:19:09 2014 (r274618) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon Nov 17 11:32:10 2014 (r274619) @@ -832,6 +832,11 @@ vdev_geom_io_start(zio_t *zio) return; } sendreq: + ASSERT(zio->io_type == ZIO_TYPE_READ || + zio->io_type == ZIO_TYPE_WRITE || + zio->io_type == ZIO_TYPE_FREE || + zio->io_type == ZIO_TYPE_IOCTL); + cp = vd->vdev_tsd; if (cp == NULL) { zio->io_error = SET_ERROR(ENXIO); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Mon Nov 17 09:19:09 2014 (r274618) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Mon Nov 17 11:32:10 2014 (r274619) @@ -713,8 +713,9 @@ vdev_label_init(vdev_t *vd, uint64_t crt * Don't TRIM if removing so that we don't interfere with zpool * disaster recovery. */ - if (zfs_trim_enabled && vdev_trim_on_init && (reason == VDEV_LABEL_CREATE || - reason == VDEV_LABEL_SPARE || reason == VDEV_LABEL_L2CACHE)) + if (zfs_trim_enabled && vdev_trim_on_init && !vd->vdev_notrim && + (reason == VDEV_LABEL_CREATE || reason == VDEV_LABEL_SPARE || + reason == VDEV_LABEL_L2CACHE)) zio_wait(zio_trim(NULL, spa, vd, 0, vd->vdev_psize)); /* From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 11:35:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD1EB3D2; Mon, 17 Nov 2014 11:35:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9AB584F; Mon, 17 Nov 2014 11:35:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHBZU3k007331; Mon, 17 Nov 2014 11:35:30 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHBZUKm007330; Mon, 17 Nov 2014 11:35:30 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201411171135.sAHBZUKm007330@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 17 Nov 2014 11:35:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274620 - head/tools/regression/zfs/zpool/add X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 11:35:30 -0000 Author: smh Date: Mon Nov 17 11:35:30 2014 New Revision: 274620 URL: https://svnweb.freebsd.org/changeset/base/274620 Log: Revert r273630 as the panic was fixed by r274619 The panic was caused by TRIM requests run against file based vdevs as write requests. PR: 191573 Sponsored by: Multiplay Modified: head/tools/regression/zfs/zpool/add/files.t Modified: head/tools/regression/zfs/zpool/add/files.t ============================================================================== --- head/tools/regression/zfs/zpool/add/files.t Mon Nov 17 11:32:10 2014 (r274619) +++ head/tools/regression/zfs/zpool/add/files.t Mon Nov 17 11:35:30 2014 (r274620) @@ -4,8 +4,6 @@ dir=`dirname $0` . ${dir}/../../misc.sh -[ "${os}" = "FreeBSD" ] && die "panics FreeBSD; see bug # 191573" - echo "1..54" files_create 8 From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 11:36:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FB22672; Mon, 17 Nov 2014 11:36:56 +0000 (UTC) Received: from mail-pa0-x234.google.com (mail-pa0-x234.google.com [IPv6:2607:f8b0:400e:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA986871; Mon, 17 Nov 2014 11:36:55 +0000 (UTC) Received: by mail-pa0-f52.google.com with SMTP id eu11so1261439pac.39 for ; Mon, 17 Nov 2014 03:36:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=G+mygvtjbRdFElv5paLVr7/itABhYQvzyUo5M9fKjho=; b=St5B9YyAZpAxcRQs1QgCKx1ldvG5oD1ZBvDVKB9bccFglEFTq2toMwzM/8DDOQNKer a9iwmAGSaqr+Vh7ffj9vqRSo+7RALJqd8VCd3aGcpHjFJ3bw9wV7bE1j2QPTsYZzrHKA LCKtjSH56gDyaBDc7oxkNJnooewREh692GfHSplm1u9birEos4uKLIKQt1L5e8EdQyNc PN5Ft7XkWl0uGGrDtsX/k01KO01b1ZrM1FHazMaKmvxdlLEWsxm589MFLy5AqlacPdKP yt7Du75t5I4IzApi1xlHeTC+b8av6JYtozxoUpEGtCzuPgT39OfRcTB/8CcRWEXjgq88 Gsrw== X-Received: by 10.70.54.161 with SMTP id k1mr28777574pdp.110.1416224215376; Mon, 17 Nov 2014 03:36:55 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:59da:de8a:308b:f2b? ([2601:8:ab80:7d6:59da:de8a:308b:f2b]) by mx.google.com with ESMTPSA id ug6sm34785751pbc.72.2014.11.17.03.36.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Nov 2014 03:36:54 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_968A4E83-EEA8-41E1-92A2-F8B5067A918B"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r274620 - head/tools/regression/zfs/zpool/add From: Garrett Cooper In-Reply-To: <201411171135.sAHBZUKm007330@svn.freebsd.org> Date: Mon, 17 Nov 2014 03:36:53 -0800 Message-Id: <83D7C0F0-720B-41D0-B0B9-6D5C21DBA7B1@gmail.com> References: <201411171135.sAHBZUKm007330@svn.freebsd.org> To: Steven Hartland X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 11:36:56 -0000 --Apple-Mail=_968A4E83-EEA8-41E1-92A2-F8B5067A918B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Nov 17, 2014, at 3:35, Steven Hartland wrote: > Author: smh > Date: Mon Nov 17 11:35:30 2014 > New Revision: 274620 > URL: https://svnweb.freebsd.org/changeset/base/274620 >=20 > Log: > Revert r273630 as the panic was fixed by r274619 >=20 > The panic was caused by TRIM requests run against file based vdevs as = write > requests. >=20 > PR: 191573 > Sponsored by: Multiplay Hi Steven, Do the other issues fall in line with the beforementioned = commit? Thanks! --Apple-Mail=_968A4E83-EEA8-41E1-92A2-F8B5067A918B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUad3VAAoJEMZr5QU6S73eoKoH/Ril5d+xgfNvo5QzumkXphUJ tOJYKuLND2zHM/LbrgxUfrAfwKkGhRyn+YN1AC+aBVWXetCJiKI7MzrpVJybQkde NELbw3z2J4zzVqR1fEL9ubn1wI0N93JwK06p/QD0oHeQpOB2mc58ihHpVBu/gP6o dd2Ldo9DNCRd09wMITtl/vwbwU0yuPsPxIb3A+0byv1e6vU8JbD6y6t8T44J+DQ5 rpN5cNy1UKBvLFcmrs1ZalGELh93qE7QZgV42j1fKmPBVYBg4xYty6TxYxkOd46u aE0o+aaW6vhQaVILSc2TVLMxL2GD1uJbLNdw+tlZJ7QIAJP0oSKDf830WD2RZH0= =U32U -----END PGP SIGNATURE----- --Apple-Mail=_968A4E83-EEA8-41E1-92A2-F8B5067A918B-- From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 12:10:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7079215C for ; Mon, 17 Nov 2014 12:10:01 +0000 (UTC) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 15F76B84 for ; Mon, 17 Nov 2014 12:10:00 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id gf13so6287593lab.13 for ; Mon, 17 Nov 2014 04:09:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc:content-type; bh=DQSlMRePXYPBNRZb74Gk7h4ZEww8Y8MFZZ9js652AAM=; b=jk/kE9bFOpZol5AoevSJjSsUCukOu8cWM86nyR5K1TGVHP7heJqMEF5yLX8ljnNdGp 8pXVmu49uPxit4EwNp2eatWhQ59a3a29Q9hE1BIVofpAfiY97tMXByXLWeDZIutcW4ZI /qUGul6cwacayeQhwbsrd03MeE8rJGbNeP6NaCfiRqY2/6B6FiAspn1opeB9JBaHSmCE fhr1K7NEFSSCkDF6lJ2W5JkNzlnKzJOAejZiP2VEOq4Mq/OBJTOE7Tn6W2nJMDIcKaY4 yS90OsPli2dVFhyzisHl5U28/fos3NX14huBqy9+u7VOb3Inl/84o3AKiJthRuvGymv8 +gYA== X-Gm-Message-State: ALoCoQmKYptYcj85TZPXDFTM9O2Kzh07jQCYu1AXis2IytNieKdETwOKbIxyV5UwKIXU+ArDeYm9 X-Received: by 10.152.5.6 with SMTP id o6mt14261476lao.8.1416225832210; Mon, 17 Nov 2014 04:03:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.21.1 with HTTP; Mon, 17 Nov 2014 04:03:21 -0800 (PST) In-Reply-To: <201411171132.sAHBWBMU006778@svn.freebsd.org> References: <201411171132.sAHBWBMU006778@svn.freebsd.org> From: Steven Hartland Date: Mon, 17 Nov 2014 12:03:21 +0000 Message-ID: Subject: Re: svn commit: r274619 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 12:10:01 -0000 On 17 November 2014 11:32, Steven Hartland wrote: > Author: smh > Date: Mon Nov 17 11:32:10 2014 > New Revision: 274619 > URL: https://svnweb.freebsd.org/changeset/base/274619 > > Log: > Disable TRIM on file backed ZFS vdevs and fix TRIM on init > > After r265152 TRIM requests are ZIO_TYPE_FREE instead of ZIO_TYPE_IOCTL > this meant file backed vdevs to attempted to process the ZIO as a write > causing a panic. > > We now disable TRIM on file backed vdevs and ASSERT the ZIO types > supported > by each vdev type to ensure we explicity support the ZIO type being > processed. > > Also ensure that TRIM on init is not procesed for devices which declare > they > didn't support TRIM via vdev_notrim. > > PR: 195061, 194976, 191573 > Sponsored by: Multiplay > This should have listed MFC: 3 days From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 12:36:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F7648F5; Mon, 17 Nov 2014 12:36:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ADFDE10; Mon, 17 Nov 2014 12:36:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHCa2W1035111; Mon, 17 Nov 2014 12:36:02 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHCa2KN035110; Mon, 17 Nov 2014 12:36:02 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201411171236.sAHCa2KN035110@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 17 Nov 2014 12:36:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274621 - head/usr.sbin/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 12:36:02 -0000 Author: trasz Date: Mon Nov 17 12:36:01 2014 New Revision: 274621 URL: https://svnweb.freebsd.org/changeset/base/274621 Log: The "intr" option is NFS-specific; fix examples in auto_master(5). MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/autofs/auto_master.5 Modified: head/usr.sbin/autofs/auto_master.5 ============================================================================== --- head/usr.sbin/autofs/auto_master.5 Mon Nov 17 11:35:30 2014 (r274620) +++ head/usr.sbin/autofs/auto_master.5 Mon Nov 17 12:36:01 2014 (r274621) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 23, 2014 +.Dd November 17, 2014 .Dt AUTO_MASTER 5 .Os .Sh NAME @@ -170,7 +170,7 @@ mount options: .Pp Automatically mount the CD drive on access: .Bd -literal -offset indent -.Li cd -intr,fstype=cd9660 :/dev/cd0 +.Li cd -fstype=cd9660 :/dev/cd0 .Ed .Sh SPECIAL MAPS Special maps have names beginning with @@ -224,7 +224,7 @@ and this in map file: .Bd -literal -offset indent .Li /example/x -intr,nfsv4 192.168.1.1:/share/example/x -.Li /example/cd -intr,fstype=cd9660 :/dev/cd0 +.Li /example/cd -fstype=cd9660 :/dev/cd0 .Ed .Sh DIRECTORY SERVICES Both From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 13:26:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7323D711; Mon, 17 Nov 2014 13:26:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F1CF379; Mon, 17 Nov 2014 13:26:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHDQTuh058645; Mon, 17 Nov 2014 13:26:29 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHDQTMw058644; Mon, 17 Nov 2014 13:26:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201411171326.sAHDQTMw058644@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 17 Nov 2014 13:26:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r274622 - stable/9/sys/cddl/compat/opensolaris/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 13:26:29 -0000 Author: avg Date: Mon Nov 17 13:26:28 2014 New Revision: 274622 URL: https://svnweb.freebsd.org/changeset/base/274622 Log: MFC r272701: make userland __assfail from opensolaris compat honor 'aok' variable Modified: stable/9/sys/cddl/compat/opensolaris/sys/assfail.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/compat/opensolaris/sys/assfail.h ============================================================================== --- stable/9/sys/cddl/compat/opensolaris/sys/assfail.h Mon Nov 17 12:36:01 2014 (r274621) +++ stable/9/sys/cddl/compat/opensolaris/sys/assfail.h Mon Nov 17 13:26:28 2014 (r274622) @@ -46,20 +46,24 @@ void assfail3(const char *, uintmax_t, c #else /* !defined(_KERNEL) */ #ifndef HAVE_ASSFAIL +extern int aok; + static __inline int __assfail(const char *expr, const char *file, int line) { (void)fprintf(stderr, "Assertion failed: (%s), file %s, line %d.\n", expr, file, line); - abort(); - /* NOTREACHED */ + if (!aok) + abort(); return (0); } #define assfail __assfail #endif #ifndef HAVE_ASSFAIL3 +extern int aok; + static __inline void __assfail3(const char *expr, uintmax_t lv, const char *op, uintmax_t rv, const char *file, int line) { @@ -67,8 +71,8 @@ __assfail3(const char *expr, uintmax_t l (void)fprintf(stderr, "Assertion failed: %s (0x%jx %s 0x%jx), file %s, line %d.\n", expr, lv, op, rv, file, line); - abort(); - /* NOTREACHED */ + if (!aok) + abort(); } #define assfail3 __assfail3 #endif From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 13:26:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D600B854; Mon, 17 Nov 2014 13:26:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1AEA389; Mon, 17 Nov 2014 13:26:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHDQpWQ058729; Mon, 17 Nov 2014 13:26:51 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHDQpDl058728; Mon, 17 Nov 2014 13:26:51 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201411171326.sAHDQpDl058728@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 17 Nov 2014 13:26:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274623 - stable/10/sys/cddl/compat/opensolaris/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 13:26:52 -0000 Author: avg Date: Mon Nov 17 13:26:50 2014 New Revision: 274623 URL: https://svnweb.freebsd.org/changeset/base/274623 Log: MFC r272701: make userland __assfail from opensolaris compat honor 'aok' variable Modified: stable/10/sys/cddl/compat/opensolaris/sys/assfail.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/compat/opensolaris/sys/assfail.h ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/sys/assfail.h Mon Nov 17 13:26:28 2014 (r274622) +++ stable/10/sys/cddl/compat/opensolaris/sys/assfail.h Mon Nov 17 13:26:50 2014 (r274623) @@ -46,20 +46,24 @@ void assfail3(const char *, uintmax_t, c #else /* !defined(_KERNEL) */ #ifndef HAVE_ASSFAIL +extern int aok; + static __inline int __assfail(const char *expr, const char *file, int line) { (void)fprintf(stderr, "Assertion failed: (%s), file %s, line %d.\n", expr, file, line); - abort(); - /* NOTREACHED */ + if (!aok) + abort(); return (0); } #define assfail __assfail #endif #ifndef HAVE_ASSFAIL3 +extern int aok; + static __inline void __assfail3(const char *expr, uintmax_t lv, const char *op, uintmax_t rv, const char *file, int line) { @@ -67,8 +71,8 @@ __assfail3(const char *expr, uintmax_t l (void)fprintf(stderr, "Assertion failed: %s (0x%jx %s 0x%jx), file %s, line %d.\n", expr, lv, op, rv, file, line); - abort(); - /* NOTREACHED */ + if (!aok) + abort(); } #define assfail3 __assfail3 #endif From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 13:29:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CDBCC1C; Mon, 17 Nov 2014 13:29:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 386773CC; Mon, 17 Nov 2014 13:29:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHDTxnJ059480; Mon, 17 Nov 2014 13:29:59 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHDTxBX059479; Mon, 17 Nov 2014 13:29:59 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201411171329.sAHDTxBX059479@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 17 Nov 2014 13:29:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r274624 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 13:29:59 -0000 Author: avg Date: Mon Nov 17 13:29:58 2014 New Revision: 274624 URL: https://svnweb.freebsd.org/changeset/base/274624 Log: MFC r272708: l2arc_write_buffers: reduce headroom value Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 17 13:26:50 2014 (r274623) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 17 13:29:58 2014 (r274624) @@ -4968,7 +4968,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de if (ab == NULL) ARCSTAT_BUMP(arcstat_l2_write_buffer_list_null_iter); - headroom = target_sz * l2arc_headroom; + headroom = target_sz * l2arc_headroom * 2 / ARC_BUFC_NUMLISTS; if (do_headroom_boost) headroom = (headroom * l2arc_headroom_boost) / 100; From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 13:30:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E5F2D4D; Mon, 17 Nov 2014 13:30:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69F1B3D3; Mon, 17 Nov 2014 13:30:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHDUJRV061237; Mon, 17 Nov 2014 13:30:19 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHDUJDN061236; Mon, 17 Nov 2014 13:30:19 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201411171330.sAHDUJDN061236@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 17 Nov 2014 13:30:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274625 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 13:30:19 -0000 Author: avg Date: Mon Nov 17 13:30:18 2014 New Revision: 274625 URL: https://svnweb.freebsd.org/changeset/base/274625 Log: MFC r272708: l2arc_write_buffers: reduce headroom value Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 17 13:29:58 2014 (r274624) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 17 13:30:18 2014 (r274625) @@ -5055,7 +5055,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de if (ab == NULL) ARCSTAT_BUMP(arcstat_l2_write_buffer_list_null_iter); - headroom = target_sz * l2arc_headroom; + headroom = target_sz * l2arc_headroom * 2 / ARC_BUFC_NUMLISTS; if (do_headroom_boost) headroom = (headroom * l2arc_headroom_boost) / 100; From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 13:39:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D629EF7E; Mon, 17 Nov 2014 13:39:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEE166A6; Mon, 17 Nov 2014 13:39:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHDdDP6064210; Mon, 17 Nov 2014 13:39:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHDd0h3064114; Mon, 17 Nov 2014 13:39:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411171339.sAHDd0h3064114@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 17 Nov 2014 13:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274626 - in head/contrib/netbsd-tests/lib: libc/gen libc/gen/posix_spawn libc/locale libc/net libc/regex libc/stdlib libc/string libc/sys libc/time libc/tls libc/tls/dso libc/tls_dso l... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 13:39:14 -0000 Author: ngie Date: Mon Nov 17 13:39:00 2014 New Revision: 274626 URL: https://svnweb.freebsd.org/changeset/base/274626 Log: Mechanically replace #if defined(__FreeBSD__) and #if defined(__NetBSD__) with their #ifdef equivalents for everything changed in contrib/netbsd-tests. There are some items from the vendor tree that use #if defined(__FreeBSD__) or #if defined(__NetBSD__) which are being left alone Requested by: bde, rpaulo Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c head/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c head/contrib/netbsd-tests/lib/libc/gen/t_glob.c head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c head/contrib/netbsd-tests/lib/libc/gen/t_nice.c head/contrib/netbsd-tests/lib/libc/gen/t_raise.c head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c head/contrib/netbsd-tests/lib/libc/gen/t_siginfo.c head/contrib/netbsd-tests/lib/libc/gen/t_time.c head/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c head/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c head/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c head/contrib/netbsd-tests/lib/libc/locale/t_wctomb.c head/contrib/netbsd-tests/lib/libc/net/t_ether_aton.c head/contrib/netbsd-tests/lib/libc/regex/debug.c head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c head/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c head/contrib/netbsd-tests/lib/libc/stdlib/h_atexit.c head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c head/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c head/contrib/netbsd-tests/lib/libc/string/t_strerror.c head/contrib/netbsd-tests/lib/libc/sys/t_access.c head/contrib/netbsd-tests/lib/libc/sys/t_clock_gettime.c head/contrib/netbsd-tests/lib/libc/sys/t_getgroups.c head/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c head/contrib/netbsd-tests/lib/libc/sys/t_kevent.c head/contrib/netbsd-tests/lib/libc/sys/t_listen.c head/contrib/netbsd-tests/lib/libc/sys/t_msgrcv.c head/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c head/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c head/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c head/contrib/netbsd-tests/lib/libc/sys/t_poll.c head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c head/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c head/contrib/netbsd-tests/lib/libc/sys/t_stat.c head/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c head/contrib/netbsd-tests/lib/libc/sys/t_write.c head/contrib/netbsd-tests/lib/libc/time/t_strptime.c head/contrib/netbsd-tests/lib/libc/tls/dso/h_tls_dlopen.c head/contrib/netbsd-tests/lib/libc/tls/t_tls_dlopen.c head/contrib/netbsd-tests/lib/libc/tls/t_tls_dynamic.c head/contrib/netbsd-tests/lib/libc/tls/t_tls_static.c head/contrib/netbsd-tests/lib/libc/tls/t_tls_static_helper.c head/contrib/netbsd-tests/lib/libc/tls_dso/h_tls_dynamic.c head/contrib/netbsd-tests/lib/libpthread/h_atexit.c head/contrib/netbsd-tests/lib/libpthread/t_detach.c Modified: head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c Mon Nov 17 13:39:00 2014 (r274626) @@ -31,7 +31,7 @@ */ -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include #endif #include @@ -251,7 +251,7 @@ ATF_TC_BODY(t_spawn_open_nonexistent, tc posix_spawn_file_actions_destroy(&fa); } -#if defined(__NetBSD__) +#ifdef __NetBSD__ ATF_TC(t_spawn_open_nonexistent_diag); ATF_TC_HEAD(t_spawn_open_nonexistent_diag, tc) @@ -381,7 +381,7 @@ ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, t_spawn_fileactions); ATF_TP_ADD_TC(tp, t_spawn_open_nonexistent); -#if defined(__NetBSD__) +#ifdef __NetBSD__ ATF_TP_ADD_TC(tp, t_spawn_open_nonexistent_diag); #endif ATF_TP_ADD_TC(tp, t_spawn_reopen); Modified: head/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c Mon Nov 17 13:39:00 2014 (r274626) @@ -56,7 +56,7 @@ ATF_TC_BODY(getcwd_err, tc) ATF_REQUIRE(getcwd(buf, 0) == NULL); ATF_REQUIRE(errno == EINVAL); -#if defined(__NetBSD__) +#ifdef __NetBSD__ errno = 0; ATF_REQUIRE(getcwd((void *)-1, sizeof(buf)) == NULL); Modified: head/contrib/netbsd-tests/lib/libc/gen/t_glob.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_glob.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/gen/t_glob.c Mon Nov 17 13:39:00 2014 (r274626) @@ -46,7 +46,7 @@ __RCSID("$NetBSD: t_glob.c,v 1.3 2013/01 #include #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include "h_macros.h" #define __gl_stat_t struct stat #define _S_IFDIR S_IFDIR @@ -138,7 +138,7 @@ gl_readdir(void *v) dir.d_ino = dd->pos; dir.d_type = f->dir ? DT_DIR : DT_REG; DPRINTF(("readdir %s %d\n", dir.d_name, dir.d_type)); -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ dir.d_reclen = -1; /* Does not have _DIRENT_RECLEN */ #else dir.d_reclen = _DIRENT_RECLEN(&dir, dir.d_namlen); @@ -223,7 +223,7 @@ run(const char *p, int flags, const char } -#if !defined(__FreeBSD__) +#ifndef __FreeBSD__ ATF_TC(glob_star); ATF_TC_HEAD(glob_star, tc) { @@ -272,7 +272,7 @@ ATF_TC_BODY(glob_nocheck, tc) ATF_TP_ADD_TCS(tp) { -#if !defined(__FreeBSD__) +#ifndef __FreeBSD__ ATF_TP_ADD_TC(tp, glob_star); #endif ATF_TP_ADD_TC(tp, glob_star_not); Modified: head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c Mon Nov 17 13:39:00 2014 (r274626) @@ -34,7 +34,7 @@ #include #include #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include #else #include @@ -82,7 +82,7 @@ const struct hnopts { /* * Truncated output. Rev. 1.7 produces "1.0 K". */ -#if !defined(__FreeBSD__) +#ifndef __FreeBSD__ { 6, 1000, "A", HN_AUTOSCALE, HN_DECIMAL, -1, "" }, /* Modified: head/contrib/netbsd-tests/lib/libc/gen/t_nice.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_nice.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/gen/t_nice.c Mon Nov 17 13:39:00 2014 (r274626) @@ -72,7 +72,7 @@ ATF_TC_BODY(nice_err, tc) { int i; -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ atf_tc_expect_fail("nice(incr) with incr < 0 fails with unprivileged " "users and sets errno == EPERM; see PR # 189821 for more details"); #endif @@ -98,7 +98,7 @@ ATF_TC_HEAD(nice_priority, tc) ATF_TC_BODY(nice_priority, tc) { -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ int i, pri, pri2, nic; #else int i, pri, nic; @@ -115,7 +115,7 @@ ATF_TC_BODY(nice_priority, tc) pri = getpriority(PRIO_PROCESS, 0); ATF_REQUIRE(errno == 0); -#if defined(__NetBSD__) +#ifdef __NetBSD__ if (nic != pri) atf_tc_fail("nice(3) and getpriority(2) conflict"); #endif @@ -130,14 +130,14 @@ ATF_TC_BODY(nice_priority, tc) if (pid == 0) { errno = 0; -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ pri = getpriority(PRIO_PROCESS, 0); #else pri2 = getpriority(PRIO_PROCESS, 0); #endif ATF_REQUIRE(errno == 0); -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ if (pri != pri2) #else if (nic != pri) @@ -180,7 +180,7 @@ ATF_TC_HEAD(nice_thread, tc) ATF_TC_BODY(nice_thread, tc) { pthread_t tid[5]; -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ int pri, rv, val; #else int rv, val; @@ -196,7 +196,7 @@ ATF_TC_BODY(nice_thread, tc) val = nice(i); ATF_REQUIRE(val != -1); -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ pri = getpriority(PRIO_PROCESS, 0); rv = pthread_create(&tid[i], NULL, threadfunc, &pri); #else Modified: head/contrib/netbsd-tests/lib/libc/gen/t_raise.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_raise.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/gen/t_raise.c Mon Nov 17 13:39:00 2014 (r274626) @@ -43,7 +43,7 @@ static int count; static void handler_err(int); static void handler_ret(int); static void handler_stress(int); -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ static int sig[] = { SIGALRM, SIGIO, SIGUSR1, SIGUSR2 }; #else static int sig[] = { SIGALRM, SIGIO, SIGUSR1, SIGUSR2, SIGPWR }; Modified: head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c Mon Nov 17 13:39:00 2014 (r274626) @@ -63,7 +63,7 @@ ATF_TC_BODY(setdomainname_basic, tc) (void)memset(name, 0, sizeof(name)); -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ /* * Sanity checks to ensure that the wrong invariant isn't being * tested for per PR # 181127 @@ -101,7 +101,7 @@ ATF_TC_BODY(setdomainname_limit, tc) (void)memset(name, 0, sizeof(name)); -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ ATF_REQUIRE(setdomainname(name, MAXHOSTNAMELEN - 1 ) == 0); ATF_REQUIRE(setdomainname(name, MAXHOSTNAMELEN) == -1); #endif Modified: head/contrib/netbsd-tests/lib/libc/gen/t_siginfo.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_siginfo.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/gen/t_siginfo.c Mon Nov 17 13:39:00 2014 (r274626) @@ -28,7 +28,7 @@ #include -#if defined(__NetBSD__) +#ifdef __NetBSD__ #include #endif #include @@ -87,7 +87,7 @@ sig_debug(int signo, siginfo_t *info, uc printf("uc_stack %p %lu 0x%x\n", ctx->uc_stack.ss_sp, (unsigned long)ctx->uc_stack.ss_size, ctx->uc_stack.ss_flags); -#if defined(__NetBSD__) +#ifdef __NetBSD__ for (i = 0; i < __arraycount(ctx->uc_mcontext.__gregs); i++) printf("uc_mcontext.greg[%d] 0x%lx\n", i, (long)ctx->uc_mcontext.__gregs[i]); @@ -144,7 +144,7 @@ sigchild_action(int signo, siginfo_t *in printf("si_uid=%d\n", info->si_uid); printf("si_pid=%d\n", info->si_pid); printf("si_status=%d\n", info->si_status); -#if defined(__NetBSD__) +#ifdef __NetBSD__ printf("si_utime=%lu\n", (unsigned long int)info->si_utime); printf("si_stime=%lu\n", (unsigned long int)info->si_stime); #endif Modified: head/contrib/netbsd-tests/lib/libc/gen/t_time.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_time.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/gen/t_time.c Mon Nov 17 13:39:00 2014 (r274626) @@ -31,7 +31,7 @@ #include __RCSID("$NetBSD: t_time.c,v 1.2 2011/11/11 05:03:38 jruoho Exp $"); -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include #endif #include Modified: head/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Mon Nov 17 13:39:00 2014 (r274626) @@ -107,7 +107,7 @@ ATF_TC_BODY(ttyname_r_err, tc) ATF_REQUIRE(rv == ERANGE); } -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ atf_tc_expect_fail("FreeBSD returns ENOTTY instead of EBADF; see bin/191936"); #endif rv = ttyname_r(-1, buf, ttymax); Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c Mon Nov 17 13:39:00 2014 (r274626) @@ -132,7 +132,7 @@ h_ctype2(const struct test *t, bool use_ size_t n; ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C"); -#if defined(__NetBSD__) +#ifdef __NetBSD__ ATF_REQUIRE(setlocale(LC_CTYPE, t->locale) != NULL); #else if (setlocale(LC_CTYPE, t->locale) == NULL) { @@ -245,7 +245,7 @@ ATF_TC_BODY(mbrtowc_internal, tc) { struct test *t; -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ atf_tc_expect_fail("ja_* locale fails"); #endif for (t = &tests[0]; t->data != NULL; ++t) Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Mon Nov 17 13:39:00 2014 (r274626) @@ -150,7 +150,7 @@ ATF_TC_BODY(mbstowcs_basic, tc) int i; ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C"); -#if defined(__NetBSD__) +#ifdef __NetBSD__ ATF_REQUIRE(setlocale(LC_CTYPE, t->locale) != NULL); #else if (setlocale(LC_CTYPE, t->locale) == NULL) { Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c Mon Nov 17 13:39:00 2014 (r274626) @@ -76,7 +76,7 @@ h_mbtowc(const char *locale, const char char *str; ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C"); -#if defined(__NetBSD__) +#ifdef __NetBSD__ ATF_REQUIRE(setlocale(LC_CTYPE, locale) != NULL); #else if (setlocale(LC_CTYPE, locale) == NULL) { @@ -137,13 +137,13 @@ ATF_TC_BODY(mbtowc, tc) h_mbtowc("ja_JP.ISO2022-JP", "\033$B", "\033$B$\"\033(B"); h_mbtowc("ja_JP.SJIS", "\202", "\202\240"); h_mbtowc("ja_JP.eucJP", "\244", "\244\242"); -#if !defined(__FreeBSD__) +#ifndef __FreeBSD__ /* Moved last as it fails */ h_mbtowc("zh_CN.GB18030", "\241", "\241\241"); #endif h_mbtowc("zh_TW.Big5", "\241", "\241@"); h_mbtowc("zh_TW.eucTW", "\241", "\241\241"); -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ atf_tc_expect_fail("zh_CN.GB18030"); h_mbtowc("zh_CN.GB18030", "\241", "\241\241"); #endif Modified: head/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c Mon Nov 17 13:39:00 2014 (r274626) @@ -66,7 +66,7 @@ __RCSID("$NetBSD: t_wcstod.c,v 1.3 2011/ #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include #endif Modified: head/contrib/netbsd-tests/lib/libc/locale/t_wctomb.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/locale/t_wctomb.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/locale/t_wctomb.c Mon Nov 17 13:39:00 2014 (r274626) @@ -109,7 +109,7 @@ h_wctomb(const struct test *t, char tc) size_t sz, ret, i; ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C"); -#if defined(__NetBSD__) +#ifdef __NetBSD__ ATF_REQUIRE(setlocale(LC_CTYPE, t->locale) != NULL); #else if (setlocale(LC_CTYPE, t->locale) == NULL) { Modified: head/contrib/netbsd-tests/lib/libc/net/t_ether_aton.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/net/t_ether_aton.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/net/t_ether_aton.c Mon Nov 17 13:39:00 2014 (r274626) @@ -46,14 +46,14 @@ __RCSID("$NetBSD: t_ether_aton.c,v 1.1 2 #include #include -#if !defined(__NetBSD__) -#if defined(__linux__) +#ifndef __NetBSD__ +#ifdef __linux__ #include #endif #include #endif -#if defined(__NetBSD__) +#ifdef __NetBSD__ #define ETHER_ADDR_LEN 6 int ether_aton_r(u_char *dest, size_t len, const char *str); @@ -65,7 +65,7 @@ static const struct { int error; } tests[] = { { { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab }, "01:23:45:67:89:ab", 0 }, -#if defined(__NetBSD__) +#ifdef __NetBSD__ { { 0x00, 0x01, 0x22, 0x03, 0x14, 0x05 }, "0:1:22-3:14:05", 0 }, { { 0x00, 0x01, 0x22, 0x03, 0x14, 0x05 }, "000122031405", 0 }, { { 0x0a, 0x0B, 0xcc, 0xdD, 0xEE, 0x0f }, "0a0BccdDEE0f", 0 }, @@ -86,13 +86,13 @@ ATF_TC_HEAD(tc_ether_aton, tc) ATF_TC_BODY(tc_ether_aton, tc) { -#if defined(__NetBSD__) +#ifdef __NetBSD__ u_char dest[ETHER_ADDR_LEN]; #else struct ether_addr dest; #endif size_t t; -#if defined(__NetBSD__) +#ifdef __NetBSD__ int e, r; #else int e; @@ -103,7 +103,7 @@ ATF_TC_BODY(tc_ether_aton, tc) for (t = 0; tests[t].str; t++) { s = tests[t].str; if ((e = tests[t].error) == 0) { -#if defined(__NetBSD__) +#ifdef __NetBSD__ if (ether_aton_r(dest, sizeof(dest), s) != e) atf_tc_fail("failed on `%s'", s); if (memcmp(dest, tests[t].res, sizeof(dest)) != 0) @@ -115,7 +115,7 @@ ATF_TC_BODY(tc_ether_aton, tc) atf_tc_fail("unexpected result on `%s'", s); #endif } else { -#if defined(__NetBSD__) +#ifdef __NetBSD__ if ((r = ether_aton_r(dest, sizeof(dest), s)) != e) atf_tc_fail("unexpectedly succeeded on `%s' " "(%d != %d)", s, r, e); Modified: head/contrib/netbsd-tests/lib/libc/regex/debug.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/regex/debug.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/regex/debug.c Mon Nov 17 13:39:00 2014 (r274626) @@ -34,7 +34,7 @@ #include #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include #include #endif @@ -54,7 +54,7 @@ static char *regchar(int); void regprint(regex_t *r, FILE *d) { -#if defined(__NetBSD__) +#ifdef __NetBSD__ struct re_guts *g = r->re_g; int c; int last; @@ -177,7 +177,7 @@ s_print(struct re_guts *g, FILE *d) break; case OANYOF: fprintf(d, "[(%ld)", (long)opnd); -#if defined(__NetBSD__) +#ifdef __NetBSD__ cs = &g->sets[opnd]; last = -1; for (size_t i = 0; i < g->csetsize+1; i++) /* +1 flushes */ @@ -250,7 +250,7 @@ s_print(struct re_guts *g, FILE *d) fprintf(d, ">"); break; default: -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ fprintf(d, "!%ld(%ld)!", OP(*s), opnd); #else fprintf(d, "!%d(%d)!", OP(*s), opnd); Modified: head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c Mon Nov 17 13:39:00 2014 (r274626) @@ -45,7 +45,7 @@ __RCSID("$NetBSD: t_exhaust.c,v 1.7 2011 #include #include #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include #endif @@ -179,7 +179,7 @@ ATF_TC_HEAD(regcomp_too_big, tc) " crash, but return a proper error code"); // libtre needs it. atf_tc_set_md_var(tc, "timeout", "600"); -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ atf_tc_set_md_var(tc, "require.memory", "64M"); #else atf_tc_set_md_var(tc, "require.memory", "120M"); @@ -189,12 +189,12 @@ ATF_TC_HEAD(regcomp_too_big, tc) ATF_TC_BODY(regcomp_too_big, tc) { regex_t re; -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ struct rlimit limit; #endif int e; -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ limit.rlim_cur = limit.rlim_max = 64 * 1024 * 1024; ATF_REQUIRE(setrlimit(RLIMIT_VMEM, &limit) != -1); #endif Modified: head/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c Mon Nov 17 13:39:00 2014 (r274626) @@ -48,7 +48,7 @@ __RCSID("$NetBSD: t_regex_att.c,v 1.1 20 #include #include #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include #endif @@ -377,7 +377,7 @@ checkmatches(const char *matches, size_t " cur=%d, max=%zu", res, l, len - off); off += l; } -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ ATF_CHECK_STREQ_MSG(res, matches, " at line %zu", lineno); #else ATF_REQUIRE_STREQ_MSG(res, matches, " at line %zu", lineno); @@ -580,7 +580,7 @@ ATF_TC_BODY(leftassoc, tc) * any explation. Mark as broken here, but I don't know why. */ atf_tc_expect_fail("Reason for breakage unknown"); #endif -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ atf_tc_expect_fail("The expected and matched groups are mismatched on FreeBSD"); #endif att_test(tc, "leftassoc"); Modified: head/contrib/netbsd-tests/lib/libc/stdlib/h_atexit.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/stdlib/h_atexit.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/stdlib/h_atexit.c Mon Nov 17 13:39:00 2014 (r274626) @@ -42,7 +42,7 @@ __RCSID("$NetBSD: h_atexit.c,v 1.1 2011/ extern int __cxa_atexit(void (*func)(void *), void *, void *); extern void __cxa_finalize(void *); -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ /* * On shared object unload, in __cxa_finalize, call and clear all installed * atexit and __cxa_atexit handlers that are either installed by unloaded @@ -191,7 +191,7 @@ main(int argc, char *argv[]) ASSERT(0 == atexit(normal_handler_0)); ASSERT(0 == atexit(normal_handler_1)); -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ ASSERT(0 == __cxa_atexit(cxa_handler_4, &arg_1, dso_handle_1)); ASSERT(0 == __cxa_atexit(cxa_handler_5, &arg_1, dso_handle_1)); ASSERT(0 == __cxa_atexit(cxa_handler_3, &arg_2, dso_handle_2)); Modified: head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c Mon Nov 17 13:39:00 2014 (r274626) @@ -34,7 +34,7 @@ #include #include #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include #endif Modified: head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c Mon Nov 17 13:39:00 2014 (r274626) @@ -36,7 +36,7 @@ #include #include #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include #endif Modified: head/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c Mon Nov 17 13:39:00 2014 (r274626) @@ -40,7 +40,7 @@ __RCSID("$NetBSD: t_getenv.c,v 1.2 2011/ #include #include #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include #endif @@ -155,7 +155,7 @@ ATF_TC_BODY(setenv_basic, tc) ATF_CHECK_ERRNO(EINVAL, setenv(NULL, "val", 1) == -1); ATF_CHECK_ERRNO(EINVAL, setenv("", "val", 1) == -1); ATF_CHECK_ERRNO(EINVAL, setenv("v=r", "val", 1) == -1); -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ /* Both FreeBSD and OS/X does not validate the second argument to setenv(3) Modified: head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c Mon Nov 17 13:39:00 2014 (r274626) @@ -75,7 +75,7 @@ __RCSID("$NetBSD: t_hsearch.c,v 1.4 2014 #define REQUIRE_ERRNO(x) ATF_REQUIRE_MSG(x, "%s", strerror(errno)) -#if defined(__NetBSD__) +#ifdef __NetBSD__ ATF_TC(hsearch_basic); ATF_TC_HEAD(hsearch_basic, tc) { @@ -231,7 +231,7 @@ ATF_TC_BODY(hsearch_two, tc) hdestroy(); } -#if defined(__NetBSD__) +#ifdef __NetBSD__ ATF_TC(hsearch_r_basic); ATF_TC_HEAD(hsearch_r_basic, tc) { @@ -389,14 +389,14 @@ ATF_TC_BODY(hsearch_r_two, tc) ATF_TP_ADD_TCS(tp) { -#if defined(__NetBSD__) +#ifdef __NetBSD__ ATF_TP_ADD_TC(tp, hsearch_basic); #endif ATF_TP_ADD_TC(tp, hsearch_duplicate); ATF_TP_ADD_TC(tp, hsearch_nonexistent); ATF_TP_ADD_TC(tp, hsearch_two); -#if defined(__NetBSD__) +#ifdef __NetBSD__ ATF_TP_ADD_TC(tp, hsearch_r_basic); #endif ATF_TP_ADD_TC(tp, hsearch_r_duplicate); Modified: head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c Mon Nov 17 13:39:00 2014 (r274626) @@ -51,7 +51,7 @@ unsigned char *start[BLOCKTYPES] = { }; char result[100]; -#if defined(__NetBSD__) +#ifdef __NetBSD__ const char goodResult[] = "7b405d24bc03195474c70ddae9e1f8fb"; #else const char goodResult[] = "217b4fbe456916bf62a2f85df752e4ab"; @@ -93,7 +93,7 @@ ATF_TC_BODY(memcpy_basic, tc) start[2] = auto1; start[3] = auto2; -#if defined(__NetBSD__) +#ifdef __NetBSD__ srandom(0L); #else /* Modified: head/contrib/netbsd-tests/lib/libc/string/t_strerror.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/string/t_strerror.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/string/t_strerror.c Mon Nov 17 13:39:00 2014 (r274626) @@ -37,7 +37,7 @@ __RCSID("$NetBSD: t_strerror.c,v 1.3 201 #include #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include #endif Modified: head/contrib/netbsd-tests/lib/libc/sys/t_access.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_access.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/sys/t_access.c Mon Nov 17 13:39:00 2014 (r274626) @@ -40,7 +40,7 @@ __RCSID("$NetBSD: t_access.c,v 1.1 2011/ #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include #endif Modified: head/contrib/netbsd-tests/lib/libc/sys/t_clock_gettime.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_clock_gettime.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/sys/t_clock_gettime.c Mon Nov 17 13:39:00 2014 (r274626) @@ -63,7 +63,7 @@ __RCSID("$NetBSD: t_clock_gettime.c,v 1. #include #include -#if defined(__NetBSD__) +#ifdef __NetBSD__ #include #endif @@ -75,7 +75,7 @@ __RCSID("$NetBSD: t_clock_gettime.c,v 1. #include #include -#if defined(__NetBSD__) +#ifdef __NetBSD__ #include "../../../h_macros.h" #else #include Modified: head/contrib/netbsd-tests/lib/libc/sys/t_getgroups.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_getgroups.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/sys/t_getgroups.c Mon Nov 17 13:39:00 2014 (r274626) @@ -57,7 +57,7 @@ ATF_TC_BODY(getgroups_err, tc) errno = 0; -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ atf_tc_expect_fail("Reported as kern/189941"); #endif ATF_REQUIRE(getgroups(-1, gidset) == -1); Modified: head/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c Mon Nov 17 13:39:00 2014 (r274626) @@ -47,7 +47,7 @@ static void sighandler(int); static const size_t maxiter = 2000; static void -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ sighandler(int signo __unused) #else sighandler(int signo) Modified: head/contrib/netbsd-tests/lib/libc/sys/t_kevent.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_kevent.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/sys/t_kevent.c Mon Nov 17 13:39:00 2014 (r274626) @@ -149,11 +149,11 @@ ATF_TC_BODY(kqueue_desc_passing, tc) printf("parent (pid %d): sending kq fd %d\n", getpid(), kq); if (sendmsg(s[0], &m, 0) == -1) { -#if defined(__NetBSD__) +#ifdef __NetBSD__ ATF_REQUIRE_EQ_MSG(errno, EBADF, "errno is %d", errno); atf_tc_skip("PR kern/46523"); #endif -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ ATF_REQUIRE_EQ_MSG(errno, EOPNOTSUPP, "errno is %d", errno); close(s[0]); #endif Modified: head/contrib/netbsd-tests/lib/libc/sys/t_listen.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_listen.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/sys/t_listen.c Mon Nov 17 13:39:00 2014 (r274626) @@ -36,7 +36,7 @@ #include #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include #endif Modified: head/contrib/netbsd-tests/lib/libc/sys/t_msgrcv.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_msgrcv.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/sys/t_msgrcv.c Mon Nov 17 13:39:00 2014 (r274626) @@ -47,7 +47,7 @@ __RCSID("$NetBSD: t_msgrcv.c,v 1.3 2013/ #include #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include #endif Modified: head/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c Mon Nov 17 13:39:00 2014 (r274626) @@ -47,7 +47,7 @@ __RCSID("$NetBSD: t_msgsnd.c,v 1.2 2011/ #include #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include #endif Modified: head/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c Mon Nov 17 13:39:00 2014 (r274626) @@ -45,7 +45,7 @@ __RCSID("$NetBSD: t_nanosleep.c,v 1.3 20 #include static void -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ handler(int signo __unused) #else handler(int signo) Modified: head/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c Mon Nov 17 13:39:00 2014 (r274626) @@ -53,7 +53,7 @@ run(int flags) while ((i = open("/", O_RDONLY)) < 3) ATF_REQUIRE(i != -1); -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ closefrom(3); #else ATF_REQUIRE(fcntl(3, F_CLOSEM) != -1); @@ -80,7 +80,7 @@ run(int flags) ATF_REQUIRE((fcntl(fd[1], F_GETFL) & O_NONBLOCK) == 0); } -#if !defined(__FreeBSD__) +#ifndef __FreeBSD__ if (flags & O_NOSIGPIPE) { ATF_REQUIRE(fcntl(fd[0], F_GETNOSIGPIPE) != 0); ATF_REQUIRE(fcntl(fd[1], F_GETNOSIGPIPE) != 0); @@ -116,7 +116,7 @@ ATF_TC_BODY(pipe2_consume, tc) { struct rlimit rl; int err, filedes[2]; -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ int old; closefrom(4); @@ -132,7 +132,7 @@ ATF_TC_BODY(pipe2_consume, tc) * file descriptor limit in the middle of a pipe2() call - i.e. * before the call only a single descriptor may be openend. */ -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ old = rl.rlim_cur; #endif rl.rlim_cur = 4; @@ -141,7 +141,7 @@ ATF_TC_BODY(pipe2_consume, tc) err = pipe2(filedes, O_CLOEXEC); ATF_REQUIRE(err == -1); -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ rl.rlim_cur = old; err = setrlimit(RLIMIT_NOFILE, &rl); #endif @@ -169,7 +169,7 @@ ATF_TC_BODY(pipe2_cloexec, tc) run(O_CLOEXEC); } -#if defined(__NetBSD__) +#ifdef __NetBSD__ ATF_TC(pipe2_nosigpipe); ATF_TC_HEAD(pipe2_nosigpipe, tc) { @@ -201,7 +201,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, pipe2_consume); ATF_TP_ADD_TC(tp, pipe2_nonblock); ATF_TP_ADD_TC(tp, pipe2_cloexec); -#if defined(__NetBSD__) +#ifdef __NetBSD__ ATF_TP_ADD_TC(tp, pipe2_nosigpipe); #endif ATF_TP_ADD_TC(tp, pipe2_einval); Modified: head/contrib/netbsd-tests/lib/libc/sys/t_poll.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_poll.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/sys/t_poll.c Mon Nov 17 13:39:00 2014 (r274626) @@ -233,7 +233,7 @@ ATF_TC_BODY(poll_err, tc) ATF_REQUIRE_ERRNO(EINVAL, poll(&pfd, 1, -2) == -1); } -#if !defined(__FreeBSD__) +#ifndef __FreeBSD__ ATF_TC(pollts_basic); ATF_TC_HEAD(pollts_basic, tc) { @@ -386,7 +386,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, poll_3way); ATF_TP_ADD_TC(tp, poll_basic); ATF_TP_ADD_TC(tp, poll_err); -#if !defined(__FreeBSD__) +#ifndef __FreeBSD__ ATF_TP_ADD_TC(tp, pollts_basic); ATF_TP_ADD_TC(tp, pollts_err); ATF_TP_ADD_TC(tp, pollts_sigmask); Modified: head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c Mon Nov 17 13:39:00 2014 (r274626) @@ -58,7 +58,7 @@ ATF_TC_BODY(revoke_basic, tc) size_t i, n; int *buf; -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ atf_tc_skip("revoke(2) is only implemented for devfs(5)."); #endif (void)memset(&res, 0, sizeof(struct rlimit)); @@ -116,7 +116,7 @@ ATF_TC_BODY(revoke_err, tc) errno = 0; ATF_REQUIRE_ERRNO(ENAMETOOLONG, revoke(buf) == -1); -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ atf_tc_skip("revoke(2) is only implemented for devfs(5)."); #endif errno = 0; @@ -139,7 +139,7 @@ ATF_TC_BODY(revoke_perm, tc) int fd, sta; pid_t pid; -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ atf_tc_skip("revoke(2) is only implemented for devfs(5)."); #endif pw = getpwnam("nobody"); Modified: head/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c Mon Nov 17 13:39:00 2014 (r274626) @@ -46,7 +46,7 @@ static void handler(int, siginfo_t *, vo static int value; static void -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ handler(int signo __unused, siginfo_t *info __unused, void *data __unused) #else handler(int signo, siginfo_t *info, void *data) @@ -76,7 +76,7 @@ ATF_TC_BODY(sigqueue_basic, tc) sv.sival_int = VALUE; -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ /* * From kern_sig.c: * Specification says sigqueue can only send signal to single process. Modified: head/contrib/netbsd-tests/lib/libc/sys/t_stat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_stat.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/sys/t_stat.c Mon Nov 17 13:39:00 2014 (r274626) @@ -47,7 +47,7 @@ __RCSID("$NetBSD: t_stat.c,v 1.4 2012/03 #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include #endif Modified: head/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c Mon Nov 17 13:39:00 2014 (r274626) @@ -38,7 +38,7 @@ static timer_t t; static bool fail = true; static void -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ timer_signal_handler(int signo, siginfo_t *si, void *osi __unused) #else timer_signal_handler(int signo, siginfo_t *si, void *osi) Modified: head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c Mon Nov 17 13:39:00 2014 (r274626) @@ -85,7 +85,7 @@ ATF_TC_BODY(unlink_err, tc) (void)memset(buf, 'x', sizeof(buf)); errno = 0; -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ ATF_REQUIRE_ERRNO(EISDIR, unlink("/") == -1); #else ATF_REQUIRE_ERRNO(EBUSY, unlink("/") == -1); Modified: head/contrib/netbsd-tests/lib/libc/sys/t_write.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_write.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/sys/t_write.c Mon Nov 17 13:39:00 2014 (r274626) @@ -32,7 +32,7 @@ __COPYRIGHT("@(#) Copyright (c) 2008\ __RCSID("$NetBSD: t_write.c,v 1.2 2011/10/19 16:19:30 jruoho Exp $"); #include -#if defined(__NetBSD__) +#ifdef __NetBSD__ #include #endif @@ -45,7 +45,7 @@ __RCSID("$NetBSD: t_write.c,v 1.2 2011/1 #include #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include #endif @@ -55,7 +55,7 @@ static bool fail = false; static const char *path = "write"; static void -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ sighandler(int signo __unused) #else sighandler(int signo) Modified: head/contrib/netbsd-tests/lib/libc/time/t_strptime.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/time/t_strptime.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/time/t_strptime.c Mon Nov 17 13:39:00 2014 (r274626) @@ -49,7 +49,7 @@ h_pass(const char *buf, const char *fmt, exp = buf + len; ret = strptime(buf, fmt, &tm); -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ ATF_CHECK_MSG(ret == exp, "strptime(\"%s\", \"%s\", tm): incorrect return code: " "expected: %p, got: %p", buf, fmt, exp, ret); @@ -88,7 +88,7 @@ h_fail(const char *buf, const char *fmt) { struct tm tm = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, NULL }; -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ ATF_CHECK_MSG(strptime(buf, fmt, &tm) == NULL, "strptime(\"%s\", " "\"%s\", &tm) should fail, but it didn't", buf, fmt); #else @@ -108,7 +108,7 @@ ATF_TC_HEAD(common, tc) ATF_TC_BODY(common, tc) { -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ atf_tc_expect_fail("There are various issues with strptime on FreeBSD"); #endif @@ -189,13 +189,13 @@ ATF_TC_BODY(day, tc) h_pass("mon", "%a", 3, -1, -1, -1, -1, -1, -1, 1, -1); h_pass("tueSDay", "%A", 7, -1, -1, -1, -1, -1, -1, 2, -1); h_pass("sunday", "%A", 6, -1, -1, -1, -1, -1, -1, 0, -1); -#if defined(__NetBSD__) +#ifdef __NetBSD__ h_fail("sunday", "%EA"); #else h_pass("Sunday", "%EA", 6, -1, -1, -1, -1, -1, -1, 0, -1); #endif h_pass("SaturDay", "%A", 8, -1, -1, -1, -1, -1, -1, 6, -1); -#if defined(__NetBSD__) +#ifdef __NetBSD__ h_fail("SaturDay", "%OA"); #else h_pass("SaturDay", "%OA", 8, -1, -1, -1, -1, -1, -1, 6, -1); Modified: head/contrib/netbsd-tests/lib/libc/tls/dso/h_tls_dlopen.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/tls/dso/h_tls_dlopen.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/tls/dso/h_tls_dlopen.c Mon Nov 17 13:39:00 2014 (r274626) @@ -36,7 +36,7 @@ __RCSID("$NetBSD: h_tls_dlopen.c,v 1.5 2 #include #include -#if defined(__NetBSD__) +#ifdef __NetBSD__ #include #endif Modified: head/contrib/netbsd-tests/lib/libc/tls/t_tls_dlopen.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/tls/t_tls_dlopen.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/tls/t_tls_dlopen.c Mon Nov 17 13:39:00 2014 (r274626) @@ -39,7 +39,7 @@ __RCSID("$NetBSD: t_tls_dlopen.c,v 1.3 2 #include #include -#if defined(__NetBSD__) +#ifdef __NetBSD__ #include #endif Modified: head/contrib/netbsd-tests/lib/libc/tls/t_tls_dynamic.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/tls/t_tls_dynamic.c Mon Nov 17 13:30:18 2014 (r274625) +++ head/contrib/netbsd-tests/lib/libc/tls/t_tls_dynamic.c Mon Nov 17 13:39:00 2014 (r274626) @@ -38,7 +38,7 @@ __RCSID("$NetBSD: t_tls_dynamic.c,v 1.3 #include #include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 14:16:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4F31B20; Mon, 17 Nov 2014 14:16:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D11EAB5E; Mon, 17 Nov 2014 14:16:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHEG2Tc082723; Mon, 17 Nov 2014 14:16:02 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHEG2af082722; Mon, 17 Nov 2014 14:16:02 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201411171416.sAHEG2af082722@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 17 Nov 2014 14:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274627 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 14:16:03 -0000 Author: avg Date: Mon Nov 17 14:16:02 2014 New Revision: 274627 URL: https://svnweb.freebsd.org/changeset/base/274627 Log: Revert r269093 which introduced physical zio alignment transform Size of physical ZIOs must never be implicitly adjusted, it's a responsibility of a caller to make sure that such a ZIO has proper offset and size. Discussed with: delphij, gibbs MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Mon Nov 17 13:39:00 2014 (r274626) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Mon Nov 17 14:16:02 2014 (r274627) @@ -2619,8 +2619,7 @@ zio_vdev_io_start(zio_t *zio) align = 1ULL << vd->vdev_top->vdev_ashift; - if ((!(zio->io_flags & ZIO_FLAG_PHYSICAL) || - (vd->vdev_top->vdev_physical_ashift > SPA_MINBLOCKSHIFT)) && + if (!(zio->io_flags & ZIO_FLAG_PHYSICAL) && P2PHASE(zio->io_size, align) != 0) { /* Transform logical writes to be a full physical block size. */ uint64_t asize = P2ROUNDUP(zio->io_size, align); From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 14:45:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27EF56EF; Mon, 17 Nov 2014 14:45:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA1CBE79; Mon, 17 Nov 2014 14:45:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHEjgIg096938; Mon, 17 Nov 2014 14:45:42 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHEjgbE096937; Mon, 17 Nov 2014 14:45:42 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201411171445.sAHEjgbE096937@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 17 Nov 2014 14:45:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274628 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 14:45:43 -0000 Author: avg Date: Mon Nov 17 14:45:42 2014 New Revision: 274628 URL: https://svnweb.freebsd.org/changeset/base/274628 Log: l2arc: restore correct rounding up of asize of compressed data This rounding up was lost in a mismerge of illumos code. See r268075 MFV r267565. After that commit zio_compress_data() no longer performs any compressed size adjustment, so it needs to be done externally. On FreeBSD we round up the size using vdev_ashift rather than SPA_MINBLOCKSIZE so that 4KB devices are properly supported. Additionally, zero out the buffer tail only if compression succeeds. The compression is considered successful if the size of compressed data after rounding up to account for the vdev ashift is less than the original data size. It does not make sense to have the data compressed if all the savings are lost to rounding up. With the new zio_compress_data() it could have been possible that the rounded compressed size would be greater than the original size and thus we could zero beyond the allocated buffer if the zeroing code was kept at the original place. Discussed with: delphij, gibbs MFC after: 2 weeks X-MFC with: r274627 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 17 14:16:02 2014 (r274627) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 17 14:45:42 2014 (r274628) @@ -5326,12 +5326,6 @@ l2arc_compress_buf(l2arc_buf_hdr_t *l2hd csize = zio_compress_data(ZIO_COMPRESS_LZ4, l2hdr->b_tmp_cdata, cdata, l2hdr->b_asize); - rounded = P2ROUNDUP(csize, (size_t)SPA_MINBLOCKSIZE); - if (rounded > csize) { - bzero((char *)cdata + csize, rounded - csize); - csize = rounded; - } - if (csize == 0) { /* zero block, indicate that there's nothing to write */ zio_data_buf_free(cdata, len); @@ -5340,11 +5334,19 @@ l2arc_compress_buf(l2arc_buf_hdr_t *l2hd l2hdr->b_tmp_cdata = NULL; ARCSTAT_BUMP(arcstat_l2_compress_zeros); return (B_TRUE); - } else if (csize > 0 && csize < len) { + } + + rounded = P2ROUNDUP(csize, + (size_t)1 << l2hdr->b_dev->l2ad_vdev->vdev_ashift); + if (rounded < len) { /* * Compression succeeded, we'll keep the cdata around for * writing and release it afterwards. */ + if (rounded > csize) { + bzero((char *)cdata + csize, rounded - csize); + csize = rounded; + } l2hdr->b_compress = ZIO_COMPRESS_LZ4; l2hdr->b_asize = csize; l2hdr->b_tmp_cdata = cdata; From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 14:56:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49422CC3; Mon, 17 Nov 2014 14:56:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 356BDFA7; Mon, 17 Nov 2014 14:56:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHEu3P6001749; Mon, 17 Nov 2014 14:56:03 GMT (envelope-from jch@FreeBSD.org) Received: (from jch@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHEu3VB001748; Mon, 17 Nov 2014 14:56:03 GMT (envelope-from jch@FreeBSD.org) Message-Id: <201411171456.sAHEu3VB001748@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jch set sender to jch@FreeBSD.org using -f From: Julien Charbon Date: Mon, 17 Nov 2014 14:56:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274629 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 14:56:03 -0000 Author: jch Date: Mon Nov 17 14:56:02 2014 New Revision: 274629 URL: https://svnweb.freebsd.org/changeset/base/274629 Log: Re-introduce padding fields removed with r264321 to keep struct tcptw ABI unchanged. Suggested by: jhb Approved by: jhb (mentor) MFC after: 1 day X-MFC-With: r264321 Modified: head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Mon Nov 17 14:45:42 2014 (r274628) +++ head/sys/netinet/tcp_var.h Mon Nov 17 14:56:02 2014 (r274629) @@ -357,6 +357,8 @@ struct tcptw { u_int t_starttime; int tw_time; TAILQ_ENTRY(tcptw) tw_2msl; + void *tw_pspare; /* TCP_SIGNATURE */ + u_int *tw_spare; /* TCP_SIGNATURE */ }; #define intotcpcb(ip) ((struct tcpcb *)(ip)->inp_ppcb) From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 15:08:11 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 380742A9; Mon, 17 Nov 2014 15:08:11 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0724413A; Mon, 17 Nov 2014 15:08:09 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id RAA10576; Mon, 17 Nov 2014 17:10:00 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XqNuQ-0001wZ-Nb; Mon, 17 Nov 2014 17:08:06 +0200 Message-ID: <546A0F1E.5050305@FreeBSD.org> Date: Mon, 17 Nov 2014 17:07:10 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Steven Hartland , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r274628 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201411171445.sAHEjgbE096937@svn.freebsd.org> <546A0ED8.6020104@freebsd.org> In-Reply-To: <546A0ED8.6020104@freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 15:08:11 -0000 On 17/11/2014 17:06, Steven Hartland wrote: > Looks like this could have introduced random data corruption, have you seen this > in practice? Which part exactly? > On 17/11/2014 14:45, Andriy Gapon wrote: >> Author: avg >> Date: Mon Nov 17 14:45:42 2014 >> New Revision: 274628 >> URL: https://svnweb.freebsd.org/changeset/base/274628 >> >> Log: >> l2arc: restore correct rounding up of asize of compressed data >> This rounding up was lost in a mismerge of illumos code. >> See r268075 MFV r267565. >> After that commit zio_compress_data() no longer performs any compressed >> size adjustment, so it needs to be done externally. On FreeBSD we round >> up the size using vdev_ashift rather than SPA_MINBLOCKSIZE so that 4KB >> devices are properly supported. >> Additionally, zero out the buffer tail only if compression succeeds. >> The compression is considered successful if the size of compressed >> data after rounding up to account for the vdev ashift is less than the >> original data size. It does not make sense to have the data compressed >> if all the savings are lost to rounding up. >> With the new zio_compress_data() it could have been possible that the >> rounded compressed size would be greater than the original size and thus >> we could zero beyond the allocated buffer if the zeroing code was kept >> at the original place. >> Discussed with: delphij, gibbs >> MFC after: 2 weeks >> X-MFC with: r274627 >> >> Modified: >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c >> >> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c >> ============================================================================== >> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 17 >> 14:16:02 2014 (r274627) >> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 17 >> 14:45:42 2014 (r274628) >> @@ -5326,12 +5326,6 @@ l2arc_compress_buf(l2arc_buf_hdr_t *l2hd >> csize = zio_compress_data(ZIO_COMPRESS_LZ4, l2hdr->b_tmp_cdata, >> cdata, l2hdr->b_asize); >> - rounded = P2ROUNDUP(csize, (size_t)SPA_MINBLOCKSIZE); >> - if (rounded > csize) { >> - bzero((char *)cdata + csize, rounded - csize); >> - csize = rounded; >> - } >> - >> if (csize == 0) { >> /* zero block, indicate that there's nothing to write */ >> zio_data_buf_free(cdata, len); >> @@ -5340,11 +5334,19 @@ l2arc_compress_buf(l2arc_buf_hdr_t *l2hd >> l2hdr->b_tmp_cdata = NULL; >> ARCSTAT_BUMP(arcstat_l2_compress_zeros); >> return (B_TRUE); >> - } else if (csize > 0 && csize < len) { >> + } >> + >> + rounded = P2ROUNDUP(csize, >> + (size_t)1 << l2hdr->b_dev->l2ad_vdev->vdev_ashift); >> + if (rounded < len) { >> /* >> * Compression succeeded, we'll keep the cdata around for >> * writing and release it afterwards. >> */ >> + if (rounded > csize) { >> + bzero((char *)cdata + csize, rounded - csize); >> + csize = rounded; >> + } >> l2hdr->b_compress = ZIO_COMPRESS_LZ4; >> l2hdr->b_asize = csize; >> l2hdr->b_tmp_cdata = cdata; >> > -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 15:12:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE9C84B5; Mon, 17 Nov 2014 15:12:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAFF1217; Mon, 17 Nov 2014 15:12:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHFClFb011003; Mon, 17 Nov 2014 15:12:47 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHFClg9011002; Mon, 17 Nov 2014 15:12:47 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201411171512.sAHFClg9011002@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Mon, 17 Nov 2014 15:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274630 - head/usr.sbin/freebsd-update X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 15:12:47 -0000 Author: feld (ports committer) Date: Mon Nov 17 15:12:46 2014 New Revision: 274630 URL: https://svnweb.freebsd.org/changeset/base/274630 Log: Add logic for detecting non-persistent filesystems being utilized by workdir which would break the upgrade process upon reboot. Currently we check for tmpfs and mdmfs. PR: 195006 Differential Revision: https://reviews.freebsd.org/D1163 Approved by: cperciva Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Mon Nov 17 14:56:02 2014 (r274629) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Mon Nov 17 15:12:46 2014 (r274630) @@ -580,6 +580,7 @@ fetchupgrade_check_params () { _KEYPRINT_z="Key must be given via -k option or configuration file." _KEYPRINT_bad="Invalid key fingerprint: " _WORKDIR_bad="Directory does not exist or is not writable: " + _WORKDIR_bad2="Directory is not on a persistent filesystem: " if [ -z "${SERVERNAME}" ]; then echo -n "`basename $0`: " @@ -603,6 +604,14 @@ fetchupgrade_check_params () { echo ${WORKDIR} exit 1 fi + for i in tmpfs mdmfs; do + if df -t ${i} ${WORKDIR} >/dev/null 2>1; then + echo -n "`basename $0`: " + echo -n "${_WORKDIR_bad2}" + echo ${WORKDIR} + exit 1 + fi + done chmod 700 ${WORKDIR} cd ${WORKDIR} || exit 1 From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 15:12:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF5165F6 for ; Mon, 17 Nov 2014 15:12:55 +0000 (UTC) Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 43A4821C for ; Mon, 17 Nov 2014 15:12:54 +0000 (UTC) Received: by mail-wg0-f41.google.com with SMTP id y19so5857171wgg.0 for ; Mon, 17 Nov 2014 07:12:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=GnDdf2rdIYTJfRloTzkXi8DOKW6+Rs9Dws66OIpSct8=; b=NKAIMSPbq2oRSjl20mmxuhkUMAG5nhMNM8tGOxrbhXZukkNkF1I2pQFMV8200Ju7g4 TFTqkiVpWt9mopBGRB6GyTnRLab6gLFXJK3k9mzPy4iWoi1nIAq0MtA7vzRGZx+7tjCL x2PjtM5q2ixfiZG03QezRbdcdXw/XXWl3QSc2m5l8QghXqdNphPCrEUT009+I/lItSgq E/9ospkbUS5eE86/N+TEiTcG2ppWYgi/DOqZBdQzhBsp+cLr87LB9Uyxw9GqHSypVcSs aehyNBVtBGroA5QFCHUP7KWqJNV3/mCUD/ijfpzPXZL+5Kx5u2EuS2JkMDTNS7CCJXrW 4dYA== X-Gm-Message-State: ALoCoQnOMZntiI1+cfcoBlzSEIQnjzUBM/ODZXW/59ZuPdImZgRXY+X4C2o+kipYZ0pt338OfOx5 X-Received: by 10.194.87.34 with SMTP id u2mr34942205wjz.42.1416236765132; Mon, 17 Nov 2014 07:06:05 -0800 (PST) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id s2sm15629437wia.3.2014.11.17.07.05.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Nov 2014 07:05:56 -0800 (PST) From: Steven Hartland X-Google-Original-From: Steven Hartland Message-ID: <546A0ED8.6020104@freebsd.org> Date: Mon, 17 Nov 2014 15:06:00 +0000 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Andriy Gapon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r274628 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201411171445.sAHEjgbE096937@svn.freebsd.org> In-Reply-To: <201411171445.sAHEjgbE096937@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 15:12:55 -0000 Looks like this could have introduced random data corruption, have you seen this in practice? On 17/11/2014 14:45, Andriy Gapon wrote: > Author: avg > Date: Mon Nov 17 14:45:42 2014 > New Revision: 274628 > URL: https://svnweb.freebsd.org/changeset/base/274628 > > Log: > l2arc: restore correct rounding up of asize of compressed data > > This rounding up was lost in a mismerge of illumos code. > See r268075 MFV r267565. > After that commit zio_compress_data() no longer performs any compressed > size adjustment, so it needs to be done externally. On FreeBSD we round > up the size using vdev_ashift rather than SPA_MINBLOCKSIZE so that 4KB > devices are properly supported. > > Additionally, zero out the buffer tail only if compression succeeds. > The compression is considered successful if the size of compressed > data after rounding up to account for the vdev ashift is less than the > original data size. It does not make sense to have the data compressed > if all the savings are lost to rounding up. > With the new zio_compress_data() it could have been possible that the > rounded compressed size would be greater than the original size and thus > we could zero beyond the allocated buffer if the zeroing code was kept > at the original place. > > Discussed with: delphij, gibbs > MFC after: 2 weeks > X-MFC with: r274627 > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 17 14:16:02 2014 (r274627) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 17 14:45:42 2014 (r274628) > @@ -5326,12 +5326,6 @@ l2arc_compress_buf(l2arc_buf_hdr_t *l2hd > csize = zio_compress_data(ZIO_COMPRESS_LZ4, l2hdr->b_tmp_cdata, > cdata, l2hdr->b_asize); > > - rounded = P2ROUNDUP(csize, (size_t)SPA_MINBLOCKSIZE); > - if (rounded > csize) { > - bzero((char *)cdata + csize, rounded - csize); > - csize = rounded; > - } > - > if (csize == 0) { > /* zero block, indicate that there's nothing to write */ > zio_data_buf_free(cdata, len); > @@ -5340,11 +5334,19 @@ l2arc_compress_buf(l2arc_buf_hdr_t *l2hd > l2hdr->b_tmp_cdata = NULL; > ARCSTAT_BUMP(arcstat_l2_compress_zeros); > return (B_TRUE); > - } else if (csize > 0 && csize < len) { > + } > + > + rounded = P2ROUNDUP(csize, > + (size_t)1 << l2hdr->b_dev->l2ad_vdev->vdev_ashift); > + if (rounded < len) { > /* > * Compression succeeded, we'll keep the cdata around for > * writing and release it afterwards. > */ > + if (rounded > csize) { > + bzero((char *)cdata + csize, rounded - csize); > + csize = rounded; > + } > l2hdr->b_compress = ZIO_COMPRESS_LZ4; > l2hdr->b_asize = csize; > l2hdr->b_tmp_cdata = cdata; > From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 15:19:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 566E28D1; Mon, 17 Nov 2014 15:19:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4300F274; Mon, 17 Nov 2014 15:19:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHFJwCZ011912; Mon, 17 Nov 2014 15:19:58 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHFJwQx011911; Mon, 17 Nov 2014 15:19:58 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201411171519.sAHFJwQx011911@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Mon, 17 Nov 2014 15:19:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274631 - head/sbin/geom/core X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 15:19:58 -0000 Author: feld (ports committer) Date: Mon Nov 17 15:19:57 2014 New Revision: 274631 URL: https://svnweb.freebsd.org/changeset/base/274631 Log: Fix geom's "usage" generation to not fabricate usage/help output for any imaginary class we give it. Differential Revision: https://reviews.freebsd.org/D1150 Submitted by: homerj Approved by: pjd Modified: head/sbin/geom/core/geom.c Modified: head/sbin/geom/core/geom.c ============================================================================== --- head/sbin/geom/core/geom.c Mon Nov 17 15:12:46 2014 (r274630) +++ head/sbin/geom/core/geom.c Mon Nov 17 15:19:57 2014 (r274631) @@ -640,6 +640,11 @@ get_class(int *argc, char ***argv) #endif /* !STATIC_GEOM_CLASSES */ set_class_name(); + + /* If we can't load or list, it's not a class. */ + if (!std_available("load") && !std_available("list")) + errx(EXIT_FAILURE, "Invalid class name."); + if (*argc < 1) usage(); } From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 15:27:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78678F72; Mon, 17 Nov 2014 15:27:50 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F22053BB; Mon, 17 Nov 2014 15:27:48 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id sAHFReBC030154 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 17 Nov 2014 18:27:40 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id sAHFReRV030153; Mon, 17 Nov 2014 18:27:40 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 17 Nov 2014 18:27:40 +0300 From: Gleb Smirnoff To: "Alexander V. Chernikov" Subject: Re: svn commit: r274585 - head/sys/net Message-ID: <20141117152740.GP1031@FreeBSD.org> References: <201411161456.sAGEuWVj029737@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201411161456.sAGEuWVj029737@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 15:27:50 -0000 On Sun, Nov 16, 2014 at 02:56:32PM +0000, Alexander V. Chernikov wrote: A> Author: melifaro A> Date: Sun Nov 16 14:56:31 2014 A> New Revision: 274585 A> URL: https://svnweb.freebsd.org/changeset/base/274585 A> A> Log: A> Make witness happy: destroy rte lock before free. A> MFC after: 2 weeks A> Modified: A> head/sys/net/route.c A> A> Modified: head/sys/net/route.c A> ============================================================================== A> --- head/sys/net/route.c Sun Nov 16 13:57:53 2014 (r274584) A> +++ head/sys/net/route.c Sun Nov 16 14:56:31 2014 (r274585) A> @@ -517,6 +517,7 @@ rtfree(struct rtentry *rt) A> /* A> * and the rtentry itself of course A> */ A> + RT_LOCK_DESTROY(rt); A> uma_zfree(V_rtzone, rt); A> return; A> } This is not right fix. The lock will be destroyed second time by rtentry_zfini(). Can you please point me at revision that introduced the problem, you are trying to solve? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 15:28:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89BD5147; Mon, 17 Nov 2014 15:28:27 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E2C23D1; Mon, 17 Nov 2014 15:28:26 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id sAHFSOcJ030169 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 17 Nov 2014 18:28:24 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id sAHFSOvt030168; Mon, 17 Nov 2014 18:28:24 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 17 Nov 2014 18:28:24 +0300 From: Gleb Smirnoff To: "Alexander V. Chernikov" Subject: Re: svn commit: r274585 - head/sys/net Message-ID: <20141117152824.GQ1031@FreeBSD.org> References: <201411161456.sAGEuWVj029737@svn.freebsd.org> <20141117152740.GP1031@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141117152740.GP1031@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 15:28:27 -0000 On Mon, Nov 17, 2014 at 06:27:40PM +0300, Gleb Smirnoff wrote: T> On Sun, Nov 16, 2014 at 02:56:32PM +0000, Alexander V. Chernikov wrote: T> A> Author: melifaro T> A> Date: Sun Nov 16 14:56:31 2014 T> A> New Revision: 274585 T> A> URL: https://svnweb.freebsd.org/changeset/base/274585 T> A> T> A> Log: T> A> Make witness happy: destroy rte lock before free. T> A> MFC after: 2 weeks T> A> Modified: T> A> head/sys/net/route.c T> A> T> A> Modified: head/sys/net/route.c T> A> ============================================================================== T> A> --- head/sys/net/route.c Sun Nov 16 13:57:53 2014 (r274584) T> A> +++ head/sys/net/route.c Sun Nov 16 14:56:31 2014 (r274585) T> A> @@ -517,6 +517,7 @@ rtfree(struct rtentry *rt) T> A> /* T> A> * and the rtentry itself of course T> A> */ T> A> + RT_LOCK_DESTROY(rt); T> A> uma_zfree(V_rtzone, rt); T> A> return; T> A> } T> T> This is not right fix. The lock will be destroyed second time by rtentry_zfini(). T> T> Can you please point me at revision that introduced the problem, you are T> trying to solve? Please ignore me. :) A lag between our yesterday IRC discussion and email. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 15:28:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D7CE14A; Mon, 17 Nov 2014 15:28:29 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C7ED23D3; Mon, 17 Nov 2014 15:28:28 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 8B49525D3AA1; Mon, 17 Nov 2014 15:28:25 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id B42ECC77070; Mon, 17 Nov 2014 15:28:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id O_IdHv8FYch0; Mon, 17 Nov 2014 15:28:23 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6] (orange-tun0-ula.sbone.de [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 02DDBC77042; Mon, 17 Nov 2014 15:28:21 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r274629 - head/sys/netinet From: "Bjoern A. Zeeb" In-Reply-To: <201411171456.sAHEu3VB001748@svn.freebsd.org> Date: Mon, 17 Nov 2014 15:28:20 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <7C2663DD-CCA3-4C76-977C-35EFD11838C6@FreeBSD.org> References: <201411171456.sAHEu3VB001748@svn.freebsd.org> To: Julien Charbon X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 15:28:29 -0000 On 17 Nov 2014, at 14:56 , Julien Charbon wrote: > Author: jch > Date: Mon Nov 17 14:56:02 2014 > New Revision: 274629 > URL: https://svnweb.freebsd.org/changeset/base/274629 >=20 > Log: > Re-introduce padding fields removed with r264321 to keep > struct tcptw ABI unchanged. >=20 > Suggested by: jhb > Approved by: jhb (mentor) > MFC after: 1 day make that 3 days and thanks for putting them back in; I have them in a local change = which makes use of them. > X-MFC-With: r264321 >=20 > Modified: > head/sys/netinet/tcp_var.h >=20 > Modified: head/sys/netinet/tcp_var.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/netinet/tcp_var.h Mon Nov 17 14:45:42 2014 = (r274628) > +++ head/sys/netinet/tcp_var.h Mon Nov 17 14:56:02 2014 = (r274629) > @@ -357,6 +357,8 @@ struct tcptw { > u_int t_starttime; > int tw_time; > TAILQ_ENTRY(tcptw) tw_2msl; > + void *tw_pspare; /* TCP_SIGNATURE */ > + u_int *tw_spare; /* TCP_SIGNATURE */ > }; >=20 > #define intotcpcb(ip) ((struct tcpcb *)(ip)->inp_ppcb) >=20 =97=20 Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 15:33:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 203506D6; Mon, 17 Nov 2014 15:33:15 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id D54C36A1; Mon, 17 Nov 2014 15:33:14 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id E4A58A94B; Mon, 17 Nov 2014 15:33:12 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 3B03F1B99; Mon, 17 Nov 2014 16:33:10 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Garrett Cooper Subject: Re: svn commit: r274618 - in head: etc/mtree lib/msun lib/msun/tests References: <201411170919.sAH9JAEc043258@svn.freebsd.org> <38F8B193-2F8C-42E7-809C-55A2970B0006@gmail.com> Date: Mon, 17 Nov 2014 16:33:10 +0100 In-Reply-To: <38F8B193-2F8C-42E7-809C-55A2970B0006@gmail.com> (Garrett Cooper's message of "Mon, 17 Nov 2014 01:19:56 -0800") Message-ID: <86ppcl6dvt.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 15:33:15 -0000 Garrett Cooper writes: > Sorry. Copy-pasted the wrong commit message. [...] You can do a forced commit: make a trivial modification to every file you want to include in the commit, and then revert it while svn commit is waiting for you to type your commit message. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 15:44:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4995E49E; Mon, 17 Nov 2014 15:44:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35CDBB64; Mon, 17 Nov 2014 15:44:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHFi1uM025008; Mon, 17 Nov 2014 15:44:01 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHFi0aR025006; Mon, 17 Nov 2014 15:44:00 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201411171544.sAHFi0aR025006@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Mon, 17 Nov 2014 15:44:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274632 - head/usr.sbin/pw/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 15:44:01 -0000 Author: brd (doc committer) Date: Mon Nov 17 15:44:00 2014 New Revision: 274632 URL: https://svnweb.freebsd.org/changeset/base/274632 Log: Clean up some language Reviewed by: will Modified: head/usr.sbin/pw/tests/pw_delete.sh head/usr.sbin/pw/tests/pw_etcdir.sh Modified: head/usr.sbin/pw/tests/pw_delete.sh ============================================================================== --- head/usr.sbin/pw/tests/pw_delete.sh Mon Nov 17 15:19:57 2014 (r274631) +++ head/usr.sbin/pw/tests/pw_delete.sh Mon Nov 17 15:44:00 2014 (r274632) @@ -15,33 +15,33 @@ rmuser_seperate_group_body() { pw -V ${HOME} useradd test || atf_fail "Creating test user" pw -V ${HOME} groupmod test -M 'test,root' || \ atf_fail "Modifying the group" - pw -V ${HOME} userdel test || atf_fail "delete the user" + pw -V ${HOME} userdel test || atf_fail "Delete the test user" } -atf_test_case group_do_not_delete_wheel_if_group_unkown -group_do_not_delete_wheel_if_group_unkown_head() { - atf_set "descr" "Make sure we do not consider as gid 0 an unknown group" +atf_test_case group_do_not_delete_wheel_if_group_unknown +group_do_not_delete_wheel_if_group_unknown_head() { + atf_set "descr" "Make sure we do not consider gid 0 an unknown group" } -group_do_not_delete_wheel_if_group_unkown_body() { +group_do_not_delete_wheel_if_group_unknown_body() { populate_etc_skel atf_check -s exit:0 -o inline:"wheel:*:0:root\n" -x pw -V ${HOME} groupshow wheel atf_check -e inline:"pw: -g expects a number\n" -s exit:64 -x pw -V ${HOME} groupdel -g I_do_not_exist atf_check -s exit:0 -o inline:"wheel:*:0:root\n" -x pw -V ${HOME} groupshow wheel } -atf_test_case user_do_not_try_to_delete_root_if_user_unkown -user_do_not_try_to_delete_root_if_user_unkown_head() { - atf_set "descr" "Make sure not to try to remove root if deleteing an unknown user" +atf_test_case user_do_not_try_to_delete_root_if_user_unknown +user_do_not_try_to_delete_root_if_user_unknown_head() { + atf_set "descr" "Make sure not to try to remove root if deleting an unknown user" } -user_do_not_try_to_delete_root_if_user_unkown_body() { +user_do_not_try_to_delete_root_if_user_unknown_body() { populate_etc_skel atf_check -e inline:"pw: -u expects a number\n" -s exit:64 -x pw -V ${HOME} userdel -u plop } atf_init_test_cases() { atf_add_test_case rmuser_seperate_group - atf_add_test_case group_do_not_delete_wheel_if_group_unkown - atf_add_test_case user_do_not_try_to_delete_root_if_user_unkown + atf_add_test_case group_do_not_delete_wheel_if_group_unknown + atf_add_test_case user_do_not_try_to_delete_root_if_user_unknown } Modified: head/usr.sbin/pw/tests/pw_etcdir.sh ============================================================================== --- head/usr.sbin/pw/tests/pw_etcdir.sh Mon Nov 17 15:19:57 2014 (r274631) +++ head/usr.sbin/pw/tests/pw_etcdir.sh Mon Nov 17 15:44:00 2014 (r274632) @@ -1,18 +1,18 @@ # $FreeBSD$ -# When provide -V dir, dir must exists -atf_test_case etcdir_must_exists -etcdir_must_exists_head() { - atf_set "descr" "When provide -V dir, dir must exists" +# When the '-V directory' option is provided, the directory must exist +atf_test_case etcdir_must_exist +etcdir_must_exist_head() { + atf_set "descr" "When the '-V directory' option is provided, the directory must exist" } -etcdir_must_exists_body() { - local fakedir="/this_directory_does_not_exists" +etcdir_must_exist_body() { + local fakedir="/this_directory_does_not_exist" atf_check -e inline:"pw: no such directory \`$fakedir'\n" \ -s exit:72 -x pw -V ${fakedir} usershow root } atf_init_test_cases() { - atf_add_test_case etcdir_must_exists + atf_add_test_case etcdir_must_exist } From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 15:52:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E2D978E; Mon, 17 Nov 2014 15:52:49 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4107AC53; Mon, 17 Nov 2014 15:52:49 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XqObf-0009u9-Mb; Mon, 17 Nov 2014 15:52:47 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id sAHFqkVx003845; Mon, 17 Nov 2014 08:52:46 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+Vkyz7MnFc5NsjbObVP4Xm X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r274630 - head/usr.sbin/freebsd-update From: Ian Lepore To: Mark Felder In-Reply-To: <201411171512.sAHFClg9011002@svn.freebsd.org> References: <201411171512.sAHFClg9011002@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Mon, 17 Nov 2014 08:52:46 -0700 Message-ID: <1416239566.1147.8.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 15:52:49 -0000 On Mon, 2014-11-17 at 15:12 +0000, Mark Felder wrote: > Author: feld (ports committer) > Date: Mon Nov 17 15:12:46 2014 > New Revision: 274630 > URL: https://svnweb.freebsd.org/changeset/base/274630 > > Log: > Add logic for detecting non-persistent filesystems being utilized by > workdir which would break the upgrade process upon reboot. > > Currently we check for tmpfs and mdmfs. > > PR: 195006 > Differential Revision: https://reviews.freebsd.org/D1163 > Approved by: cperciva > > Modified: > head/usr.sbin/freebsd-update/freebsd-update.sh > > Modified: head/usr.sbin/freebsd-update/freebsd-update.sh > ============================================================================== > --- head/usr.sbin/freebsd-update/freebsd-update.sh Mon Nov 17 14:56:02 2014 (r274629) > +++ head/usr.sbin/freebsd-update/freebsd-update.sh Mon Nov 17 15:12:46 2014 (r274630) > @@ -580,6 +580,7 @@ fetchupgrade_check_params () { > _KEYPRINT_z="Key must be given via -k option or configuration file." > _KEYPRINT_bad="Invalid key fingerprint: " > _WORKDIR_bad="Directory does not exist or is not writable: " > + _WORKDIR_bad2="Directory is not on a persistent filesystem: " > > if [ -z "${SERVERNAME}" ]; then > echo -n "`basename $0`: " > @@ -603,6 +604,14 @@ fetchupgrade_check_params () { > echo ${WORKDIR} > exit 1 > fi > + for i in tmpfs mdmfs; do > + if df -t ${i} ${WORKDIR} >/dev/null 2>1; then > + echo -n "`basename $0`: " > + echo -n "${_WORKDIR_bad2}" > + echo ${WORKDIR} > + exit 1 > + fi > + done > chmod 700 ${WORKDIR} > cd ${WORKDIR} || exit 1 > > This doesn't look quite right. There is no mdmfs filesystem, that's just the name of the tool that creates a UFS filesystem on an md(4) device. On one of my systems where /var is set up by /etc/rc.d/var and /tmp by an fstab entry of: "md /tmp mfs rw,noatime,-s128m 0 0" I see this from df: root@bb:~ # df -hT Filesystem Type Size Used Avail Capacity Mounted on 172.22.42.240:/bb nfs 504G 280G 184G 60% / devfs devfs 1.0K 1.0K 0B 100% /dev /dev/md0 ufs 124M 24K 114M 0% /tmp /dev/md1 ufs 31M 360K 28M 1% /var Something like this should work: case $(df -T ${WORKDIR}) in */dev/md[0-9]* | *tmpfs* ) echo error messages and stuff exit 1 ;; esac -- Ian From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 16:14:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF781C84 for ; Mon, 17 Nov 2014 16:14:11 +0000 (UTC) Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D090E6C for ; Mon, 17 Nov 2014 16:14:11 +0000 (UTC) Received: by mail-wi0-f171.google.com with SMTP id bs8so3733162wib.16 for ; Mon, 17 Nov 2014 08:14:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=B5szRIx2USh2sW74sGOlu7w/XvjW1ORHfKnnoXL6Z0s=; b=ZhDKnSP+8ZzF7cF/84OU2rIGP7HnQr9pHpqkx+fTIzvzhizb9PTO69BLSZWo7yXqIa fCXVNJEE6hB4bK0YK9hlQzPSZNUV4ZjN8GNBh6sgC6k6N+DD5/2mRLhMWNa7Bh40z7lk ewx+vIIL8XSnXnbNEtP0XJhF13CLRuKHHfkFvT9vqSR7+J4CkCz5UvxJaB5XhC2OAd09 Y+EuY563UkEpQNtbTqdX/2StHKU5uwOvgwOMVCXYe9haR2HynuWmGVKoSLq3wlq6OtDq qyaLJK0cLRS5hyVuwZ4JPypQIblL16hP9jVKLISsr97BQrMlsmrd4+dS2AsllhAYFJcX u6Sg== X-Gm-Message-State: ALoCoQnTXuab4N2TIZgcVrr2lRXDqDkfgYOrjvIqMIgUQKFB3FZ3oezxE+j+pdP/hv22QwwCad9/ X-Received: by 10.180.10.231 with SMTP id l7mr32608170wib.1.1416240841201; Mon, 17 Nov 2014 08:14:01 -0800 (PST) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id p8sm19143187wia.1.2014.11.17.08.14.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Nov 2014 08:14:00 -0800 (PST) Message-ID: <546A1ECC.7000301@multiplay.co.uk> Date: Mon, 17 Nov 2014 16:14:04 +0000 From: Steven Hartland User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Andriy Gapon , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r274628 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201411171445.sAHEjgbE096937@svn.freebsd.org> <546A0ED8.6020104@freebsd.org> <546A0F1E.5050305@FreeBSD.org> In-Reply-To: <546A0F1E.5050305@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 16:14:12 -0000 On 17/11/2014 15:07, Andriy Gapon wrote: > On 17/11/2014 17:06, Steven Hartland wrote: >> Looks like this could have introduced random data corruption, have you seen this >> in practice? > Which part exactly? The part where it zeroed beyond the allocated buffer. >> On 17/11/2014 14:45, Andriy Gapon wrote: >>> Author: avg >>> Date: Mon Nov 17 14:45:42 2014 >>> New Revision: 274628 >>> URL: https://svnweb.freebsd.org/changeset/base/274628 >>> >>> Log: >>> l2arc: restore correct rounding up of asize of compressed data >>> This rounding up was lost in a mismerge of illumos code. >>> See r268075 MFV r267565. >>> After that commit zio_compress_data() no longer performs any compressed >>> size adjustment, so it needs to be done externally. On FreeBSD we round >>> up the size using vdev_ashift rather than SPA_MINBLOCKSIZE so that 4KB >>> devices are properly supported. >>> Additionally, zero out the buffer tail only if compression succeeds. >>> The compression is considered successful if the size of compressed >>> data after rounding up to account for the vdev ashift is less than the >>> original data size. It does not make sense to have the data compressed >>> if all the savings are lost to rounding up. >>> With the new zio_compress_data() it could have been possible that the >>> rounded compressed size would be greater than the original size and thus >>> we could zero beyond the allocated buffer if the zeroing code was kept >>> at the original place. >>> Discussed with: delphij, gibbs >>> MFC after: 2 weeks >>> X-MFC with: r274627 >>> >>> Modified: >>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c >>> >>> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c >>> ============================================================================== >>> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 17 >>> 14:16:02 2014 (r274627) >>> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 17 >>> 14:45:42 2014 (r274628) >>> @@ -5326,12 +5326,6 @@ l2arc_compress_buf(l2arc_buf_hdr_t *l2hd >>> csize = zio_compress_data(ZIO_COMPRESS_LZ4, l2hdr->b_tmp_cdata, >>> cdata, l2hdr->b_asize); >>> - rounded = P2ROUNDUP(csize, (size_t)SPA_MINBLOCKSIZE); >>> - if (rounded > csize) { >>> - bzero((char *)cdata + csize, rounded - csize); >>> - csize = rounded; >>> - } >>> - >>> if (csize == 0) { >>> /* zero block, indicate that there's nothing to write */ >>> zio_data_buf_free(cdata, len); >>> @@ -5340,11 +5334,19 @@ l2arc_compress_buf(l2arc_buf_hdr_t *l2hd >>> l2hdr->b_tmp_cdata = NULL; >>> ARCSTAT_BUMP(arcstat_l2_compress_zeros); >>> return (B_TRUE); >>> - } else if (csize > 0 && csize < len) { >>> + } >>> + >>> + rounded = P2ROUNDUP(csize, >>> + (size_t)1 << l2hdr->b_dev->l2ad_vdev->vdev_ashift); >>> + if (rounded < len) { >>> /* >>> * Compression succeeded, we'll keep the cdata around for >>> * writing and release it afterwards. >>> */ >>> + if (rounded > csize) { >>> + bzero((char *)cdata + csize, rounded - csize); >>> + csize = rounded; >>> + } >>> l2hdr->b_compress = ZIO_COMPRESS_LZ4; >>> l2hdr->b_asize = csize; >>> l2hdr->b_tmp_cdata = cdata; >>> > From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 16:29:35 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E5941CA; Mon, 17 Nov 2014 16:29:35 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 8D4E7FC1; Mon, 17 Nov 2014 16:29:34 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA11508; Mon, 17 Nov 2014 18:31:25 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XqPBE-00021m-DC; Mon, 17 Nov 2014 18:29:32 +0200 Message-ID: <546A2248.5000400@FreeBSD.org> Date: Mon, 17 Nov 2014 18:28:56 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Steven Hartland , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r274628 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201411171445.sAHEjgbE096937@svn.freebsd.org> <546A0ED8.6020104@freebsd.org> <546A0F1E.5050305@FreeBSD.org> <546A1ECC.7000301@multiplay.co.uk> In-Reply-To: <546A1ECC.7000301@multiplay.co.uk> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 16:29:35 -0000 On 17/11/2014 18:14, Steven Hartland wrote: > > On 17/11/2014 15:07, Andriy Gapon wrote: >> On 17/11/2014 17:06, Steven Hartland wrote: >>> Looks like this could have introduced random data corruption, have you seen this >>> in practice? >> Which part exactly? > The part where it zeroed beyond the allocated buffer. Oh, maybe I worded the commit message badly, but I wanted to say was that *if* I replaced SPA_MINBLOCKSIZE with vdev_ashift, but left the zeroing code where it was before, then there would be zeroing beyond the buffer. There was no corruption with the previous code. >>> On 17/11/2014 14:45, Andriy Gapon wrote: >>>> Author: avg >>>> Date: Mon Nov 17 14:45:42 2014 >>>> New Revision: 274628 >>>> URL: https://svnweb.freebsd.org/changeset/base/274628 >>>> >>>> Log: >>>> l2arc: restore correct rounding up of asize of compressed data >>>> This rounding up was lost in a mismerge of illumos code. >>>> See r268075 MFV r267565. >>>> After that commit zio_compress_data() no longer performs any compressed >>>> size adjustment, so it needs to be done externally. On FreeBSD we round >>>> up the size using vdev_ashift rather than SPA_MINBLOCKSIZE so that 4KB >>>> devices are properly supported. >>>> Additionally, zero out the buffer tail only if compression succeeds. >>>> The compression is considered successful if the size of compressed >>>> data after rounding up to account for the vdev ashift is less than the >>>> original data size. It does not make sense to have the data compressed >>>> if all the savings are lost to rounding up. >>>> With the new zio_compress_data() it could have been possible that the >>>> rounded compressed size would be greater than the original size and thus >>>> we could zero beyond the allocated buffer if the zeroing code was kept >>>> at the original place. >>>> Discussed with: delphij, gibbs >>>> MFC after: 2 weeks >>>> X-MFC with: r274627 >>>> >>>> Modified: >>>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c >>>> >>>> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c >>>> ============================================================================== >>>> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 17 >>>> 14:16:02 2014 (r274627) >>>> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 17 >>>> 14:45:42 2014 (r274628) >>>> @@ -5326,12 +5326,6 @@ l2arc_compress_buf(l2arc_buf_hdr_t *l2hd >>>> csize = zio_compress_data(ZIO_COMPRESS_LZ4, l2hdr->b_tmp_cdata, >>>> cdata, l2hdr->b_asize); >>>> - rounded = P2ROUNDUP(csize, (size_t)SPA_MINBLOCKSIZE); >>>> - if (rounded > csize) { >>>> - bzero((char *)cdata + csize, rounded - csize); >>>> - csize = rounded; >>>> - } >>>> - >>>> if (csize == 0) { >>>> /* zero block, indicate that there's nothing to write */ >>>> zio_data_buf_free(cdata, len); >>>> @@ -5340,11 +5334,19 @@ l2arc_compress_buf(l2arc_buf_hdr_t *l2hd >>>> l2hdr->b_tmp_cdata = NULL; >>>> ARCSTAT_BUMP(arcstat_l2_compress_zeros); >>>> return (B_TRUE); >>>> - } else if (csize > 0 && csize < len) { >>>> + } >>>> + >>>> + rounded = P2ROUNDUP(csize, >>>> + (size_t)1 << l2hdr->b_dev->l2ad_vdev->vdev_ashift); >>>> + if (rounded < len) { >>>> /* >>>> * Compression succeeded, we'll keep the cdata around for >>>> * writing and release it afterwards. >>>> */ >>>> + if (rounded > csize) { >>>> + bzero((char *)cdata + csize, rounded - csize); >>>> + csize = rounded; >>>> + } >>>> l2hdr->b_compress = ZIO_COMPRESS_LZ4; >>>> l2hdr->b_asize = csize; >>>> l2hdr->b_tmp_cdata = cdata; >>>> >> > -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 16:30:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C7D932E; Mon, 17 Nov 2014 16:30:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64529B7; Mon, 17 Nov 2014 16:30:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHGUqWw045292; Mon, 17 Nov 2014 16:30:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHGUqXB045291; Mon, 17 Nov 2014 16:30:52 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201411171630.sAHGUqXB045291@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 17 Nov 2014 16:30:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274633 - head/sys/dev/pccbb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 16:30:52 -0000 Author: imp Date: Mon Nov 17 16:30:51 2014 New Revision: 274633 URL: https://svnweb.freebsd.org/changeset/base/274633 Log: Remove stray empty comment. The code is adequately explained in the block comment above, so there's nothing to add here. Modified: head/sys/dev/pccbb/pccbb.c Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Mon Nov 17 15:44:00 2014 (r274632) +++ head/sys/dev/pccbb/pccbb.c Mon Nov 17 16:30:51 2014 (r274633) @@ -992,8 +992,6 @@ cbb_cardbus_reset_power(device_t brdev, * a cardbus bus, so that's the only register we check here. */ if (on && CBB_CARD_PRESENT(cbb_get(sc, CBB_SOCKET_STATE))) { - /* - */ PCI_MASK_CONFIG(brdev, CBBR_BRIDGECTRL, &~CBBM_BRIDGECTRL_RESET, 2); b = pcib_get_bus(child); From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 17:17:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9DB1625; Mon, 17 Nov 2014 17:17:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 956C1880; Mon, 17 Nov 2014 17:17:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHHHBkn067302; Mon, 17 Nov 2014 17:17:11 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHHHBFw067301; Mon, 17 Nov 2014 17:17:11 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201411171717.sAHHHBFw067301@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 17 Nov 2014 17:17:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274634 - stable/10/usr.bin/mkimg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 17:17:11 -0000 Author: marcel Date: Mon Nov 17 17:17:10 2014 New Revision: 274634 URL: https://svnweb.freebsd.org/changeset/base/274634 Log: MFC r274410: Fix for behaviour of SEEK_DATA on ZFS. Modified: stable/10/usr.bin/mkimg/image.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/mkimg/image.c ============================================================================== --- stable/10/usr.bin/mkimg/image.c Mon Nov 17 16:30:51 2014 (r274633) +++ stable/10/usr.bin/mkimg/image.c Mon Nov 17 17:17:10 2014 (r274634) @@ -405,16 +405,18 @@ image_copyin_mapped(lba_t blk, int fd, u error = 0; while (!error && cur < end) { hole = lseek(fd, cur, SEEK_HOLE); + if (hole == -1) + hole = end; data = lseek(fd, cur, SEEK_DATA); + if (data == -1) + data = end; /* * Treat the entire file as data if sparse files * are not supported by the underlying file system. */ - if (hole == -1 && data == -1) { + if (hole == end && data == end) data = cur; - hole = end; - } if (cur == hole && data > hole) { hole = pos; From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 18:09:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B6B587F; Mon, 17 Nov 2014 18:09:55 +0000 (UTC) Received: from dmz-mailsec-scanner-1.mit.edu (dmz-mailsec-scanner-1.mit.edu [18.9.25.12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2B9CDD1; Mon, 17 Nov 2014 18:09:54 +0000 (UTC) X-AuditID: 1209190c-f795e6d000006c66-4d-546a39ebd82f Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) (using TLS with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP id 12.EF.27750.BE93A645; Mon, 17 Nov 2014 13:09:47 -0500 (EST) Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id sAHI9jhg024048; Mon, 17 Nov 2014 13:09:46 -0500 Received: from multics.mit.edu (system-low-sipb.mit.edu [18.187.2.37]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id sAHI9huX031529 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 17 Nov 2014 13:09:44 -0500 Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id sAHI9gBV006317; Mon, 17 Nov 2014 13:09:43 -0500 (EST) Date: Mon, 17 Nov 2014 13:09:42 -0500 (EST) From: Benjamin Kaduk X-X-Sender: kaduk@multics.mit.edu To: Xin Li Subject: Re: svn commit: r274583 - head/usr.sbin/watchdogd In-Reply-To: <54698F93.2030700@delphij.net> Message-ID: References: <201411160944.sAG9iUTJ084769@svn.freebsd.org> <54698F93.2030700@delphij.net> User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprBKsWRmVeSWpSXmKPExsUixG6nrvvaMivE4EyHgMWxh0fZLXbs3c5i 8ad9CpDYtJDVounLAiYHVo//s+4wecz4NJ/FY+esu+wBzFFcNimpOZllqUX6dglcGfOfChV8 Y6s42fqUtYFxH2sXIweHhICJxO13fF2MnECmmMSFe+vZuhi5OIQEZjNJPJ+4gB3C2cgo0XDo PiOEc4hJ4s2NWawQTgOjRMfVFUwgo1gEtCXev/UFGcUmoCbxeG8zK8RYRYnNpyYxg9giAgoS m3ZvYQLpZRZ4wSjRdHgeI0hCWMBKorP/DtgcTqA5x+dagIR5BRwl3r3dywSxay6jxLvGI2BD RQV0JFbvn8ICUSQocXLmEzCbWUBLYvn0bSwTGIVmIUnNQpJawMi0ilE2JbdKNzcxM6c4NVm3 ODkxLy+1SNdQLzezRC81pXQTIyjQOSV5djC+Oah0iFGAg1GJh3dHdmaIEGtiWXFl7iFGSQ4m JVHeNMOsECG+pPyUyozE4oz4otKc1OJDjBIczEoivFomQDnelMTKqtSifJiUNAeLkjjvph98 IUIC6YklqdmpqQWpRTBZGQ4OJQne+xZAjYJFqempFWmZOSUIaSYOTpDhPEDDP4HU8BYXJOYW Z6ZD5E8x6nK0NL3tZRJiycvPS5US52UAphghAZCijNI8uDmwBPWKURzoLWFeDpAqHmByg5v0 CmgJE9CSORsyQZaUJCKkpBoYPZbr3u2YdXXV2sqz6e9/mn+Z8uDWxQ8R197l+muwP9S6xqB+ WuhGjWVhWETO5NpjjSmfPt9Qs5NiV5o4U8LMLP3etPux1XcPOVs7BB89OPHZ3rLkTKfFDwIf PV9xaBlrzsPl6Sp5aZYW7BMmBtZ2L1ixOmJmBLdMEr928sYNS9fvtvvz4c31UiWW4oxEQy3m ouJEAKCijF8rAwAA Cc: Benjamin Kaduk , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 18:09:55 -0000 On Mon, 17 Nov 2014, Xin Li wrote: > On 11/16/14 13:46, Benjamin Kaduk wrote: > > On Sun, Nov 16, 2014 at 4:44 AM, Xin LI > > wrote: > > > > Author: delphij Date: Sun Nov 16 09:44:30 2014 New Revision: > > 274583 URL: https://svnweb.freebsd.org/changeset/base/274583 > > > > Log: Default to use 10 seconds as nap interval instead of 1. > > > > relnotes: yes? > > I'm not sure -- no objection but is this noteworthy? Well, I'm not sure, either. It seems borderline to me, but IIRC Glen had asked us to err on the side of using relnotes: yes too often instead of too little. It seems like this could fall under "a change of default configuration that would result in a noticeable behavior change" for some systems, but probably not a particularly large number. I don't have strong feelings either way. -Ben From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 18:43:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F07AB5AA; Mon, 17 Nov 2014 18:43:39 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CBE37241; Mon, 17 Nov 2014 18:43:39 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [12.229.62.2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 99D0C22BED; Mon, 17 Nov 2014 10:43:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1416249818; x=1416264218; bh=M38WlMs+byjH198guWG0V7Y88dl+XQ9os9C0IuypWk0=; h=Date:From:Reply-To:To:Subject:References:In-Reply-To; b=AcPWMJU5uGqfpSsv2rh117GjpcXBiAyCN2tCdwwoyC2lAwW+xzZDXhuWYnB3Q7yKv V07QhodUl9BR8kwATMzkCBMHBxYLF0M5MvxRWxDkz75QQyDN9nTUH208jcrHn/+gSe 3ohzxzSxt8mvuNpJmy19iRsV0D+Lo3dA2DXHMF2s= Message-ID: <546A41DA.9020008@delphij.net> Date: Mon, 17 Nov 2014 10:43:38 -0800 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r274619 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201411171132.sAHBWBMU006778@svn.freebsd.org> In-Reply-To: <201411171132.sAHBWBMU006778@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 18:43:40 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 11/17/14 03:32, Steven Hartland wrote: > Author: smh Date: Mon Nov 17 11:32:10 2014 New Revision: 274619 > URL: https://svnweb.freebsd.org/changeset/base/274619 > > Log: Disable TRIM on file backed ZFS vdevs and fix TRIM on init > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c > ============================================================================== > > - --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Mon Nov 17 09:19:09 2014 (r274618) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c > Mon Nov 17 11:32:10 2014 (r274619) @@ -796,6 +796,8 @@ > vdev_disk_io_start(zio_t *zio) return; } > > + ASSERT(zio->io_type == ZIO_TYPE_READ || zio->io_type == > ZIO_TYPE_WRITE); + vb = kmem_alloc(sizeof (vdev_buf_t), KM_SLEEP); > > vb->vb_io = zio; > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c > ============================================================================== > > - --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Mon Nov 17 09:19:09 2014 (r274618) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c > Mon Nov 17 11:32:10 2014 (r274619) @@ -129,6 +129,8 @@ skip_open: > return (error); } > > + vd->vdev_notrim = B_TRUE; + *max_psize = *psize = vattr.va_size; > *logical_ashift = SPA_MINBLOCKSHIFT; *physical_ashift = > SPA_MINBLOCKSHIFT; @@ -185,6 +187,8 @@ vdev_file_io_start(zio_t > *zio) return; } > > + ASSERT(zio->io_type == ZIO_TYPE_READ || zio->io_type == > ZIO_TYPE_WRITE); + zio->io_error = vn_rdwr(zio->io_type == > ZIO_TYPE_READ ? UIO_READ : UIO_WRITE, vp, zio->io_data, > zio->io_size, zio->io_offset, UIO_SYSSPACE, 0, RLIM64_INFINITY, > kcred, &resid); > Please upstream both file's assertion changes. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0 iQIcBAEBCgAGBQJUakHZAAoJEJW2GBstM+nsBCsP/REPNGaorCxDk77Q18wu/lS6 tL5g9FrGeFJINKlgGSGgr3mStrWGNCTKPxErK6kbEitX2P47ynMuHxQu3M2UzmUr OANSiqHn0bJ0thv8FOE4ldbxO5i8uI9XfpfCX65yZS+TeDsOWMp8TuVUJqHkZdXD zPEV/isfewgUQ3UIC0ECy5v2BpnnzdsjziLsi0vmJ9Zcx5SD7Pkna9FlJiwWT53G 5NF2JYhTpbNlPacI+vMFPSYMmqaT4o32tx9JP0VJqjGU6RPkXSu9Id6m4CbFpVDD 5ak6iMLkdiCasGQ9g/+CMkOBLu3I/bomZvg/NVZEQ4rhKu8uZ3Mx67nL1f/KXq1R s66VI765yqmgWIhxHqYtOCWTZ73Fs9zwe7hluh3x9tQ6tphOD/LG05nxQiRt9XoI FC5eA6SrKNNfNM1P+HQ21fTJbHt3fvn8Y+WAS60bK5KjW7DI8zCirSlUmF0Euyn0 xXeh9xQtEtiX+trOSphrcg5445mXcGUenj2qmcwkufHfQ39stGkvSJ28yRiLqegc NMcxTkbup/1puH0dDaLGl2+k+RTfX7Z4PyaetqTSTJ1LX6bNAkICCVo/kM4gpKIT 1vxwOzHPTrEOzUOF7M+em5Uqh5sdBBbgxqI9HkpBgqbmYIDUg2SpH5XTGMDazdnO kHNe8ABOdFm2zf2uyG+O =Ffj/ -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 18:52:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D918956; Mon, 17 Nov 2014 18:52:37 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C99C370; Mon, 17 Nov 2014 18:52:37 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XqRPf-00031S-KB; Mon, 17 Nov 2014 18:52:35 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id sAHIqQvR004256; Mon, 17 Nov 2014 11:52:26 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19Cv5V6wwt+24imr1eR1SkZ X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r274583 - head/usr.sbin/watchdogd From: Ian Lepore To: Benjamin Kaduk In-Reply-To: References: <201411160944.sAG9iUTJ084769@svn.freebsd.org> <54698F93.2030700@delphij.net> Content-Type: text/plain; charset="us-ascii" Date: Mon, 17 Nov 2014 11:52:21 -0700 Message-ID: <1416250341.1147.29.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Benjamin Kaduk , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Xin Li X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 18:52:37 -0000 On Mon, 2014-11-17 at 13:09 -0500, Benjamin Kaduk wrote: > On Mon, 17 Nov 2014, Xin Li wrote: > > > On 11/16/14 13:46, Benjamin Kaduk wrote: > > > On Sun, Nov 16, 2014 at 4:44 AM, Xin LI > > > wrote: > > > > > > Author: delphij Date: Sun Nov 16 09:44:30 2014 New Revision: > > > 274583 URL: https://svnweb.freebsd.org/changeset/base/274583 > > > > > > Log: Default to use 10 seconds as nap interval instead of 1. > > > > > > relnotes: yes? > > > > I'm not sure -- no objection but is this noteworthy? > > Well, I'm not sure, either. It seems borderline to me, but IIRC Glen had > asked us to err on the side of using relnotes: yes too often instead of > too little. It seems like this could fall under "a change of default > configuration that would result in a noticeable behavior change" for some > systems, but probably not a particularly large number. > > I don't have strong feelings either way. > > -Ben > I think the only way you would see a behavior change is if we had a system whose max timeout was under 10 seconds. The shortest I know of are some arm systems whose max is 16 seconds. -- Ian From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 20:25:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D76D9E4B; Mon, 17 Nov 2014 20:25:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C469DFCD; Mon, 17 Nov 2014 20:25:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHKPLfO055667; Mon, 17 Nov 2014 20:25:21 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHKPLMl055666; Mon, 17 Nov 2014 20:25:21 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201411172025.sAHKPLMl055666@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Mon, 17 Nov 2014 20:25:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274635 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 20:25:22 -0000 Author: dchagin Date: Mon Nov 17 20:25:21 2014 New Revision: 274635 URL: https://svnweb.freebsd.org/changeset/base/274635 Log: Use the correct device as the power_for_sleep() method always pass request up to parent bridge. Reviewed by: jhb MFC after: 1 week xMFC: r274386,r274397 Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Mon Nov 17 17:17:10 2014 (r274634) +++ head/sys/dev/pci/pci.c Mon Nov 17 20:25:21 2014 (r274635) @@ -3637,7 +3637,6 @@ static void pci_set_power_child(device_t dev, device_t child, int state) { struct pci_devinfo *dinfo; - device_t pcib; int dstate; /* @@ -3647,11 +3646,10 @@ pci_set_power_child(device_t dev, device * device power. Skip children who aren't attached since they * are handled separately. */ - pcib = device_get_parent(dev); dinfo = device_get_ivars(child); dstate = state; if (device_is_attached(child) && - PCIB_POWER_FOR_SLEEP(pcib, child, &dstate) == 0) + PCIB_POWER_FOR_SLEEP(dev, child, &dstate) == 0) pci_set_powerstate(child, dstate); } From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 21:01:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04BFED9; Mon, 17 Nov 2014 21:01:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E606C665; Mon, 17 Nov 2014 21:01:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHL1ZDh074281; Mon, 17 Nov 2014 21:01:35 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHL1ZZ7074280; Mon, 17 Nov 2014 21:01:35 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201411172101.sAHL1ZZ7074280@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 17 Nov 2014 21:01:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274636 - head/sys/libkern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 21:01:36 -0000 Author: delphij Date: Mon Nov 17 21:01:35 2014 New Revision: 274636 URL: https://svnweb.freebsd.org/changeset/base/274636 Log: Sync with userland variant. MFC after: 2 weeks Modified: head/sys/libkern/strncmp.c Modified: head/sys/libkern/strncmp.c ============================================================================== --- head/sys/libkern/strncmp.c Mon Nov 17 20:25:21 2014 (r274635) +++ head/sys/libkern/strncmp.c Mon Nov 17 21:01:35 2014 (r274636) @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -33,9 +33,7 @@ __FBSDID("$FreeBSD$"); #include int -strncmp(s1, s2, n) - register const char *s1, *s2; - register size_t n; +strncmp(const char *s1, const char *s2, size_t n) { if (n == 0) @@ -44,7 +42,7 @@ strncmp(s1, s2, n) if (*s1 != *s2++) return (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1)); - if (*s1++ == 0) + if (*s1++ == '\0') break; } while (--n != 0); return (0); From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 22:22:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F143C0E; Mon, 17 Nov 2014 22:22:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AE2EF2F; Mon, 17 Nov 2014 22:22:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHMMHgR012920; Mon, 17 Nov 2014 22:22:17 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHMMHCs012916; Mon, 17 Nov 2014 22:22:17 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201411172222.sAHMMHCs012916@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 17 Nov 2014 22:22:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274637 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 22:22:18 -0000 Author: markj Date: Mon Nov 17 22:22:16 2014 New Revision: 274637 URL: https://svnweb.freebsd.org/changeset/base/274637 Log: DTrace imposes a 128-byte limit on the length of the function component of a probe name. When dtrace -G builds up a DOF section for the specified provider(s), the probe function names are truncated to fit in this limit. The DOF is later used to build the symbol table for the generated object file, so the table can end up with truncated references, causing link errors. Instead of potentially truncating symbol table entries, write the full function name to the DOF string table and allow the kernel to enforce the 128-byte function name limit when a process attempts to load its DOF. PR: 194757 Differential Revision: https://reviews.freebsd.org/D1175 Reviewed by: rpaulo MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.h Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c Mon Nov 17 21:01:35 2014 (r274636) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c Mon Nov 17 22:22:16 2014 (r274637) @@ -469,7 +469,7 @@ dof_add_probe(dt_idhash_t *dhp, dt_ident * locally so an alternate symbol is added for the purpose * of this relocation. */ - if (pip->pi_rname[0] == '\0') + if (pip->pi_rname == NULL) dofr.dofr_name = dofpr.dofpr_func; else dofr.dofr_name = dof_add_string(ddo, pip->pi_rname); Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c Mon Nov 17 21:01:35 2014 (r274636) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c Mon Nov 17 22:22:16 2014 (r274637) @@ -520,6 +520,8 @@ dt_probe_destroy(dt_probe_t *prp) for (pip = prp->pr_inst; pip != NULL; pip = pip_next) { pip_next = pip->pi_next; + dt_free(dtp, pip->pi_rname); + dt_free(dtp, pip->pi_fname); dt_free(dtp, pip->pi_offs); dt_free(dtp, pip->pi_enoffs); dt_free(dtp, pip); @@ -552,28 +554,18 @@ dt_probe_define(dt_provider_t *pvp, dt_p if ((pip = dt_zalloc(dtp, sizeof (*pip))) == NULL) return (-1); - if ((pip->pi_offs = dt_zalloc(dtp, - sizeof (uint32_t))) == NULL) { - dt_free(dtp, pip); - return (-1); - } + if ((pip->pi_offs = dt_zalloc(dtp, sizeof (uint32_t))) == NULL) + goto nomem; if ((pip->pi_enoffs = dt_zalloc(dtp, - sizeof (uint32_t))) == NULL) { - dt_free(dtp, pip->pi_offs); - dt_free(dtp, pip); - return (-1); - } + sizeof (uint32_t))) == NULL) + goto nomem; - (void) strlcpy(pip->pi_fname, fname, sizeof (pip->pi_fname)); - if (rname != NULL) { - if (strlen(rname) + 1 > sizeof (pip->pi_rname)) { - dt_free(dtp, pip->pi_offs); - dt_free(dtp, pip); - return (dt_set_errno(dtp, EDT_COMPILER)); - } - (void) strcpy(pip->pi_rname, rname); - } + if ((pip->pi_fname = strdup(fname)) == NULL) + goto nomem; + + if (rname != NULL && (pip->pi_rname = strdup(rname)) == NULL) + goto nomem; pip->pi_noffs = 0; pip->pi_maxoffs = 1; @@ -618,6 +610,13 @@ dt_probe_define(dt_provider_t *pvp, dt_p (*offs)[(*noffs)++] = offset; return (0); + +nomem: + dt_free(dtp, pip->pi_fname); + dt_free(dtp, pip->pi_enoffs); + dt_free(dtp, pip->pi_offs); + dt_free(dtp, pip); + return (dt_set_errno(dtp, EDT_NOMEM)); } /* Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.h Mon Nov 17 21:01:35 2014 (r274636) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.h Mon Nov 17 22:22:16 2014 (r274637) @@ -64,8 +64,8 @@ typedef struct dt_probe_iter { } dt_probe_iter_t; typedef struct dt_probe_instance { - char pi_fname[DTRACE_FUNCNAMELEN]; /* function name */ - char pi_rname[DTRACE_FUNCNAMELEN + 20]; /* mangled relocation name */ + char *pi_fname; /* function name */ + char *pi_rname; /* mangled relocation name */ uint32_t *pi_offs; /* offsets into the function */ uint32_t *pi_enoffs; /* is-enabled offsets */ uint_t pi_noffs; /* number of offsets */ From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 22:46:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B161530; Mon, 17 Nov 2014 22:46:05 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D89481D2; Mon, 17 Nov 2014 22:46:04 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0E379B939; Mon, 17 Nov 2014 17:46:03 -0500 (EST) From: John Baldwin To: Dmitry Chagin Subject: Re: svn commit: r274635 - head/sys/dev/pci Date: Mon, 17 Nov 2014 17:45:23 -0500 Message-ID: <2245618.H2SPKlpWdS@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-PRERELEASE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201411172025.sAHKPLMl055666@svn.freebsd.org> References: <201411172025.sAHKPLMl055666@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 17 Nov 2014 17:46:03 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 22:46:05 -0000 On Monday, November 17, 2014 08:25:21 PM Dmitry Chagin wrote: > Author: dchagin > Date: Mon Nov 17 20:25:21 2014 > New Revision: 274635 > URL: https://svnweb.freebsd.org/changeset/base/274635 > > Log: > Use the correct device as the power_for_sleep() method > always pass request up to parent bridge. > > Reviewed by: jhb > MFC after: 1 week > xMFC: r274386,r274397 Hmm, I had misread this diff as being another instance of what Adrian had found. I think this is actually not correct. The parent of a pci device ('dev' here) is a pciX device. pciX devices do not implement the PCIB_POWER_FOR_SLEEP method from pcib_if.m, so this probably just broke Adrian's Asus laptop as now it will always use D3 again and ignore _SxD. You said that this change fixed your laptop, yes? Did it work before Adrian's change in r274386 and break afterwards? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 23:17:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 311BAD76; Mon, 17 Nov 2014 23:17:27 +0000 (UTC) Received: from mail-wg0-x232.google.com (mail-wg0-x232.google.com [IPv6:2a00:1450:400c:c00::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B5784767; Mon, 17 Nov 2014 23:17:26 +0000 (UTC) Received: by mail-wg0-f50.google.com with SMTP id k14so8088058wgh.37 for ; Mon, 17 Nov 2014 15:17:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=jVfaQfChIkHOdR+W823H2eMQJ7Q4YT65d0boOaOkbLM=; b=KIuvJ4j11ZGLCvwSaVHx2Estrgr1LlYGC4bf9g8xgscxmnvrtyiKpU2v9PzmEKkcz1 vLSyI5+DNvCDdQBXxTxIgGtaX70X3iamjF0HTZG7c13e1gHRT/bohdbOrIDUKdIDTl5B /oJL7f0WfohIsPTXDk8Iu7M1N9K9vC6Jm6TGAo66ZDHe03YgKHQEcMvrexlNUbuh1UTe 3M9DUqrzUuKfE2aD1r54yhUvo3nVGianDA3qkjr1T1vIDj/0AmvHcuDCVLUMwRWmJUru RfSy6w0xXNNMHCeKJD3bJl0bna4GiAGg/5dXucrlQ/txdhlUBpbdeD25azvoVQ/IHe69 6jDA== MIME-Version: 1.0 X-Received: by 10.180.188.102 with SMTP id fz6mr25847172wic.59.1416266245234; Mon, 17 Nov 2014 15:17:25 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.106.136 with HTTP; Mon, 17 Nov 2014 15:17:25 -0800 (PST) In-Reply-To: <2245618.H2SPKlpWdS@ralph.baldwin.cx> References: <201411172025.sAHKPLMl055666@svn.freebsd.org> <2245618.H2SPKlpWdS@ralph.baldwin.cx> Date: Mon, 17 Nov 2014 15:17:25 -0800 X-Google-Sender-Auth: 0MRDlcMsQ_FtEP6s2CGIZ7O3mAM Message-ID: Subject: Re: svn commit: r274635 - head/sys/dev/pci From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Dmitry Chagin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 23:17:27 -0000 On 17 November 2014 14:45, John Baldwin wrote: > On Monday, November 17, 2014 08:25:21 PM Dmitry Chagin wrote: >> Author: dchagin >> Date: Mon Nov 17 20:25:21 2014 >> New Revision: 274635 >> URL: https://svnweb.freebsd.org/changeset/base/274635 >> >> Log: >> Use the correct device as the power_for_sleep() method >> always pass request up to parent bridge. >> >> Reviewed by: jhb >> MFC after: 1 week >> xMFC: r274386,r274397 > > Hmm, I had misread this diff as being another instance of what Adrian had > found. I think this is actually not correct. The parent of a pci device > ('dev' here) is a pciX device. pciX devices do not implement the > PCIB_POWER_FOR_SLEEP method from pcib_if.m, so this probably just broke > Adrian's Asus laptop as now it will always use D3 again and ignore _SxD. > > You said that this change fixed your laptop, yes? Did it work before Adrian's > change in r274386 and break afterwards? Hm, it doesn't cascade up to the parent of dev if it's called? -adrian From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 01:38:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4DBEE8D; Tue, 18 Nov 2014 01:38:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7488669; Tue, 18 Nov 2014 01:38:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAI1cemc003903; Tue, 18 Nov 2014 01:38:40 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAI1ceUv003900; Tue, 18 Nov 2014 01:38:40 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201411180138.sAI1ceUv003900@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 18 Nov 2014 01:38:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274638 - head/sys/dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 01:38:40 -0000 Author: loos Date: Tue Nov 18 01:38:39 2014 New Revision: 274638 URL: https://svnweb.freebsd.org/changeset/base/274638 Log: Add basic interrupt management code to gpiobus and ofw_gpiobus. This is the general support to allow the use of GPIO pins as interrupt sources for direct gpiobus children. The use of GPIO pins as generic interrupt sources (for an ethernet driver for example) will only be possible when arm/intrng is complete. Then, most of this code will need to be rewritten, but it works for now, is better than what we have and will allow further developments. Tested on: ar71xx (RSPRO), am335x (BBB), bcm2835 (Raspberry pi) Differential Revision: https://reviews.freebsd.org/D999 Reviewed by: rpaulo Modified: head/sys/dev/gpio/gpiobus.c head/sys/dev/gpio/gpiobusvar.h head/sys/dev/gpio/ofw_gpiobus.c Modified: head/sys/dev/gpio/gpiobus.c ============================================================================== --- head/sys/dev/gpio/gpiobus.c Mon Nov 17 22:22:16 2014 (r274637) +++ head/sys/dev/gpio/gpiobus.c Tue Nov 18 01:38:39 2014 (r274638) @@ -38,6 +38,13 @@ __FBSDID("$FreeBSD$"); #include "gpiobus_if.h" +#undef GPIOBUS_DEBUG +#ifdef GPIOBUS_DEBUG +#define dprintf printf +#else +#define dprintf(x, arg...) +#endif + static int gpiobus_parse_pins(struct gpiobus_softc *, device_t, int); static int gpiobus_probe(device_t); static int gpiobus_attach(device_t); @@ -105,6 +112,11 @@ gpiobus_init_softc(device_t dev) sc = GPIOBUS_SOFTC(dev); sc->sc_busdev = dev; sc->sc_dev = device_get_parent(dev); + sc->sc_intr_rman.rm_type = RMAN_ARRAY; + sc->sc_intr_rman.rm_descr = "GPIO Interrupts"; + if (rman_init(&sc->sc_intr_rman) != 0 || + rman_manage_region(&sc->sc_intr_rman, 0, ~0) != 0) + panic("%s: failed to set up rman.", __func__); if (GPIO_PIN_MAX(sc->sc_dev, &sc->sc_npins) != 0) return (ENXIO); @@ -267,6 +279,7 @@ gpiobus_print_child(device_t dev, device retval += bus_print_child_header(dev, child); retval += printf(" at pin(s) "); gpiobus_print_pins(devi); + resource_list_print_type(&devi->rl, "irq", SYS_RES_IRQ, "%ld"); retval += bus_print_child_footer(dev, child); return (retval); @@ -304,7 +317,9 @@ gpiobus_add_child(device_t dev, u_int or device_delete_child(dev, child); return (0); } + resource_list_init(&devi->rl); device_set_ivars(child, devi); + return (child); } @@ -314,14 +329,103 @@ gpiobus_hinted_child(device_t bus, const struct gpiobus_softc *sc = GPIOBUS_SOFTC(bus); struct gpiobus_ivar *devi; device_t child; - int pins; - + int irq, pins; child = BUS_ADD_CHILD(bus, 0, dname, dunit); devi = GPIOBUS_IVAR(child); resource_int_value(dname, dunit, "pins", &pins); if (gpiobus_parse_pins(sc, child, pins)) device_delete_child(bus, child); + if (resource_int_value(dname, dunit, "irq", &irq) == 0) { + if (bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1) != 0) + device_printf(bus, + "warning: bus_set_resource() failed\n"); + } +} + +static int +gpiobus_set_resource(device_t dev, device_t child, int type, int rid, + u_long start, u_long count) +{ + struct gpiobus_ivar *devi; + struct resource_list_entry *rle; + + dprintf("%s: entry (%p, %p, %d, %d, %p, %ld)\n", + __func__, dev, child, type, rid, (void *)(intptr_t)start, count); + devi = GPIOBUS_IVAR(child); + rle = resource_list_add(&devi->rl, type, rid, start, + start + count - 1, count); + if (rle == NULL) + return (ENXIO); + + return (0); +} + +static struct resource * +gpiobus_alloc_resource(device_t bus, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct gpiobus_softc *sc; + struct resource *rv; + struct resource_list *rl; + struct resource_list_entry *rle; + int isdefault; + + if (type != SYS_RES_IRQ) + return (NULL); + isdefault = (start == 0UL && end == ~0UL && count == 1); + rle = NULL; + if (isdefault) { + rl = BUS_GET_RESOURCE_LIST(bus, child); + if (rl == NULL) + return (NULL); + rle = resource_list_find(rl, type, *rid); + if (rle == NULL) + return (NULL); + if (rle->res != NULL) + panic("%s: resource entry is busy", __func__); + start = rle->start; + count = rle->count; + end = rle->end; + } + sc = device_get_softc(bus); + rv = rman_reserve_resource(&sc->sc_intr_rman, start, end, count, flags, + child); + if (rv == NULL) + return (NULL); + rman_set_rid(rv, *rid); + if ((flags & RF_ACTIVE) != 0 && + bus_activate_resource(child, type, *rid, rv) != 0) { + rman_release_resource(rv); + return (NULL); + } + + return (rv); +} + +static int +gpiobus_release_resource(device_t bus __unused, device_t child, int type, + int rid, struct resource *r) +{ + int error; + + if (rman_get_flags(r) & RF_ACTIVE) { + error = bus_deactivate_resource(child, type, rid, r); + if (error) + return (error); + } + + return (rman_release_resource(r)); +} + +static struct resource_list * +gpiobus_get_resource_list(device_t bus __unused, device_t child) +{ + struct gpiobus_ivar *ivar; + + ivar = GPIOBUS_IVAR(child); + + return (&ivar->rl); } static int @@ -450,6 +554,15 @@ static device_method_t gpiobus_methods[] DEVMETHOD(device_resume, gpiobus_resume), /* Bus interface */ + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_config_intr, bus_generic_config_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_set_resource, gpiobus_set_resource), + DEVMETHOD(bus_alloc_resource, gpiobus_alloc_resource), + DEVMETHOD(bus_release_resource, gpiobus_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_get_resource_list, gpiobus_get_resource_list), DEVMETHOD(bus_add_child, gpiobus_add_child), DEVMETHOD(bus_print_child, gpiobus_print_child), DEVMETHOD(bus_child_pnpinfo_str, gpiobus_child_pnpinfo_str), Modified: head/sys/dev/gpio/gpiobusvar.h ============================================================================== --- head/sys/dev/gpio/gpiobusvar.h Mon Nov 17 22:22:16 2014 (r274637) +++ head/sys/dev/gpio/gpiobusvar.h Tue Nov 18 01:38:39 2014 (r274638) @@ -34,6 +34,7 @@ #include #include +#include #ifdef FDT #include @@ -62,6 +63,7 @@ struct gpiobus_softc { struct mtx sc_mtx; /* bus mutex */ + struct rman sc_intr_rman; /* isr resources */ device_t sc_busdev; /* bus device */ device_t sc_owner; /* bus owner */ device_t sc_dev; /* driver device */ @@ -71,6 +73,7 @@ struct gpiobus_softc struct gpiobus_ivar { + struct resource_list rl; /* isr resource list */ uint32_t npins; /* pins total */ uint32_t *flags; /* pins flags */ uint32_t *pins; /* pins map */ Modified: head/sys/dev/gpio/ofw_gpiobus.c ============================================================================== --- head/sys/dev/gpio/ofw_gpiobus.c Mon Nov 17 22:22:16 2014 (r274637) +++ head/sys/dev/gpio/ofw_gpiobus.c Tue Nov 18 01:38:39 2014 (r274638) @@ -238,6 +238,13 @@ ofw_gpiobus_setup_devinfo(device_t dev, free(dinfo, M_DEVBUF); return (NULL); } + /* And now the interrupt resources. */ + resource_list_init(&dinfo->opd_dinfo.rl); + if (ofw_bus_intr_to_rl(dev, node, &dinfo->opd_dinfo.rl) != 0) { + ofw_bus_gen_destroy_devinfo(&dinfo->opd_obdinfo); + free(dinfo, M_DEVBUF); + return (NULL); + } return (dinfo); } @@ -246,6 +253,7 @@ static void ofw_gpiobus_destroy_devinfo(struct ofw_gpiobus_devinfo *dinfo) { + resource_list_free(&dinfo->opd_dinfo.rl); ofw_bus_gen_destroy_devinfo(&dinfo->opd_obdinfo); free(dinfo, M_DEVBUF); } @@ -326,6 +334,8 @@ ofw_gpiobus_print_child(device_t dev, de retval += bus_print_child_header(dev, child); retval += printf(" at pin(s) "); gpiobus_print_pins(&devi->opd_dinfo); + resource_list_print_type(&devi->opd_dinfo.rl, "irq", SYS_RES_IRQ, + "%ld"); retval += bus_print_child_footer(dev, child); return (retval); From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 01:39:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FBD4FE4; Tue, 18 Nov 2014 01:39:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C232689; Tue, 18 Nov 2014 01:39:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAI1dL5O004048; Tue, 18 Nov 2014 01:39:21 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAI1dLAS004047; Tue, 18 Nov 2014 01:39:21 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201411180139.sAI1dLAS004047@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 18 Nov 2014 01:39:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274639 - head/sys/dev/pccbb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 01:39:22 -0000 Author: imp Date: Tue Nov 18 01:39:21 2014 New Revision: 274639 URL: https://svnweb.freebsd.org/changeset/base/274639 Log: Modernize comments about BIOSes being lame since in this detail they aren't lame, the rules changed along the way. Catch up to 1999 or so with the new rules. Modified: head/sys/dev/pccbb/pccbb.c Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Tue Nov 18 01:38:39 2014 (r274638) +++ head/sys/dev/pccbb/pccbb.c Tue Nov 18 01:39:21 2014 (r274639) @@ -1584,13 +1584,17 @@ cbb_resume(device_t self) uint32_t tmp; /* - * Some BIOSes will not save the BARs for the pci chips, so we - * must do it ourselves. If the BAR is reset to 0 for an I/O - * device, it will read back as 0x1, so no explicit test for - * memory devices are needed. + * In the APM and early ACPI era, BIOSes saved the PCI config + * registers. As chips became more complicated, that functionality moved + * into the ACPI code / tables. We must therefore, restore the settings + * we made here to make sure the device come back. Transitions to Dx + * from D0 and back to D0 cause the bridge to lose its config space, so + * all the bus mappings and such are preserved. * - * Note: The PCI bus code should do this automatically for us on - * suspend/resume, but until it does, we have to cope. + * For most drivers, the PCI layer handles this saving. However, + * sicne there's much black magic and archane art hidden in these + * few lines of code that would be difficult to transition into + * the PCI layer. */ pci_write_config(self, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); DEVPRINTF((self, "PCI Memory allocated: %08lx\n", From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 01:39:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 257ED141; Tue, 18 Nov 2014 01:39:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0710D68B; Tue, 18 Nov 2014 01:39:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAI1dNNQ004092; Tue, 18 Nov 2014 01:39:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAI1dNqO004091; Tue, 18 Nov 2014 01:39:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201411180139.sAI1dNqO004091@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 18 Nov 2014 01:39:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274640 - head/sys/modules/if_gre X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 01:39:24 -0000 Author: imp Date: Tue Nov 18 01:39:23 2014 New Revision: 274640 URL: https://svnweb.freebsd.org/changeset/base/274640 Log: Use automated MK_INET*_SUPPORT code here as well. Modified: head/sys/modules/if_gre/Makefile Modified: head/sys/modules/if_gre/Makefile ============================================================================== --- head/sys/modules/if_gre/Makefile Tue Nov 18 01:39:21 2014 (r274639) +++ head/sys/modules/if_gre/Makefile Tue Nov 18 01:39:23 2014 (r274640) @@ -1,29 +1,16 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../net ${.CURDIR}/../../netinet ${.CURDIR}/../../netinet6 -.include "${.CURDIR}/../../conf/kern.opts.mk" +SYSDIR?=${.CURDIR}/../.. +.PATH: ${SYSDIR}/net ${SYSDIR}/netinet ${SYSDIR}/netinet6 +.include "${SYSDIR}/conf/kern.opts.mk" KMOD= if_gre SRCS= if_gre.c opt_inet.h opt_inet6.h -.if defined(KERNBUILDDIR) -OPT_INET!= cat ${KERNBUILDDIR}/opt_inet.h; echo -.if empty(OPT_INET) -MK_INET_SUPPORT=no -.endif -.endif - .if ${MK_INET_SUPPORT} != "no" SRCS+= ip_gre.c .endif -.if defined(KERNBUILDDIR) -OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h; echo -.if empty(OPT_INET6) -MK_INET6_SUPPORT=no -.endif -.endif - .if ${MK_INET6_SUPPORT} != "no" SRCS+= ip6_gre.c .endif From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 01:54:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78712422; Tue, 18 Nov 2014 01:54:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6310A882; Tue, 18 Nov 2014 01:54:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAI1sXSs012800; Tue, 18 Nov 2014 01:54:33 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAI1sV7P012791; Tue, 18 Nov 2014 01:54:31 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201411180154.sAI1sV7P012791@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 18 Nov 2014 01:54:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274641 - in head/sys: arm/freescale/imx arm/ti dev/iicbus dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 01:54:33 -0000 Author: ian Date: Tue Nov 18 01:54:31 2014 New Revision: 274641 URL: https://svnweb.freebsd.org/changeset/base/274641 Log: Allow i2c bus speed to be configured via hints, FDT data, and sysctl. The current support for controlling i2c bus speed is an inconsistant mess. There are 4 symbolic speed values defined, UNKNOWN, SLOW, FAST, FASTEST. It seems to be universally assumed that SLOW means the standard 100KHz rate from the original spec. Nothing ever calls iicbus_reset() with a speed of FAST, although some drivers would treat it as the 400KHz standard speed. Mostly iicbus_reset() is called with the speed set to UNKNOWN or FASTEST, and there's really no telling what any individual driver will do with those. The speed of an i2c bus is limited by the speed of the slowest device on the bus. This means that generally the bus speed needs to be configured based on the board/system and the components within it. Historically for i2c we've configured with device hints. Newer systems use FDT data and it documents a clock-frequency property for i2c busses. Hobbyists and developers are likely to want on the fly changes. These changes provide all 3 methods, but do not require any existing drivers to change to use the new facilities. This adds an iicbus method, iicbus_get_frequency(dev, speed) that gets the frequency for the requested symbolic speed. If the symbolic speed is SLOW or if there is no speed configured for the bus, the returned value is 100KHz, always. Otherwise, if bus speed is configured by hints, fdt, tunable, or sysctl, that speed is returned. It also adds a helper function, iicbus_init_frequency() that any bus driver subclassed from iicbus can initialize the frequency from some other source of info. Initial driver implementations are provided for Freescale and TI. Differential Revision: https://reviews.freebsd.org/D1174 PR: 195009 Modified: head/sys/arm/freescale/imx/imx_i2c.c head/sys/arm/ti/ti_i2c.c head/sys/dev/iicbus/iicbus.c head/sys/dev/iicbus/iicbus.h head/sys/dev/iicbus/iicbus_if.m head/sys/dev/ofw/ofw_iicbus.c Modified: head/sys/arm/freescale/imx/imx_i2c.c ============================================================================== --- head/sys/arm/freescale/imx/imx_i2c.c Tue Nov 18 01:39:23 2014 (r274640) +++ head/sys/arm/freescale/imx/imx_i2c.c Tue Nov 18 01:54:31 2014 (r274641) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -45,6 +46,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include #include "iicbus_if.h" @@ -79,6 +82,32 @@ __FBSDID("$FreeBSD$"); #define I2C_BAUD_RATE_DEF 0x3F #define I2C_DFSSR_DIV 0x10 +/* + * A table of available divisors and the associated coded values to put in the + * FDR register to achieve that divisor.. There is no algorithmic relationship I + * can see between divisors and the codes that go into the register. The table + * begins and ends with entries that handle insane configuration values. + */ +struct clkdiv { + u_int divisor; + u_int regcode; +}; +static struct clkdiv clkdiv_table[] = { + { 0, 0x20 }, { 22, 0x20 }, { 24, 0x21 }, { 26, 0x22 }, + { 28, 0x23 }, { 30, 0x00 }, { 32, 0x24 }, { 36, 0x25 }, + { 40, 0x26 }, { 42, 0x03 }, { 44, 0x27 }, { 48, 0x28 }, + { 52, 0x05 }, { 56, 0x29 }, { 60, 0x06 }, { 64, 0x2a }, + { 72, 0x2b }, { 80, 0x2c }, { 88, 0x09 }, { 96, 0x2d }, + { 104, 0x0a }, { 112, 0x2e }, { 128, 0x2f }, { 144, 0x0c }, + { 160, 0x30 }, { 192, 0x31 }, { 224, 0x32 }, { 240, 0x0f }, + { 256, 0x33 }, { 288, 0x10 }, { 320, 0x34 }, { 384, 0x35 }, + { 448, 0x36 }, { 480, 0x13 }, { 512, 0x37 }, { 576, 0x14 }, + { 640, 0x38 }, { 768, 0x39 }, { 896, 0x3a }, { 960, 0x17 }, + { 1024, 0x3b }, { 1152, 0x18 }, { 1280, 0x3c }, { 1536, 0x3d }, + { 1792, 0x3e }, { 1920, 0x1b }, { 2048, 0x3f }, { 2304, 0x1c }, + { 2560, 0x1d }, { 3072, 0x1e }, { 3840, 0x1f }, {UINT_MAX, 0x1f} +}; + #ifdef DEBUG #define debugf(fmt, args...) do { printf("%s(): ", __func__); \ printf(fmt,##args); } while (0) @@ -390,28 +419,29 @@ static int i2c_reset(device_t dev, u_char speed, u_char addr, u_char *oldadr) { struct i2c_softc *sc; - uint8_t baud_rate; + u_int busfreq, div, i, ipgfreq; sc = device_get_softc(dev); - switch (speed) { - case IIC_FAST: - baud_rate = I2C_BAUD_RATE_FAST; - break; - case IIC_SLOW: - case IIC_UNKNOWN: - case IIC_FASTEST: - default: - baud_rate = I2C_BAUD_RATE_DEF; - break; + /* + * Look up the divisor that gives the nearest speed that doesn't exceed + * the configured value for the bus. + */ + ipgfreq = imx_ccm_ipg_hz(); + busfreq = IICBUS_GET_FREQUENCY(sc->iicbus, speed); + div = (ipgfreq + busfreq - 1) / busfreq; + for (i = 0; i < nitems(clkdiv_table); i++) { + if (clkdiv_table[i].divisor >= div) + break; } + div = clkdiv_table[i].regcode; mtx_lock(&sc->mutex); i2c_write_reg(sc, I2C_CONTROL_REG, 0x0); i2c_write_reg(sc, I2C_STATUS_REG, 0x0); DELAY(1000); - i2c_write_reg(sc, I2C_FDR_REG, 20); + i2c_write_reg(sc, I2C_FDR_REG, (uint8_t)div); i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN); DELAY(1000); i2c_write_reg(sc, I2C_STATUS_REG, 0x0); Modified: head/sys/arm/ti/ti_i2c.c ============================================================================== --- head/sys/arm/ti/ti_i2c.c Tue Nov 18 01:39:23 2014 (r274640) +++ head/sys/arm/ti/ti_i2c.c Tue Nov 18 01:54:31 2014 (r274641) @@ -102,8 +102,7 @@ struct ti_i2c_softc struct ti_i2c_clock_config { - int speed; - int bitrate; + u_int frequency; /* Bus frequency in Hz */ uint8_t psc; /* Fast/Standard mode prescale divider */ uint8_t scll; /* Fast/Standard mode SCL low time */ uint8_t sclh; /* Fast/Standard mode SCL high time */ @@ -113,12 +112,11 @@ struct ti_i2c_clock_config #if defined(SOC_OMAP4) static struct ti_i2c_clock_config ti_omap4_i2c_clock_configs[] = { - { IIC_UNKNOWN, 100000, 23, 13, 15, 0, 0}, - { IIC_SLOW, 100000, 23, 13, 15, 0, 0}, - { IIC_FAST, 400000, 9, 5, 7, 0, 0}, - { IIC_FASTEST, 1000000, 5, 3, 4, 0, 0}, - /* { IIC_FASTEST, 3200000, 1, 113, 115, 7, 10}, - HS mode */ - { -1, 0 } + { 100000, 23, 13, 15, 0, 0}, + { 400000, 9, 5, 7, 0, 0}, + { 1000000, 5, 3, 4, 0, 0}, +/* { 3200000, 1, 113, 115, 7, 10}, - HS mode */ + { 0 /* Table terminator */ } }; #endif @@ -128,11 +126,9 @@ static struct ti_i2c_clock_config ti_oma * clock to 12Mhz, for 400kHz I2C clock set the internal clock to 24Mhz. */ static struct ti_i2c_clock_config ti_am335x_i2c_clock_configs[] = { - { IIC_UNKNOWN, 100000, 7, 59, 61, 0, 0}, - { IIC_SLOW, 100000, 7, 59, 61, 0, 0}, - { IIC_FAST, 400000, 3, 23, 25, 0, 0}, - { IIC_FASTEST, 400000, 3, 23, 25, 0, 0}, - { -1, 0 } + { 100000, 7, 59, 61, 0, 0}, + { 400000, 3, 23, 25, 0, 0}, + { 0 /* Table terminator */ } }; #endif @@ -508,6 +504,7 @@ ti_i2c_reset(struct ti_i2c_softc *sc, u_ { int timeout; struct ti_i2c_clock_config *clkcfg; + u_int busfreq; uint16_t fifo_trsh, reg, scll, sclh; switch (ti_chip()) { @@ -524,13 +521,24 @@ ti_i2c_reset(struct ti_i2c_softc *sc, u_ default: panic("Unknown Ti SoC, unable to reset the i2c"); } - while (clkcfg->speed != -1) { - if (clkcfg->speed == speed) + + /* + * If we haven't attached the bus yet, just init at the default slow + * speed. This lets us get the hardware initialized enough to attach + * the bus which is where the real speed configuration is handled. After + * the bus is attached, get the configured speed from it. Search the + * configuration table for the best speed we can do that doesn't exceed + * the requested speed. + */ + if (sc->sc_iicbus == NULL) + busfreq = 100000; + else + busfreq = IICBUS_GET_FREQUENCY(sc->sc_iicbus, speed); + for (;;) { + if (clkcfg[1].frequency == 0 || clkcfg[1].frequency > busfreq) break; clkcfg++; } - if (clkcfg->speed == -1) - return (EINVAL); /* * 23.1.4.3 - HS I2C Software Reset Modified: head/sys/dev/iicbus/iicbus.c ============================================================================== --- head/sys/dev/iicbus/iicbus.c Tue Nov 18 01:39:23 2014 (r274640) +++ head/sys/dev/iicbus/iicbus.c Tue Nov 18 01:54:31 2014 (r274641) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -96,6 +97,7 @@ iicbus_attach(device_t dev) sc->dev = dev; mtx_init(&sc->lock, "iicbus", NULL, MTX_DEF); + iicbus_init_frequency(dev, 0); iicbus_reset(dev, IIC_FASTEST, 0, NULL); if (resource_int_value(device_get_name(dev), device_get_unit(dev), "strict", &strict) == 0) @@ -243,6 +245,51 @@ iicbus_null_repeated_start(device_t dev, return (IIC_ENOTSUPP); } +void +iicbus_init_frequency(device_t dev, u_int bus_freq) +{ + struct iicbus_softc *sc = IICBUS_SOFTC(dev); + + /* + * If a bus frequency value was passed in, use it. Otherwise initialize + * it first to the standard i2c 100KHz frequency, then override that + * from a hint if one exists. + */ + if (bus_freq > 0) + sc->bus_freq = bus_freq; + else { + sc->bus_freq = 100000; + resource_int_value(device_get_name(dev), device_get_unit(dev), + "frequency", (int *)&sc->bus_freq); + } + /* + * Set up the sysctl that allows the bus frequency to be changed. + * It is flagged as a tunable so that the user can set the value in + * loader(8), and that will override any other setting from any source. + * The sysctl tunable/value is the one most directly controlled by the + * user and thus the one that always takes precedence. + */ + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "frequency", CTLFLAG_RW | CTLFLAG_TUN, &sc->bus_freq, + sc->bus_freq, "Bus frequency in Hz"); +} + +static u_int +iicbus_get_frequency(device_t dev, u_char speed) +{ + struct iicbus_softc *sc = IICBUS_SOFTC(dev); + + /* + * If the frequency has not been configured for the bus, or the request + * is specifically for SLOW speed, use the standard 100KHz rate, else + * use the configured bus speed. + */ + if (sc->bus_freq == 0 || speed == IIC_SLOW) + return (100000); + return (sc->bus_freq); +} + static device_method_t iicbus_methods[] = { /* device interface */ DEVMETHOD(device_probe, iicbus_probe), @@ -260,6 +307,7 @@ static device_method_t iicbus_methods[] /* iicbus interface */ DEVMETHOD(iicbus_transfer, iicbus_transfer), + DEVMETHOD(iicbus_get_frequency, iicbus_get_frequency), DEVMETHOD_END }; Modified: head/sys/dev/iicbus/iicbus.h ============================================================================== --- head/sys/dev/iicbus/iicbus.h Tue Nov 18 01:39:23 2014 (r274640) +++ head/sys/dev/iicbus/iicbus.h Tue Nov 18 01:54:31 2014 (r274641) @@ -44,6 +44,7 @@ struct iicbus_softc u_char strict; /* deny operations that violate the * I2C protocol */ struct mtx lock; + u_int bus_freq; /* Configured bus Hz. */ }; struct iicbus_ivar @@ -67,7 +68,8 @@ IICBUS_ACCESSOR(nostop, NOSTOP, bool) #define IICBUS_UNLOCK(sc) mtx_unlock(&(sc)->lock) #define IICBUS_ASSERT_LOCKED(sc) mtx_assert(&(sc)->lock, MA_OWNED) -extern int iicbus_generic_intr(device_t dev, int event, char *buf); +int iicbus_generic_intr(device_t dev, int event, char *buf); +void iicbus_init_frequency(device_t dev, u_int bus_freq); extern driver_t iicbus_driver; extern devclass_t iicbus_devclass; Modified: head/sys/dev/iicbus/iicbus_if.m ============================================================================== --- head/sys/dev/iicbus/iicbus_if.m Tue Nov 18 01:39:23 2014 (r274640) +++ head/sys/dev/iicbus/iicbus_if.m Tue Nov 18 01:54:31 2014 (r274641) @@ -31,6 +31,15 @@ INTERFACE iicbus; +CODE { + static u_int + iicbus_default_frequency(device_t bus, u_char speed) + { + + return (100000); + } +}; + # # Interpret interrupt # @@ -115,3 +124,14 @@ METHOD int transfer { struct iic_msg *msgs; uint32_t nmsgs; }; + +# +# Return the frequency in Hz for the bus running at the given +# symbolic speed. Only the IIC_SLOW speed has meaning, it is always +# 100KHz. The UNKNOWN, FAST, and FASTEST rates all map to the +# configured bus frequency, or 100KHz when not otherwise configured. +# +METHOD u_int get_frequency { + device_t dev; + u_char speed; +} DEFAULT iicbus_default_frequency; Modified: head/sys/dev/ofw/ofw_iicbus.c ============================================================================== --- head/sys/dev/ofw/ofw_iicbus.c Tue Nov 18 01:39:23 2014 (r274640) +++ head/sys/dev/ofw/ofw_iicbus.c Tue Nov 18 01:54:31 2014 (r274641) @@ -101,12 +101,24 @@ ofw_iicbus_attach(device_t dev) { struct iicbus_softc *sc = IICBUS_SOFTC(dev); struct ofw_iicbus_devinfo *dinfo; - phandle_t child; - pcell_t paddr; + phandle_t child, node; + pcell_t freq, paddr; device_t childdev; sc->dev = dev; mtx_init(&sc->lock, "iicbus", NULL, MTX_DEF); + + /* + * If there is a clock-frequency property for the device node, use it as + * the starting value for the bus frequency. Then call the common + * routine that handles the tunable/sysctl which allows the FDT value to + * be overridden by the user. + */ + node = ofw_bus_get_node(dev); + freq = 0; + OF_getencprop(node, "clock-frequency", &freq, sizeof(freq)); + iicbus_init_frequency(dev, freq); + iicbus_reset(dev, IIC_FASTEST, 0, NULL); bus_generic_probe(dev); @@ -115,8 +127,7 @@ ofw_iicbus_attach(device_t dev) /* * Attach those children represented in the device tree. */ - for (child = OF_child(ofw_bus_get_node(dev)); child != 0; - child = OF_peer(child)) { + for (child = OF_child(node); child != 0; child = OF_peer(child)) { /* * Try to get the I2C address first from the i2c-address * property, then try the reg property. It moves around From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 02:11:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48F2D76F; Tue, 18 Nov 2014 02:11:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36190A3D; Tue, 18 Nov 2014 02:11:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAI2B8dE019517; Tue, 18 Nov 2014 02:11:08 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAI2B85F019516; Tue, 18 Nov 2014 02:11:08 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201411180211.sAI2B85F019516@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 18 Nov 2014 02:11:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274642 - head/sys/dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 02:11:08 -0000 Author: loos Date: Tue Nov 18 02:11:07 2014 New Revision: 274642 URL: https://svnweb.freebsd.org/changeset/base/274642 Log: Remove unnecessary code. After r273566, the gpiobus version of bus_print_child() also works on FDT systems. Modified: head/sys/dev/gpio/ofw_gpiobus.c Modified: head/sys/dev/gpio/ofw_gpiobus.c ============================================================================== --- head/sys/dev/gpio/ofw_gpiobus.c Tue Nov 18 01:54:31 2014 (r274641) +++ head/sys/dev/gpio/ofw_gpiobus.c Tue Nov 18 02:11:07 2014 (r274642) @@ -324,23 +324,6 @@ ofw_gpiobus_add_child(device_t dev, u_in return (child); } -static int -ofw_gpiobus_print_child(device_t dev, device_t child) -{ - struct ofw_gpiobus_devinfo *devi; - int retval = 0; - - devi = device_get_ivars(child); - retval += bus_print_child_header(dev, child); - retval += printf(" at pin(s) "); - gpiobus_print_pins(&devi->opd_dinfo); - resource_list_print_type(&devi->opd_dinfo.rl, "irq", SYS_RES_IRQ, - "%ld"); - retval += bus_print_child_footer(dev, child); - - return (retval); -} - static const struct ofw_bus_devinfo * ofw_gpiobus_get_devinfo(device_t bus, device_t dev) { @@ -358,7 +341,6 @@ static device_method_t ofw_gpiobus_metho /* Bus interface */ DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str), - DEVMETHOD(bus_print_child, ofw_gpiobus_print_child), DEVMETHOD(bus_add_child, ofw_gpiobus_add_child), /* ofw_bus interface */ From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 02:41:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CE3DB71; Tue, 18 Nov 2014 02:41:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A233CD6; Tue, 18 Nov 2014 02:41:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAI2famI035143; Tue, 18 Nov 2014 02:41:36 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAI2fZ35035140; Tue, 18 Nov 2014 02:41:35 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201411180241.sAI2fZ35035140@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 18 Nov 2014 02:41:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274643 - head/sys/dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 02:41:36 -0000 Author: loos Date: Tue Nov 18 02:41:35 2014 New Revision: 274643 URL: https://svnweb.freebsd.org/changeset/base/274643 Log: Fix gpiobus_child_location_str() to return a real string with the mapped pins. Make gpiobus_print_pins() static again. Modified: head/sys/dev/gpio/gpiobus.c head/sys/dev/gpio/gpiobusvar.h Modified: head/sys/dev/gpio/gpiobus.c ============================================================================== --- head/sys/dev/gpio/gpiobus.c Tue Nov 18 02:11:07 2014 (r274642) +++ head/sys/dev/gpio/gpiobus.c Tue Nov 18 02:41:35 2014 (r274643) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #define dprintf(x, arg...) #endif +static void gpiobus_print_pins(struct gpiobus_ivar *, char *, size_t); static int gpiobus_parse_pins(struct gpiobus_softc *, device_t, int); static int gpiobus_probe(device_t); static int gpiobus_attach(device_t); @@ -69,11 +70,11 @@ static int gpiobus_pin_set(device_t, dev static int gpiobus_pin_get(device_t, device_t, uint32_t, unsigned int*); static int gpiobus_pin_toggle(device_t, device_t, uint32_t); -void -gpiobus_print_pins(struct gpiobus_ivar *devi) +static void +gpiobus_print_pins(struct gpiobus_ivar *devi, char *buf, size_t buflen) { - int range_start, range_stop, need_coma; - int i; + char tmp[128]; + int i, range_start, range_stop, need_coma; if (devi->npins == 0) return; @@ -83,11 +84,15 @@ gpiobus_print_pins(struct gpiobus_ivar * for (i = 1; i < devi->npins; i++) { if (devi->pins[i] != (range_stop + 1)) { if (need_coma) - printf(","); + strlcat(buf, ",", buflen); + memset(tmp, 0, sizeof(tmp)); if (range_start != range_stop) - printf("%d-%d", range_start, range_stop); + snprintf(tmp, sizeof(tmp) - 1, "%d-%d", + range_start, range_stop); else - printf("%d", range_start); + snprintf(tmp, sizeof(tmp) - 1, "%d", + range_start); + strlcat(buf, tmp, buflen); range_start = range_stop = devi->pins[i]; need_coma = 1; @@ -97,11 +102,15 @@ gpiobus_print_pins(struct gpiobus_ivar * } if (need_coma) - printf(","); + strlcat(buf, ",", buflen); + memset(tmp, 0, sizeof(tmp)); if (range_start != range_stop) - printf("%d-%d", range_start, range_stop); + snprintf(tmp, sizeof(tmp) - 1, "%d-%d", + range_start, range_stop); else - printf("%d", range_start); + snprintf(tmp, sizeof(tmp) - 1, "%d", + range_start); + strlcat(buf, tmp, buflen); } int @@ -273,12 +282,16 @@ gpiobus_resume(device_t dev) static int gpiobus_print_child(device_t dev, device_t child) { - struct gpiobus_ivar *devi = GPIOBUS_IVAR(child); + char pins[128]; int retval = 0; + struct gpiobus_ivar *devi; + devi = GPIOBUS_IVAR(child); + memset(pins, 0, sizeof(pins)); retval += bus_print_child_header(dev, child); retval += printf(" at pin(s) "); - gpiobus_print_pins(devi); + gpiobus_print_pins(devi, pins, sizeof(pins)); + retval += printf("%s", pins); resource_list_print_type(&devi->rl, "irq", SYS_RES_IRQ, "%ld"); retval += bus_print_child_footer(dev, child); @@ -289,8 +302,12 @@ static int gpiobus_child_location_str(device_t bus, device_t child, char *buf, size_t buflen) { + struct gpiobus_ivar *devi; + + devi = GPIOBUS_IVAR(child); + strlcpy(buf, "pin(s)=", buflen); + gpiobus_print_pins(devi, buf, buflen); - snprintf(buf, buflen, "pins=?"); return (0); } Modified: head/sys/dev/gpio/gpiobusvar.h ============================================================================== --- head/sys/dev/gpio/gpiobusvar.h Tue Nov 18 02:11:07 2014 (r274642) +++ head/sys/dev/gpio/gpiobusvar.h Tue Nov 18 02:41:35 2014 (r274643) @@ -94,7 +94,6 @@ gpio_map_gpios(device_t bus, phandle_t d device_t ofw_gpiobus_add_fdt_child(device_t, phandle_t); #endif -void gpiobus_print_pins(struct gpiobus_ivar *); int gpiobus_init_softc(device_t); extern driver_t gpiobus_driver; From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 03:26:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 039E7349; Tue, 18 Nov 2014 03:26:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB2D61CC; Tue, 18 Nov 2014 03:26:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAI3QqZD055657; Tue, 18 Nov 2014 03:26:52 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAI3Qq6h055656; Tue, 18 Nov 2014 03:26:52 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201411180326.sAI3Qq6h055656@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 18 Nov 2014 03:26:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274644 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 03:26:53 -0000 Author: ian Date: Tue Nov 18 03:26:52 2014 New Revision: 274644 URL: https://svnweb.freebsd.org/changeset/base/274644 Log: Fix the i2c bus speed divisors for TI OMAP4 and AM335x. For OMAP4, the old values for 1MHz gave a bus frequency of about 890KHz. The new numbers hit 1MHz exactly. For AM335x the prescaler values are adjusted to give a 24MHz clock for all 3 standard speeds, as the manual recommends (as near as we can tell, there are errors and typos apparent in the document). Also, 1MHz speed is added, and has been tested successfully on a BeagleboneWhite board. PR: 195009 Modified: head/sys/arm/ti/ti_i2c.c Modified: head/sys/arm/ti/ti_i2c.c ============================================================================== --- head/sys/arm/ti/ti_i2c.c Tue Nov 18 02:41:35 2014 (r274643) +++ head/sys/arm/ti/ti_i2c.c Tue Nov 18 03:26:52 2014 (r274644) @@ -111,10 +111,15 @@ struct ti_i2c_clock_config }; #if defined(SOC_OMAP4) +/* + * OMAP4 i2c bus clock is 96MHz / ((psc + 1) * (scll + 7 + sclh + 5)). + * The prescaler values for 100KHz and 400KHz modes come from the table in the + * OMAP4 TRM. The table doesn't list 1MHz; these values should give that speed. + */ static struct ti_i2c_clock_config ti_omap4_i2c_clock_configs[] = { { 100000, 23, 13, 15, 0, 0}, { 400000, 9, 5, 7, 0, 0}, - { 1000000, 5, 3, 4, 0, 0}, + { 1000000, 5, 1, 3, 0, 0}, /* { 3200000, 1, 113, 115, 7, 10}, - HS mode */ { 0 /* Table terminator */ } }; @@ -122,12 +127,13 @@ static struct ti_i2c_clock_config ti_oma #if defined(SOC_TI_AM335X) /* - * AM335X doesn't support HS mode. For 100kHz I2C clock set the internal - * clock to 12Mhz, for 400kHz I2C clock set the internal clock to 24Mhz. + * AM335x i2c bus clock is 48MHZ / ((psc + 1) * (scll + 7 + sclh + 5)) + * In all cases we prescale the clock to 24MHz as recommended in the manual. */ static struct ti_i2c_clock_config ti_am335x_i2c_clock_configs[] = { - { 100000, 7, 59, 61, 0, 0}, - { 400000, 3, 23, 25, 0, 0}, + { 100000, 1, 111, 117, 0, 0}, + { 400000, 1, 23, 25, 0, 0}, + { 1000000, 1, 5, 7, 0, 0}, { 0 /* Table terminator */ } }; #endif From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 06:46:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33A4BD59; Tue, 18 Nov 2014 06:46:32 +0000 (UTC) Received: from dchagin.static.corbina.net (dchagin.static.corbina.ru [78.107.232.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "dchagin.static.corbina.net", Issuer "dchagin.static.corbina.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B45EB880; Tue, 18 Nov 2014 06:46:30 +0000 (UTC) Received: from dchagin.static.corbina.net (localhost [127.0.0.1]) by dchagin.static.corbina.net (8.14.9/8.14.9) with ESMTP id sAI6kRNR000972 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 18 Nov 2014 09:46:27 +0300 (MSK) (envelope-from dchagin@dchagin.static.corbina.net) Received: (from dchagin@localhost) by dchagin.static.corbina.net (8.14.9/8.14.9/Submit) id sAI6kR9M000971; Tue, 18 Nov 2014 09:46:27 +0300 (MSK) (envelope-from dchagin) Date: Tue, 18 Nov 2014 09:46:26 +0300 From: Chagin Dmitry To: John Baldwin Subject: Re: svn commit: r274635 - head/sys/dev/pci Message-ID: <20141118064626.GA956@dchagin.static.corbina.net> References: <201411172025.sAHKPLMl055666@svn.freebsd.org> <2245618.H2SPKlpWdS@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fUYQa+Pmc3FrFX/N" Content-Disposition: inline In-Reply-To: <2245618.H2SPKlpWdS@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 06:46:32 -0000 --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 17, 2014 at 05:45:23PM -0500, John Baldwin wrote: > On Monday, November 17, 2014 08:25:21 PM Dmitry Chagin wrote: > > Author: dchagin > > Date: Mon Nov 17 20:25:21 2014 > > New Revision: 274635 > > URL: https://svnweb.freebsd.org/changeset/base/274635 > >=20 > > Log: > > Use the correct device as the power_for_sleep() method > > always pass request up to parent bridge. > >=20 > > Reviewed by: jhb > > MFC after: 1 week > > xMFC: r274386,r274397 >=20 > Hmm, I had misread this diff as being another instance of what Adrian had= =20 > found. I think this is actually not correct. The parent of a pci device= =20 > ('dev' here) is a pciX device. pciX devices do not implement the=20 > PCIB_POWER_FOR_SLEEP method from pcib_if.m, so this probably just broke= =20 > Adrian's Asus laptop as now it will always use D3 again and ignore _SxD. ugh.. i understood, let me see more closely >=20 > You said that this change fixed your laptop, yes? Did it work before Adr= ian's=20 > change in r274386 and break afterwards? yes --=20 Have fun! chd --fUYQa+Pmc3FrFX/N Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlRq60IACgkQ0t2Tb3OO/O39JgCdHpPTc+4p2g2nm7LyggdTTNUv 8IAAoLP6nu/GLnfOBEFyenAJl293CZkz =xIpI -----END PGP SIGNATURE----- --fUYQa+Pmc3FrFX/N-- From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 07:03:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4DDA2249; Tue, 18 Nov 2014 07:03:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AB15A1A; Tue, 18 Nov 2014 07:03:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAI73BPa056839; Tue, 18 Nov 2014 07:03:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAI73B67056838; Tue, 18 Nov 2014 07:03:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201411180703.sAI73B67056838@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 18 Nov 2014 07:03:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r274645 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 07:03:11 -0000 Author: gjb Date: Tue Nov 18 07:03:10 2014 New Revision: 274645 URL: https://svnweb.freebsd.org/changeset/base/274645 Log: Update approvers file to share custody of releng/10.1 between so@ and re@ until re@ is comfortable releasing releng/10.1 entirely post release. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Tue Nov 18 03:26:52 2014 (r274644) +++ svnadmin/conf/approvers Tue Nov 18 07:03:10 2014 (r274645) @@ -21,7 +21,7 @@ #^stable/9/ re #^stable/8/ re #^stable/7/ re -^releng/10.1/ re +^releng/10.1/ (security-officer|so|re) ^releng/10.0/ (security-officer|so) ^releng/9.[0-3]/ (security-officer|so) ^releng/8.[0-4]/ (security-officer|so) From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 07:16:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 445CC505; Tue, 18 Nov 2014 07:16:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 305FFAFA; Tue, 18 Nov 2014 07:16:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAI7G4qJ062019; Tue, 18 Nov 2014 07:16:04 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAI7G4Yv062018; Tue, 18 Nov 2014 07:16:04 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201411180716.sAI7G4Yv062018@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Tue, 18 Nov 2014 07:16:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274646 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 07:16:04 -0000 Author: jpaetzel Date: Tue Nov 18 07:16:03 2014 New Revision: 274646 URL: https://svnweb.freebsd.org/changeset/base/274646 Log: MFC 273866 Plug memory ordering holes in buf_ring_enqueue. For at least some users this patch eliminates the races previously discussed on the mailing list. Submitted by: oleg Reviewed by: kmacy MFC after: 2 weeks Tested by: kmacy,rpaulo Modified: stable/10/sys/sys/buf_ring.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/buf_ring.h ============================================================================== --- stable/10/sys/sys/buf_ring.h Tue Nov 18 07:03:10 2014 (r274645) +++ stable/10/sys/sys/buf_ring.h Tue Nov 18 07:16:03 2014 (r274646) @@ -64,8 +64,7 @@ struct buf_ring { static __inline int buf_ring_enqueue(struct buf_ring *br, void *buf) { - uint32_t prod_head, prod_next; - uint32_t cons_tail; + uint32_t prod_head, prod_next, cons_tail; #ifdef DEBUG_BUFRING int i; for (i = br->br_cons_head; i != br->br_prod_head; @@ -77,16 +76,20 @@ buf_ring_enqueue(struct buf_ring *br, vo critical_enter(); do { prod_head = br->br_prod_head; + prod_next = (prod_head + 1) & br->br_prod_mask; cons_tail = br->br_cons_tail; - prod_next = (prod_head + 1) & br->br_prod_mask; - if (prod_next == cons_tail) { - br->br_drops++; - critical_exit(); - return (ENOBUFS); + rmb(); + if (prod_head == br->br_prod_head && + cons_tail == br->br_cons_tail) { + br->br_drops++; + critical_exit(); + return (ENOBUFS); + } + continue; } - } while (!atomic_cmpset_int(&br->br_prod_head, prod_head, prod_next)); + } while (!atomic_cmpset_acq_int(&br->br_prod_head, prod_head, prod_next)); #ifdef DEBUG_BUFRING if (br->br_ring[prod_head] != NULL) panic("dangling value in enqueue"); @@ -94,19 +97,13 @@ buf_ring_enqueue(struct buf_ring *br, vo br->br_ring[prod_head] = buf; /* - * The full memory barrier also avoids that br_prod_tail store - * is reordered before the br_ring[prod_head] is full setup. - */ - mb(); - - /* * If there are other enqueues in progress * that preceeded us, we need to wait for them * to complete */ while (br->br_prod_tail != prod_head) cpu_spinwait(); - br->br_prod_tail = prod_next; + atomic_store_rel_int(&br->br_prod_tail, prod_next); critical_exit(); return (0); } @@ -119,37 +116,23 @@ static __inline void * buf_ring_dequeue_mc(struct buf_ring *br) { uint32_t cons_head, cons_next; - uint32_t prod_tail; void *buf; - int success; critical_enter(); do { cons_head = br->br_cons_head; - prod_tail = br->br_prod_tail; - cons_next = (cons_head + 1) & br->br_cons_mask; - - if (cons_head == prod_tail) { + + if (cons_head == br->br_prod_tail) { critical_exit(); return (NULL); } - - success = atomic_cmpset_int(&br->br_cons_head, cons_head, - cons_next); - } while (success == 0); + } while (!atomic_cmpset_acq_int(&br->br_cons_head, cons_head, cons_next)); buf = br->br_ring[cons_head]; #ifdef DEBUG_BUFRING br->br_ring[cons_head] = NULL; #endif - - /* - * The full memory barrier also avoids that br_ring[cons_read] - * load is reordered after br_cons_tail is set. - */ - mb(); - /* * If there are other dequeues in progress * that preceeded us, we need to wait for them @@ -158,7 +141,7 @@ buf_ring_dequeue_mc(struct buf_ring *br) while (br->br_cons_tail != cons_head) cpu_spinwait(); - br->br_cons_tail = cons_next; + atomic_store_rel_int(&br->br_cons_tail, cons_next); critical_exit(); return (buf); From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 09:18:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E266B9C8; Tue, 18 Nov 2014 09:18:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE67187A; Tue, 18 Nov 2014 09:18:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAI9IZI8018572; Tue, 18 Nov 2014 09:18:35 GMT (envelope-from matthew@FreeBSD.org) Received: (from matthew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAI9IZwn018571; Tue, 18 Nov 2014 09:18:35 GMT (envelope-from matthew@FreeBSD.org) Message-Id: <201411180918.sAI9IZwn018571@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: matthew set sender to matthew@FreeBSD.org using -f From: Matthew Seaman Date: Tue, 18 Nov 2014 09:18:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r274647 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 09:18:36 -0000 Author: matthew (ports committer) Date: Tue Nov 18 09:18:35 2014 New Revision: 274647 URL: https://svnweb.freebsd.org/changeset/base/274647 Log: Take miwi's src commit bit into safekeeping, at his own request. Approved by: core (implicit) Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Tue Nov 18 07:16:03 2014 (r274646) +++ svnadmin/conf/access Tue Nov 18 09:18:35 2014 (r274647) @@ -150,7 +150,6 @@ mckay mckusick mdf melifaro -miwi mjg mm monthadar From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 12:53:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6BAB5A53; Tue, 18 Nov 2014 12:53:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 546F59D; Tue, 18 Nov 2014 12:53:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAICrauC031780; Tue, 18 Nov 2014 12:53:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAICrWhp031761; Tue, 18 Nov 2014 12:53:32 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201411181253.sAICrWhp031761@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 18 Nov 2014 12:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274648 - in stable/10: share/man/man9 sys/amd64/amd64 sys/amd64/ia32 sys/arm/include sys/compat/freebsd32 sys/i386/i386 sys/ia64/include sys/kern sys/mips/include sys/net sys/powerpc/p... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 12:53:36 -0000 Author: kib Date: Tue Nov 18 12:53:32 2014 New Revision: 274648 URL: https://svnweb.freebsd.org/changeset/base/274648 Log: Merge the fueword(9) and casueword(9). In particular, MFC r273783: Add fueword(9) and casueword(9) functions. MFC note: ia64 is handled like arm, with NO_FUEWORD define. MFC r273784: Replace some calls to fuword() by fueword() with proper error checking. MFC r273785: Convert kern_umtx.c to use fueword() and casueword(). MFC note: the sys__umtx_lock and sys__umtx_unlock syscalls are not converted, they are removed from HEAD, and not used. The do_sem2*() family is not yet merged to stable/10, corresponding chunk will be merged after do_sem2* are committed. MFC r273788 (by jkim): Actually install casuword(9) to fix build. MFC r273911: Add type qualifier volatile to the base (userspace) address argument of fuword(9) and suword(9). Added: stable/10/share/man/man9/casuword.9 - copied unchanged from r273783, head/share/man/man9/casuword.9 Modified: stable/10/share/man/man9/Makefile stable/10/share/man/man9/fetch.9 stable/10/share/man/man9/store.9 stable/10/sys/amd64/amd64/support.S stable/10/sys/amd64/ia32/ia32_syscall.c stable/10/sys/arm/include/param.h stable/10/sys/compat/freebsd32/freebsd32_misc.c stable/10/sys/i386/i386/support.s stable/10/sys/i386/i386/trap.c stable/10/sys/ia64/include/param.h stable/10/sys/kern/kern_exec.c stable/10/sys/kern/kern_umtx.c stable/10/sys/kern/subr_uio.c stable/10/sys/kern/vfs_acl.c stable/10/sys/mips/include/param.h stable/10/sys/net/if_spppsubr.c stable/10/sys/powerpc/powerpc/copyinout.c stable/10/sys/sparc64/include/param.h stable/10/sys/sys/systm.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/Makefile ============================================================================== --- stable/10/share/man/man9/Makefile Tue Nov 18 09:18:35 2014 (r274647) +++ stable/10/share/man/man9/Makefile Tue Nov 18 12:53:32 2014 (r274648) @@ -46,6 +46,7 @@ MAN= accept_filter.9 \ BUS_SETUP_INTR.9 \ bus_space.9 \ byteorder.9 \ + casuword.9 \ cd.9 \ condvar.9 \ config_intrhook.9 \ @@ -566,6 +567,9 @@ MLINKS+=condvar.9 cv_broadcast.9 \ MLINKS+=config_intrhook.9 config_intrhook_disestablish.9 \ config_intrhook.9 config_intrhook_establish.9 MLINKS+=contigmalloc.9 contigfree.9 +MLINKS+=casuword.9 casueword.9 \ + casuword.9 casueword32.9 \ + casuword.9 casuword32.9 MLINKS+=copy.9 copyin.9 \ copy.9 copyin_nofault.9 \ copy.9 copyinstr.9 \ @@ -668,7 +672,10 @@ MLINKS+=fetch.9 fubyte.9 \ fetch.9 fuword.9 \ fetch.9 fuword16.9 \ fetch.9 fuword32.9 \ - fetch.9 fuword64.9 + fetch.9 fuword64.9 \ + fetch.9 fueword.9 \ + fetch.9 fueword32.9 \ + fetch.9 fueword64.9 MLINKS+=fpu_kern.9 fpu_kern_alloc_ctx.9 \ fpu_kern.9 fpu_kern_free_ctx.9 \ fpu_kern.9 fpu_kern_enter.9 \ Copied: stable/10/share/man/man9/casuword.9 (from r273783, head/share/man/man9/casuword.9) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man9/casuword.9 Tue Nov 18 12:53:32 2014 (r274648, copy of r273783, head/share/man/man9/casuword.9) @@ -0,0 +1,95 @@ +.\" Copyright (c) 2014 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" Part of this documentation was written by +.\" Konstantin Belousov under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 21, 2014 +.Dt CASU 9 +.Os +.Sh NAME +.Nm casueword , +.Nm casueword32 , +.Nm casuword , +.Nm casuword32 +.Nd fetch, compare and store data from user-space +.Sh SYNOPSIS +.In sys/types.h +.In sys/systm.h +.Ft int +.Fn casueword "volatile u_long *base" "u_long oldval" "u_long *oldvalp" "u_long newval" +.Ft int +.Fn casueword32 "volatile uint32_t *base" "uint32_t oldval" "uint32_t *oldvalp" "uint32_t newval" +.Ft u_long +.Fn casuword "volatile u_long *base" "u_long oldval" "u_long newval" +.Ft uint32_t +.Fn casuword32 "volatile uint32_t *base" "uint32_t oldval" "uint32_t newval" +.Sh DESCRIPTION +The +.Nm +functions are designed to perform atomic compare-and-swap operation on +the value in the usermode memory of the current process. +.Pp +The +.Nm +routines reads the value from user memory with address +.Pa base , +and compare the value read with +.Pa oldval . +If the values are equal, +.Pa newval +is written to the +.Pa *base . +In case of +.Fn casueword32 +and +.Fn casueword , +old value is stored into the (kernel-mode) variable pointed by +.Pa *oldvalp . +The userspace value must be naturally aligned. +.Pp +The callers of +.Fn casuword +and +.Fn casuword32 +functions cannot distinguish between -1 read from +userspace and function failure. +.Sh RETURN VALUES +The +.Fn casuword +and +.Fn casuword32 +functions return the data fetched or -1 on failure. +The +.Fn casueword +and +.Fn casueword32 +functions return 0 on success and -1 on failure. +.Sh SEE ALSO +.Xr atomic 9 , +.Xr fetch 9 , +.Xr store 9 Modified: stable/10/share/man/man9/fetch.9 ============================================================================== --- stable/10/share/man/man9/fetch.9 Tue Nov 18 09:18:35 2014 (r274647) +++ stable/10/share/man/man9/fetch.9 Tue Nov 18 12:53:32 2014 (r274648) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 5, 2009 +.Dd October 29, 2014 .Dt FETCH 9 .Os .Sh NAME @@ -44,43 +44,56 @@ .Nm fuword , .Nm fuword16 , .Nm fuword32 , -.Nm fuword64 +.Nm fuword64 , +.Nm fueword , +.Nm fueword32 , +.Nm fueword64 .Nd fetch data from user-space .Sh SYNOPSIS .In sys/types.h -.In sys/time.h .In sys/systm.h .Ft int -.Fn fubyte "const void *base" +.Fn fubyte "volatile const void *base" .Ft long -.Fn fuword "const void *base" +.Fn fuword "volatile const void *base" .Ft int -.Fn fuword16 "void *base" +.Fn fuword16 "volatile const void *base" .Ft int32_t -.Fn fuword32 "const void *base" +.Fn fuword32 "volatile const void *base" .Ft int64_t -.Fn fuword64 "const void *base" +.Fn fuword64 "volatile const void *base" +.Ft long +.Fn fueword "volatile const void *base" "long *val" +.Ft int32_t +.Fn fueword32 "volatile const void *base" "int32_t *val" +.Ft int64_t +.Fn fueword64 "volatile const void *base" "int64_t *val" .In sys/resourcevar.h .Ft int .Fn fuswintr "void *base" .Sh DESCRIPTION The .Nm -functions are designed to copy small amounts of data from user-space. +functions are designed to copy small amounts of data from user-space +of the current process. +If read is successful, it is performed atomically. +The data read must be naturally aligned. .Pp The .Nm routines provide the following functionality: -.Bl -tag -width "fuswintr()" +.Bl -tag -width "fueword32()" .It Fn fubyte Fetches a byte of data from the user-space address .Pa base . +The byte read is zero-extended into the results variable. .It Fn fuword -Fetches a word of data from the user-space address +Fetches a word of data (long) from the user-space address .Pa base . .It Fn fuword16 Fetches 16 bits of data from the user-space address .Pa base . +The half-word read is zero-extended into the results variable. .It Fn fuword32 Fetches 32 bits of data from the user-space address .Pa base . @@ -91,11 +104,46 @@ Fetches 64 bits of data from the user-sp Fetches a short word of data from the user-space address .Pa base . This function is safe to call during an interrupt context. +.It Fn fueword +Fetches a word of data (long) from the user-space address +.Pa base +and stores the result in the variable pointed by +.Pa val . +.It Fn fueword32 +Fetches 32 bits of data from the user-space address +.Pa base +and stores the result in the variable pointed by +.Pa val . +.It Fn fueword64 +Fetches 64 bits of data from the user-space address +.Pa base +and stores the result in the variable pointed by +.Pa val . .El +.Pp +The callers of +.Fn fuword , +.Fn fuword32 +and +.Fn fuword64 +functions cannot distinguish between -1 read from +userspace and function failure. .Sh RETURN VALUES The -.Nm +.Fn fubyte , +.Fn fuword , +.Fn fuword16 , +.Fn fuword32 , +.Fn fuword64 , +and +.Fn fuswintr functions return the data fetched or -1 on failure. +The +.Fn fueword , +.Fn fueword32 +and +.Fn fueword64 +functions return 0 on success and -1 on failure. .Sh SEE ALSO .Xr copy 9 , .Xr store 9 Modified: stable/10/share/man/man9/store.9 ============================================================================== --- stable/10/share/man/man9/store.9 Tue Nov 18 09:18:35 2014 (r274647) +++ stable/10/share/man/man9/store.9 Tue Nov 18 12:53:32 2014 (r274648) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 5, 2009 +.Dd October 29, 2014 .Dt STORE 9 .Os .Sh NAME @@ -48,15 +48,15 @@ .In sys/time.h .In sys/systm.h .Ft int -.Fn subyte "void *base" "int byte" +.Fn subyte "volatile void *base" "int byte" .Ft int -.Fn suword "void *base" "long word" +.Fn suword "volatile void *base" "long word" .Ft int -.Fn suword16 "void *base" "int word" +.Fn suword16 "volatile void *base" "int word" .Ft int -.Fn suword32 "void *base" "int32_t word" +.Fn suword32 "volatile void *base" "int32_t word" .Ft int -.Fn suword64 "void *base" "int64_t word" +.Fn suword64 "volatile void *base" "int64_t word" .In sys/resourcevar.h .Ft int .Fn suswintr "void *base" "int word" @@ -64,6 +64,8 @@ The .Nm functions are designed to copy small amounts of data to user-space. +If write is successful, it is performed atomically. +The data written must be naturally aligned. .Pp The .Nm Modified: stable/10/sys/amd64/amd64/support.S ============================================================================== --- stable/10/sys/amd64/amd64/support.S Tue Nov 18 09:18:35 2014 (r274647) +++ stable/10/sys/amd64/amd64/support.S Tue Nov 18 12:53:32 2014 (r274648) @@ -312,12 +312,13 @@ copyin_fault: END(copyin) /* - * casuword32. Compare and set user integer. Returns -1 or the current value. - * dst = %rdi, old = %rsi, new = %rdx + * casueword32. Compare and set user integer. Returns -1 on fault, + * 0 if access was successful. Old value is written to *oldp. + * dst = %rdi, old = %esi, oldp = %rdx, new = %ecx */ -ENTRY(casuword32) - movq PCPU(CURPCB),%rcx - movq $fusufault,PCB_ONFAULT(%rcx) +ENTRY(casueword32) + movq PCPU(CURPCB),%r8 + movq $fusufault,PCB_ONFAULT(%r8) movq $VM_MAXUSER_ADDRESS-4,%rax cmpq %rax,%rdi /* verify address is valid */ @@ -327,26 +328,34 @@ ENTRY(casuword32) #ifdef SMP lock #endif - cmpxchgl %edx,(%rdi) /* new = %edx */ + cmpxchgl %ecx,(%rdi) /* new = %ecx */ /* * The old value is in %eax. If the store succeeded it will be the * value we expected (old) from before the store, otherwise it will - * be the current value. + * be the current value. Save %eax into %esi to prepare the return + * value. */ + movl %eax,%esi + xorl %eax,%eax + movq %rax,PCB_ONFAULT(%r8) - movq PCPU(CURPCB),%rcx - movq $0,PCB_ONFAULT(%rcx) + /* + * Access the oldp after the pcb_onfault is cleared, to correctly + * catch corrupted pointer. + */ + movl %esi,(%rdx) /* oldp = %rdx */ ret -END(casuword32) +END(casueword32) /* - * casuword. Compare and set user word. Returns -1 or the current value. - * dst = %rdi, old = %rsi, new = %rdx + * casueword. Compare and set user long. Returns -1 on fault, + * 0 if access was successful. Old value is written to *oldp. + * dst = %rdi, old = %rsi, oldp = %rdx, new = %rcx */ -ENTRY(casuword) - movq PCPU(CURPCB),%rcx - movq $fusufault,PCB_ONFAULT(%rcx) +ENTRY(casueword) + movq PCPU(CURPCB),%r8 + movq $fusufault,PCB_ONFAULT(%r8) movq $VM_MAXUSER_ADDRESS-4,%rax cmpq %rax,%rdi /* verify address is valid */ @@ -356,28 +365,28 @@ ENTRY(casuword) #ifdef SMP lock #endif - cmpxchgq %rdx,(%rdi) /* new = %rdx */ + cmpxchgq %rcx,(%rdi) /* new = %rcx */ /* - * The old value is in %eax. If the store succeeded it will be the + * The old value is in %rax. If the store succeeded it will be the * value we expected (old) from before the store, otherwise it will * be the current value. */ - - movq PCPU(CURPCB),%rcx - movq $fusufault,PCB_ONFAULT(%rcx) - movq $0,PCB_ONFAULT(%rcx) + movq %rax,%rsi + xorl %eax,%eax + movq %rax,PCB_ONFAULT(%r8) + movq %rsi,(%rdx) ret -END(casuword) +END(casueword) /* * Fetch (load) a 64-bit word, a 32-bit word, a 16-bit word, or an 8-bit - * byte from user memory. All these functions are MPSAFE. - * addr = %rdi + * byte from user memory. + * addr = %rdi, valp = %rsi */ -ALTENTRY(fuword64) -ENTRY(fuword) +ALTENTRY(fueword64) +ENTRY(fueword) movq PCPU(CURPCB),%rcx movq $fusufault,PCB_ONFAULT(%rcx) @@ -385,13 +394,15 @@ ENTRY(fuword) cmpq %rax,%rdi /* verify address is valid */ ja fusufault - movq (%rdi),%rax - movq $0,PCB_ONFAULT(%rcx) + xorl %eax,%eax + movq (%rdi),%r11 + movq %rax,PCB_ONFAULT(%rcx) + movq %r11,(%rsi) ret END(fuword64) END(fuword) -ENTRY(fuword32) +ENTRY(fueword32) movq PCPU(CURPCB),%rcx movq $fusufault,PCB_ONFAULT(%rcx) @@ -399,10 +410,12 @@ ENTRY(fuword32) cmpq %rax,%rdi /* verify address is valid */ ja fusufault - movl (%rdi),%eax - movq $0,PCB_ONFAULT(%rcx) + xorl %eax,%eax + movl (%rdi),%r11d + movq %rax,PCB_ONFAULT(%rcx) + movl %r11d,(%rsi) ret -END(fuword32) +END(fueword32) /* * fuswintr() and suswintr() are specialized variants of fuword16() and Modified: stable/10/sys/amd64/ia32/ia32_syscall.c ============================================================================== --- stable/10/sys/amd64/ia32/ia32_syscall.c Tue Nov 18 09:18:35 2014 (r274647) +++ stable/10/sys/amd64/ia32/ia32_syscall.c Tue Nov 18 12:53:32 2014 (r274648) @@ -110,7 +110,7 @@ ia32_fetch_syscall_args(struct thread *t struct proc *p; struct trapframe *frame; caddr_t params; - u_int32_t args[8]; + u_int32_t args[8], tmp; int error, i; p = td->td_proc; @@ -126,7 +126,10 @@ ia32_fetch_syscall_args(struct thread *t /* * Code is first argument, followed by actual args. */ - sa->code = fuword32(params); + error = fueword32(params, &tmp); + if (error == -1) + return (EFAULT); + sa->code = tmp; params += sizeof(int); } else if (sa->code == SYS___syscall) { /* @@ -135,7 +138,10 @@ ia32_fetch_syscall_args(struct thread *t * We use a 32-bit fetch in case params is not * aligned. */ - sa->code = fuword32(params); + error = fueword32(params, &tmp); + if (error == -1) + return (EFAULT); + sa->code = tmp; params += sizeof(quad_t); } if (p->p_sysent->sv_mask) Modified: stable/10/sys/arm/include/param.h ============================================================================== --- stable/10/sys/arm/include/param.h Tue Nov 18 09:18:35 2014 (r274647) +++ stable/10/sys/arm/include/param.h Tue Nov 18 12:53:32 2014 (r274648) @@ -149,4 +149,8 @@ #define pgtok(x) ((x) * (PAGE_SIZE / 1024)) +#ifdef _KERNEL +#define NO_FUEWORD 1 +#endif + #endif /* !_ARM_INCLUDE_PARAM_H_ */ Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_misc.c Tue Nov 18 09:18:35 2014 (r274647) +++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Tue Nov 18 12:53:32 2014 (r274648) @@ -1924,16 +1924,21 @@ freebsd32_sysctl(struct thread *td, stru { int error, name[CTL_MAXNAME]; size_t j, oldlen; + uint32_t tmp; if (uap->namelen > CTL_MAXNAME || uap->namelen < 2) return (EINVAL); error = copyin(uap->name, name, uap->namelen * sizeof(int)); if (error) return (error); - if (uap->oldlenp) - oldlen = fuword32(uap->oldlenp); - else + if (uap->oldlenp) { + error = fueword32(uap->oldlenp, &tmp); + oldlen = tmp; + } else { oldlen = 0; + } + if (error != 0) + return (EFAULT); error = userland_sysctl(td, name, uap->namelen, uap->old, &oldlen, 1, uap->new, uap->newlen, &j, SCTL_MASK32); Modified: stable/10/sys/i386/i386/support.s ============================================================================== --- stable/10/sys/i386/i386/support.s Tue Nov 18 09:18:35 2014 (r274647) +++ stable/10/sys/i386/i386/support.s Tue Nov 18 12:53:32 2014 (r274648) @@ -389,16 +389,16 @@ copyin_fault: ret /* - * casuword. Compare and set user word. Returns -1 or the current value. + * casueword. Compare and set user word. Returns -1 on fault, + * 0 on non-faulting access. The current value is in *oldp. */ - -ALTENTRY(casuword32) -ENTRY(casuword) +ALTENTRY(casueword32) +ENTRY(casueword) movl PCPU(CURPCB),%ecx movl $fusufault,PCB_ONFAULT(%ecx) movl 4(%esp),%edx /* dst */ movl 8(%esp),%eax /* old */ - movl 12(%esp),%ecx /* new */ + movl 16(%esp),%ecx /* new */ cmpl $VM_MAXUSER_ADDRESS-4,%edx /* verify address is valid */ ja fusufault @@ -416,17 +416,20 @@ ENTRY(casuword) movl PCPU(CURPCB),%ecx movl $0,PCB_ONFAULT(%ecx) + movl 12(%esp),%edx /* oldp */ + movl %eax,(%edx) + xorl %eax,%eax ret -END(casuword32) -END(casuword) +END(casueword32) +END(casueword) /* * Fetch (load) a 32-bit word, a 16-bit word, or an 8-bit byte from user - * memory. All these functions are MPSAFE. + * memory. */ -ALTENTRY(fuword32) -ENTRY(fuword) +ALTENTRY(fueword32) +ENTRY(fueword) movl PCPU(CURPCB),%ecx movl $fusufault,PCB_ONFAULT(%ecx) movl 4(%esp),%edx /* from */ @@ -436,9 +439,12 @@ ENTRY(fuword) movl (%edx),%eax movl $0,PCB_ONFAULT(%ecx) + movl 8(%esp),%edx + movl %eax,(%edx) + xorl %eax,%eax ret -END(fuword32) -END(fuword) +END(fueword32) +END(fueword) /* * fuswintr() and suswintr() are specialized variants of fuword16() and Modified: stable/10/sys/i386/i386/trap.c ============================================================================== --- stable/10/sys/i386/i386/trap.c Tue Nov 18 09:18:35 2014 (r274647) +++ stable/10/sys/i386/i386/trap.c Tue Nov 18 12:53:32 2014 (r274648) @@ -1062,6 +1062,7 @@ cpu_fetch_syscall_args(struct thread *td struct proc *p; struct trapframe *frame; caddr_t params; + long tmp; int error; p = td->td_proc; @@ -1077,14 +1078,20 @@ cpu_fetch_syscall_args(struct thread *td /* * Code is first argument, followed by actual args. */ - sa->code = fuword(params); + error = fueword(params, &tmp); + if (error == -1) + return (EFAULT); + sa->code = tmp; params += sizeof(int); } else if (sa->code == SYS___syscall) { /* * Like syscall, but code is a quad, so as to maintain * quad alignment for the rest of the arguments. */ - sa->code = fuword(params); + error = fueword(params, &tmp); + if (error == -1) + return (EFAULT); + sa->code = tmp; params += sizeof(quad_t); } Modified: stable/10/sys/ia64/include/param.h ============================================================================== --- stable/10/sys/ia64/include/param.h Tue Nov 18 09:18:35 2014 (r274647) +++ stable/10/sys/ia64/include/param.h Tue Nov 18 12:53:32 2014 (r274648) @@ -121,4 +121,8 @@ #define pgtok(x) ((x) * (PAGE_SIZE / 1024)) +#ifdef _KERNEL +#define NO_FUEWORD 1 +#endif + #endif /* !_IA64_INCLUDE_PARAM_H_ */ Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Tue Nov 18 09:18:35 2014 (r274647) +++ stable/10/sys/kern/kern_exec.c Tue Nov 18 12:53:32 2014 (r274648) @@ -1124,7 +1124,7 @@ int exec_copyin_args(struct image_args *args, char *fname, enum uio_seg segflg, char **argv, char **envv) { - char *argp, *envp; + u_long argp, envp; int error; size_t length; @@ -1160,13 +1160,17 @@ exec_copyin_args(struct image_args *args /* * extract arguments first */ - while ((argp = (caddr_t) (intptr_t) fuword(argv++))) { - if (argp == (caddr_t) -1) { + for (;;) { + error = fueword(argv++, &argp); + if (error == -1) { error = EFAULT; goto err_exit; } - if ((error = copyinstr(argp, args->endp, - args->stringspace, &length))) { + if (argp == 0) + break; + error = copyinstr((void *)(uintptr_t)argp, args->endp, + args->stringspace, &length); + if (error != 0) { if (error == ENAMETOOLONG) error = E2BIG; goto err_exit; @@ -1182,13 +1186,17 @@ exec_copyin_args(struct image_args *args * extract environment strings */ if (envv) { - while ((envp = (caddr_t)(intptr_t)fuword(envv++))) { - if (envp == (caddr_t)-1) { + for (;;) { + error = fueword(envv++, &envp); + if (error == -1) { error = EFAULT; goto err_exit; } - if ((error = copyinstr(envp, args->endp, - args->stringspace, &length))) { + if (envp == 0) + break; + error = copyinstr((void *)(uintptr_t)envp, + args->endp, args->stringspace, &length); + if (error != 0) { if (error == ENAMETOOLONG) error = E2BIG; goto err_exit; Modified: stable/10/sys/kern/kern_umtx.c ============================================================================== --- stable/10/sys/kern/kern_umtx.c Tue Nov 18 09:18:35 2014 (r274647) +++ stable/10/sys/kern/kern_umtx.c Tue Nov 18 12:53:32 2014 (r274648) @@ -510,6 +510,15 @@ umtxq_unbusy(struct umtx_key *key) wakeup_one(uc); } +static inline void +umtxq_unbusy_unlocked(struct umtx_key *key) +{ + + umtxq_lock(key); + umtxq_unbusy(key); + umtxq_unlock(key); +} + static struct umtxq_queue * umtxq_queue_lookup(struct umtx_key *key, int q) { @@ -1208,6 +1217,7 @@ do_wait(struct thread *td, void *addr, u struct abs_timeout timo; struct umtx_q *uq; u_long tmp; + uint32_t tmp32; int error = 0; uq = td->td_umtxq; @@ -1221,18 +1231,29 @@ do_wait(struct thread *td, void *addr, u umtxq_lock(&uq->uq_key); umtxq_insert(uq); umtxq_unlock(&uq->uq_key); - if (compat32 == 0) - tmp = fuword(addr); - else - tmp = (unsigned int)fuword32(addr); + if (compat32 == 0) { + error = fueword(addr, &tmp); + if (error != 0) + error = EFAULT; + } else { + error = fueword32(addr, &tmp32); + if (error == 0) + tmp = tmp32; + else + error = EFAULT; + } umtxq_lock(&uq->uq_key); - if (tmp == id) - error = umtxq_sleep(uq, "uwait", timeout == NULL ? - NULL : &timo); - if ((uq->uq_flags & UQF_UMTXQ) == 0) - error = 0; - else + if (error == 0) { + if (tmp == id) + error = umtxq_sleep(uq, "uwait", timeout == NULL ? + NULL : &timo); + if ((uq->uq_flags & UQF_UMTXQ) == 0) + error = 0; + else + umtxq_remove(uq); + } else if ((uq->uq_flags & UQF_UMTXQ) != 0) { umtxq_remove(uq); + } umtxq_unlock(&uq->uq_key); umtx_key_release(&uq->uq_key); if (error == ERESTART) @@ -1269,11 +1290,11 @@ do_lock_normal(struct thread *td, struct struct abs_timeout timo; struct umtx_q *uq; uint32_t owner, old, id; - int error = 0; + int error, rv; id = td->td_tid; uq = td->td_umtxq; - + error = 0; if (timeout != NULL) abs_timeout_init2(&timo, timeout); @@ -1282,7 +1303,9 @@ do_lock_normal(struct thread *td, struct * can fault on any access. */ for (;;) { - owner = fuword32(__DEVOLATILE(void *, &m->m_owner)); + rv = fueword32(&m->m_owner, &owner); + if (rv == -1) + return (EFAULT); if (mode == _UMUTEX_WAIT) { if (owner == UMUTEX_UNOWNED || owner == UMUTEX_CONTESTED) return (0); @@ -1290,31 +1313,31 @@ do_lock_normal(struct thread *td, struct /* * Try the uncontested case. This should be done in userland. */ - owner = casuword32(&m->m_owner, UMUTEX_UNOWNED, id); + rv = casueword32(&m->m_owner, UMUTEX_UNOWNED, + &owner, id); + /* The address was invalid. */ + if (rv == -1) + return (EFAULT); /* The acquire succeeded. */ if (owner == UMUTEX_UNOWNED) return (0); - /* The address was invalid. */ - if (owner == -1) - return (EFAULT); - /* If no one owns it but it is contested try to acquire it. */ if (owner == UMUTEX_CONTESTED) { - owner = casuword32(&m->m_owner, - UMUTEX_CONTESTED, id | UMUTEX_CONTESTED); + rv = casueword32(&m->m_owner, + UMUTEX_CONTESTED, &owner, + id | UMUTEX_CONTESTED); + /* The address was invalid. */ + if (rv == -1) + return (EFAULT); if (owner == UMUTEX_CONTESTED) return (0); - /* The address was invalid. */ - if (owner == -1) - return (EFAULT); - - error = umtxq_check_susp(td); - if (error != 0) - return (error); + rv = umtxq_check_susp(td); + if (rv != 0) + return (rv); /* If this failed the lock has changed, restart. */ continue; @@ -1350,10 +1373,11 @@ do_lock_normal(struct thread *td, struct * either some one else has acquired the lock or it has been * released. */ - old = casuword32(&m->m_owner, owner, owner | UMUTEX_CONTESTED); + rv = casueword32(&m->m_owner, owner, &old, + owner | UMUTEX_CONTESTED); /* The address was invalid. */ - if (old == -1) { + if (rv == -1) { umtxq_lock(&uq->uq_key); umtxq_remove(uq); umtxq_unbusy(&uq->uq_key); @@ -1398,16 +1422,16 @@ do_unlock_normal(struct thread *td, stru /* * Make sure we own this mtx. */ - owner = fuword32(__DEVOLATILE(uint32_t *, &m->m_owner)); - if (owner == -1) + error = fueword32(&m->m_owner, &owner); + if (error == -1) return (EFAULT); if ((owner & ~UMUTEX_CONTESTED) != id) return (EPERM); if ((owner & UMUTEX_CONTESTED) == 0) { - old = casuword32(&m->m_owner, owner, UMUTEX_UNOWNED); - if (old == -1) + error = casueword32(&m->m_owner, owner, &old, UMUTEX_UNOWNED); + if (error == -1) return (EFAULT); if (old == owner) return (0); @@ -1429,14 +1453,14 @@ do_unlock_normal(struct thread *td, stru * there is zero or one thread only waiting for it. * Otherwise, it must be marked as contested. */ - old = casuword32(&m->m_owner, owner, - count <= 1 ? UMUTEX_UNOWNED : UMUTEX_CONTESTED); + error = casueword32(&m->m_owner, owner, &old, + count <= 1 ? UMUTEX_UNOWNED : UMUTEX_CONTESTED); umtxq_lock(&key); umtxq_signal(&key,1); umtxq_unbusy(&key); umtxq_unlock(&key); umtx_key_release(&key); - if (old == -1) + if (error == -1) return (EFAULT); if (old != owner) return (EINVAL); @@ -1456,14 +1480,16 @@ do_wake_umutex(struct thread *td, struct int error; int count; - owner = fuword32(__DEVOLATILE(uint32_t *, &m->m_owner)); - if (owner == -1) + error = fueword32(&m->m_owner, &owner); + if (error == -1) return (EFAULT); if ((owner & ~UMUTEX_CONTESTED) != 0) return (0); - flags = fuword32(&m->m_flags); + error = fueword32(&m->m_flags, &flags); + if (error == -1) + return (EFAULT); /* We should only ever be in here for contested locks */ if ((error = umtx_key_get(m, TYPE_NORMAL_UMUTEX, GET_SHARE(flags), @@ -1475,16 +1501,20 @@ do_wake_umutex(struct thread *td, struct count = umtxq_count(&key); umtxq_unlock(&key); - if (count <= 1) - owner = casuword32(&m->m_owner, UMUTEX_CONTESTED, UMUTEX_UNOWNED); + if (count <= 1) { + error = casueword32(&m->m_owner, UMUTEX_CONTESTED, &owner, + UMUTEX_UNOWNED); + if (error == -1) + error = EFAULT; + } umtxq_lock(&key); - if (count != 0 && (owner & ~UMUTEX_CONTESTED) == 0) + if (error == 0 && count != 0 && (owner & ~UMUTEX_CONTESTED) == 0) umtxq_signal(&key, 1); umtxq_unbusy(&key); umtxq_unlock(&key); umtx_key_release(&key); - return (0); + return (error); } /* @@ -1527,41 +1557,47 @@ do_wake2_umutex(struct thread *td, struc * any memory. */ if (count > 1) { - owner = fuword32(__DEVOLATILE(uint32_t *, &m->m_owner)); - while ((owner & UMUTEX_CONTESTED) ==0) { - old = casuword32(&m->m_owner, owner, - owner|UMUTEX_CONTESTED); + error = fueword32(&m->m_owner, &owner); + if (error == -1) + error = EFAULT; + while (error == 0 && (owner & UMUTEX_CONTESTED) == 0) { + error = casueword32(&m->m_owner, owner, &old, + owner | UMUTEX_CONTESTED); + if (error == -1) { + error = EFAULT; + break; + } if (old == owner) break; owner = old; - if (old == -1) - break; error = umtxq_check_susp(td); if (error != 0) break; } } else if (count == 1) { - owner = fuword32(__DEVOLATILE(uint32_t *, &m->m_owner)); - while ((owner & ~UMUTEX_CONTESTED) != 0 && + error = fueword32(&m->m_owner, &owner); + if (error == -1) + error = EFAULT; + while (error == 0 && (owner & ~UMUTEX_CONTESTED) != 0 && (owner & UMUTEX_CONTESTED) == 0) { - old = casuword32(&m->m_owner, owner, - owner|UMUTEX_CONTESTED); + error = casueword32(&m->m_owner, owner, &old, + owner | UMUTEX_CONTESTED); + if (error == -1) { + error = EFAULT; + break; + } if (old == owner) break; owner = old; - if (old == -1) - break; error = umtxq_check_susp(td); if (error != 0) break; } } umtxq_lock(&key); - if (owner == -1) { - error = EFAULT; + if (error == EFAULT) { umtxq_signal(&key, INT_MAX); - } - else if (count != 0 && (owner & ~UMUTEX_CONTESTED) == 0) + } else if (count != 0 && (owner & ~UMUTEX_CONTESTED) == 0) umtxq_signal(&key, 1); umtxq_unbusy(&key); umtxq_unlock(&key); @@ -1941,7 +1977,7 @@ do_lock_pi(struct thread *td, struct umu struct umtx_q *uq; struct umtx_pi *pi, *new_pi; uint32_t id, owner, old; - int error; + int error, rv; id = td->td_tid; uq = td->td_umtxq; @@ -1984,7 +2020,12 @@ do_lock_pi(struct thread *td, struct umu /* * Try the uncontested case. This should be done in userland. */ - owner = casuword32(&m->m_owner, UMUTEX_UNOWNED, id); + rv = casueword32(&m->m_owner, UMUTEX_UNOWNED, &owner, id); + /* The address was invalid. */ + if (rv == -1) { + error = EFAULT; + break; + } /* The acquire succeeded. */ if (owner == UMUTEX_UNOWNED) { @@ -1992,16 +2033,15 @@ do_lock_pi(struct thread *td, struct umu break; } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 13:01:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E061C9D; Tue, 18 Nov 2014 13:01:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A56A17B; Tue, 18 Nov 2014 13:01:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAID1gZa036779; Tue, 18 Nov 2014 13:01:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAID1gLK036778; Tue, 18 Nov 2014 13:01:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201411181301.sAID1gLK036778@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 18 Nov 2014 13:01:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274649 - stable/10/sys/dev/agp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 13:01:42 -0000 Author: kib Date: Tue Nov 18 13:01:41 2014 New Revision: 274649 URL: https://svnweb.freebsd.org/changeset/base/274649 Log: MFC r274377: On 965 and higher, map GTT as write-combining. Modified: stable/10/sys/dev/agp/agp_i810.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/agp/agp_i810.c ============================================================================== --- stable/10/sys/dev/agp/agp_i810.c Tue Nov 18 12:53:32 2014 (r274648) +++ stable/10/sys/dev/agp/agp_i810.c Tue Nov 18 13:01:41 2014 (r274649) @@ -113,6 +113,8 @@ static int agp_sb_get_gtt_total_entries( static int agp_i810_install_gatt(device_t dev); static int agp_i830_install_gatt(device_t dev); +static int agp_i965_install_gatt(device_t dev); +static int agp_g4x_install_gatt(device_t dev); static void agp_i810_deinstall_gatt(device_t dev); static void agp_i830_deinstall_gatt(device_t dev); @@ -395,7 +397,7 @@ static const struct agp_i810_driver agp_ .get_stolen_size = agp_i915_get_stolen_size, .get_gtt_mappable_entries = agp_i915_get_gtt_mappable_entries, .get_gtt_total_entries = agp_i965_get_gtt_total_entries, - .install_gatt = agp_i830_install_gatt, + .install_gatt = agp_i965_install_gatt, .deinstall_gatt = agp_i830_deinstall_gatt, .write_gtt = agp_i965_write_gtt, .install_gtt_pte = agp_i965_install_gtt_pte, @@ -464,7 +466,7 @@ static const struct agp_i810_driver agp_ .get_stolen_size = agp_i915_get_stolen_size, .get_gtt_mappable_entries = agp_i915_get_gtt_mappable_entries, .get_gtt_total_entries = agp_gen5_get_gtt_total_entries, - .install_gatt = agp_i830_install_gatt, + .install_gatt = agp_g4x_install_gatt, .deinstall_gatt = agp_i830_deinstall_gatt, .write_gtt = agp_g4x_write_gtt, .install_gtt_pte = agp_g4x_install_gtt_pte, @@ -487,7 +489,7 @@ static const struct agp_i810_driver agp_ .get_stolen_size = agp_sb_get_stolen_size, .get_gtt_mappable_entries = agp_i915_get_gtt_mappable_entries, .get_gtt_total_entries = agp_sb_get_gtt_total_entries, - .install_gatt = agp_i830_install_gatt, + .install_gatt = agp_g4x_install_gatt, .deinstall_gatt = agp_i830_deinstall_gatt, .write_gtt = agp_sb_write_gtt, .install_gtt_pte = agp_sb_install_gtt_pte, @@ -1405,14 +1407,11 @@ agp_i810_install_gatt(device_t dev) return (0); } -static int -agp_i830_install_gatt(device_t dev) +static void +agp_i830_install_gatt_init(struct agp_i810_softc *sc) { - struct agp_i810_softc *sc; uint32_t pgtblctl; - sc = device_get_softc(dev); - /* * The i830 automatically initializes the 128k gatt on boot. * GATT address is already in there, make sure it's enabled. @@ -1422,10 +1421,46 @@ agp_i830_install_gatt(device_t dev) bus_write_4(sc->sc_res[0], AGP_I810_PGTBL_CTL, pgtblctl); sc->gatt->ag_physical = pgtblctl & ~1; +} + +static int +agp_i830_install_gatt(device_t dev) +{ + struct agp_i810_softc *sc; + + sc = device_get_softc(dev); + agp_i830_install_gatt_init(sc); return (0); } static int +agp_gen4_install_gatt(device_t dev, const vm_size_t gtt_offset) +{ + struct agp_i810_softc *sc; + + sc = device_get_softc(dev); + pmap_change_attr((vm_offset_t)rman_get_virtual(sc->sc_res[0]) + + gtt_offset, rman_get_size(sc->sc_res[0]) - gtt_offset, + VM_MEMATTR_WRITE_COMBINING); + agp_i830_install_gatt_init(sc); + return (0); +} + +static int +agp_i965_install_gatt(device_t dev) +{ + + return (agp_gen4_install_gatt(dev, 512 * 1024)); +} + +static int +agp_g4x_install_gatt(device_t dev) +{ + + return (agp_gen4_install_gatt(dev, 2 * 1024 * 1024)); +} + +static int agp_i810_attach(device_t dev) { struct agp_i810_softc *sc; From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 13:03:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0B27DEB; Tue, 18 Nov 2014 13:03:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D9DA188; Tue, 18 Nov 2014 13:03:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAID3JIb037113; Tue, 18 Nov 2014 13:03:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAID3JaJ037112; Tue, 18 Nov 2014 13:03:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201411181303.sAID3JaJ037112@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 18 Nov 2014 13:03:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274650 - stable/10/sys/dev/agp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 13:03:19 -0000 Author: kib Date: Tue Nov 18 13:03:18 2014 New Revision: 274650 URL: https://svnweb.freebsd.org/changeset/base/274650 Log: MFC r274378: Attach agp_i810 to non-VGA display class. Modified: stable/10/sys/dev/agp/agp_i810.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/agp/agp_i810.c ============================================================================== --- stable/10/sys/dev/agp/agp_i810.c Tue Nov 18 13:01:41 2014 (r274649) +++ stable/10/sys/dev/agp/agp_i810.c Tue Nov 18 13:03:18 2014 (r274650) @@ -747,7 +747,8 @@ agp_i810_match(device_t dev) int i, devid; if (pci_get_class(dev) != PCIC_DISPLAY - || pci_get_subclass(dev) != PCIS_DISPLAY_VGA) + || (pci_get_subclass(dev) != PCIS_DISPLAY_VGA && + pci_get_subclass(dev) != PCIS_DISPLAY_OTHER)) return (NULL); devid = pci_get_devid(dev); From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 13:05:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0864FE3; Tue, 18 Nov 2014 13:05:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2DE919E; Tue, 18 Nov 2014 13:05:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAID5PZQ037557; Tue, 18 Nov 2014 13:05:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAID5Pis037556; Tue, 18 Nov 2014 13:05:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201411181305.sAID5Pis037556@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 18 Nov 2014 13:05:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274651 - stable/10/sys/dev/agp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 13:05:25 -0000 Author: kib Date: Tue Nov 18 13:05:24 2014 New Revision: 274651 URL: https://svnweb.freebsd.org/changeset/base/274651 Log: MFC r274379: Initial attachment of the agp(4) to Haswell IGP. Modified: stable/10/sys/dev/agp/agp_i810.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/agp/agp_i810.c ============================================================================== --- stable/10/sys/dev/agp/agp_i810.c Tue Nov 18 13:03:18 2014 (r274650) +++ stable/10/sys/dev/agp/agp_i810.c Tue Nov 18 13:05:24 2014 (r274651) @@ -501,6 +501,29 @@ static const struct agp_i810_driver agp_ .chipset_flush = agp_i810_chipset_flush, }; +static const struct agp_i810_driver agp_i810_hsw_driver = { + .chiptype = CHIP_SB, + .gen = 7, + .busdma_addr_mask_sz = 40, + .res_spec = agp_g4x_res_spec, + .check_active = agp_sb_check_active, + .set_desc = agp_i810_set_desc, + .dump_regs = agp_sb_dump_regs, + .get_stolen_size = agp_sb_get_stolen_size, + .get_gtt_mappable_entries = agp_i915_get_gtt_mappable_entries, + .get_gtt_total_entries = agp_sb_get_gtt_total_entries, + .install_gatt = agp_g4x_install_gatt, + .deinstall_gatt = agp_i830_deinstall_gatt, + .write_gtt = agp_sb_write_gtt, + .install_gtt_pte = agp_sb_install_gtt_pte, + .read_gtt_pte = agp_g4x_read_gtt_pte, + .read_gtt_pte_paddr = agp_sb_read_gtt_pte_paddr, + .set_aperture = agp_i915_set_aperture, + .chipset_flush_setup = agp_i810_chipset_flush_setup, + .chipset_flush_teardown = agp_i810_chipset_flush_teardown, + .chipset_flush = agp_i810_chipset_flush, +}; + /* For adding new devices, devid is the id of the graphics controller * (pci:0:2:0, for example). The placeholder (usually at pci:0:2:1) for the * second head should never be added. The bridge_offset is the offset to @@ -737,6 +760,41 @@ static const struct agp_i810_match { .driver = &agp_i810_sb_driver }, { + .devid = 0x04028086, + .name = "Haswell desktop GT1", + .driver = &agp_i810_hsw_driver + }, + { + .devid = 0x04128086, + .name = "Haswell desktop GT2", + .driver = &agp_i810_hsw_driver + }, + { + .devid = 0x040a8086, + .name = "Haswell server GT1", + .driver = &agp_i810_hsw_driver + }, + { + .devid = 0x041a8086, + .name = "Haswell server GT2", + .driver = &agp_i810_hsw_driver + }, + { + .devid = 0x04068086, + .name = "Haswell mobile GT1", + .driver = &agp_i810_hsw_driver + }, + { + .devid = 0x04168086, + .name = "Haswell mobile GT2", + .driver = &agp_i810_hsw_driver + }, + { + .devid = 0x0c168086, + .name = "Haswell SDV", + .driver = &agp_i810_hsw_driver + }, + { .devid = 0, } }; From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 13:38:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43D65A02; Tue, 18 Nov 2014 13:38:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30C776D5; Tue, 18 Nov 2014 13:38:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIDc8OJ051820; Tue, 18 Nov 2014 13:38:08 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIDc8uP051819; Tue, 18 Nov 2014 13:38:08 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201411181338.sAIDc8uP051819@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 18 Nov 2014 13:38:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274652 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 13:38:08 -0000 Author: glebius Date: Tue Nov 18 13:38:07 2014 New Revision: 274652 URL: https://svnweb.freebsd.org/changeset/base/274652 Log: Collapse three contiguous comment blocks into one. Remove historical note about wrong assumptions 20 years ago. Use proper casing. Sponsored by: Nginx, Inc. Modified: head/sys/vm/vnode_pager.c Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Tue Nov 18 13:05:24 2014 (r274651) +++ head/sys/vm/vnode_pager.c Tue Nov 18 13:38:07 2014 (r274652) @@ -727,17 +727,12 @@ vnode_pager_generic_getpages(struct vnod return VM_PAGER_BAD; bsize = vp->v_mount->mnt_stat.f_iosize; - - /* get the UNDERLYING device for the file with VOP_BMAP() */ - - /* - * originally, we did not check for an error return value -- assuming - * an fs always has a bmap entry point -- that assumption is wrong!!! - */ foff = IDX_TO_OFF(m[reqpage]->pindex); /* - * if we can't bmap, use old VOP code + * Get the underlying device blocks for the file with VOP_BMAP(). + * If the file system doesn't support VOP_BMAP, use old way of + * getting pages via VOP_READ. */ error = VOP_BMAP(vp, foff / bsize, &bo, &reqblock, NULL, NULL); if (error == EOPNOTSUPP) { From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 13:38:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33A5FAD5; Tue, 18 Nov 2014 13:38:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D4756D6; Tue, 18 Nov 2014 13:38:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIDc9ix051870; Tue, 18 Nov 2014 13:38:09 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIDc9U3051869; Tue, 18 Nov 2014 13:38:09 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201411181338.sAIDc9U3051869@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Tue, 18 Nov 2014 13:38:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274653 - head/usr.sbin/freebsd-update X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 13:38:10 -0000 Author: feld (ports committer) Date: Tue Nov 18 13:38:09 2014 New Revision: 274653 URL: https://svnweb.freebsd.org/changeset/base/274653 Log: Re-work non-persistent filesystem detection as it was not possible to detect /dev/md backed mfs filesystems that way. Differential Revision: https://reviews.freebsd.org/D1163 Approved by: ian Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Tue Nov 18 13:38:07 2014 (r274652) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Tue Nov 18 13:38:09 2014 (r274653) @@ -604,14 +604,13 @@ fetchupgrade_check_params () { echo ${WORKDIR} exit 1 fi - for i in tmpfs mdmfs; do - if df -t ${i} ${WORKDIR} >/dev/null 2>1; then - echo -n "`basename $0`: " - echo -n "${_WORKDIR_bad2}" - echo ${WORKDIR} - exit 1 - fi - done + case `df -T ${WORKDIR}` in */dev/md[0-9]* | *tmpfs*) + echo -n "`basename $0`: " + echo -n "${_WORKDIR_bad2}" + echo ${WORKDIR} + exit 1 + ;; + esac chmod 700 ${WORKDIR} cd ${WORKDIR} || exit 1 From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 14:11:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07FFF729; Tue, 18 Nov 2014 14:11:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7F54AF3; Tue, 18 Nov 2014 14:11:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIEBFw7069049; Tue, 18 Nov 2014 14:11:15 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIEBFlh069043; Tue, 18 Nov 2014 14:11:15 GMT (envelope-from br@FreeBSD.org) Message-Id: <201411181411.sAIEBFlh069043@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 18 Nov 2014 14:11:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274655 - in head/sys/dev/virtio: block mmio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 14:11:16 -0000 Author: br Date: Tue Nov 18 14:11:14 2014 New Revision: 274655 URL: https://svnweb.freebsd.org/changeset/base/274655 Log: Add Virtio MMIO bus driver. Sponsored by: DARPA, AFRL Added: head/sys/dev/virtio/mmio/ head/sys/dev/virtio/mmio/virtio_mmio.c (contents, props changed) head/sys/dev/virtio/mmio/virtio_mmio.h (contents, props changed) head/sys/dev/virtio/mmio/virtio_mmio_if.m (contents, props changed) Modified: head/sys/dev/virtio/block/virtio_blk.c Modified: head/sys/dev/virtio/block/virtio_blk.c ============================================================================== --- head/sys/dev/virtio/block/virtio_blk.c Tue Nov 18 14:00:00 2014 (r274654) +++ head/sys/dev/virtio/block/virtio_blk.c Tue Nov 18 14:11:14 2014 (r274655) @@ -243,6 +243,8 @@ static driver_t vtblk_driver = { }; static devclass_t vtblk_devclass; +DRIVER_MODULE(virtio_blk, virtio_mmio, vtblk_driver, vtblk_devclass, + vtblk_modevent, 0); DRIVER_MODULE(virtio_blk, virtio_pci, vtblk_driver, vtblk_devclass, vtblk_modevent, 0); MODULE_VERSION(virtio_blk, 1); Added: head/sys/dev/virtio/mmio/virtio_mmio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/virtio/mmio/virtio_mmio.c Tue Nov 18 14:11:14 2014 (r274655) @@ -0,0 +1,800 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * VirtIO MMIO interface. + * This driver is heavily based on VirtIO PCI interface driver. + */ + +/* + * FDT example: + * virtio_block@1000 { + * compatible = "virtio,mmio"; + * reg = <0x1000 0x100>; + * interrupts = <63>; + * interrupt-parent = <&GIC>; + * }; + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include "virtio_mmio_if.h" +#include "virtio_bus_if.h" +#include "virtio_if.h" + +#define PAGE_SHIFT 12 + +struct vtmmio_virtqueue { + struct virtqueue *vtv_vq; + int vtv_no_intr; +}; + +struct vtmmio_softc { + device_t dev; + device_t platform; + struct resource *res[2]; + + uint64_t vtmmio_features; + uint32_t vtmmio_flags; + + /* This "bus" will only ever have one child. */ + device_t vtmmio_child_dev; + struct virtio_feature_desc *vtmmio_child_feat_desc; + + int vtmmio_nvqs; + struct vtmmio_virtqueue *vtmmio_vqs; + void *ih; +}; + +static int vtmmio_probe(device_t); +static int vtmmio_attach(device_t); +static int vtmmio_detach(device_t); +static int vtmmio_suspend(device_t); +static int vtmmio_resume(device_t); +static int vtmmio_shutdown(device_t); +static void vtmmio_driver_added(device_t, driver_t *); +static void vtmmio_child_detached(device_t, device_t); +static int vtmmio_read_ivar(device_t, device_t, int, uintptr_t *); +static int vtmmio_write_ivar(device_t, device_t, int, uintptr_t); +static uint64_t vtmmio_negotiate_features(device_t, uint64_t); +static int vtmmio_with_feature(device_t, uint64_t); +static int vtmmio_alloc_virtqueues(device_t, int, int, + struct vq_alloc_info *); +static int vtmmio_setup_intr(device_t, enum intr_type); +static void vtmmio_stop(device_t); +static int vtmmio_reinit(device_t, uint64_t); +static void vtmmio_reinit_complete(device_t); +static void vtmmio_notify_virtqueue(device_t, uint16_t); +static uint8_t vtmmio_get_status(device_t); +static void vtmmio_set_status(device_t, uint8_t); +static void vtmmio_read_dev_config(device_t, bus_size_t, void *, int); +static void vtmmio_write_dev_config(device_t, bus_size_t, void *, int); +static void vtmmio_describe_features(struct vtmmio_softc *, const char *, + uint64_t); +static void vtmmio_probe_and_attach_child(struct vtmmio_softc *); +static int vtmmio_reinit_virtqueue(struct vtmmio_softc *, int); +static void vtmmio_free_interrupts(struct vtmmio_softc *); +static void vtmmio_free_virtqueues(struct vtmmio_softc *); +static void vtmmio_release_child_resources(struct vtmmio_softc *); +static void vtmmio_reset(struct vtmmio_softc *); +static void vtmmio_select_virtqueue(struct vtmmio_softc *, int); +static void vtmmio_vq_intr(void *); + +/* + * I/O port read/write wrappers. + */ +#define vtmmio_write_config_1(sc, o, v) \ + bus_write_1((sc)->res[0], (o), (v)); \ + VIRTIO_MMIO_NOTE(sc->platform, (o)) +#define vtmmio_write_config_2(sc, o, v) \ + bus_write_2((sc)->res[0], (o), (v)); \ + VIRTIO_MMIO_NOTE(sc->platform, (o)) +#define vtmmio_write_config_4(sc, o, v) \ + bus_write_4((sc)->res[0], (o), (v)); \ + VIRTIO_MMIO_NOTE(sc->platform, (o)) + +#define vtmmio_read_config_1(sc, o) \ + bus_read_1((sc)->res[0], (o)) +#define vtmmio_read_config_2(sc, o) \ + bus_read_2((sc)->res[0], (o)) +#define vtmmio_read_config_4(sc, o) \ + bus_read_4((sc)->res[0], (o)) + +static device_method_t vtmmio_methods[] = { + /* Device interface. */ + DEVMETHOD(device_probe, vtmmio_probe), + DEVMETHOD(device_attach, vtmmio_attach), + DEVMETHOD(device_detach, vtmmio_detach), + DEVMETHOD(device_suspend, vtmmio_suspend), + DEVMETHOD(device_resume, vtmmio_resume), + DEVMETHOD(device_shutdown, vtmmio_shutdown), + + /* Bus interface. */ + DEVMETHOD(bus_driver_added, vtmmio_driver_added), + DEVMETHOD(bus_child_detached, vtmmio_child_detached), + DEVMETHOD(bus_read_ivar, vtmmio_read_ivar), + DEVMETHOD(bus_write_ivar, vtmmio_write_ivar), + + /* VirtIO bus interface. */ + DEVMETHOD(virtio_bus_negotiate_features, vtmmio_negotiate_features), + DEVMETHOD(virtio_bus_with_feature, vtmmio_with_feature), + DEVMETHOD(virtio_bus_alloc_virtqueues, vtmmio_alloc_virtqueues), + DEVMETHOD(virtio_bus_setup_intr, vtmmio_setup_intr), + DEVMETHOD(virtio_bus_stop, vtmmio_stop), + DEVMETHOD(virtio_bus_reinit, vtmmio_reinit), + DEVMETHOD(virtio_bus_reinit_complete, vtmmio_reinit_complete), + DEVMETHOD(virtio_bus_notify_vq, vtmmio_notify_virtqueue), + DEVMETHOD(virtio_bus_read_device_config, vtmmio_read_dev_config), + DEVMETHOD(virtio_bus_write_device_config, vtmmio_write_dev_config), + + DEVMETHOD_END +}; + +static driver_t vtmmio_driver = { + "virtio_mmio", + vtmmio_methods, + sizeof(struct vtmmio_softc) +}; + +devclass_t vtmmio_devclass; + +DRIVER_MODULE(virtio_mmio, simplebus, vtmmio_driver, vtmmio_devclass, 0, 0); +MODULE_VERSION(virtio_mmio, 1); +MODULE_DEPEND(virtio_mmio, simplebus, 1, 1, 1); +MODULE_DEPEND(virtio_mmio, virtio, 1, 1, 1); + +static int +vtmmio_setup_intr(device_t dev, enum intr_type type) +{ + struct vtmmio_softc *sc; + int rid; + int err; + + sc = device_get_softc(dev); + + err = VIRTIO_MMIO_SETUP_INTR(sc->platform, sc->dev, + vtmmio_vq_intr, sc); + if (err == 0) { + /* Okay we have backend-specific interrupts */ + return (0); + } + + rid = 0; + sc->res[1] = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE); + if (!sc->res[1]) { + device_printf(dev, "Can't allocate interrupt\n"); + return (ENXIO); + } + + if (bus_setup_intr(dev, sc->res[1], INTR_TYPE_MISC | INTR_MPSAFE, + NULL, vtmmio_vq_intr, sc, &sc->ih)) { + device_printf(dev, "Can't setup the interrupt\n"); + return (ENXIO); + } + + return (0); +} + +static int +vtmmio_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "virtio,mmio")) + return (ENXIO); + + device_set_desc(dev, "VirtIO MMIO adapter"); + return (BUS_PROBE_DEFAULT); +} + +static int +vtmmio_setup_platform(struct vtmmio_softc *sc) +{ + phandle_t platform_node; + struct fdt_ic *ic; + phandle_t xref; + phandle_t node; + + sc->platform = NULL; + + if ((node = ofw_bus_get_node(sc->dev)) == -1) + return (ENXIO); + + if (OF_searchencprop(node, "platform", &xref, + sizeof(xref)) == -1) { + return (ENXIO); + } + + platform_node = OF_node_from_xref(xref); + + SLIST_FOREACH(ic, &fdt_ic_list_head, fdt_ics) { + if (ic->iph == platform_node) { + sc->platform = ic->dev; + break; + } + } + + if (sc->platform == NULL) { + /* No platform-specific device. Ignore it. */ + } + + return (0); +} + +static int +vtmmio_attach(device_t dev) +{ + struct vtmmio_softc *sc; + device_t child; + int rid; + + sc = device_get_softc(dev); + sc->dev = dev; + + vtmmio_setup_platform(sc); + + rid = 0; + sc->res[0] = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (!sc->res[0]) { + device_printf(dev, "Cannot allocate memory window.\n"); + return (ENXIO); + } + + vtmmio_reset(sc); + + /* Tell the host we've noticed this device. */ + vtmmio_set_status(dev, VIRTIO_CONFIG_STATUS_ACK); + + if ((child = device_add_child(dev, NULL, -1)) == NULL) { + device_printf(dev, "Cannot create child device.\n"); + vtmmio_set_status(dev, VIRTIO_CONFIG_STATUS_FAILED); + vtmmio_detach(dev); + return (ENOMEM); + } + + sc->vtmmio_child_dev = child; + vtmmio_probe_and_attach_child(sc); + + return (0); +} + +static int +vtmmio_detach(device_t dev) +{ + struct vtmmio_softc *sc; + device_t child; + int error; + + sc = device_get_softc(dev); + + if ((child = sc->vtmmio_child_dev) != NULL) { + error = device_delete_child(dev, child); + if (error) + return (error); + sc->vtmmio_child_dev = NULL; + } + + vtmmio_reset(sc); + + if (sc->res[0] != NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, 0, + sc->res[0]); + sc->res[0] = NULL; + } + + return (0); +} + +static int +vtmmio_suspend(device_t dev) +{ + + return (bus_generic_suspend(dev)); +} + +static int +vtmmio_resume(device_t dev) +{ + + return (bus_generic_resume(dev)); +} + +static int +vtmmio_shutdown(device_t dev) +{ + + (void) bus_generic_shutdown(dev); + + /* Forcibly stop the host device. */ + vtmmio_stop(dev); + + return (0); +} + +static void +vtmmio_driver_added(device_t dev, driver_t *driver) +{ + struct vtmmio_softc *sc; + + sc = device_get_softc(dev); + + vtmmio_probe_and_attach_child(sc); +} + +static void +vtmmio_child_detached(device_t dev, device_t child) +{ + struct vtmmio_softc *sc; + + sc = device_get_softc(dev); + + vtmmio_reset(sc); + vtmmio_release_child_resources(sc); +} + +static int +vtmmio_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) +{ + struct vtmmio_softc *sc; + + sc = device_get_softc(dev); + + if (sc->vtmmio_child_dev != child) + return (ENOENT); + + switch (index) { + case VIRTIO_IVAR_DEVTYPE: + case VIRTIO_IVAR_SUBDEVICE: + *result = vtmmio_read_config_4(sc, VIRTIO_MMIO_DEVICE_ID); + break; + case VIRTIO_IVAR_VENDOR: + *result = vtmmio_read_config_4(sc, VIRTIO_MMIO_VENDOR_ID); + break; + default: + return (ENOENT); + } + + return (0); +} + +static int +vtmmio_write_ivar(device_t dev, device_t child, int index, uintptr_t value) +{ + struct vtmmio_softc *sc; + + sc = device_get_softc(dev); + + if (sc->vtmmio_child_dev != child) + return (ENOENT); + + switch (index) { + case VIRTIO_IVAR_FEATURE_DESC: + sc->vtmmio_child_feat_desc = (void *) value; + break; + default: + return (ENOENT); + } + + return (0); +} + +static uint64_t +vtmmio_negotiate_features(device_t dev, uint64_t child_features) +{ + struct vtmmio_softc *sc; + uint64_t host_features, features; + + sc = device_get_softc(dev); + + host_features = vtmmio_read_config_4(sc, VIRTIO_MMIO_HOST_FEATURES); + vtmmio_describe_features(sc, "host", host_features); + + /* + * Limit negotiated features to what the driver, virtqueue, and + * host all support. + */ + features = host_features & child_features; + features = virtqueue_filter_features(features); + sc->vtmmio_features = features; + + vtmmio_describe_features(sc, "negotiated", features); + vtmmio_write_config_4(sc, VIRTIO_MMIO_GUEST_FEATURES, features); + + return (features); +} + +static int +vtmmio_with_feature(device_t dev, uint64_t feature) +{ + struct vtmmio_softc *sc; + + sc = device_get_softc(dev); + + return ((sc->vtmmio_features & feature) != 0); +} + +static int +vtmmio_alloc_virtqueues(device_t dev, int flags, int nvqs, + struct vq_alloc_info *vq_info) +{ + struct vtmmio_virtqueue *vqx; + struct vq_alloc_info *info; + struct vtmmio_softc *sc; + struct virtqueue *vq; + int idx, error; + uint16_t size; + + sc = device_get_softc(dev); + + if (sc->vtmmio_nvqs != 0) + return (EALREADY); + if (nvqs <= 0) + return (EINVAL); + + sc->vtmmio_vqs = malloc(nvqs * sizeof(struct vtmmio_virtqueue), + M_DEVBUF, M_NOWAIT | M_ZERO); + if (sc->vtmmio_vqs == NULL) + return (ENOMEM); + + for (idx = 0; idx < nvqs; idx++) { + vqx = &sc->vtmmio_vqs[idx]; + info = &vq_info[idx]; + + vtmmio_select_virtqueue(sc, idx); + size = vtmmio_read_config_2(sc, VIRTIO_MMIO_QUEUE_NUM); + + error = virtqueue_alloc(dev, idx, size, + VIRTIO_MMIO_VRING_ALIGN, 0xFFFFFFFFUL, info, &vq); + if (error) { + device_printf(dev, + "cannot allocate virtqueue %d: %d\n", + idx, error); + break; + } +#if 0 + device_printf(dev, "virtqueue paddr 0x%08lx\n", + (uint64_t)virtqueue_paddr(vq)); +#endif + vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_PFN, + virtqueue_paddr(vq) >> PAGE_SHIFT); + + vqx->vtv_vq = *info->vqai_vq = vq; + vqx->vtv_no_intr = info->vqai_intr == NULL; + + sc->vtmmio_nvqs++; + } + + if (error) + vtmmio_free_virtqueues(sc); + + return (error); +} + +static void +vtmmio_stop(device_t dev) +{ + + vtmmio_reset(device_get_softc(dev)); +} + +static int +vtmmio_reinit(device_t dev, uint64_t features) +{ + struct vtmmio_softc *sc; + int idx, error; + + sc = device_get_softc(dev); + + if (vtmmio_get_status(dev) != VIRTIO_CONFIG_STATUS_RESET) + vtmmio_stop(dev); + + /* + * Quickly drive the status through ACK and DRIVER. The device + * does not become usable again until vtmmio_reinit_complete(). + */ + vtmmio_set_status(dev, VIRTIO_CONFIG_STATUS_ACK); + vtmmio_set_status(dev, VIRTIO_CONFIG_STATUS_DRIVER); + + vtmmio_negotiate_features(dev, features); + + for (idx = 0; idx < sc->vtmmio_nvqs; idx++) { + error = vtmmio_reinit_virtqueue(sc, idx); + if (error) + return (error); + } + + return (0); +} + +static void +vtmmio_reinit_complete(device_t dev) +{ + + vtmmio_set_status(dev, VIRTIO_CONFIG_STATUS_DRIVER_OK); +} + +static void +vtmmio_notify_virtqueue(device_t dev, uint16_t queue) +{ + struct vtmmio_softc *sc; + + sc = device_get_softc(dev); + + vtmmio_write_config_2(sc, VIRTIO_MMIO_QUEUE_NOTIFY, queue); +} + +static uint8_t +vtmmio_get_status(device_t dev) +{ + struct vtmmio_softc *sc; + + sc = device_get_softc(dev); + + return (vtmmio_read_config_1(sc, VIRTIO_MMIO_STATUS)); +} + +static void +vtmmio_set_status(device_t dev, uint8_t status) +{ + struct vtmmio_softc *sc; + + sc = device_get_softc(dev); + + if (status != VIRTIO_CONFIG_STATUS_RESET) + status |= vtmmio_get_status(dev); + + vtmmio_write_config_1(sc, VIRTIO_MMIO_STATUS, status); +} + +static void +vtmmio_read_dev_config(device_t dev, bus_size_t offset, + void *dst, int length) +{ + struct vtmmio_softc *sc; + bus_size_t off; + uint8_t *d; + int size; + + sc = device_get_softc(dev); + off = VIRTIO_MMIO_CONFIG + offset; + + for (d = dst; length > 0; d += size, off += size, length -= size) { + if (length >= 4) { + size = 4; + *(uint32_t *)d = vtmmio_read_config_4(sc, off); + } else if (length >= 2) { + size = 2; + *(uint16_t *)d = vtmmio_read_config_2(sc, off); + } else { + size = 1; + *d = vtmmio_read_config_1(sc, off); + } + } +} + +static void +vtmmio_write_dev_config(device_t dev, bus_size_t offset, + void *src, int length) +{ + struct vtmmio_softc *sc; + bus_size_t off; + uint8_t *s; + int size; + + sc = device_get_softc(dev); + off = VIRTIO_MMIO_CONFIG + offset; + + for (s = src; length > 0; s += size, off += size, length -= size) { + if (length >= 4) { + size = 4; + vtmmio_write_config_4(sc, off, *(uint32_t *)s); + } else if (length >= 2) { + size = 2; + vtmmio_write_config_2(sc, off, *(uint16_t *)s); + } else { + size = 1; + vtmmio_write_config_1(sc, off, *s); + } + } +} + +static void +vtmmio_describe_features(struct vtmmio_softc *sc, const char *msg, + uint64_t features) +{ + device_t dev, child; + + dev = sc->dev; + child = sc->vtmmio_child_dev; + + if (device_is_attached(child) && bootverbose == 0) + return; + + virtio_describe(dev, msg, features, sc->vtmmio_child_feat_desc); +} + +static void +vtmmio_probe_and_attach_child(struct vtmmio_softc *sc) +{ + device_t dev, child; + + dev = sc->dev; + child = sc->vtmmio_child_dev; + + if (child == NULL) + return; + + if (device_get_state(child) != DS_NOTPRESENT) { + return; + } + + if (device_probe(child) != 0) { + return; + } + + vtmmio_set_status(dev, VIRTIO_CONFIG_STATUS_DRIVER); + if (device_attach(child) != 0) { + vtmmio_set_status(dev, VIRTIO_CONFIG_STATUS_FAILED); + vtmmio_reset(sc); + vtmmio_release_child_resources(sc); + /* Reset status for future attempt. */ + vtmmio_set_status(dev, VIRTIO_CONFIG_STATUS_ACK); + } else { + vtmmio_set_status(dev, VIRTIO_CONFIG_STATUS_DRIVER_OK); + VIRTIO_ATTACH_COMPLETED(child); + } +} + +static int +vtmmio_reinit_virtqueue(struct vtmmio_softc *sc, int idx) +{ + struct vtmmio_virtqueue *vqx; + struct virtqueue *vq; + int error; + uint16_t size; + + vqx = &sc->vtmmio_vqs[idx]; + vq = vqx->vtv_vq; + + KASSERT(vq != NULL, ("%s: vq %d not allocated", __func__, idx)); + + vtmmio_select_virtqueue(sc, idx); + size = vtmmio_read_config_2(sc, VIRTIO_MMIO_QUEUE_NUM); + + error = virtqueue_reinit(vq, size); + if (error) + return (error); + + vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_PFN, + virtqueue_paddr(vq) >> PAGE_SHIFT); + + return (0); +} + +static void +vtmmio_free_interrupts(struct vtmmio_softc *sc) +{ + + if (sc->ih != NULL) + bus_teardown_intr(sc->dev, sc->res[1], sc->ih); + + if (sc->res[1] != NULL) + bus_release_resource(sc->dev, SYS_RES_IRQ, 0, sc->res[1]); +} + +static void +vtmmio_free_virtqueues(struct vtmmio_softc *sc) +{ + struct vtmmio_virtqueue *vqx; + int idx; + + for (idx = 0; idx < sc->vtmmio_nvqs; idx++) { + vqx = &sc->vtmmio_vqs[idx]; + + vtmmio_select_virtqueue(sc, idx); + vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_PFN, 0); + + virtqueue_free(vqx->vtv_vq); + vqx->vtv_vq = NULL; + } + + free(sc->vtmmio_vqs, M_DEVBUF); + sc->vtmmio_vqs = NULL; + sc->vtmmio_nvqs = 0; +} + +static void +vtmmio_release_child_resources(struct vtmmio_softc *sc) +{ + + vtmmio_free_interrupts(sc); + vtmmio_free_virtqueues(sc); +} + +static void +vtmmio_reset(struct vtmmio_softc *sc) +{ + + /* + * Setting the status to RESET sets the host device to + * the original, uninitialized state. + */ + vtmmio_set_status(sc->dev, VIRTIO_CONFIG_STATUS_RESET); +} + +static void +vtmmio_select_virtqueue(struct vtmmio_softc *sc, int idx) +{ + + vtmmio_write_config_2(sc, VIRTIO_MMIO_QUEUE_SEL, idx); +} + +static void +vtmmio_vq_intr(void *arg) +{ + struct vtmmio_virtqueue *vqx; + struct vtmmio_softc *sc; + struct virtqueue *vq; + int idx; + + sc = arg; + + /* Notify all virtqueues. */ + for (idx = 0; idx < sc->vtmmio_nvqs; idx++) { + vqx = &sc->vtmmio_vqs[idx]; + vq = vqx->vtv_vq; + virtqueue_intr(vq); + }; +} Added: head/sys/dev/virtio/mmio/virtio_mmio.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/virtio/mmio/virtio_mmio.h Tue Nov 18 14:11:14 2014 (r274655) @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _VIRTIO_MMIO_H +#define _VIRTIO_MMIO_H + +#define VIRTIO_MMIO_MAGIC_VALUE 0x000 +#define VIRTIO_MMIO_VERSION 0x004 +#define VIRTIO_MMIO_DEVICE_ID 0x008 + +#define VIRTIO_MMIO_MAGIC_VALUE 0x000 +#define VIRTIO_MMIO_VERSION 0x004 +#define VIRTIO_MMIO_DEVICE_ID 0x008 +#define VIRTIO_MMIO_VENDOR_ID 0x00c +#define VIRTIO_MMIO_HOST_FEATURES 0x010 +#define VIRTIO_MMIO_HOST_FEATURES_SEL 0x014 +#define VIRTIO_MMIO_GUEST_FEATURES 0x020 +#define VIRTIO_MMIO_GUEST_FEATURES_SEL 0x024 +#define VIRTIO_MMIO_GUEST_PAGE_SIZE 0x028 +#define VIRTIO_MMIO_QUEUE_SEL 0x030 +#define VIRTIO_MMIO_QUEUE_NUM_MAX 0x034 +#define VIRTIO_MMIO_QUEUE_NUM 0x038 +#define VIRTIO_MMIO_QUEUE_ALIGN 0x03c +#define VIRTIO_MMIO_QUEUE_PFN 0x040 +#define VIRTIO_MMIO_QUEUE_NOTIFY 0x050 +#define VIRTIO_MMIO_INTERRUPT_STATUS 0x060 +#define VIRTIO_MMIO_INTERRUPT_ACK 0x064 +#define VIRTIO_MMIO_STATUS 0x070 +#define VIRTIO_MMIO_CONFIG 0x100 +#define VIRTIO_MMIO_INT_VRING (1 << 0) +#define VIRTIO_MMIO_INT_CONFIG (1 << 1) +#define VIRTIO_MMIO_VRING_ALIGN 4096 + +#endif /* _VIRTIO_MMIO_H */ Added: head/sys/dev/virtio/mmio/virtio_mmio_if.m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/virtio/mmio/virtio_mmio_if.m Tue Nov 18 14:11:14 2014 (r274655) @@ -0,0 +1,76 @@ +#- +# Copyright (c) 2014 Ruslan Bukin +# All rights reserved. +# +# This software was developed by SRI International and the University of +# Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) +# ("CTSRD"), as part of the DARPA CRASH research programme. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +#include + +# +# This is optional interface to virtio mmio backend. +# Useful when backend is implemented not by the hardware but software, e.g. +# by using another cpu core. +# + +INTERFACE virtio_mmio; + +CODE { + static int + virtio_mmio_write(device_t dev, size_t offset) + { + + return (1); + } + + static int + virtio_mmio_setup_intr(device_t dev, device_t mmio_dev, + void *handler, void *ih_user) + { + + return (1); + } +}; + +# +# Inform backend we have data wrotten to offset. +# +METHOD int note { + device_t dev; + size_t offset; +} DEFAULT virtio_mmio_write; + +# +# Setup backend-specific interrupts. +# +METHOD int setup_intr { + device_t dev; + device_t mmio_dev; + void *handler; + void *ih_user; +} DEFAULT virtio_mmio_setup_intr; From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 14:12:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 010F9874; Tue, 18 Nov 2014 14:12:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D701AB9C; Tue, 18 Nov 2014 14:12:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIECKVQ070287; Tue, 18 Nov 2014 14:12:20 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIECKuV070284; Tue, 18 Nov 2014 14:12:20 GMT (envelope-from br@FreeBSD.org) Message-Id: <201411181412.sAIECKuV070284@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 18 Nov 2014 14:12:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274656 - head/sys/dev/altera/pio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 14:12:21 -0000 Author: br Date: Tue Nov 18 14:12:19 2014 New Revision: 274656 URL: https://svnweb.freebsd.org/changeset/base/274656 Log: Add Altera Parallel IO (PIO) device driver. Sponsored by: DARPA, AFRL Added: head/sys/dev/altera/pio/ head/sys/dev/altera/pio/pio.c (contents, props changed) head/sys/dev/altera/pio/pio.h (contents, props changed) head/sys/dev/altera/pio/pio_if.m (contents, props changed) Added: head/sys/dev/altera/pio/pio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/altera/pio/pio.c Tue Nov 18 14:12:19 2014 (r274656) @@ -0,0 +1,215 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Altera PIO (Parallel IO) device driver + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include "pio_if.h" + +#define READ4(_sc, _reg) bus_read_4((_sc)->res[0], _reg) +#define READ2(_sc, _reg) bus_read_2((_sc)->res[0], _reg) +#define READ1(_sc, _reg) bus_read_1((_sc)->res[0], _reg) +#define WRITE4(_sc, _reg, _val) bus_write_4((_sc)->res[0], _reg, _val) +#define WRITE2(_sc, _reg, _val) bus_write_2((_sc)->res[0], _reg, _val) +#define WRITE1(_sc, _reg, _val) bus_write_1((_sc)->res[0], _reg, _val) + +struct pio_softc { + struct resource *res[2]; + bus_space_tag_t bst; + bus_space_handle_t bsh; + device_t dev; + void *ih; +}; + +static struct resource_spec pio_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { -1, 0 } +}; + +static int +pio_setup_irq(device_t dev, void *intr_handler, void *ih_user) +{ + struct pio_softc *sc; + + sc = device_get_softc(dev); + + /* Setup interrupt handlers */ + if (bus_setup_intr(sc->dev, sc->res[1], INTR_TYPE_BIO | INTR_MPSAFE, + NULL, intr_handler, ih_user, &sc->ih)) { + device_printf(sc->dev, "Unable to setup intr\n"); + return (1); + } + + return (0); +} + +static int +pio_teardown_irq(device_t dev) +{ + struct pio_softc *sc; + + sc = device_get_softc(dev); + + bus_teardown_intr(sc->dev, sc->res[1], sc->ih); + + return (0); +} + +static int +pio_read(device_t dev) +{ + struct pio_softc *sc; + + sc = device_get_softc(dev); + + return (READ4(sc, PIO_DATA)); +} + +static int +pio_set(device_t dev, int bit, int enable) +{ + struct pio_softc *sc; + + sc = device_get_softc(dev); + + if (enable) + WRITE4(sc, PIO_OUTSET, bit); + else + WRITE4(sc, PIO_OUTCLR, bit); + + return (0); +} + +static int +pio_configure(device_t dev, int dir, int mask) +{ + struct pio_softc *sc; + + sc = device_get_softc(dev); + + WRITE4(sc, PIO_INT_MASK, mask); + WRITE4(sc, PIO_DIR, dir); + + return (0); +} + +static int +pio_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "altr,pio")) + return (ENXIO); + + device_set_desc(dev, "Altera PIO"); + return (BUS_PROBE_DEFAULT); +} + +static int +pio_attach(device_t dev) +{ + struct pio_softc *sc; + struct fdt_ic *fic; + phandle_t node; + + sc = device_get_softc(dev); + sc->dev = dev; + + if (bus_alloc_resources(dev, pio_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + /* Memory interface */ + sc->bst = rman_get_bustag(sc->res[0]); + sc->bsh = rman_get_bushandle(sc->res[0]); + + WRITE4(sc, PIO_DATA, 0); + + if ((node = ofw_bus_get_node(sc->dev)) == -1) + return (ENXIO); + + fic = malloc(sizeof(*fic), M_DEVBUF, M_WAITOK|M_ZERO); + fic->iph = node; + fic->dev = dev; + SLIST_INSERT_HEAD(&fdt_ic_list_head, fic, fdt_ics); + + return (0); +} + +static device_method_t pio_methods[] = { + DEVMETHOD(device_probe, pio_probe), + DEVMETHOD(device_attach, pio_attach), + + /* pio_if.m */ + DEVMETHOD(pio_read, pio_read), + DEVMETHOD(pio_configure, pio_configure), + DEVMETHOD(pio_set, pio_set), + DEVMETHOD(pio_setup_irq, pio_setup_irq), + DEVMETHOD(pio_teardown_irq, pio_teardown_irq), + DEVMETHOD_END +}; + +static driver_t pio_driver = { + "altera_pio", + pio_methods, + sizeof(struct pio_softc), +}; + +static devclass_t pio_devclass; + +DRIVER_MODULE(altera_pio, simplebus, pio_driver, pio_devclass, 0, 0); Added: head/sys/dev/altera/pio/pio.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/altera/pio/pio.h Tue Nov 18 14:12:19 2014 (r274656) @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#define PIO_DATA 0x00 +#define PIO_DIR 0x04 +#define PIO_OUT(n) (1 << n) +#define PIO_OUT_ALL 0xffffffff +#define PIO_INT_MASK 0x08 +#define PIO_UNMASK(n) (1 << n) +#define PIO_UNMASK_ALL 0xffffffff +#define PIO_EDGECAPT 0x0c +#define PIO_OUTSET 0x10 +#define PIO_OUTCLR 0x14 + Added: head/sys/dev/altera/pio/pio_if.m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/altera/pio/pio_if.m Tue Nov 18 14:12:19 2014 (r274656) @@ -0,0 +1,65 @@ +#- +# Copyright (c) 2014 Ruslan Bukin +# All rights reserved. +# +# This software was developed by SRI International and the University of +# Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) +# ("CTSRD"), as part of the DARPA CRASH research programme. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +#include + +INTERFACE pio; + +# +# PIO device methods +# + +METHOD int read { + device_t dev; +}; + +METHOD int setup_irq { + device_t dev; + void *handler; + void *ih_user; +}; + +METHOD int teardown_irq { + device_t dev; +}; + +METHOD int set { + device_t dev; + int bit; + int enable; +}; + +METHOD int configure { + device_t dev; + int dir; + int mask; +} From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 14:24:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40E83C30; Tue, 18 Nov 2014 14:24:56 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A3FCCF7; Tue, 18 Nov 2014 14:24:55 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id sAIEOn30038290 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 18 Nov 2014 16:24:49 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua sAIEOn30038290 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id sAIEOnRt038289; Tue, 18 Nov 2014 16:24:49 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 18 Nov 2014 16:24:49 +0200 From: Konstantin Belousov To: Mark Felder Subject: Re: svn commit: r274653 - head/usr.sbin/freebsd-update Message-ID: <20141118142449.GW17068@kib.kiev.ua> References: <201411181338.sAIDc9U3051869@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201411181338.sAIDc9U3051869@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 14:24:56 -0000 On Tue, Nov 18, 2014 at 01:38:09PM +0000, Mark Felder wrote: > Author: feld (ports committer) > Date: Tue Nov 18 13:38:09 2014 > New Revision: 274653 > URL: https://svnweb.freebsd.org/changeset/base/274653 > > Log: > Re-work non-persistent filesystem detection as it was not possible to > detect /dev/md backed mfs filesystems that way. > > Differential Revision: https://reviews.freebsd.org/D1163 > Approved by: ian > > Modified: > head/usr.sbin/freebsd-update/freebsd-update.sh > > Modified: head/usr.sbin/freebsd-update/freebsd-update.sh > ============================================================================== > --- head/usr.sbin/freebsd-update/freebsd-update.sh Tue Nov 18 13:38:07 2014 (r274652) > +++ head/usr.sbin/freebsd-update/freebsd-update.sh Tue Nov 18 13:38:09 2014 (r274653) > @@ -604,14 +604,13 @@ fetchupgrade_check_params () { > echo ${WORKDIR} > exit 1 > fi > - for i in tmpfs mdmfs; do > - if df -t ${i} ${WORKDIR} >/dev/null 2>1; then > - echo -n "`basename $0`: " > - echo -n "${_WORKDIR_bad2}" > - echo ${WORKDIR} > - exit 1 > - fi > - done > + case `df -T ${WORKDIR}` in */dev/md[0-9]* | *tmpfs*) > + echo -n "`basename $0`: " > + echo -n "${_WORKDIR_bad2}" > + echo ${WORKDIR} > + exit 1 > + ;; > + esac > chmod 700 ${WORKDIR} > cd ${WORKDIR} || exit 1 > Why do you suppose that md-backed volumes are not persistent ? vnode-backed devices are stable. From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 15:05:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D62B5719; Tue, 18 Nov 2014 15:05:32 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9206195; Tue, 18 Nov 2014 15:05:32 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XqkLM-000FLN-L6; Tue, 18 Nov 2014 15:05:24 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id sAIF5NhS006099; Tue, 18 Nov 2014 08:05:23 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18BCjbMHopxAizW2nuYe6zI X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r274653 - head/usr.sbin/freebsd-update From: Ian Lepore To: Konstantin Belousov In-Reply-To: <20141118142449.GW17068@kib.kiev.ua> References: <201411181338.sAIDc9U3051869@svn.freebsd.org> <20141118142449.GW17068@kib.kiev.ua> Content-Type: text/plain; charset="us-ascii" Date: Tue, 18 Nov 2014 08:05:22 -0700 Message-ID: <1416323122.1147.46.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mark Felder X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 15:05:33 -0000 On Tue, 2014-11-18 at 16:24 +0200, Konstantin Belousov wrote: > On Tue, Nov 18, 2014 at 01:38:09PM +0000, Mark Felder wrote: > > Author: feld (ports committer) > > Date: Tue Nov 18 13:38:09 2014 > > New Revision: 274653 > > URL: https://svnweb.freebsd.org/changeset/base/274653 > > > > Log: > > Re-work non-persistent filesystem detection as it was not possible to > > detect /dev/md backed mfs filesystems that way. > > > > Differential Revision: https://reviews.freebsd.org/D1163 > > Approved by: ian > > > > Modified: > > head/usr.sbin/freebsd-update/freebsd-update.sh > > > > Modified: head/usr.sbin/freebsd-update/freebsd-update.sh > > ============================================================================== > > --- head/usr.sbin/freebsd-update/freebsd-update.sh Tue Nov 18 13:38:07 2014 (r274652) > > +++ head/usr.sbin/freebsd-update/freebsd-update.sh Tue Nov 18 13:38:09 2014 (r274653) > > @@ -604,14 +604,13 @@ fetchupgrade_check_params () { > > echo ${WORKDIR} > > exit 1 > > fi > > - for i in tmpfs mdmfs; do > > - if df -t ${i} ${WORKDIR} >/dev/null 2>1; then > > - echo -n "`basename $0`: " > > - echo -n "${_WORKDIR_bad2}" > > - echo ${WORKDIR} > > - exit 1 > > - fi > > - done > > + case `df -T ${WORKDIR}` in */dev/md[0-9]* | *tmpfs*) > > + echo -n "`basename $0`: " > > + echo -n "${_WORKDIR_bad2}" > > + echo ${WORKDIR} > > + exit 1 > > + ;; > > + esac > > chmod 700 ${WORKDIR} > > cd ${WORKDIR} || exit 1 > > > Why do you suppose that md-backed volumes are not persistent ? > vnode-backed devices are stable. > This is intended to guard against /var being an mfs due to diskless or readonly-root setup by rc.d/var during freebsd-update. I suppose it's possible for someone to configure /var in a persistant file-backed md on such a system. (Hmm, that's maybe even useful with nfs root, I may give that a try.) It looks like the information needed to figure out whether it's persistant or not is available in the kern.geom.conftxt sysctl, but parsing that with shell script is going to lead to some ugly hieroglyphics. Maybe a reasonable compromise would be instead of hard-fail, just warn the user that a memory-backed /var doesn't work and prompt them? (I'm not sure if the script is interactive at this point or not.) -- Ian From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 15:47:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B50C120E; Tue, 18 Nov 2014 15:47:49 +0000 (UTC) Received: from mail-wg0-x22b.google.com (mail-wg0-x22b.google.com [IPv6:2a00:1450:400c:c00::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 580FB8A2; Tue, 18 Nov 2014 15:47:49 +0000 (UTC) Received: by mail-wg0-f43.google.com with SMTP id l18so6554110wgh.30 for ; Tue, 18 Nov 2014 07:47:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=OE9pOtEN9HI6RT7rm/xM24kwnPH1I93xJNfeWlw0G+4=; b=m4X1XnrsqVYo0mM+JtrX0e0Jvtb/5iU5YcL6xiOwVD8D22cqM945BirHmjDaXKzT7R G52fGUyIYwyGPh7v8+iEPIjSHcUy4Kr5FNwAUEj4JFwR7Ur4ZF2sibgiSuiTtecO0iM0 +fnj7lcHgewUihiAqktpBwtiudc2OBNHCbAE/X+LlNcnbvT4qOZASNhP9qMqsfuPFzQ5 FpaWCUsw/RKPZs8WVYaN4LkBaMrmx+p4lee87iWPlWYMW2b1epKL9EE8Sl7DVNWwMqSH S/ihG1Trp45ioiFiHN86rQY2AKeOhdNT0CBPOeLAtyFqtL7jLjLMNU6K/QXOtme6khjF MMJQ== MIME-Version: 1.0 X-Received: by 10.180.83.98 with SMTP id p2mr4961175wiy.20.1416325666170; Tue, 18 Nov 2014 07:47:46 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.106.136 with HTTP; Tue, 18 Nov 2014 07:47:46 -0800 (PST) In-Reply-To: <20141118064626.GA956@dchagin.static.corbina.net> References: <201411172025.sAHKPLMl055666@svn.freebsd.org> <2245618.H2SPKlpWdS@ralph.baldwin.cx> <20141118064626.GA956@dchagin.static.corbina.net> Date: Tue, 18 Nov 2014 07:47:46 -0800 X-Google-Sender-Auth: z8cdXYS35KESugQlHmxFrmdcF3I Message-ID: Subject: Re: svn commit: r274635 - head/sys/dev/pci From: Adrian Chadd To: Chagin Dmitry Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 15:47:49 -0000 Hi, Want to post a bootverbose suspend/resume pass with -HEAD without this patch in it, then with this patch in it? We should likely revert this commit (for correctness) and then dig deeper into what's going on. -adrian On 17 November 2014 22:46, Chagin Dmitry wrote: > On Mon, Nov 17, 2014 at 05:45:23PM -0500, John Baldwin wrote: >> On Monday, November 17, 2014 08:25:21 PM Dmitry Chagin wrote: >> > Author: dchagin >> > Date: Mon Nov 17 20:25:21 2014 >> > New Revision: 274635 >> > URL: https://svnweb.freebsd.org/changeset/base/274635 >> > >> > Log: >> > Use the correct device as the power_for_sleep() method >> > always pass request up to parent bridge. >> > >> > Reviewed by: jhb >> > MFC after: 1 week >> > xMFC: r274386,r274397 >> >> Hmm, I had misread this diff as being another instance of what Adrian had >> found. I think this is actually not correct. The parent of a pci device >> ('dev' here) is a pciX device. pciX devices do not implement the >> PCIB_POWER_FOR_SLEEP method from pcib_if.m, so this probably just broke >> Adrian's Asus laptop as now it will always use D3 again and ignore _SxD. > ugh.. i understood, let me see more closely >> >> You said that this change fixed your laptop, yes? Did it work before Adrian's >> change in r274386 and break afterwards? > yes > > -- > Have fun! > chd From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 16:31:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A54DA09; Tue, 18 Nov 2014 16:31:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E25BFC4; Tue, 18 Nov 2014 16:31:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIGV0u1033345; Tue, 18 Nov 2014 16:31:00 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIGV0Cj033343; Tue, 18 Nov 2014 16:31:00 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201411181631.sAIGV0Cj033343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 18 Nov 2014 16:31:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274660 - head/etc/devd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 16:31:01 -0000 Author: jhibbits Date: Tue Nov 18 16:31:00 2014 New Revision: 274660 URL: https://svnweb.freebsd.org/changeset/base/274660 Log: Missed a terminating ';'. X-MFC-with: r273009 Modified: head/etc/devd/apple.conf Modified: head/etc/devd/apple.conf ============================================================================== --- head/etc/devd/apple.conf Tue Nov 18 15:38:40 2014 (r274659) +++ head/etc/devd/apple.conf Tue Nov 18 16:31:00 2014 (r274660) @@ -77,4 +77,4 @@ notify 10 { match "subsystem" "POWER"; match "type" "ACLINE"; action "/etc/rc.d/power_profile $notify"; -} +}; From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 17:06:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 314DEE3D; Tue, 18 Nov 2014 17:06:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C7C26A9; Tue, 18 Nov 2014 17:06:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIH6fTG051896; Tue, 18 Nov 2014 17:06:41 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIH6eS9051888; Tue, 18 Nov 2014 17:06:40 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201411181706.sAIH6eS9051888@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 18 Nov 2014 17:06:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274661 - in head/sys: conf geom/part modules/geom/geom_part/geom_part_bsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 17:06:42 -0000 Author: imp Date: Tue Nov 18 17:06:40 2014 New Revision: 274661 URL: https://svnweb.freebsd.org/changeset/base/274661 Log: Implement the historic DIOCGDINFO ioctl for gpart on BSD partitions. Several utilities still use this interface and require additional information since gpart was activated than before. This allows fsck of a UFS partition without having to specify it is UFS, per historic behavior. Modified: head/sys/conf/files head/sys/geom/part/g_part.c head/sys/geom/part/g_part_bsd.c head/sys/geom/part/g_part_if.m head/sys/modules/geom/geom_part/geom_part_bsd/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Nov 18 16:31:00 2014 (r274660) +++ head/sys/conf/files Tue Nov 18 17:06:40 2014 (r274661) @@ -2773,7 +2773,7 @@ geom/eli/pkcs5v2.c optional geom_eli geom/gate/g_gate.c optional geom_gate geom/geom_aes.c optional geom_aes geom/geom_bsd.c optional geom_bsd -geom/geom_bsd_enc.c optional geom_bsd +geom/geom_bsd_enc.c optional geom_bsd | geom_part_bsd geom/geom_ccd.c optional ccd | geom_ccd geom/geom_ctl.c standard geom/geom_dev.c standard Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Tue Nov 18 16:31:00 2014 (r274660) +++ head/sys/geom/part/g_part.c Tue Nov 18 17:06:40 2014 (r274661) @@ -143,6 +143,7 @@ static g_orphan_t g_part_orphan; static g_spoiled_t g_part_spoiled; static g_start_t g_part_start; static g_resize_t g_part_resize; +static g_ioctl_t g_part_ioctl; static struct g_class g_part_class = { .name = "PART", @@ -159,7 +160,8 @@ static struct g_class g_part_class = { .orphan = g_part_orphan, .spoiled = g_part_spoiled, .start = g_part_start, - .resize = g_part_resize + .resize = g_part_resize, + .ioctl = g_part_ioctl, }; DECLARE_GEOM_CLASS(g_part_class, g_part); @@ -2059,6 +2061,25 @@ g_part_dumpconf(struct sbuf *sb, const c } } +/*- + * This start routine is only called for non-trivial requests, all the + * trivial ones are handled autonomously by the slice code. + * For requests we handle here, we must call the g_io_deliver() on the + * bio, and return non-zero to indicate to the slice code that we did so. + * This code executes in the "DOWN" I/O path, this means: + * * No sleeping. + * * Don't grab the topology lock. + * * Don't call biowait, g_getattr(), g_setattr() or g_read_data() + */ +static int +g_part_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag, struct thread *td) +{ + struct g_part_table *table; + + table = pp->geom->softc; + return G_PART_IOCTL(table, pp, cmd, data, fflag, td); +} + static void g_part_resize(struct g_consumer *cp) { Modified: head/sys/geom/part/g_part_bsd.c ============================================================================== --- head/sys/geom/part/g_part_bsd.c Tue Nov 18 16:31:00 2014 (r274660) +++ head/sys/geom/part/g_part_bsd.c Tue Nov 18 17:06:40 2014 (r274661) @@ -83,6 +83,8 @@ static const char *g_part_bsd_type(struc static int g_part_bsd_write(struct g_part_table *, struct g_consumer *); static int g_part_bsd_resize(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); +static int g_part_bsd_ioctl(struct g_part_table *, struct g_provider *, + u_long cmd, void *data, int fflag, struct thread *td); static kobj_method_t g_part_bsd_methods[] = { KOBJMETHOD(g_part_add, g_part_bsd_add), @@ -98,6 +100,7 @@ static kobj_method_t g_part_bsd_methods[ KOBJMETHOD(g_part_read, g_part_bsd_read), KOBJMETHOD(g_part_type, g_part_bsd_type), KOBJMETHOD(g_part_write, g_part_bsd_write), + KOBJMETHOD(g_part_ioctl, g_part_bsd_ioctl), { 0, 0 } }; @@ -494,6 +497,38 @@ g_part_bsd_type(struct g_part_table *bas return (buf); } +/*- + * This start routine is only called for non-trivial requests, all the + * trivial ones are handled autonomously by the slice code. + * For requests we handle here, we must call the g_io_deliver() on the + * bio, and return non-zero to indicate to the slice code that we did so. + * This code executes in the "DOWN" I/O path, this means: + * * No sleeping. + * * Don't grab the topology lock. + * * Don't call biowait, g_getattr(), g_setattr() or g_read_data() + */ +static int +g_part_bsd_ioctl(struct g_part_table *basetable, struct g_provider *pp, + u_long cmd, void *data, int fflag, struct thread *td) +{ + + switch (cmd) + { + case DIOCGDINFO: + { + struct g_part_bsd_table *table; + u_char *p; + + table = (struct g_part_bsd_table *)basetable; + p = table->bbarea + pp->sectorsize; + return (bsd_disklabel_le_dec(p, data, MAXPARTITIONS)); + } + default: + return (ENOIOCTL); + + } +} + static int g_part_bsd_write(struct g_part_table *basetable, struct g_consumer *cp) { Modified: head/sys/geom/part/g_part_if.m ============================================================================== --- head/sys/geom/part/g_part_if.m Tue Nov 18 16:31:00 2014 (r274660) +++ head/sys/geom/part/g_part_if.m Tue Nov 18 17:06:40 2014 (r274661) @@ -71,6 +71,14 @@ CODE { { return (ENOSYS); } + + static int + default_ioctl(struct g_part_table *table __unused, struct g_provider *pp __unused, + u_long cmd __unused, void *data __unused, int fflag __unused, + struct thread *td __unused) + { + return (ENOIOCTL); + } }; # add() - scheme specific processing for the add verb. @@ -120,6 +128,16 @@ METHOD void fullname { const char *pfx; } DEFAULT default_fullname; +# ioctl() - implement historic ioctls, perhaps. +METHOD int ioctl { + struct g_part_table *table; + struct g_provider *pp; + u_long cmd; + void *data; + int fflag; + struct thread *td; +} DEFAULT default_ioctl; + # modify() - scheme specific processing for the modify verb. METHOD int modify { struct g_part_table *table; Modified: head/sys/modules/geom/geom_part/geom_part_bsd/Makefile ============================================================================== --- head/sys/modules/geom/geom_part/geom_part_bsd/Makefile Tue Nov 18 16:31:00 2014 (r274660) +++ head/sys/modules/geom/geom_part/geom_part_bsd/Makefile Tue Nov 18 17:06:40 2014 (r274661) @@ -1,9 +1,9 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../geom/part +.PATH: ${.CURDIR}/../../../../geom/part ${.CURDIR}/../../../../geom KMOD= geom_part_bsd -SRCS= g_part_bsd.c +SRCS= g_part_bsd.c geom_bsd_enc.c SRCS+= bus_if.h device_if.h g_part_if.h From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 17:06:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEEBFF72; Tue, 18 Nov 2014 17:06:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2A436AB; Tue, 18 Nov 2014 17:06:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIH6jIp051947; Tue, 18 Nov 2014 17:06:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIH6iLX051943; Tue, 18 Nov 2014 17:06:44 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201411181706.sAIH6iLX051943@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 18 Nov 2014 17:06:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274662 - in head: share/mk tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 17:06:46 -0000 Author: imp Date: Tue Nov 18 17:06:44 2014 New Revision: 274662 URL: https://svnweb.freebsd.org/changeset/base/274662 Log: Acutally, replaces NO_INCS with WITHOUT_INCLUDES and make WITHOUT_TOOLCHAIN imply it instead. Sponsored by: Netflix Added: head/tools/build/options/WITHOUT_INCLUDES (contents, props changed) Modified: head/share/mk/bsd.incs.mk head/share/mk/bsd.opts.mk head/share/mk/src.opts.mk Modified: head/share/mk/bsd.incs.mk ============================================================================== --- head/share/mk/bsd.incs.mk Tue Nov 18 17:06:40 2014 (r274661) +++ head/share/mk/bsd.incs.mk Tue Nov 18 17:06:44 2014 (r274662) @@ -4,7 +4,7 @@ .error bsd.incs.mk cannot be included directly. .endif -.if ${MK_TOOLCHAIN} != "no" +.if ${MK_INCLUDES} != "no" INCSGROUPS?= INCS Modified: head/share/mk/bsd.opts.mk ============================================================================== --- head/share/mk/bsd.opts.mk Tue Nov 18 17:06:40 2014 (r274661) +++ head/share/mk/bsd.opts.mk Tue Nov 18 17:06:44 2014 (r274662) @@ -51,6 +51,7 @@ ____: __DEFAULT_YES_OPTIONS = \ ASSERT_DEBUG \ DOCCOMPRESS \ + INCLUDES \ INSTALLLIB \ KERBEROS \ MAN \ Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Tue Nov 18 17:06:40 2014 (r274661) +++ head/share/mk/src.opts.mk Tue Nov 18 17:06:44 2014 (r274662) @@ -306,6 +306,7 @@ MK_BINUTILS:= no MK_CLANG:= no MK_GCC:= no MK_GDB:= no +MK_INCLUDES:= no .endif .if ${MK_CLANG} == "no" Added: head/tools/build/options/WITHOUT_INCLUDES ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_INCLUDES Tue Nov 18 17:06:44 2014 (r274662) @@ -0,0 +1,8 @@ +.\" $FreeBSD$ +Set to not install header files. +This option used to be spelled +.Va NO_INCS . +.Bf -symbolic +The option does not work for build targets. +.Ef + From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 17:06:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93A53F77; Tue, 18 Nov 2014 17:06:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80A0F6AC; Tue, 18 Nov 2014 17:06:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIH6lfQ051991; Tue, 18 Nov 2014 17:06:47 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIH6lUn051990; Tue, 18 Nov 2014 17:06:47 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201411181706.sAIH6lUn051990@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 18 Nov 2014 17:06:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274663 - head/sys/dev/pccbb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 17:06:47 -0000 Author: imp Date: Tue Nov 18 17:06:46 2014 New Revision: 274663 URL: https://svnweb.freebsd.org/changeset/base/274663 Log: Fix typo pointed out by avg@ and Joerg Sonnenberger. Add a clarifying sentence too. Sponsored by: Netflix Modified: head/sys/dev/pccbb/pccbb.c Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Tue Nov 18 17:06:44 2014 (r274662) +++ head/sys/dev/pccbb/pccbb.c Tue Nov 18 17:06:46 2014 (r274663) @@ -1591,10 +1591,10 @@ cbb_resume(device_t self) * from D0 and back to D0 cause the bridge to lose its config space, so * all the bus mappings and such are preserved. * - * For most drivers, the PCI layer handles this saving. However, - * sicne there's much black magic and archane art hidden in these - * few lines of code that would be difficult to transition into - * the PCI layer. + * For most drivers, the PCI layer handles this saving. However, since + * there's much black magic and arcane art hidden in these few lines of + * code that would be difficult to transition into the PCI + * layer. chipinit was several years of trial and error to write. */ pci_write_config(self, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); DEVPRINTF((self, "PCI Memory allocated: %08lx\n", From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 17:06:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F6BEF9B; Tue, 18 Nov 2014 17:06:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C1A76B0; Tue, 18 Nov 2014 17:06:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIH6mRN052035; Tue, 18 Nov 2014 17:06:48 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIH6mb9052034; Tue, 18 Nov 2014 17:06:48 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201411181706.sAIH6mb9052034@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 18 Nov 2014 17:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274664 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 17:06:49 -0000 Author: imp Date: Tue Nov 18 17:06:48 2014 New Revision: 274664 URL: https://svnweb.freebsd.org/changeset/base/274664 Log: LIB32 is supported for powerpc64 too. Make the note more general about 64-bit processors. Sponsored by: Netflix Modified: head/tools/build/options/WITHOUT_LIB32 Modified: head/tools/build/options/WITHOUT_LIB32 ============================================================================== --- head/tools/build/options/WITHOUT_LIB32 Tue Nov 18 17:06:46 2014 (r274663) +++ head/tools/build/options/WITHOUT_LIB32 Tue Nov 18 17:06:48 2014 (r274664) @@ -1,4 +1,4 @@ .\" $FreeBSD$ -On amd64, set to not build 32-bit library set and a +On 64-bit platforms, set to not build 32-bit library set and a .Nm ld-elf32.so.1 runtime linker. From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 17:06:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B786C13A; Tue, 18 Nov 2014 17:06:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A495B6B1; Tue, 18 Nov 2014 17:06:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIH6poH052087; Tue, 18 Nov 2014 17:06:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIH6pcl052085; Tue, 18 Nov 2014 17:06:51 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201411181706.sAIH6pcl052085@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 18 Nov 2014 17:06:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274665 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 17:06:51 -0000 Author: imp Date: Tue Nov 18 17:06:50 2014 New Revision: 274665 URL: https://svnweb.freebsd.org/changeset/base/274665 Log: Document WITHOUT_USB_EXAMPLES and WITHOUT_TESTS_SUPPORT Sponsored by: Netflix Added: head/tools/build/options/WITHOUT_TESTS_SUPPORT (contents, props changed) head/tools/build/options/WITHOUT_USB_GADGET_EXAMPLES (contents, props changed) Added: head/tools/build/options/WITHOUT_TESTS_SUPPORT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_TESTS_SUPPORT Tue Nov 18 17:06:50 2014 (r274665) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to disables the build of all test-related dependencies, including ATF. Added: head/tools/build/options/WITHOUT_USB_GADGET_EXAMPLES ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_USB_GADGET_EXAMPLES Tue Nov 18 17:06:50 2014 (r274665) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build USB gadget kernel modules. From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 17:06:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8383122F; Tue, 18 Nov 2014 17:06:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70C306B6; Tue, 18 Nov 2014 17:06:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIH6r9v052134; Tue, 18 Nov 2014 17:06:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIH6rOB052133; Tue, 18 Nov 2014 17:06:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201411181706.sAIH6rOB052133@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 18 Nov 2014 17:06:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274666 - head/sys/modules/cxgb/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 17:06:53 -0000 Author: imp Date: Tue Nov 18 17:06:52 2014 New Revision: 274666 URL: https://svnweb.freebsd.org/changeset/base/274666 Log: opt_global.h is never needed in SRCS lists. Sponsored by: Netflix Modified: head/sys/modules/cxgb/tom/Makefile Modified: head/sys/modules/cxgb/tom/Makefile ============================================================================== --- head/sys/modules/cxgb/tom/Makefile Tue Nov 18 17:06:50 2014 (r274665) +++ head/sys/modules/cxgb/tom/Makefile Tue Nov 18 17:06:52 2014 (r274666) @@ -6,7 +6,7 @@ CXGB = ${.CURDIR}/../../../dev/cxgb KMOD= t3_tom SRCS= cxgb_tom.c cxgb_cpl_io.c cxgb_listen.c cxgb_l2t.c SRCS+= opt_compat.h opt_inet.h opt_inet6.h opt_ipsec.h -SRCS+= opt_tcpdebug.h opt_ddb.h opt_sched.h opt_global.h opt_ktr.h +SRCS+= opt_tcpdebug.h opt_ddb.h opt_sched.h opt_ktr.h SRCS+= device_if.h bus_if.h pci_if.h CFLAGS+= -g -I${CXGB} From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 17:07:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA63D6F7; Tue, 18 Nov 2014 17:07:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACACE6C0; Tue, 18 Nov 2014 17:07:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIH713R052282; Tue, 18 Nov 2014 17:07:01 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIH6vtR052227; Tue, 18 Nov 2014 17:06:57 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201411181706.sAIH6vtR052227@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 18 Nov 2014 17:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274668 - in head/sys: arm/arm arm/broadcom/bcm2835 arm/freescale/imx arm/include arm/mv arm/ti arm/versatile arm/xilinx dev/xen/netback i386/xen kern mips/mips xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 17:07:01 -0000 Author: imp Date: Tue Nov 18 17:06:56 2014 New Revision: 274668 URL: https://svnweb.freebsd.org/changeset/base/274668 Log: opt_global.h is included automatically in the build. No need to explicitly include it in these places. Sponsored by: Netflix Modified: head/sys/arm/arm/stdatomic.c head/sys/arm/broadcom/bcm2835/bcm2835_common.c head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c head/sys/arm/freescale/imx/imx_common.c head/sys/arm/include/asmacros.h head/sys/arm/mv/mv_common.c head/sys/arm/ti/ti_common.c head/sys/arm/versatile/versatile_common.c head/sys/arm/versatile/versatile_machdep.c head/sys/arm/xilinx/uart_dev_cdnc.c head/sys/arm/xilinx/zy7_machdep.c head/sys/dev/xen/netback/netback.c head/sys/i386/xen/locore.s head/sys/kern/kern_mutex.c head/sys/mips/mips/stdatomic.c head/sys/mips/mips/trap.c head/sys/xen/gnttab.c Modified: head/sys/arm/arm/stdatomic.c ============================================================================== --- head/sys/arm/arm/stdatomic.c Tue Nov 18 17:06:54 2014 (r274667) +++ head/sys/arm/arm/stdatomic.c Tue Nov 18 17:06:56 2014 (r274668) @@ -34,10 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef _KERNEL -#include "opt_global.h" -#endif - /* * Executing statements with interrupts disabled. */ Modified: head/sys/arm/broadcom/bcm2835/bcm2835_common.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_common.c Tue Nov 18 17:06:54 2014 (r274667) +++ head/sys/arm/broadcom/bcm2835/bcm2835_common.c Tue Nov 18 17:06:56 2014 (r274668) @@ -29,8 +29,6 @@ * SUCH DAMAGE. */ -#include "opt_global.h" - #include __FBSDID("$FreeBSD$"); Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Tue Nov 18 17:06:54 2014 (r274667) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Tue Nov 18 17:06:56 2014 (r274668) @@ -38,7 +38,6 @@ #include "opt_ddb.h" #include "opt_platform.h" -#include "opt_global.h" #include __FBSDID("$FreeBSD$"); Modified: head/sys/arm/freescale/imx/imx_common.c ============================================================================== --- head/sys/arm/freescale/imx/imx_common.c Tue Nov 18 17:06:54 2014 (r274667) +++ head/sys/arm/freescale/imx/imx_common.c Tue Nov 18 17:06:56 2014 (r274668) @@ -33,8 +33,6 @@ * SUCH DAMAGE. */ -#include "opt_global.h" - #include __FBSDID("$FreeBSD$"); Modified: head/sys/arm/include/asmacros.h ============================================================================== --- head/sys/arm/include/asmacros.h Tue Nov 18 17:06:54 2014 (r274667) +++ head/sys/arm/include/asmacros.h Tue Nov 18 17:06:56 2014 (r274668) @@ -34,7 +34,6 @@ #ifdef _KERNEL #ifdef LOCORE -#include "opt_global.h" #ifdef _ARM_ARCH_6 #define GET_CURTHREAD_PTR(tmp) \ Modified: head/sys/arm/mv/mv_common.c ============================================================================== --- head/sys/arm/mv/mv_common.c Tue Nov 18 17:06:54 2014 (r274667) +++ head/sys/arm/mv/mv_common.c Tue Nov 18 17:06:56 2014 (r274668) @@ -29,8 +29,6 @@ * SUCH DAMAGE. */ -#include "opt_global.h" - #include __FBSDID("$FreeBSD$"); Modified: head/sys/arm/ti/ti_common.c ============================================================================== --- head/sys/arm/ti/ti_common.c Tue Nov 18 17:06:54 2014 (r274667) +++ head/sys/arm/ti/ti_common.c Tue Nov 18 17:06:56 2014 (r274668) @@ -29,8 +29,6 @@ * SUCH DAMAGE. */ -#include "opt_global.h" - #include __FBSDID("$FreeBSD$"); Modified: head/sys/arm/versatile/versatile_common.c ============================================================================== --- head/sys/arm/versatile/versatile_common.c Tue Nov 18 17:06:54 2014 (r274667) +++ head/sys/arm/versatile/versatile_common.c Tue Nov 18 17:06:56 2014 (r274668) @@ -29,8 +29,6 @@ * SUCH DAMAGE. */ -#include "opt_global.h" - #include __FBSDID("$FreeBSD$"); Modified: head/sys/arm/versatile/versatile_machdep.c ============================================================================== --- head/sys/arm/versatile/versatile_machdep.c Tue Nov 18 17:06:54 2014 (r274667) +++ head/sys/arm/versatile/versatile_machdep.c Tue Nov 18 17:06:56 2014 (r274668) @@ -35,7 +35,6 @@ #include "opt_ddb.h" #include "opt_platform.h" -#include "opt_global.h" #include __FBSDID("$FreeBSD$"); Modified: head/sys/arm/xilinx/uart_dev_cdnc.c ============================================================================== --- head/sys/arm/xilinx/uart_dev_cdnc.c Tue Nov 18 17:06:54 2014 (r274667) +++ head/sys/arm/xilinx/uart_dev_cdnc.c Tue Nov 18 17:06:56 2014 (r274668) @@ -38,8 +38,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_global.h" - #include #include #include Modified: head/sys/arm/xilinx/zy7_machdep.c ============================================================================== --- head/sys/arm/xilinx/zy7_machdep.c Tue Nov 18 17:06:54 2014 (r274667) +++ head/sys/arm/xilinx/zy7_machdep.c Tue Nov 18 17:06:56 2014 (r274668) @@ -33,8 +33,6 @@ * (v1.4) November 16, 2012. Xilinx doc UG585. */ -#include "opt_global.h" - #include __FBSDID("$FreeBSD$"); Modified: head/sys/dev/xen/netback/netback.c ============================================================================== --- head/sys/dev/xen/netback/netback.c Tue Nov 18 17:06:54 2014 (r274667) +++ head/sys/dev/xen/netback/netback.c Tue Nov 18 17:06:56 2014 (r274668) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); */ #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_global.h" #include "opt_sctp.h" Modified: head/sys/i386/xen/locore.s ============================================================================== --- head/sys/i386/xen/locore.s Tue Nov 18 17:06:54 2014 (r274667) +++ head/sys/i386/xen/locore.s Tue Nov 18 17:06:56 2014 (r274668) @@ -42,7 +42,6 @@ #include "opt_bootp.h" #include "opt_compat.h" #include "opt_nfsroot.h" -#include "opt_global.h" #include "opt_pmap.h" #include Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Tue Nov 18 17:06:54 2014 (r274667) +++ head/sys/kern/kern_mutex.c Tue Nov 18 17:06:56 2014 (r274668) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include "opt_adaptive_mutexes.h" #include "opt_ddb.h" -#include "opt_global.h" #include "opt_hwpmc_hooks.h" #include "opt_sched.h" Modified: head/sys/mips/mips/stdatomic.c ============================================================================== --- head/sys/mips/mips/stdatomic.c Tue Nov 18 17:06:54 2014 (r274667) +++ head/sys/mips/mips/stdatomic.c Tue Nov 18 17:06:56 2014 (r274668) @@ -33,10 +33,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef _KERNEL -#include "opt_global.h" -#endif - #if defined(__SYNC_ATOMICS) /* Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Tue Nov 18 17:06:54 2014 (r274667) +++ head/sys/mips/mips/trap.c Tue Nov 18 17:06:56 2014 (r274668) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" #include "opt_ddb.h" -#include "opt_global.h" #include "opt_ktrace.h" #include Modified: head/sys/xen/gnttab.c ============================================================================== --- head/sys/xen/gnttab.c Tue Nov 18 17:06:54 2014 (r274667) +++ head/sys/xen/gnttab.c Tue Nov 18 17:06:56 2014 (r274668) @@ -13,7 +13,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_global.h" #include "opt_pmap.h" #include From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 17:07:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D226B773; Tue, 18 Nov 2014 17:07:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FEDB6C8; Tue, 18 Nov 2014 17:07:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIH73ub052325; Tue, 18 Nov 2014 17:07:03 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIH73Dx052324; Tue, 18 Nov 2014 17:07:03 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201411181707.sAIH73Dx052324@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 18 Nov 2014 17:07:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274669 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 17:07:04 -0000 Author: imp Date: Tue Nov 18 17:07:02 2014 New Revision: 274669 URL: https://svnweb.freebsd.org/changeset/base/274669 Log: These delays aren't needed. Elimate them. They should be on the order of a few cycles at most, not 10us. They make it impossible to implement half-duplex protocols that are faster than about 1KHz. Sponsored by: Netflix Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Tue Nov 18 17:06:56 2014 (r274668) +++ head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Tue Nov 18 17:07:02 2014 (r274669) @@ -238,9 +238,7 @@ bcm_gpio_set_pud(struct bcm_gpio_softc * offset = pin - 32 * bank; BCM_GPIO_WRITE(sc, BCM_GPIO_GPPUD(0), state); - DELAY(10); BCM_GPIO_WRITE(sc, BCM_GPIO_GPPUDCLK(bank), (1 << offset)); - DELAY(10); BCM_GPIO_WRITE(sc, BCM_GPIO_GPPUD(0), 0); BCM_GPIO_WRITE(sc, BCM_GPIO_GPPUDCLK(bank), 0); } From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 17:06:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37BCF30C; Tue, 18 Nov 2014 17:06:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24FE46B7; Tue, 18 Nov 2014 17:06:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIH6tPx052181; Tue, 18 Nov 2014 17:06:55 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIH6tQM052179; Tue, 18 Nov 2014 17:06:55 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201411181706.sAIH6tQM052179@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 18 Nov 2014 17:06:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274667 - head/sys/modules/lmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 17:06:55 -0000 Author: imp Date: Tue Nov 18 17:06:54 2014 New Revision: 274667 URL: https://svnweb.freebsd.org/changeset/base/274667 Log: No need to list opt_global.h. No need to force ALTQ here, since that's not the normal default for the system and nothing else forces it on. Sponsored by: Netflix Modified: head/sys/modules/lmc/Makefile Modified: head/sys/modules/lmc/Makefile ============================================================================== --- head/sys/modules/lmc/Makefile Tue Nov 18 17:06:52 2014 (r274666) +++ head/sys/modules/lmc/Makefile Tue Nov 18 17:06:54 2014 (r274667) @@ -7,12 +7,9 @@ SRCS = if_lmc.c if_lmc.h SRCS += device_if.h bus_if.h pci_if.h SRCS += opt_inet.h opt_inet6.h SRCS += opt_netgraph.h -SRCS += opt_global.h SRCS += opt_bpf.h opt_netgraph.h: echo "#define NETGRAPH 1" > ${.TARGET} -opt_global.h: - echo "#define ALTQ 1" > ${.TARGET} .include From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 17:22:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2181C9A; Tue, 18 Nov 2014 17:22:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CADD5905; Tue, 18 Nov 2014 17:22:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIHMDCP061083; Tue, 18 Nov 2014 17:22:13 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIHM9w4061061; Tue, 18 Nov 2014 17:22:09 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201411181722.sAIHM9w4061061@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 18 Nov 2014 17:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274670 - in head/sys: arm/allwinner arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/rockchip arm/samsung/exynos arm/ti arm/xscale/ixp425 dev/gpio mips/atheros mips/cavi... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 17:22:14 -0000 Author: loos Date: Tue Nov 18 17:22:08 2014 New Revision: 274670 URL: https://svnweb.freebsd.org/changeset/base/274670 Log: Moves all the duplicate code to a single function. Verify for invalid modes and unwanted flags before pass the new flags to driver. Modified: head/sys/arm/allwinner/a10_gpio.c head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c head/sys/arm/freescale/imx/imx_gpio.c head/sys/arm/freescale/vybrid/vf_gpio.c head/sys/arm/rockchip/rk30xx_gpio.c head/sys/arm/samsung/exynos/exynos5_pad.c head/sys/arm/ti/ti_gpio.c head/sys/arm/xscale/ixp425/avila_gpio.c head/sys/arm/xscale/ixp425/cambria_gpio.c head/sys/dev/gpio/gpiobus.c head/sys/dev/gpio/gpiobusvar.h head/sys/dev/gpio/gpioc.c head/sys/mips/atheros/ar71xx_gpio.c head/sys/mips/cavium/octeon_gpio.c head/sys/mips/rt305x/rt305x_gpio.c head/sys/powerpc/wii/wii_gpio.c Modified: head/sys/arm/allwinner/a10_gpio.c ============================================================================== --- head/sys/arm/allwinner/a10_gpio.c Tue Nov 18 17:07:02 2014 (r274669) +++ head/sys/arm/allwinner/a10_gpio.c Tue Nov 18 17:22:08 2014 (r274670) @@ -302,20 +302,6 @@ a10_gpio_pin_setflags(device_t dev, uint if (i >= sc->sc_gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->sc_gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together. */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - - /* Can't mix pull-up/pull-down together. */ - if ((flags & (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) == - (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) - return (EINVAL); - a10_gpio_pin_configure(sc, &sc->sc_gpio_pins[i], flags); return (0); Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Tue Nov 18 17:07:02 2014 (r274669) +++ head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Tue Nov 18 17:22:08 2014 (r274670) @@ -397,20 +397,6 @@ bcm_gpio_pin_setflags(device_t dev, uint if (bcm_gpio_pin_is_ro(sc, pin)) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->sc_gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together. */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - - /* Can't mix pull-up/pull-down together. */ - if ((flags & (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) == - (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) - return (EINVAL); - bcm_gpio_pin_configure(sc, &sc->sc_gpio_pins[i], flags); return (0); Modified: head/sys/arm/freescale/imx/imx_gpio.c ============================================================================== --- head/sys/arm/freescale/imx/imx_gpio.c Tue Nov 18 17:07:02 2014 (r274669) +++ head/sys/arm/freescale/imx/imx_gpio.c Tue Nov 18 17:22:08 2014 (r274670) @@ -268,18 +268,8 @@ imx51_gpio_pin_setflags(device_t dev, ui if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - imx51_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); - return (0); } Modified: head/sys/arm/freescale/vybrid/vf_gpio.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_gpio.c Tue Nov 18 17:07:02 2014 (r274669) +++ head/sys/arm/freescale/vybrid/vf_gpio.c Tue Nov 18 17:22:08 2014 (r274670) @@ -312,15 +312,6 @@ vf_gpio_pin_setflags(device_t dev, uint3 if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - vf_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); return (0); Modified: head/sys/arm/rockchip/rk30xx_gpio.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_gpio.c Tue Nov 18 17:07:02 2014 (r274669) +++ head/sys/arm/rockchip/rk30xx_gpio.c Tue Nov 18 17:22:08 2014 (r274670) @@ -318,20 +318,6 @@ rk30_gpio_pin_setflags(device_t dev, uin if (i >= sc->sc_gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->sc_gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together. */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - - /* Can't mix pull-up/pull-down together. */ - if ((flags & (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) == - (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) - return (EINVAL); - rk30_gpio_pin_configure(sc, &sc->sc_gpio_pins[i], flags); return (0); Modified: head/sys/arm/samsung/exynos/exynos5_pad.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_pad.c Tue Nov 18 17:07:02 2014 (r274669) +++ head/sys/arm/samsung/exynos/exynos5_pad.c Tue Nov 18 17:22:08 2014 (r274670) @@ -764,15 +764,6 @@ pad_pin_setflags(device_t dev, uint32_t if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - pad_pin_configure(sc, &sc->gpio_pins[i], flags); return (0); Modified: head/sys/arm/ti/ti_gpio.c ============================================================================== --- head/sys/arm/ti/ti_gpio.c Tue Nov 18 17:07:02 2014 (r274669) +++ head/sys/arm/ti/ti_gpio.c Tue Nov 18 17:22:08 2014 (r274670) @@ -462,16 +462,6 @@ ti_gpio_pin_setflags(device_t dev, uint3 uint32_t mask = (1UL << (pin % PINS_PER_BANK)); uint32_t reg_val; - /* Sanity check the flags supplied are valid, i.e. not input and output */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == 0x0000) - return (EINVAL); - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - if ((flags & (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) == - (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) - return (EINVAL); - TI_GPIO_LOCK(sc); /* Sanity check the pin number is valid */ Modified: head/sys/arm/xscale/ixp425/avila_gpio.c ============================================================================== --- head/sys/arm/xscale/ixp425/avila_gpio.c Tue Nov 18 17:07:02 2014 (r274669) +++ head/sys/arm/xscale/ixp425/avila_gpio.c Tue Nov 18 17:22:08 2014 (r274670) @@ -220,16 +220,8 @@ avila_gpio_pin_setflags(device_t dev, ui if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & mask)) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->sc_pins[pin].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - avila_gpio_pin_configure(sc, &sc->sc_pins[pin], flags); + return (0); } Modified: head/sys/arm/xscale/ixp425/cambria_gpio.c ============================================================================== --- head/sys/arm/xscale/ixp425/cambria_gpio.c Tue Nov 18 17:07:02 2014 (r274669) +++ head/sys/arm/xscale/ixp425/cambria_gpio.c Tue Nov 18 17:22:08 2014 (r274670) @@ -317,15 +317,6 @@ cambria_gpio_pin_setflags(device_t dev, if (pin >= GPIO_PINS) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->sc_pins[pin].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - GPIO_LOCK(sc); sc->sc_pins[pin].gp_flags = flags; Modified: head/sys/dev/gpio/gpiobus.c ============================================================================== --- head/sys/dev/gpio/gpiobus.c Tue Nov 18 17:07:02 2014 (r274669) +++ head/sys/dev/gpio/gpiobus.c Tue Nov 18 17:22:08 2014 (r274670) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -70,6 +71,23 @@ static int gpiobus_pin_set(device_t, dev static int gpiobus_pin_get(device_t, device_t, uint32_t, unsigned int*); static int gpiobus_pin_toggle(device_t, device_t, uint32_t); +int +gpio_check_flags(uint32_t caps, uint32_t flags) +{ + + /* Check for unwanted flags. */ + if ((flags & caps) == 0 || (flags & caps) != flags) + return (EINVAL); + /* Cannot mix input/output together. */ + if (flags & GPIO_PIN_INPUT && flags & GPIO_PIN_OUTPUT) + return (EINVAL); + /* Cannot mix pull-up/pull-down together. */ + if (flags & GPIO_PIN_PULLUP && flags & GPIO_PIN_PULLDOWN) + return (EINVAL); + + return (0); +} + static void gpiobus_print_pins(struct gpiobus_ivar *devi, char *buf, size_t buflen) { @@ -490,11 +508,16 @@ gpiobus_pin_setflags(device_t dev, devic { struct gpiobus_softc *sc = GPIOBUS_SOFTC(dev); struct gpiobus_ivar *devi = GPIOBUS_IVAR(child); + uint32_t caps; if (pin >= devi->npins) return (EINVAL); + if (GPIO_PIN_GETCAPS(sc->sc_dev, devi->pins[pin], &caps) != 0) + return (EINVAL); + if (gpio_check_flags(caps, flags) != 0) + return (EINVAL); - return GPIO_PIN_SETFLAGS(sc->sc_dev, devi->pins[pin], flags); + return (GPIO_PIN_SETFLAGS(sc->sc_dev, devi->pins[pin], flags)); } static int Modified: head/sys/dev/gpio/gpiobusvar.h ============================================================================== --- head/sys/dev/gpio/gpiobusvar.h Tue Nov 18 17:07:02 2014 (r274669) +++ head/sys/dev/gpio/gpiobusvar.h Tue Nov 18 17:22:08 2014 (r274670) @@ -94,6 +94,7 @@ gpio_map_gpios(device_t bus, phandle_t d device_t ofw_gpiobus_add_fdt_child(device_t, phandle_t); #endif +int gpio_check_flags(uint32_t, uint32_t); int gpiobus_init_softc(device_t); extern driver_t gpiobus_driver; Modified: head/sys/dev/gpio/gpioc.c ============================================================================== --- head/sys/dev/gpio/gpioc.c Tue Nov 18 17:07:02 2014 (r274669) +++ head/sys/dev/gpio/gpioc.c Tue Nov 18 17:22:08 2014 (r274670) @@ -29,19 +29,16 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include #include +#include #include #include #include #include -#include -#include -#include -#include +#include + #include "gpio_if.h" #undef GPIOC_DEBUG @@ -119,6 +116,7 @@ gpioc_ioctl(struct cdev *cdev, u_long cm struct gpioc_softc *sc = cdev->si_drv1; struct gpio_pin pin; struct gpio_req req; + uint32_t caps; switch (cmd) { case GPIOMAXPIN: @@ -141,8 +139,12 @@ gpioc_ioctl(struct cdev *cdev, u_long cm case GPIOSETCONFIG: bcopy(arg, &pin, sizeof(pin)); dprintf("set config pin %d\n", pin.gp_pin); - res = GPIO_PIN_SETFLAGS(sc->sc_pdev, pin.gp_pin, - pin.gp_flags); + res = GPIO_PIN_GETCAPS(sc->sc_pdev, pin.gp_pin, &caps); + if (res == 0) + res = gpio_check_flags(caps, pin.gp_flags); + if (res == 0) + res = GPIO_PIN_SETFLAGS(sc->sc_pdev, pin.gp_pin, + pin.gp_flags); break; case GPIOGET: bcopy(arg, &req, sizeof(req)); Modified: head/sys/mips/atheros/ar71xx_gpio.c ============================================================================== --- head/sys/mips/atheros/ar71xx_gpio.c Tue Nov 18 17:07:02 2014 (r274669) +++ head/sys/mips/atheros/ar71xx_gpio.c Tue Nov 18 17:22:08 2014 (r274670) @@ -241,16 +241,8 @@ ar71xx_gpio_pin_setflags(device_t dev, u if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); + return (0); } Modified: head/sys/mips/cavium/octeon_gpio.c ============================================================================== --- head/sys/mips/cavium/octeon_gpio.c Tue Nov 18 17:07:02 2014 (r274669) +++ head/sys/mips/cavium/octeon_gpio.c Tue Nov 18 17:22:08 2014 (r274670) @@ -219,16 +219,8 @@ octeon_gpio_pin_setflags(device_t dev, u if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - octeon_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); + return (0); } Modified: head/sys/mips/rt305x/rt305x_gpio.c ============================================================================== --- head/sys/mips/rt305x/rt305x_gpio.c Tue Nov 18 17:07:02 2014 (r274669) +++ head/sys/mips/rt305x/rt305x_gpio.c Tue Nov 18 17:22:08 2014 (r274670) @@ -242,18 +242,8 @@ rt305x_gpio_pin_setflags(device_t dev, u if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - rt305x_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); - return (0); } Modified: head/sys/powerpc/wii/wii_gpio.c ============================================================================== --- head/sys/powerpc/wii/wii_gpio.c Tue Nov 18 17:07:02 2014 (r274669) +++ head/sys/powerpc/wii/wii_gpio.c Tue Nov 18 17:22:08 2014 (r274670) @@ -295,11 +295,6 @@ wiigpio_pin_setflags(device_t dev, uint3 if (pin >= WIIGPIO_NPINS) return (EINVAL); - if ((flags & ~(GPIO_PIN_OUTPUT|GPIO_PIN_INPUT)) != 0) - return (EINVAL); - if ((flags & (GPIO_PIN_OUTPUT|GPIO_PIN_INPUT)) == - (GPIO_PIN_OUTPUT|GPIO_PIN_INPUT)) - return (EINVAL); sc = device_get_softc(dev); pinbank = WIIGPIO_PINBANK(pin); pinmask = WIIGPIO_PINMASK(pin); From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 17:37:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3928833F; Tue, 18 Nov 2014 17:37:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 256D3A41; Tue, 18 Nov 2014 17:37:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIHbYsw066422; Tue, 18 Nov 2014 17:37:34 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIHbYKl066421; Tue, 18 Nov 2014 17:37:34 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201411181737.sAIHbYKl066421@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 18 Nov 2014 17:37:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274671 - head/sys/dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 17:37:34 -0000 Author: loos Date: Tue Nov 18 17:37:33 2014 New Revision: 274671 URL: https://svnweb.freebsd.org/changeset/base/274671 Log: Make gpio_default_map_gpios() static. No functional changes. Modified: head/sys/dev/gpio/gpio_if.m Modified: head/sys/dev/gpio/gpio_if.m ============================================================================== --- head/sys/dev/gpio/gpio_if.m Tue Nov 18 17:22:08 2014 (r274670) +++ head/sys/dev/gpio/gpio_if.m Tue Nov 18 17:37:33 2014 (r274671) @@ -32,9 +32,7 @@ INTERFACE gpio; CODE { - static gpio_map_gpios_t gpio_default_map_gpios; - - int + static int gpio_default_map_gpios(device_t bus, phandle_t dev, phandle_t gparent, int gcells, pcell_t *gpios, uint32_t *pin, uint32_t *flags) From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 18:03:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B64FB26; Tue, 18 Nov 2014 18:03:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 566B8D52; Tue, 18 Nov 2014 18:03:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAII3gMU079802; Tue, 18 Nov 2014 18:03:42 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAII3fCg079794; Tue, 18 Nov 2014 18:03:41 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201411181803.sAII3fCg079794@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Tue, 18 Nov 2014 18:03:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274672 - in head/contrib/libxo: . libxo xolint X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 18:03:42 -0000 Author: marcel Date: Tue Nov 18 18:03:40 2014 New Revision: 274672 URL: https://svnweb.freebsd.org/changeset/base/274672 Log: Upgrade libxo to 0.1.6. Summary of changes: 1. Coverity defect fixes Obtained from: https://github.com/Juniper/libxo/releases/tag/0.1.6 Modified: head/contrib/libxo/configure.ac head/contrib/libxo/libxo/libxo.c head/contrib/libxo/libxo/xoconfig.h head/contrib/libxo/libxo/xoversion.h head/contrib/libxo/xolint/xolint.pl Modified: head/contrib/libxo/configure.ac ============================================================================== --- head/contrib/libxo/configure.ac Tue Nov 18 17:37:33 2014 (r274671) +++ head/contrib/libxo/configure.ac Tue Nov 18 18:03:40 2014 (r274672) @@ -12,7 +12,7 @@ # AC_PREREQ(2.2) -AC_INIT([libxo], [0.1.5], [phil@juniper.net]) +AC_INIT([libxo], [0.1.6], [phil@juniper.net]) AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability]) # Support silent build rules. Requires at least automake-1.11. Modified: head/contrib/libxo/libxo/libxo.c ============================================================================== --- head/contrib/libxo/libxo/libxo.c Tue Nov 18 17:37:33 2014 (r274671) +++ head/contrib/libxo/libxo/libxo.c Tue Nov 18 18:03:40 2014 (r274672) @@ -317,7 +317,7 @@ xo_init_handle (xo_handle_t *xop) cp = getenv("LC_ALL"); if (cp == NULL) cp = "UTF-8"; /* Optimistic? */ - cp = setlocale(LC_CTYPE, cp); + (void) setlocale(LC_CTYPE, cp); } /* @@ -607,8 +607,10 @@ xo_vsnprintf (xo_handle_t *xop, xo_buffe rc = vsnprintf(xbp->xb_curp, left, fmt, va_local); if (rc > xbp->xb_size) { - if (!xo_buf_has_room(xbp, rc)) + if (!xo_buf_has_room(xbp, rc)) { + va_end(va_local); return -1; + } /* * After we call vsnprintf(), the stage of vap is not defined. @@ -648,8 +650,10 @@ xo_printf_v (xo_handle_t *xop, const cha rc = vsnprintf(xbp->xb_curp, left, fmt, va_local); if (rc > xbp->xb_size) { - if (!xo_buf_has_room(xbp, rc)) + if (!xo_buf_has_room(xbp, rc)) { + va_end(va_local); return -1; + } va_end(va_local); /* Reset vap to the start */ va_copy(va_local, vap); @@ -974,8 +978,10 @@ xo_warn_hcv (xo_handle_t *xop, int code, int left = xbp->xb_size - (xbp->xb_curp - xbp->xb_bufp); int rc = vsnprintf(xbp->xb_curp, left, newfmt, vap); if (rc > xbp->xb_size) { - if (!xo_buf_has_room(xbp, rc)) + if (!xo_buf_has_room(xbp, rc)) { + va_end(va_local); return; + } va_end(vap); /* Reset vap to the start */ va_copy(vap, va_local); @@ -1118,8 +1124,10 @@ xo_message_hcv (xo_handle_t *xop, int co int left = xbp->xb_size - (xbp->xb_curp - xbp->xb_bufp); rc = vsnprintf(xbp->xb_curp, left, fmt, vap); if (rc > xbp->xb_size) { - if (!xo_buf_has_room(xbp, rc)) + if (!xo_buf_has_room(xbp, rc)) { + va_end(va_local); return; + } va_end(vap); /* Reset vap to the start */ va_copy(vap, va_local); @@ -1154,14 +1162,15 @@ xo_message_hcv (xo_handle_t *xop, int co va_copy(va_local, vap); - rc = vsnprintf(buf, bufsiz, fmt, va_local); + rc = vsnprintf(bp, bufsiz, fmt, va_local); if (rc > bufsiz) { bufsiz = rc + BUFSIZ; bp = alloca(bufsiz); va_end(va_local); va_copy(va_local, vap); - rc = vsnprintf(buf, bufsiz, fmt, va_local); + rc = vsnprintf(bp, bufsiz, fmt, va_local); } + va_end(va_local); cp = bp + rc; if (need_nl) { @@ -1302,9 +1311,9 @@ xo_create_to_file (FILE *fp, xo_style_t * @xop XO handle to alter (or NULL for default handle) */ void -xo_destroy (xo_handle_t *xop) +xo_destroy (xo_handle_t *xop_arg) { - xop = xo_default(xop); + xo_handle_t *xop = xo_default(xop_arg); if (xop->xo_close && (xop->xo_flags & XOF_CLOSE_FP)) xop->xo_close(xop->xo_opaque); @@ -1315,7 +1324,7 @@ xo_destroy (xo_handle_t *xop) xo_buf_cleanup(&xop->xo_predicate); xo_buf_cleanup(&xop->xo_attrs); - if (xop == &xo_default_handle) { + if (xop_arg == NULL) { bzero(&xo_default_handle, sizeof(&xo_default_handle)); xo_default_inited = 0; } else @@ -1743,7 +1752,7 @@ xo_format_string_direct (xo_handle_t *xo int need_enc, int have_enc) { int cols = 0; - wchar_t wc; + wchar_t wc = 0; int ilen, olen, width; int attr = (flags & XFF_ATTR); const char *sp; Modified: head/contrib/libxo/libxo/xoconfig.h ============================================================================== --- head/contrib/libxo/libxo/xoconfig.h Tue Nov 18 17:37:33 2014 (r274671) +++ head/contrib/libxo/libxo/xoconfig.h Tue Nov 18 18:03:40 2014 (r274672) @@ -158,7 +158,7 @@ #define PACKAGE_NAME "libxo" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "libxo 0.1.5" +#define PACKAGE_STRING "libxo 0.1.6" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "libxo" @@ -167,7 +167,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.1.5" +#define PACKAGE_VERSION "0.1.6" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -181,7 +181,7 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "0.1.5" +#define VERSION "0.1.6" /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ Modified: head/contrib/libxo/libxo/xoversion.h ============================================================================== --- head/contrib/libxo/libxo/xoversion.h Tue Nov 18 17:37:33 2014 (r274671) +++ head/contrib/libxo/libxo/xoversion.h Tue Nov 18 18:03:40 2014 (r274672) @@ -18,17 +18,17 @@ /** * The version string */ -#define LIBXO_VERSION "0.1.5" +#define LIBXO_VERSION "0.1.6" /** * The version number */ -#define LIBXO_VERSION_NUMBER 1004 +#define LIBXO_VERSION_NUMBER 1006 /** * The version number as a string */ -#define LIBXO_VERSION_STRING "1004" +#define LIBXO_VERSION_STRING "1006" /** * The version number extra info as a string Modified: head/contrib/libxo/xolint/xolint.pl ============================================================================== --- head/contrib/libxo/xolint/xolint.pl Tue Nov 18 17:37:33 2014 (r274671) +++ head/contrib/libxo/xolint/xolint.pl Tue Nov 18 18:03:40 2014 (r274672) @@ -28,6 +28,19 @@ sub main { extract_samples() if /^-X/; } + if ($#ARGV < 0) { + print STDERR "xolint [options] files ...\n"; + print STDERR " -c invoke 'cpp' on input\n"; + print STDERR " -C flags Pass flags to cpp\n"; + print STDERR " -d Show debug output\n"; + print STDERR " -D Extract xolint documentation\n"; + print STDERR " -I Print xo_info_t data\n"; + print STDERR " -p Print input data on errors\n"; + print STDERR " -V Print vocabulary (list of tags)\n"; + print STDERR " -X Print examples of invalid use\n"; + exit(1); + } + for $file (@ARGV) { parse_file($file); } @@ -269,9 +282,9 @@ sub check_format { $last = $prev; next; } + $prev = $ch; } - $prev = $ch; $build[$phase] .= $ch; } @@ -346,18 +359,6 @@ sub check_field { info("potential missing slash after N, L, or T with format") if $field[1] =~ /%/; - #@ Format cannot be given when content is present (roles: DNLT) - #@ xo_emit("{T:Max/%6.6s}", "Max"); - #@ Fields with the D, N, L, or T roles can't have both - #@ static literal content ("{T:Title}") and a - #@ format ("{T:/%s}"). - #@ This error will also occur when the content has a backslash - #@ in it, like "{N:Type of I/O}"; backslashes should be escaped, - #@ like "{N:Type of I\\/O}". Note the double backslash, one for - #@ handling 'C' strings, and one for libxo. - error("format cannot be given when content is present") - if $field[1] && $field[2]; - #@ An encoding format cannot be given (roles: DNLT) #@ xo_emit("{T:Max//%s}", "Max"); #@ Fields with the D, N, L, and T roles are not emitted in @@ -367,6 +368,21 @@ sub check_field { if $field[3]; } + # Field is a decoration, label, or title + if ($field[0] =~ /DLN/) { + #@ Format cannot be given when content is present (roles: DLN) + #@ xo_emit("{N:Max/%6.6s}", "Max"); + #@ Fields with the D, L, or N roles can't have both + #@ static literal content ("{L:Label}") and a + #@ format ("{L:/%s}"). + #@ This error will also occur when the content has a backslash + #@ in it, like "{N:Type of I/O}"; backslashes should be escaped, + #@ like "{N:Type of I\\/O}". Note the double backslash, one for + #@ handling 'C' strings, and one for libxo. + error("format cannot be given when content is present") + if $field[1] && $field[2]; + } + # A value field if (length($field[0]) == 0 || $field[0] =~ /V/) { @@ -527,7 +543,7 @@ sub check_field_format { #@ for non-strings. This error may occur from a typo, #@ like "{:tag/%6..6d}" where only one period should be used. error("max width only valid for strings") - if $#chunks >= 2 && $fc =~ /[sS]/; + if $#chunks >= 2 && $fc !~ /[sS]/; } sub error { From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 18:40:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF709442; Tue, 18 Nov 2014 18:40:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAB73FC; Tue, 18 Nov 2014 18:40:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIIe23M094559; Tue, 18 Nov 2014 18:40:02 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIIe2C7094558; Tue, 18 Nov 2014 18:40:02 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201411181840.sAIIe2C7094558@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 18 Nov 2014 18:40:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274673 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 18:40:02 -0000 Author: delphij Date: Tue Nov 18 18:40:01 2014 New Revision: 274673 URL: https://svnweb.freebsd.org/changeset/base/274673 Log: Allow tuning zfs_max_recordsize via loader tunable. Tuning is NOT recommended. Requested by: Slawa Olhovchenkov MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Nov 18 18:03:40 2014 (r274672) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Nov 18 18:40:01 2014 (r274673) @@ -51,6 +51,8 @@ #include #include +SYSCTL_DECL(_vfs_zfs); + /* * The SPA supports block sizes up to 16MB. However, very large blocks * can have an impact on i/o latency (e.g. tying up a spinning disk for @@ -61,6 +63,9 @@ * of this setting. */ int zfs_max_recordsize = 1 * 1024 * 1024; +SYSCTL_INT(_vfs_zfs, OID_AUTO, max_recordsize, CTLFLAG_RDTUN, + &zfs_max_recordsize, 0, + "Maximum block size. Expect dragons when tuning this."); #define SWITCH64(x, y) \ { \ From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 18:52:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F94A656; Tue, 18 Nov 2014 18:52:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B4D92A9; Tue, 18 Nov 2014 18:52:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIIqdHv002983; Tue, 18 Nov 2014 18:52:39 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIIqd7S002982; Tue, 18 Nov 2014 18:52:39 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201411181852.sAIIqd7S002982@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 18 Nov 2014 18:52:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274674 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 18:52:39 -0000 Author: delphij Date: Tue Nov 18 18:52:38 2014 New Revision: 274674 URL: https://svnweb.freebsd.org/changeset/base/274674 Log: Add a tunable for spa_slop_shift which controls how much space we would reserve by default. Tuning is not recommended. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Nov 18 18:40:01 2014 (r274673) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Nov 18 18:52:38 2014 (r274674) @@ -401,6 +401,9 @@ zfs_deadman_init() * See also the comments in zfs_space_check_t. */ int spa_slop_shift = 5; +SYSCTL_INT(_vfs_zfs, OID_AUTO, spa_slop_shift, CTLFLAG_RWTUN, + &spa_slop_shift, 0, + "Shift value of reserved space (1/(2^spa_slop_shift))."); /* * ========================================================================== From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 19:30:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6767DB6; Tue, 18 Nov 2014 19:30:04 +0000 (UTC) Received: from dchagin.static.corbina.net (dchagin.static.corbina.ru [78.107.232.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "dchagin.static.corbina.net", Issuer "dchagin.static.corbina.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2083086C; Tue, 18 Nov 2014 19:30:02 +0000 (UTC) Received: from dchagin.static.corbina.net (localhost [127.0.0.1]) by dchagin.static.corbina.net (8.14.9/8.14.9) with ESMTP id sAIJTqX2000962 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 18 Nov 2014 22:29:53 +0300 (MSK) (envelope-from dchagin@dchagin.static.corbina.net) Received: (from dchagin@localhost) by dchagin.static.corbina.net (8.14.9/8.14.9/Submit) id sAIJTqVg000961; Tue, 18 Nov 2014 22:29:52 +0300 (MSK) (envelope-from dchagin) Date: Tue, 18 Nov 2014 22:29:52 +0300 From: Chagin Dmitry To: Adrian Chadd Subject: Re: svn commit: r274635 - head/sys/dev/pci Message-ID: <20141118192952.GA945@dchagin.static.corbina.net> References: <201411172025.sAHKPLMl055666@svn.freebsd.org> <2245618.H2SPKlpWdS@ralph.baldwin.cx> <20141118064626.GA956@dchagin.static.corbina.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/9DWx/yDrRhgMJTb" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 19:30:04 -0000 --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 18, 2014 at 07:47:46AM -0800, Adrian Chadd wrote: > Hi, >=20 > Want to post a bootverbose suspend/resume pass with -HEAD without this > patch in it, then with this patch in it? >=20 it seems that at resume path METHOD set_powerstate() is not invoked. fro pr= oper pciX. ie, no "Transition from D3 to D0" prints. i'm trying to understand the reas= on=20 > We should likely revert this commit (for correctness) and then dig > deeper into what's going on. >=20 sure. >=20 >=20 > -adrian >=20 >=20 > On 17 November 2014 22:46, Chagin Dmitry wrote: > > On Mon, Nov 17, 2014 at 05:45:23PM -0500, John Baldwin wrote: > >> On Monday, November 17, 2014 08:25:21 PM Dmitry Chagin wrote: > >> > Author: dchagin > >> > Date: Mon Nov 17 20:25:21 2014 > >> > New Revision: 274635 > >> > URL: https://svnweb.freebsd.org/changeset/base/274635 > >> > > >> > Log: > >> > Use the correct device as the power_for_sleep() method > >> > always pass request up to parent bridge. > >> > > >> > Reviewed by: jhb > >> > MFC after: 1 week > >> > xMFC: r274386,r274397 > >> > >> Hmm, I had misread this diff as being another instance of what Adrian = had > >> found. I think this is actually not correct. The parent of a pci dev= ice > >> ('dev' here) is a pciX device. pciX devices do not implement the > >> PCIB_POWER_FOR_SLEEP method from pcib_if.m, so this probably just broke > >> Adrian's Asus laptop as now it will always use D3 again and ignore _Sx= D. > > ugh.. i understood, let me see more closely > >> > >> You said that this change fixed your laptop, yes? Did it work before = Adrian's > >> change in r274386 and break afterwards? > > yes > > > > -- > > Have fun! > > chd --=20 Have fun! chd --/9DWx/yDrRhgMJTb Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlRrnjAACgkQ0t2Tb3OO/O1mHQCfTTUzutDz+3FA24Em5+Mu+gKZ wmYAnA9K/hfW+uMP+I3/XaqrLi3La0BG =kboy -----END PGP SIGNATURE----- --/9DWx/yDrRhgMJTb-- From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 21:03:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B13A5292; Tue, 18 Nov 2014 21:03:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 833CE268; Tue, 18 Nov 2014 21:03:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIL3lV8063429; Tue, 18 Nov 2014 21:03:47 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIL3leC063427; Tue, 18 Nov 2014 21:03:47 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201411182103.sAIL3leC063427@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 18 Nov 2014 21:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274675 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 21:03:47 -0000 Author: jhb Date: Tue Nov 18 21:03:46 2014 New Revision: 274675 URL: https://svnweb.freebsd.org/changeset/base/274675 Log: Convert the refire_notify_ack timer from timeout(9) to callout(9). Tested by: no one Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Tue Nov 18 18:52:38 2014 (r274674) +++ head/sys/dev/isp/isp_freebsd.c Tue Nov 18 21:03:46 2014 (r274675) @@ -2137,9 +2137,9 @@ isp_refire_putback_atio(void *arg) { union ccb *ccb = arg; ispsoftc_t *isp = XS_ISP(ccb); - ISP_LOCK(isp); + + ISP_ASSERT_LOCKED(isp); isp_target_putback_atio(ccb); - ISP_UNLOCK(isp); } static void @@ -2147,13 +2147,13 @@ isp_refire_notify_ack(void *arg) { isp_tna_t *tp = arg; ispsoftc_t *isp = tp->isp; - ISP_LOCK(isp); + + ISP_ASSERT_LOCKED(isp); if (isp_notify_ack(isp, tp->not)) { - (void) timeout(isp_refire_notify_ack, tp, 5); + callout_schedule(&tp->timer, 5); } else { free(tp, M_DEVBUF); } - ISP_UNLOCK(isp); } @@ -2170,7 +2170,8 @@ isp_target_putback_atio(union ccb *ccb) if (qe == NULL) { xpt_print(ccb->ccb_h.path, "%s: Request Queue Overflow\n", __func__); - (void) timeout(isp_refire_putback_atio, ccb, 10); + callout_reset(&PISP_PCMD(ccb)->wdog, 10, + isp_refire_putback_atio, ccb); return; } memset(qe, 0, QENTRY_LEN); @@ -5964,7 +5965,9 @@ isp_async(ispsoftc_t *isp, ispasync_t cm } else { tp->not = NULL; } - (void) timeout(isp_refire_notify_ack, tp, 5); + callout_init_mtx(&tp->timer, &isp->isp_lock, 0); + callout_reset(&tp->timer, 5, + isp_refire_notify_ack, tp); } else { isp_prt(isp, ISP_LOGERR, "you lose- cannot allocate a notify refire"); } Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Tue Nov 18 18:52:38 2014 (r274674) +++ head/sys/dev/isp/isp_freebsd.h Tue Nov 18 21:03:46 2014 (r274675) @@ -158,6 +158,7 @@ typedef struct isp_timed_notify_ack { void *isp; void *not; uint8_t data[64]; /* sb QENTRY_LEN, but order of definitions is wrong */ + struct callout timer; } isp_tna_t; TAILQ_HEAD(isp_ccbq, ccb_hdr); @@ -401,6 +402,7 @@ struct isposinfo { */ #define ISP_LOCK(isp) mtx_lock(&isp->isp_osinfo.lock) #define ISP_UNLOCK(isp) mtx_unlock(&isp->isp_osinfo.lock) +#define ISP_ASSERT_LOCKED(isp) mtx_assert(&isp->isp_osinfo.lock, MA_OWNED) /* * Required Macros/Defines From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 21:51:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AED18CB6; Tue, 18 Nov 2014 21:51:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9ACE9913; Tue, 18 Nov 2014 21:51:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAILp2mG085945; Tue, 18 Nov 2014 21:51:02 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAILp2iP085942; Tue, 18 Nov 2014 21:51:02 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201411182151.sAILp2iP085942@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 18 Nov 2014 21:51:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274676 - head/sys/dev/mcd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 21:51:02 -0000 Author: jhb Date: Tue Nov 18 21:51:01 2014 New Revision: 274676 URL: https://svnweb.freebsd.org/changeset/base/274676 Log: Add locking to mcd(4) and mark MPSAFE. - Actually use existing per-softc mutex. - Use mutex in cdev routines and remove D_NEEDGIANT. - Use callout(9) instead of timeout(9). - Don't check for impossible conditions (e.g. MCDINIT being clear). - Remove critical_enter/exit when sending a PIO command. - Use bus_*() instead of bus_space_*(). Tested by: no one Modified: head/sys/dev/mcd/mcd.c head/sys/dev/mcd/mcd_isa.c head/sys/dev/mcd/mcdvar.h Modified: head/sys/dev/mcd/mcd.c ============================================================================== --- head/sys/dev/mcd/mcd.c Tue Nov 18 21:03:46 2014 (r274675) +++ head/sys/dev/mcd/mcd.c Tue Nov 18 21:51:01 2014 (r274676) @@ -128,7 +128,7 @@ static void hsg2msf(int hsg, bcd_t *msf) static int msf2hsg(bcd_t *msf, int relative); static int mcd_volinfo(struct mcd_softc *); static int mcd_waitrdy(struct mcd_softc *,int dly); -static timeout_t mcd_timeout; +static void mcd_timeout(void *arg); static void mcd_doread(struct mcd_softc *, int state, struct mcd_mbx *mbxin); static void mcd_soft_reset(struct mcd_softc *); static int mcd_hard_reset(struct mcd_softc *); @@ -168,7 +168,7 @@ static struct cdevsw mcd_cdevsw = { .d_ioctl = mcdioctl, .d_strategy = mcdstrategy, .d_name = "mcd", - .d_flags = D_DISK | D_NEEDGIANT, + .d_flags = D_DISK, }; #define MCD_RETRYS 5 @@ -193,6 +193,7 @@ mcd_attach(struct mcd_softc *sc) unit = device_get_unit(sc->dev); + MCD_LOCK(sc); sc->data.flags |= MCDINIT; mcd_soft_reset(sc); bioq_init(&sc->data.head); @@ -201,11 +202,13 @@ mcd_attach(struct mcd_softc *sc) /* wire controller for interrupts and dma */ mcd_configure(sc); #endif + MCD_UNLOCK(sc); /* name filled in probe */ sc->mcd_dev_t = make_dev(&mcd_cdevsw, 8 * unit, UID_ROOT, GID_OPERATOR, 0640, "mcd%d", unit); sc->mcd_dev_t->si_drv1 = (void *)sc; + callout_init_mtx(&sc->timer, &sc->mtx, 0); return (0); } @@ -218,41 +221,49 @@ mcdopen(struct cdev *dev, int flags, int sc = (struct mcd_softc *)dev->si_drv1; - /* not initialized*/ - if (!(sc->data.flags & MCDINIT)) - return (ENXIO); - /* invalidated in the meantime? mark all open part's invalid */ - if (!(sc->data.flags & MCDVALID) && sc->data.openflags) + MCD_LOCK(sc); + if (!(sc->data.flags & MCDVALID) && sc->data.openflags) { + MCD_UNLOCK(sc); return (ENXIO); + } - if (mcd_getstat(sc, 1) == -1) + if (mcd_getstat(sc, 1) == -1) { + MCD_UNLOCK(sc); return (EIO); + } if ( (sc->data.status & (MCDDSKCHNG|MCDDOOROPEN)) || !(sc->data.status & MCDDSKIN)) for (retry = 0; retry < DISK_SENSE_SECS * WAIT_FRAC; retry++) { - (void) tsleep((caddr_t)sc, PSOCK | PCATCH, "mcdsn1", hz/WAIT_FRAC); - if ((r = mcd_getstat(sc, 1)) == -1) + (void) mtx_sleep(sc, &sc->mtx, PSOCK | PCATCH, + "mcdsn1", hz/WAIT_FRAC); + if ((r = mcd_getstat(sc, 1)) == -1) { + MCD_UNLOCK(sc); return (EIO); + } if (r != -2) break; } if (sc->data.status & MCDDOOROPEN) { + MCD_UNLOCK(sc); device_printf(sc->dev, "door is open\n"); return (ENXIO); } if (!(sc->data.status & MCDDSKIN)) { + MCD_UNLOCK(sc); device_printf(sc->dev, "no CD inside\n"); return (ENXIO); } if (sc->data.status & MCDDSKCHNG) { + MCD_UNLOCK(sc); device_printf(sc->dev, "CD not sensed\n"); return (ENXIO); } if (mcd_size(dev) < 0) { + MCD_UNLOCK(sc); device_printf(sc->dev, "failed to get disk size\n"); return (ENXIO); } @@ -262,10 +273,14 @@ mcdopen(struct cdev *dev, int flags, int sc->data.flags |= MCDVALID; (void) mcd_lock_door(sc, MCD_LK_LOCK); - if (!(sc->data.flags & MCDVALID)) + if (!(sc->data.flags & MCDVALID)) { + MCD_UNLOCK(sc); return (ENXIO); + } - return mcd_read_toc(sc); + r = mcd_read_toc(sc); + MCD_UNLOCK(sc); + return (r); } static int @@ -275,12 +290,13 @@ mcdclose(struct cdev *dev, int flags, in sc = (struct mcd_softc *)dev->si_drv1; - if (!(sc->data.flags & MCDINIT) || !sc->data.openflags) - return (ENXIO); + MCD_LOCK(sc); + KASSERT(sc->data.openflags, ("device not open")); (void) mcd_lock_door(sc, MCD_LK_UNLOCK); sc->data.openflags = 0; sc->data.partflags &= ~MCDREADRAW; + MCD_UNLOCK(sc); return (0); } @@ -293,6 +309,7 @@ mcdstrategy(struct bio *bp) sc = (struct mcd_softc *)bp->bio_dev->si_drv1; /* if device invalidated (e.g. media change, door open), error */ + MCD_LOCK(sc); if (!(sc->data.flags & MCDVALID)) { device_printf(sc->dev, "media changed\n"); bp->bio_error = EIO; @@ -321,11 +338,13 @@ mcdstrategy(struct bio *bp) /* now check whether we can perform processing */ mcd_start(sc); + MCD_UNLOCK(sc); return; bad: bp->bio_flags |= BIO_ERROR; done: + MCD_UNLOCK(sc); bp->bio_resid = bp->bio_bcount; biodone(bp); return; @@ -336,6 +355,7 @@ mcd_start(struct mcd_softc *sc) { struct bio *bp; + MCD_ASSERT_LOCKED(sc); if (sc->data.flags & MCDMBXBSY) { return; } @@ -365,8 +385,11 @@ mcdioctl(struct cdev *dev, u_long cmd, c sc = (struct mcd_softc *)dev->si_drv1; - if (mcd_getstat(sc, 1) == -1) /* detect disk change too */ + MCD_LOCK(sc); + if (mcd_getstat(sc, 1) == -1) { /* detect disk change too */ + MCD_UNLOCK(sc); return (EIO); + } MCD_TRACE("ioctl called 0x%lx\n", cmd); switch (cmd) { @@ -378,83 +401,114 @@ MCD_TRACE("ioctl called 0x%lx\n", cmd); case CDIOCSETMUTE: case CDIOCSETLEFT: case CDIOCSETRIGHT: + MCD_UNLOCK(sc); return (EINVAL); case CDIOCEJECT: - return mcd_eject(sc); + r = mcd_eject(sc); + MCD_UNLOCK(sc); + return (r); case CDIOCSETDEBUG: sc->data.debug = 1; + MCD_UNLOCK(sc); return (0); case CDIOCCLRDEBUG: sc->data.debug = 0; + MCD_UNLOCK(sc); return (0); case CDIOCRESET: - return mcd_hard_reset(sc); + r = mcd_hard_reset(sc); + MCD_UNLOCK(sc); + return (r); case CDIOCALLOW: - return mcd_lock_door(sc, MCD_LK_UNLOCK); + r = mcd_lock_door(sc, MCD_LK_UNLOCK); + MCD_UNLOCK(sc); + return (r); case CDIOCPREVENT: - return mcd_lock_door(sc, MCD_LK_LOCK); + r = mcd_lock_door(sc, MCD_LK_LOCK); + MCD_UNLOCK(sc); + return (r); case CDIOCCLOSE: - return mcd_inject(sc); + r = mcd_inject(sc); + MCD_UNLOCK(sc); + return (r); } if (!(sc->data.flags & MCDVALID)) { if ( (sc->data.status & (MCDDSKCHNG|MCDDOOROPEN)) || !(sc->data.status & MCDDSKIN)) for (retry = 0; retry < DISK_SENSE_SECS * WAIT_FRAC; retry++) { - (void) tsleep((caddr_t)sc, PSOCK | PCATCH, "mcdsn2", hz/WAIT_FRAC); - if ((r = mcd_getstat(sc, 1)) == -1) + (void) mtx_sleep(sc, &sc->mtx, PSOCK | PCATCH, + "mcdsn2", hz/WAIT_FRAC); + if ((r = mcd_getstat(sc, 1)) == -1) { + MCD_UNLOCK(sc); return (EIO); + } if (r != -2) break; } if ( (sc->data.status & (MCDDOOROPEN|MCDDSKCHNG)) || !(sc->data.status & MCDDSKIN) || mcd_size(dev) < 0 - ) + ) { + MCD_UNLOCK(sc); return (ENXIO); + } sc->data.flags |= MCDVALID; sc->data.partflags |= MCDREADRAW; (void) mcd_lock_door(sc, MCD_LK_LOCK); - if (!(sc->data.flags & MCDVALID)) + if (!(sc->data.flags & MCDVALID)) { + MCD_UNLOCK(sc); return (ENXIO); + } } switch (cmd) { case DIOCGMEDIASIZE: *(off_t *)addr = (off_t)sc->data.disksize * sc->data.blksize; - return (0); + r = 0; + break; case DIOCGSECTORSIZE: *(u_int *)addr = sc->data.blksize; - return (0); - + r = 0; + break; case CDIOCPLAYTRACKS: - return mcd_playtracks(sc, (struct ioc_play_track *) addr); + r = mcd_playtracks(sc, (struct ioc_play_track *) addr); + break; case CDIOCPLAYBLOCKS: - return mcd_playblocks(sc, (struct ioc_play_blocks *) addr); + r = mcd_playblocks(sc, (struct ioc_play_blocks *) addr); + break; case CDIOCPLAYMSF: - return mcd_playmsf(sc, (struct ioc_play_msf *) addr); + r = mcd_playmsf(sc, (struct ioc_play_msf *) addr); + break; case CDIOCREADSUBCHANNEL_SYSSPACE: return mcd_subchan(sc, (struct ioc_read_subchannel *) addr, 1); case CDIOCREADSUBCHANNEL: return mcd_subchan(sc, (struct ioc_read_subchannel *) addr, 0); case CDIOREADTOCHEADER: - return mcd_toc_header(sc, (struct ioc_toc_header *) addr); + r = mcd_toc_header(sc, (struct ioc_toc_header *) addr); + break; case CDIOREADTOCENTRYS: return mcd_toc_entrys(sc, (struct ioc_read_toc_entry *) addr); case CDIOCRESUME: - return mcd_resume(sc); + r = mcd_resume(sc); + break; case CDIOCPAUSE: - return mcd_pause(sc); + r = mcd_pause(sc); + break; case CDIOCSTART: if (mcd_setmode(sc, MCD_MD_COOKED) != 0) - return (EIO); - return (0); + r = EIO; + else + r = 0; + break; case CDIOCSTOP: - return mcd_stop(sc); + r = mcd_stop(sc); + break; default: - return (ENOTTY); + r = ENOTTY; } - /*NOTREACHED*/ + MCD_UNLOCK(sc); + return (r); } static int @@ -762,6 +816,7 @@ mcd_timeout(void *arg) sc = (struct mcd_softc *)arg; + MCD_ASSERT_LOCKED(sc); mcd_doread(sc, sc->ch_state, sc->ch_mbxsave); } @@ -775,6 +830,7 @@ mcd_doread(struct mcd_softc *sc, int sta int blknum; caddr_t addr; + MCD_ASSERT_LOCKED(sc); mbx = (state!=MCD_S_BEGIN) ? sc->ch_mbxsave : mbxin; bp = mbx->bp; @@ -789,15 +845,16 @@ retry_status: MCD_WRITE(sc, MCD_REG_COMMAND, MCD_CMDGETSTAT); mbx->count = RDELAY_WAITSTAT; sc->ch_state = MCD_S_WAITSTAT; - sc->ch = timeout(mcd_timeout, (caddr_t)sc, hz/100); /* XXX */ + callout_reset(&sc->timer, hz/100, mcd_timeout, sc); /* XXX */ return; case MCD_S_WAITSTAT: sc->ch_state = MCD_S_WAITSTAT; - untimeout(mcd_timeout,(caddr_t)sc, sc->ch); + callout_stop(&sc->timer); if (mbx->count-- >= 0) { if (MCD_READ(sc, MCD_FLAGS) & MFL_STATUS_NOT_AVAIL) { sc->ch_state = MCD_S_WAITSTAT; - timeout(mcd_timeout, (caddr_t)sc, hz/100); /* XXX */ + callout_reset(&sc->timer, hz/100, + mcd_timeout, sc); /* XXX */ return; } sc->data.status = MCD_READ(sc, MCD_REG_STATUS) & 0xFF; @@ -834,7 +891,7 @@ retry_mode: MCD_WRITE(sc, MCD_REG_COMMAND, rm); sc->ch_state = MCD_S_WAITMODE; - sc->ch = timeout(mcd_timeout, (caddr_t)sc, hz/100); /* XXX */ + callout_reset(&sc->timer, hz / 100, mcd_timeout, sc); /* XXX */ return; } else { device_printf(sc->dev, "timeout getstatus\n"); @@ -843,14 +900,14 @@ retry_mode: case MCD_S_WAITMODE: sc->ch_state = MCD_S_WAITMODE; - untimeout(mcd_timeout, (caddr_t)sc, sc->ch); + callout_stop(&sc->timer); if (mbx->count-- < 0) { device_printf(sc->dev, "timeout set mode\n"); goto readerr; } if (MCD_READ(sc, MCD_FLAGS) & MFL_STATUS_NOT_AVAIL) { sc->ch_state = MCD_S_WAITMODE; - sc->ch = timeout(mcd_timeout, (caddr_t)sc, hz/100); + callout_reset(&sc->timer, hz / 100, mcd_timeout, sc); return; } sc->data.status = MCD_READ(sc, MCD_REG_STATUS) & 0xFF; @@ -878,7 +935,6 @@ nextblock: hsg2msf(blknum,rbuf.start_msf); retry_read: /* send the read command */ - critical_enter(); MCD_WRITE(sc, MCD_REG_COMMAND, sc->data.read_command); MCD_WRITE(sc, MCD_REG_COMMAND, rbuf.start_msf[0]); MCD_WRITE(sc, MCD_REG_COMMAND, rbuf.start_msf[1]); @@ -886,7 +942,6 @@ retry_read: MCD_WRITE(sc, MCD_REG_COMMAND, 0); MCD_WRITE(sc, MCD_REG_COMMAND, 0); MCD_WRITE(sc, MCD_REG_COMMAND, 1); - critical_exit(); /* Spin briefly (<= 2ms) to avoid missing next block */ for (i = 0; i < 20; i++) { @@ -898,11 +953,11 @@ retry_read: mbx->count = RDELAY_WAITREAD; sc->ch_state = MCD_S_WAITREAD; - sc->ch = timeout(mcd_timeout, (caddr_t)sc, hz/100); /* XXX */ + callout_reset(&sc->timer, hz / 100, mcd_timeout, sc); /* XXX */ return; case MCD_S_WAITREAD: sc->ch_state = MCD_S_WAITREAD; - untimeout(mcd_timeout, (caddr_t)sc, sc->ch); + callout_stop(&sc->timer); if (mbx->count-- > 0) { k = MCD_READ(sc, MCD_FLAGS); if (!(k & MFL_DATA_NOT_AVAIL)) { /* XXX */ @@ -947,7 +1002,7 @@ retry_read: goto changed; } sc->ch_state = MCD_S_WAITREAD; - sc->ch = timeout(mcd_timeout, (caddr_t)sc, hz/100); /* XXX */ + callout_reset(&sc->timer, hz / 100, mcd_timeout, sc); /* XXX */ return; } else { device_printf(sc->dev, "timeout read data\n"); @@ -1010,7 +1065,8 @@ mcd_close_tray(struct mcd_softc *sc) MCD_WRITE(sc, MCD_REG_COMMAND, MCD_CMDCLOSETRAY); for (retry = 0; retry < CLOSE_TRAY_SECS * WAIT_FRAC; retry++) { if (MCD_READ(sc, MCD_FLAGS) & MFL_STATUS_NOT_AVAIL) - (void) tsleep((caddr_t)sc, PSOCK | PCATCH, "mcdcls", hz/WAIT_FRAC); + (void) mtx_sleep(sc, &sc->mtx, PSOCK | PCATCH, + "mcdcls", hz/WAIT_FRAC); else { if ((r = mcd_getstat(sc, 0)) == -1) return (EIO); @@ -1303,6 +1359,7 @@ mcd_toc_entrys(struct mcd_softc *sc, str } /* copy the data back */ + MCD_UNLOCK(sc); return copyout(entries, te->data, n * sizeof(struct cd_toc_entry)); } @@ -1418,6 +1475,7 @@ mcd_subchan(struct mcd_softc *sc, struct break; } + MCD_UNLOCK(sc); if (nocopyout == 0) return copyout(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len)); bcopy(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len)); Modified: head/sys/dev/mcd/mcd_isa.c ============================================================================== --- head/sys/dev/mcd/mcd_isa.c Tue Nov 18 21:03:46 2014 (r274675) +++ head/sys/dev/mcd/mcd_isa.c Tue Nov 18 21:51:01 2014 (r274676) @@ -126,6 +126,7 @@ mcd_alloc_resources (device_t dev) sc = device_get_softc(dev); error = 0; + mtx_init(&sc->mtx, "mcd", NULL, MTX_DEF); if (sc->port_type) { sc->port = bus_alloc_resource_any(dev, sc->port_type, @@ -135,8 +136,6 @@ mcd_alloc_resources (device_t dev) error = ENOMEM; goto bad; } - sc->port_bst = rman_get_bustag(sc->port); - sc->port_bsh = rman_get_bushandle(sc->port); } if (sc->irq_type) { @@ -159,9 +158,6 @@ mcd_alloc_resources (device_t dev) } } - mtx_init(&sc->mtx, device_get_nameunit(dev), - "Interrupt lock", MTX_DEF | MTX_RECURSE); - bad: return (error); } @@ -175,18 +171,14 @@ mcd_release_resources (device_t dev) if (sc->irq_ih) bus_teardown_intr(dev, sc->irq, sc->irq_ih); - if (sc->port) { + if (sc->port) bus_release_resource(dev, sc->port_type, sc->port_rid, sc->port); - sc->port_bst = 0; - sc->port_bsh = 0; - } if (sc->irq) bus_release_resource(dev, sc->irq_type, sc->irq_rid, sc->irq); if (sc->drq) bus_release_resource(dev, sc->drq_type, sc->drq_rid, sc->drq); - if (mtx_initialized(&sc->mtx) != 0) - mtx_destroy(&sc->mtx); + mtx_destroy(&sc->mtx); return; } Modified: head/sys/dev/mcd/mcdvar.h ============================================================================== --- head/sys/dev/mcd/mcdvar.h Tue Nov 18 21:03:46 2014 (r274675) +++ head/sys/dev/mcd/mcdvar.h Tue Nov 18 21:51:01 2014 (r274676) @@ -41,8 +41,6 @@ struct mcd_softc { struct resource * port; int port_rid; int port_type; - bus_space_tag_t port_bst; - bus_space_handle_t port_bsh; struct resource * irq; int irq_rid; @@ -55,20 +53,19 @@ struct mcd_softc { struct mtx mtx; - struct callout_handle ch; + struct callout timer; int ch_state; struct mcd_mbx * ch_mbxsave; struct mcd_data data; }; -#define MCD_LOCK(_sc) splx(&(_sc)->mtx -#define MCD_UNLOCK(_sc) splx(&(_sc)->mtx +#define MCD_LOCK(_sc) mtx_lock(&_sc->mtx) +#define MCD_UNLOCK(_sc) mtx_unlock(&_sc->mtx) +#define MCD_ASSERT_LOCKED(_sc) mtx_assert(&_sc->mtx, MA_OWNED) -#define MCD_READ(_sc, _reg) \ - bus_space_read_1(_sc->port_bst, _sc->port_bsh, _reg) -#define MCD_WRITE(_sc, _reg, _val) \ - bus_space_write_1(_sc->port_bst, _sc->port_bsh, _reg, _val) +#define MCD_READ(_sc, _reg) bus_read_1(_sc->port, _reg) +#define MCD_WRITE(_sc, _reg, _val) bus_write_1(_sc->port, _reg, _val) int mcd_probe (struct mcd_softc *); int mcd_attach (struct mcd_softc *); From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 21:55:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2047E2E; Tue, 18 Nov 2014 21:55:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE07F9C4; Tue, 18 Nov 2014 21:55:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAILtpxT087178; Tue, 18 Nov 2014 21:55:51 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAILtp6l087176; Tue, 18 Nov 2014 21:55:51 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201411182155.sAILtp6l087176@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 18 Nov 2014 21:55:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274677 - head/sys/dev/mly X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 21:55:52 -0000 Author: jhb Date: Tue Nov 18 21:55:50 2014 New Revision: 274677 URL: https://svnweb.freebsd.org/changeset/base/274677 Log: Add locking to mly(4) and mark MPSAFE. - Add a per-softc mutex. - Use mutex as CAM sim lock. - Use taskqueue_thread instead of taskqueue_swi_giant. - Use callout(9) instead of timeout(9). - Use bus_*() instead of bus_space_*(). Tested by: no one Modified: head/sys/dev/mly/mly.c head/sys/dev/mly/mlyvar.h Modified: head/sys/dev/mly/mly.c ============================================================================== --- head/sys/dev/mly/mly.c Tue Nov 18 21:51:01 2014 (r274676) +++ head/sys/dev/mly/mly.c Tue Nov 18 21:55:50 2014 (r274677) @@ -88,7 +88,8 @@ static void mly_periodic(void *data); static int mly_immediate_command(struct mly_command *mc); static int mly_start(struct mly_command *mc); static void mly_done(struct mly_softc *sc); -static void mly_complete(void *context, int pending); +static void mly_complete(struct mly_softc *sc); +static void mly_complete_handler(void *context, int pending); static int mly_alloc_command(struct mly_softc *sc, struct mly_command **mcp); static void mly_release_command(struct mly_command *mc); @@ -116,7 +117,7 @@ static void mly_printstate(struct mly_so static void mly_print_command(struct mly_command *mc); static void mly_print_packet(struct mly_command *mc); static void mly_panic(struct mly_softc *sc, char *reason); -static int mly_timeout(struct mly_softc *sc); +static void mly_timeout(void *arg); #endif void mly_print_controller(int controller); @@ -151,7 +152,6 @@ MODULE_DEPEND(mly, cam, 1, 1, 1); static struct cdevsw mly_cdevsw = { .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, .d_open = mly_user_open, .d_close = mly_user_close, .d_ioctl = mly_user_ioctl, @@ -216,8 +216,11 @@ mly_attach(device_t dev) debug_called(1); sc->mly_dev = dev; + mtx_init(&sc->mly_lock, "mly", NULL, MTX_DEF); + callout_init_mtx(&sc->mly_periodic, &sc->mly_lock, 0); #ifdef MLY_DEBUG + callout_init_mtx(&sc->mly_timeout, &sc->mly_lock, 0); if (device_get_unit(sc->mly_dev) == 0) mly_softc0 = sc; #endif @@ -238,7 +241,7 @@ mly_attach(device_t dev) /* * Initialise command-completion task. */ - TASK_INIT(&sc->mly_task_complete, 0, mly_complete, sc); + TASK_INIT(&sc->mly_task_complete, 0, mly_complete_handler, sc); /* disable interrupts before we start talking to the controller */ MLY_MASK_INTERRUPTS(sc); @@ -260,7 +263,10 @@ mly_attach(device_t dev) /* * Obtain controller feature information */ - if ((error = mly_get_controllerinfo(sc))) + MLY_LOCK(sc); + error = mly_get_controllerinfo(sc); + MLY_UNLOCK(sc); + if (error) goto out; /* @@ -274,13 +280,16 @@ mly_attach(device_t dev) * Get the current event counter for health purposes, populate the initial * health status buffer. */ - if ((error = mly_get_eventstatus(sc))) - goto out; + MLY_LOCK(sc); + error = mly_get_eventstatus(sc); /* * Enable memory-mailbox mode. */ - if ((error = mly_enable_mmbox(sc))) + if (error == 0) + error = mly_enable_mmbox(sc); + MLY_UNLOCK(sc); + if (error) goto out; /* @@ -297,6 +306,7 @@ mly_attach(device_t dev) /* * Mark all attached devices for rescan. */ + MLY_LOCK(sc); mly_scan_devices(sc); /* @@ -305,6 +315,7 @@ mly_attach(device_t dev) * the SCSI subsystem gets to us, courtesy of the "SCSI settling delay". */ mly_periodic((void *)sc); + MLY_UNLOCK(sc); /* * Create the control device. @@ -317,7 +328,7 @@ mly_attach(device_t dev) MLY_UNMASK_INTERRUPTS(sc); #ifdef MLY_DEBUG - timeout((timeout_t *)mly_timeout, sc, MLY_CMD_TIMEOUT * hz); + callout_reset(&sc->mly_timeout, MLY_CMD_TIMEOUT * hz, mly_timeout, sc); #endif out: @@ -353,8 +364,6 @@ mly_pci_attach(struct mly_softc *sc) mly_printf(sc, "can't allocate register window\n"); goto fail; } - sc->mly_btag = rman_get_bustag(sc->mly_regs_resource); - sc->mly_bhandle = rman_get_bushandle(sc->mly_regs_resource); /* * Allocate and connect our interrupt. @@ -365,7 +374,7 @@ mly_pci_attach(struct mly_softc *sc) mly_printf(sc, "can't allocate interrupt\n"); goto fail; } - if (bus_setup_intr(sc->mly_dev, sc->mly_irq, INTR_TYPE_CAM | INTR_ENTROPY, NULL, mly_intr, sc, &sc->mly_intr)) { + if (bus_setup_intr(sc->mly_dev, sc->mly_irq, INTR_TYPE_CAM | INTR_ENTROPY | INTR_MPSAFE, NULL, mly_intr, sc, &sc->mly_intr)) { mly_printf(sc, "can't set up interrupt\n"); goto fail; } @@ -405,7 +414,7 @@ mly_pci_attach(struct mly_softc *sc) BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ busdma_lock_mutex, /* lockfunc */ - &Giant, /* lockarg */ + &sc->mly_lock, /* lockarg */ &sc->mly_buffer_dmat)) { mly_printf(sc, "can't allocate buffer DMA tag\n"); goto fail; @@ -511,18 +520,25 @@ mly_shutdown(device_t dev) struct mly_softc *sc = device_get_softc(dev); debug_called(1); - - if (sc->mly_state & MLY_STATE_OPEN) + + MLY_LOCK(sc); + if (sc->mly_state & MLY_STATE_OPEN) { + MLY_UNLOCK(sc); return(EBUSY); + } /* kill the periodic event */ - untimeout(mly_periodic, sc, sc->mly_periodic); + callout_stop(&sc->mly_periodic); +#ifdef MLY_DEBUG + callout_stop(&sc->mly_timeout); +#endif /* flush controller */ mly_printf(sc, "flushing cache..."); printf("%s\n", mly_flush(sc) ? "failed" : "done"); MLY_MASK_INTERRUPTS(sc); + MLY_UNLOCK(sc); return(0); } @@ -538,7 +554,9 @@ mly_intr(void *arg) debug_called(2); + MLY_LOCK(sc); mly_done(sc); + MLY_UNLOCK(sc); }; /******************************************************************************** @@ -676,6 +694,13 @@ mly_free(struct mly_softc *sc) /* Remove the management device */ destroy_dev(sc->mly_dev_t); + if (sc->mly_intr) + bus_teardown_intr(sc->mly_dev, sc->mly_irq, sc->mly_intr); + callout_drain(&sc->mly_periodic); +#ifdef MLY_DEBUG + callout_drain(&sc->mly_timeout); +#endif + /* detach from CAM */ mly_cam_detach(sc); @@ -711,8 +736,6 @@ mly_free(struct mly_softc *sc) bus_dma_tag_destroy(sc->mly_mmbox_dmat); /* disconnect the interrupt handler */ - if (sc->mly_intr) - bus_teardown_intr(sc->mly_dev, sc->mly_irq, sc->mly_intr); if (sc->mly_irq != NULL) bus_release_resource(sc->mly_dev, SYS_RES_IRQ, sc->mly_irq_rid, sc->mly_irq); @@ -723,6 +746,8 @@ mly_free(struct mly_softc *sc) /* release the register window mapping */ if (sc->mly_regs_resource != NULL) bus_release_resource(sc->mly_dev, SYS_RES_MEMORY, sc->mly_regs_rid, sc->mly_regs_resource); + + mtx_destroy(&sc->mly_lock); } /******************************************************************************** @@ -1086,6 +1111,7 @@ mly_ioctl(struct mly_softc *sc, struct m int error; debug_called(1); + MLY_ASSERT_LOCKED(sc); mc = NULL; if (mly_alloc_command(sc, &mc)) { @@ -1375,6 +1401,7 @@ mly_periodic(void *data) int bus, target; debug_called(2); + MLY_ASSERT_LOCKED(sc); /* * Scan devices. @@ -1398,7 +1425,7 @@ mly_periodic(void *data) mly_check_event(sc); /* reschedule ourselves */ - sc->mly_periodic = timeout(mly_periodic, sc, MLY_PERIODIC_INTERVAL * hz); + callout_schedule(&sc->mly_periodic, MLY_PERIODIC_INTERVAL * hz); } /******************************************************************************** @@ -1415,21 +1442,19 @@ static int mly_immediate_command(struct mly_command *mc) { struct mly_softc *sc = mc->mc_sc; - int error, s; + int error; debug_called(1); - /* spinning at splcam is ugly, but we're only used during controller init */ - s = splcam(); + MLY_ASSERT_LOCKED(sc); if ((error = mly_start(mc))) { - splx(s); return(error); } if (sc->mly_state & MLY_STATE_INTERRUPTS_ON) { /* sleep on the command */ while(!(mc->mc_flags & MLY_CMD_COMPLETE)) { - tsleep(mc, PRIBIO, "mlywait", 0); + mtx_sleep(mc, &sc->mly_lock, PRIBIO, "mlywait", 0); } } else { /* spin and collect status while we do */ @@ -1437,7 +1462,6 @@ mly_immediate_command(struct mly_command mly_done(mc->mc_sc); } } - splx(s); return(0); } @@ -1453,9 +1477,9 @@ mly_start(struct mly_command *mc) { struct mly_softc *sc = mc->mc_sc; union mly_command_packet *pkt; - int s; debug_called(2); + MLY_ASSERT_LOCKED(sc); /* * Set the command up for delivery to the controller. @@ -1467,8 +1491,6 @@ mly_start(struct mly_command *mc) mc->mc_timestamp = time_second; #endif - s = splcam(); - /* * Do we have to use the hardware mailbox? */ @@ -1477,7 +1499,6 @@ mly_start(struct mly_command *mc) * Check to see if the controller is ready for us. */ if (MLY_IDBR_TRUE(sc, MLY_HM_CMDSENT)) { - splx(s); return(EBUSY); } mc->mc_flags |= MLY_CMD_BUSY; @@ -1494,7 +1515,6 @@ mly_start(struct mly_command *mc) /* check to see if the next index is free yet */ if (pkt->mmbox.flag != 0) { - splx(s); return(EBUSY); } mc->mc_flags |= MLY_CMD_BUSY; @@ -1502,13 +1522,11 @@ mly_start(struct mly_command *mc) /* copy in new command */ bcopy(mc->mc_packet->mmbox.data, pkt->mmbox.data, sizeof(pkt->mmbox.data)); /* barrier to ensure completion of previous write before we write the flag */ - bus_space_barrier(sc->mly_btag, sc->mly_bhandle, 0, 0, - BUS_SPACE_BARRIER_WRITE); + bus_barrier(sc->mly_regs_resource, 0, 0, BUS_SPACE_BARRIER_WRITE); /* copy flag last */ pkt->mmbox.flag = mc->mc_packet->mmbox.flag; /* barrier to ensure completion of previous write before we notify the controller */ - bus_space_barrier(sc->mly_btag, sc->mly_bhandle, 0, 0, - BUS_SPACE_BARRIER_WRITE); + bus_barrier(sc->mly_regs_resource, 0, 0, BUS_SPACE_BARRIER_WRITE); /* signal controller, update index */ MLY_SET_REG(sc, sc->mly_idbr, MLY_AM_CMDSENT); @@ -1516,7 +1534,6 @@ mly_start(struct mly_command *mc) } mly_enqueue_busy(mc); - splx(s); return(0); } @@ -1529,9 +1546,9 @@ mly_done(struct mly_softc *sc) struct mly_command *mc; union mly_status_packet *sp; u_int16_t slot; - int s, worked; + int worked; - s = splcam(); + MLY_ASSERT_LOCKED(sc); worked = 0; /* pick up hardware-mailbox commands */ @@ -1589,12 +1606,11 @@ mly_done(struct mly_softc *sc) MLY_SET_REG(sc, sc->mly_odbr, MLY_AM_STSREADY); } - splx(s); if (worked) { if (sc->mly_state & MLY_STATE_INTERRUPTS_ON) - taskqueue_enqueue(taskqueue_swi_giant, &sc->mly_task_complete); + taskqueue_enqueue(taskqueue_thread, &sc->mly_task_complete); else - mly_complete(sc, 0); + mly_complete(sc); } } @@ -1602,13 +1618,21 @@ mly_done(struct mly_softc *sc) * Process completed commands */ static void -mly_complete(void *context, int pending) +mly_complete_handler(void *context, int pending) { struct mly_softc *sc = (struct mly_softc *)context; + + MLY_LOCK(sc); + mly_complete(sc); + MLY_UNLOCK(sc); +} + +static void +mly_complete(struct mly_softc *sc) +{ struct mly_command *mc; void (* mc_complete)(struct mly_command *mc); - debug_called(2); /* @@ -1935,15 +1959,18 @@ mly_cam_attach(struct mly_softc *sc) if ((sc->mly_cam_sim[chn] = cam_sim_alloc(mly_cam_action, mly_cam_poll, "mly", sc, device_get_unit(sc->mly_dev), - &Giant, + &sc->mly_lock, sc->mly_controllerinfo->maximum_parallel_commands, 1, devq)) == NULL) { return(ENOMEM); } + MLY_LOCK(sc); if (xpt_bus_register(sc->mly_cam_sim[chn], sc->mly_dev, chn)) { + MLY_UNLOCK(sc); mly_printf(sc, "CAM XPT phsyical channel registration failed\n"); return(ENXIO); } + MLY_UNLOCK(sc); debug(1, "registered physical channel %d", chn); } } @@ -1955,15 +1982,18 @@ mly_cam_attach(struct mly_softc *sc) for (i = 0; i < sc->mly_controllerinfo->virtual_channels_present; i++, chn++) { if ((sc->mly_cam_sim[chn] = cam_sim_alloc(mly_cam_action, mly_cam_poll, "mly", sc, device_get_unit(sc->mly_dev), - &Giant, + &sc->mly_lock, sc->mly_controllerinfo->maximum_parallel_commands, 0, devq)) == NULL) { return(ENOMEM); } + MLY_LOCK(sc); if (xpt_bus_register(sc->mly_cam_sim[chn], sc->mly_dev, chn)) { + MLY_UNLOCK(sc); mly_printf(sc, "CAM XPT virtual channel registration failed\n"); return(ENXIO); } + MLY_UNLOCK(sc); debug(1, "registered virtual channel %d", chn); } @@ -1987,12 +2017,14 @@ mly_cam_detach(struct mly_softc *sc) debug_called(1); + MLY_LOCK(sc); for (i = 0; i < sc->mly_cam_channels; i++) { if (sc->mly_cam_sim[i] != NULL) { xpt_bus_deregister(cam_sim_path(sc->mly_cam_sim[i])); cam_sim_free(sc->mly_cam_sim[i], 0); } } + MLY_UNLOCK(sc); if (sc->mly_cam_devq != NULL) cam_simq_free(sc->mly_cam_devq); } @@ -2030,6 +2062,7 @@ mly_cam_action(struct cam_sim *sim, unio struct mly_softc *sc = cam_sim_softc(sim); debug_called(2); + MLY_ASSERT_LOCKED(sc); switch (ccb->ccb_h.func_code) { @@ -2173,7 +2206,6 @@ mly_cam_action_io(struct cam_sim *sim, s struct mly_command_scsi_small *ss; int bus, target; int error; - int s; bus = cam_sim_bus(sim); target = csio->ccb_h.target_id; @@ -2220,11 +2252,9 @@ mly_cam_action_io(struct cam_sim *sim, s * Get a command, or push the ccb back to CAM and freeze the queue. */ if ((error = mly_alloc_command(sc, &mc))) { - s = splcam(); xpt_freeze_simq(sim, 1); csio->ccb_h.status |= CAM_REQUEUE_REQ; sc->mly_qfrzn_cnt++; - splx(s); return(error); } @@ -2270,11 +2300,9 @@ mly_cam_action_io(struct cam_sim *sim, s /* give the command to the controller */ if ((error = mly_start(mc))) { - s = splcam(); xpt_freeze_simq(sim, 1); csio->ccb_h.status |= CAM_REQUEUE_REQ; sc->mly_qfrzn_cnt++; - splx(s); return(error); } @@ -2306,7 +2334,6 @@ mly_cam_complete(struct mly_command *mc) struct mly_btl *btl; u_int8_t cmd; int bus, target; - int s; debug_called(2); @@ -2359,12 +2386,10 @@ mly_cam_complete(struct mly_command *mc) break; } - s = splcam(); if (sc->mly_qfrzn_cnt) { csio->ccb_h.status |= CAM_RELEASE_SIMQ; sc->mly_qfrzn_cnt--; } - splx(s); xpt_done((union ccb *)csio); mly_release_command(mc); @@ -2805,7 +2830,9 @@ mly_user_open(struct cdev *dev, int flag { struct mly_softc *sc = dev->si_drv1; + MLY_LOCK(sc); sc->mly_state |= MLY_STATE_OPEN; + MLY_UNLOCK(sc); return(0); } @@ -2817,7 +2844,9 @@ mly_user_close(struct cdev *dev, int fla { struct mly_softc *sc = dev->si_drv1; + MLY_LOCK(sc); sc->mly_state &= ~MLY_STATE_OPEN; + MLY_UNLOCK(sc); return (0); } @@ -2855,13 +2884,16 @@ static int mly_user_command(struct mly_softc *sc, struct mly_user_command *uc) { struct mly_command *mc; - int error, s; + int error; /* allocate a command */ + MLY_LOCK(sc); if (mly_alloc_command(sc, &mc)) { + MLY_UNLOCK(sc); error = ENOMEM; goto out; /* XXX Linux version will wait for a command */ } + MLY_UNLOCK(sc); /* handle data size/direction */ mc->mc_length = (uc->DataTransferLength >= 0) ? uc->DataTransferLength : -uc->DataTransferLength; @@ -2888,12 +2920,14 @@ mly_user_command(struct mly_softc *sc, s mc->mc_complete = NULL; /* execute the command */ - if ((error = mly_start(mc)) != 0) + MLY_LOCK(sc); + if ((error = mly_start(mc)) != 0) { + MLY_UNLOCK(sc); goto out; - s = splcam(); + } while (!(mc->mc_flags & MLY_CMD_COMPLETE)) - tsleep(mc, PRIBIO, "mlyioctl", 0); - splx(s); + mtx_sleep(mc, &sc->mly_lock, PRIBIO, "mlyioctl", 0); + MLY_UNLOCK(sc); /* return the data to userspace */ if (uc->DataTransferLength > 0) @@ -2916,8 +2950,11 @@ mly_user_command(struct mly_softc *sc, s out: if (mc->mc_data != NULL) free(mc->mc_data, M_DEVBUF); - if (mc != NULL) + if (mc != NULL) { + MLY_LOCK(sc); mly_release_command(mc); + MLY_UNLOCK(sc); + } return(error); } @@ -2931,32 +2968,36 @@ static int mly_user_health(struct mly_softc *sc, struct mly_user_health *uh) { struct mly_health_status mh; - int error, s; + int error; /* fetch the current health status from userspace */ if ((error = copyin(uh->HealthStatusBuffer, &mh, sizeof(mh))) != 0) return(error); /* spin waiting for a status update */ - s = splcam(); + MLY_LOCK(sc); error = EWOULDBLOCK; while ((error != 0) && (sc->mly_event_change == mh.change_counter)) - error = tsleep(&sc->mly_event_change, PRIBIO | PCATCH, "mlyhealth", 0); - splx(s); + error = mtx_sleep(&sc->mly_event_change, &sc->mly_lock, PRIBIO | PCATCH, + "mlyhealth", 0); + mh = sc->mly_mmbox->mmm_health.status; + MLY_UNLOCK(sc); - /* copy the controller's health status buffer out (there is a race here if it changes again) */ - error = copyout(&sc->mly_mmbox->mmm_health.status, uh->HealthStatusBuffer, - sizeof(uh->HealthStatusBuffer)); + /* copy the controller's health status buffer out */ + error = copyout(&mh, uh->HealthStatusBuffer, sizeof(mh)); return(error); } #ifdef MLY_DEBUG -static int -mly_timeout(struct mly_softc *sc) +static void +mly_timeout(void *arg) { + struct mly_softc *sc; struct mly_command *mc; int deadline; + sc = arg; + MLY_ASSERT_LOCKED(sc); deadline = time_second - MLY_CMD_TIMEOUT; TAILQ_FOREACH(mc, &sc->mly_busy, mc_link) { if ((mc->mc_timestamp < deadline)) { @@ -2966,8 +3007,6 @@ mly_timeout(struct mly_softc *sc) } } - timeout((timeout_t *)mly_timeout, sc, MLY_CMD_TIMEOUT * hz); - - return (0); + callout_reset(&sc->mly_timeout, MLY_CMD_TIMEOUT * hz, mly_timeout, sc); } #endif Modified: head/sys/dev/mly/mlyvar.h ============================================================================== --- head/sys/dev/mly/mlyvar.h Tue Nov 18 21:51:01 2014 (r274676) +++ head/sys/dev/mly/mlyvar.h Tue Nov 18 21:55:50 2014 (r274677) @@ -59,10 +59,6 @@ # include -#ifndef INTR_ENTROPY -# define INTR_ENTROPY 0 -#endif - /******************************************************************************** ******************************************************************************** Driver Variable Definitions @@ -161,8 +157,6 @@ struct mly_softc { struct cdev *mly_dev_t; struct resource *mly_regs_resource; /* register interface window */ int mly_regs_rid; /* resource ID */ - bus_space_handle_t mly_bhandle; /* bus space handle */ - bus_space_tag_t mly_btag; /* bus space tag */ bus_dma_tag_t mly_parent_dmat; /* parent DMA tag */ bus_dma_tag_t mly_buffer_dmat; /* data buffer/command DMA tag */ struct resource *mly_irq; /* interrupt */ @@ -195,6 +189,7 @@ struct mly_softc { u_int32_t mly_mmbox_status_index; /* index we next expect status at */ /* controller features, limits and status */ + struct mtx mly_lock; int mly_state; #define MLY_STATE_OPEN (1<<1) #define MLY_STATE_INTERRUPTS_ON (1<<2) @@ -219,7 +214,7 @@ struct mly_softc { u_int32_t mly_event_change; /* event status change indicator */ u_int32_t mly_event_counter; /* next event for which we anticpiate status */ u_int32_t mly_event_waiting; /* next event the controller will post status for */ - struct callout_handle mly_periodic; /* periodic event handling */ + struct callout mly_periodic; /* periodic event handling */ /* CAM connection */ struct cam_devq *mly_cam_devq; /* CAM device queue */ @@ -230,29 +225,37 @@ struct mly_softc { /* command-completion task */ struct task mly_task_complete; /* deferred-completion task */ int mly_qfrzn_cnt; /* Track simq freezes */ + +#ifdef MLY_DEBUG + struct callout mly_timeout; +#endif }; +#define MLY_LOCK(sc) mtx_lock(&(sc)->mly_lock) +#define MLY_UNLOCK(sc) mtx_unlock(&(sc)->mly_lock) +#define MLY_ASSERT_LOCKED(sc) mtx_assert(&(sc)->mly_lock, MA_OWNED) + /* * Register access helpers. */ -#define MLY_SET_REG(sc, reg, val) bus_space_write_1(sc->mly_btag, sc->mly_bhandle, reg, val) -#define MLY_GET_REG(sc, reg) bus_space_read_1 (sc->mly_btag, sc->mly_bhandle, reg) -#define MLY_GET_REG2(sc, reg) bus_space_read_2 (sc->mly_btag, sc->mly_bhandle, reg) -#define MLY_GET_REG4(sc, reg) bus_space_read_4 (sc->mly_btag, sc->mly_bhandle, reg) +#define MLY_SET_REG(sc, reg, val) bus_write_1(sc->mly_regs_resource, reg, val) +#define MLY_GET_REG(sc, reg) bus_read_1 (sc->mly_regs_resource, reg) +#define MLY_GET_REG2(sc, reg) bus_read_2 (sc->mly_regs_resource, reg) +#define MLY_GET_REG4(sc, reg) bus_read_4 (sc->mly_regs_resource, reg) #define MLY_SET_MBOX(sc, mbox, ptr) \ do { \ - bus_space_write_4(sc->mly_btag, sc->mly_bhandle, mbox, *((u_int32_t *)ptr)); \ - bus_space_write_4(sc->mly_btag, sc->mly_bhandle, mbox + 4, *((u_int32_t *)ptr + 1)); \ - bus_space_write_4(sc->mly_btag, sc->mly_bhandle, mbox + 8, *((u_int32_t *)ptr + 2)); \ - bus_space_write_4(sc->mly_btag, sc->mly_bhandle, mbox + 12, *((u_int32_t *)ptr + 3)); \ + bus_write_4(sc->mly_regs_resource, mbox, *((u_int32_t *)ptr)); \ + bus_write_4(sc->mly_regs_resource, mbox + 4, *((u_int32_t *)ptr + 1)); \ + bus_write_4(sc->mly_regs_resource, mbox + 8, *((u_int32_t *)ptr + 2)); \ + bus_write_4(sc->mly_regs_resource, mbox + 12, *((u_int32_t *)ptr + 3)); \ } while(0); #define MLY_GET_MBOX(sc, mbox, ptr) \ do { \ - *((u_int32_t *)ptr) = bus_space_read_4(sc->mly_btag, sc->mly_bhandle, mbox); \ - *((u_int32_t *)ptr + 1) = bus_space_read_4(sc->mly_btag, sc->mly_bhandle, mbox + 4); \ - *((u_int32_t *)ptr + 2) = bus_space_read_4(sc->mly_btag, sc->mly_bhandle, mbox + 8); \ - *((u_int32_t *)ptr + 3) = bus_space_read_4(sc->mly_btag, sc->mly_bhandle, mbox + 12); \ + *((u_int32_t *)ptr) = bus_read_4(sc->mly_regs_resource, mbox); \ + *((u_int32_t *)ptr + 1) = bus_read_4(sc->mly_regs_resource, mbox + 4); \ + *((u_int32_t *)ptr + 2) = bus_read_4(sc->mly_regs_resource, mbox + 8); \ + *((u_int32_t *)ptr + 3) = bus_read_4(sc->mly_regs_resource, mbox + 12); \ } while(0); #define MLY_IDBR_TRUE(sc, mask) \ @@ -315,46 +318,34 @@ mly_initq_ ## name (struct mly_softc *sc static __inline void \ mly_enqueue_ ## name (struct mly_command *mc) \ { \ - int s; \ \ - s = splcam(); \ TAILQ_INSERT_TAIL(&mc->mc_sc->mly_ ## name, mc, mc_link); \ MLYQ_ADD(mc->mc_sc, index); \ - splx(s); \ } \ static __inline void \ mly_requeue_ ## name (struct mly_command *mc) \ { \ - int s; \ \ - s = splcam(); \ TAILQ_INSERT_HEAD(&mc->mc_sc->mly_ ## name, mc, mc_link); \ MLYQ_ADD(mc->mc_sc, index); \ - splx(s); \ } \ static __inline struct mly_command * \ mly_dequeue_ ## name (struct mly_softc *sc) \ { \ struct mly_command *mc; \ - int s; \ \ - s = splcam(); \ if ((mc = TAILQ_FIRST(&sc->mly_ ## name)) != NULL) { \ TAILQ_REMOVE(&sc->mly_ ## name, mc, mc_link); \ MLYQ_REMOVE(sc, index); \ } \ - splx(s); \ return(mc); \ } \ static __inline void \ mly_remove_ ## name (struct mly_command *mc) \ { \ - int s; \ \ - s = splcam(); \ TAILQ_REMOVE(&mc->mc_sc->mly_ ## name, mc, mc_link); \ MLYQ_REMOVE(mc->mc_sc, index); \ - splx(s); \ } \ struct hack From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 21:58:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B24A7FB3; Tue, 18 Nov 2014 21:58:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F07C9E4; Tue, 18 Nov 2014 21:58:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAILww5G087566; Tue, 18 Nov 2014 21:58:58 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAILwwEc087564; Tue, 18 Nov 2014 21:58:58 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201411182158.sAILwwEc087564@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 18 Nov 2014 21:58:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274678 - head/sys/dev/pst X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 21:58:58 -0000 Author: jhb Date: Tue Nov 18 21:58:57 2014 New Revision: 274678 URL: https://svnweb.freebsd.org/changeset/base/274678 Log: Cleanups to pst(4): - Use callout(9) instead of timeout(9). - Don't bother zero'ing the softc. - Destroy mutex on detach. Tested by: no one Modified: head/sys/dev/pst/pst-pci.c head/sys/dev/pst/pst-raid.c Modified: head/sys/dev/pst/pst-pci.c ============================================================================== --- head/sys/dev/pst/pst-pci.c Tue Nov 18 21:55:50 2014 (r274677) +++ head/sys/dev/pst/pst-pci.c Tue Nov 18 21:58:57 2014 (r274678) @@ -73,15 +73,13 @@ iop_pci_attach(device_t dev) struct iop_softc *sc = device_get_softc(dev); int rid; - bzero(sc, sizeof(struct iop_softc)); - /* get resources */ - rid = 0x10; + rid = PCIR_BAR(0); sc->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (!sc->r_mem) - return 0; + return ENXIO; rid = 0x00; sc->r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, @@ -104,11 +102,16 @@ static int iop_pci_detach(device_t dev) { struct iop_softc *sc = device_get_softc(dev); + int error; + error = bus_generic_detach(dev); + if (error) + return (error); bus_teardown_intr(dev, sc->r_irq, sc->handle); bus_release_resource(dev, SYS_RES_IRQ, 0x00, sc->r_irq); - bus_release_resource(dev, SYS_RES_MEMORY, 0x10, sc->r_mem); - return bus_generic_detach(dev); + bus_release_resource(dev, SYS_RES_MEMORY, PCIR_BAR(0), sc->r_mem); + mtx_destroy(&sc->mtx); + return (0); } Modified: head/sys/dev/pst/pst-raid.c ============================================================================== --- head/sys/dev/pst/pst-raid.c Tue Nov 18 21:55:50 2014 (r274677) +++ head/sys/dev/pst/pst-raid.c Tue Nov 18 21:58:57 2014 (r274678) @@ -63,7 +63,7 @@ struct pst_softc { struct pst_request { struct pst_softc *psc; /* pointer to softc */ u_int32_t mfa; /* frame addreess */ - struct callout_handle timeout_handle; /* handle for untimeout */ + struct callout timeout; /* timeout timer */ struct bio *bp; /* associated bio ptr */ }; @@ -75,7 +75,7 @@ static int pst_shutdown(device_t); static void pst_start(struct pst_softc *); static void pst_done(struct iop_softc *, u_int32_t, struct i2o_single_reply *); static int pst_rw(struct pst_request *); -static void pst_timeout(struct pst_request *); +static void pst_timeout(void *); static void bpack(int8_t *, int8_t *, int); /* local vars */ @@ -97,7 +97,7 @@ pst_add_raid(struct iop_softc *sc, struc psc->iop = sc; psc->lct = lct; device_set_softc(child, psc); - return bus_generic_attach(sc->dev); + return device_probe_and_attach(child); } static int @@ -224,6 +224,7 @@ pst_start(struct pst_softc *psc) iop_free_mfa(psc->iop, mfa); return; } + callout_init_mtx(&request->timeout, &psc->iop->mtx, 0); psc->iop->outstanding++; request->psc = psc; request->mfa = mfa; @@ -245,7 +246,7 @@ pst_done(struct iop_softc *sc, u_int32_t (struct pst_request *)reply->transaction_context; struct pst_softc *psc = request->psc; - untimeout((timeout_t *)pst_timeout, request, request->timeout_handle); + callout_stop(&request->timeout); request->bp->bio_resid = request->bp->bio_bcount - reply->donecount; biofinish(request->bp, NULL, reply->status ? EIO : 0); free(request, M_PSTRAID); @@ -297,26 +298,25 @@ pst_rw(struct pst_request *request) request->psc->iop->reg->iqueue = request->mfa; - if (dumping) - request->timeout_handle.callout = NULL; - else - request->timeout_handle = - timeout((timeout_t*)pst_timeout, request, 10 * hz); + if (!dumping) + callout_reset(&request->timeout, 10 * hz, pst_timeout, request); return 0; } static void -pst_timeout(struct pst_request *request) +pst_timeout(void *arg) { + struct pst_request *request; + + request = arg; printf("pst: timeout mfa=0x%08x cmd=0x%02x\n", request->mfa, request->bp->bio_cmd); - mtx_lock(&request->psc->iop->mtx); + mtx_assert(&request->psc->iop->mtx, MA_OWNED); iop_free_mfa(request->psc->iop, request->mfa); if ((request->mfa = iop_get_mfa(request->psc->iop)) == 0xffffffff) { printf("pst: timeout no mfa possible\n"); biofinish(request->bp, NULL, EIO); request->psc->iop->outstanding--; - mtx_unlock(&request->psc->iop->mtx); return; } if (pst_rw(request)) { @@ -324,7 +324,6 @@ pst_timeout(struct pst_request *request) biofinish(request->bp, NULL, EIO); request->psc->iop->outstanding--; } - mtx_unlock(&request->psc->iop->mtx); } static void From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 22:00:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79E9E193; Tue, 18 Nov 2014 22:00:34 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34402A83; Tue, 18 Nov 2014 22:00:34 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.82 (FreeBSD)) (envelope-from ) id 1Xqqp4-0008KB-Pv; Wed, 19 Nov 2014 02:00:30 +0400 Date: Wed, 19 Nov 2014 02:00:30 +0400 From: Slawa Olhovchenkov To: Xin LI Subject: Re: svn commit: r274673 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20141118220030.GA31347@zxy.spb.ru> References: <201411181840.sAIIe2C7094558@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201411181840.sAIIe2C7094558@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 22:00:34 -0000 On Tue, Nov 18, 2014 at 06:40:02PM +0000, Xin LI wrote: > Author: delphij > Date: Tue Nov 18 18:40:01 2014 > New Revision: 274673 > URL: https://svnweb.freebsd.org/changeset/base/274673 > > Log: > Allow tuning zfs_max_recordsize via loader tunable. Tuning is NOT > recommended. This is not tuning, this is simple guard. And can be safe changed (incrased, at the least) in any time. For some workload optimal is maximum, i.e. 16MB. May be better comment: increasing this value required strong understaning after-effects of increasing memory consumption and bulk data transfers. (sorry for english) > Requested by: Slawa Olhovchenkov > MFC after: 2 weeks Thanks, can you allow RW? > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Nov 18 18:03:40 2014 (r274672) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Nov 18 18:40:01 2014 (r274673) > @@ -51,6 +51,8 @@ > #include > #include > > +SYSCTL_DECL(_vfs_zfs); > + > /* > * The SPA supports block sizes up to 16MB. However, very large blocks > * can have an impact on i/o latency (e.g. tying up a spinning disk for > @@ -61,6 +63,9 @@ > * of this setting. > */ > int zfs_max_recordsize = 1 * 1024 * 1024; > +SYSCTL_INT(_vfs_zfs, OID_AUTO, max_recordsize, CTLFLAG_RDTUN, > + &zfs_max_recordsize, 0, > + "Maximum block size. Expect dragons when tuning this."); > > #define SWITCH64(x, y) \ > { \ > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 22:02:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E9B72F3; Tue, 18 Nov 2014 22:02:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A667A9E; Tue, 18 Nov 2014 22:02:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIM2dFl091597; Tue, 18 Nov 2014 22:02:39 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIM2cs4091594; Tue, 18 Nov 2014 22:02:38 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201411182202.sAIM2cs4091594@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 18 Nov 2014 22:02:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274679 - head/sys/dev/scd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 22:02:39 -0000 Author: jhb Date: Tue Nov 18 22:02:37 2014 New Revision: 274679 URL: https://svnweb.freebsd.org/changeset/base/274679 Log: Add locking to scd(4) and mark MPSAFE. - Actually use existing per-softc mutex. - Use mutex in cdev routines and remove D_NEEDGIANT. - Use callout(9) instead of timeout(9). - Don't check for impossible conditions (e.g. SCDINIT being clear). - Use bus_*() instead of bus_space_*(). Tested by: no one Modified: head/sys/dev/scd/scd.c head/sys/dev/scd/scd_isa.c head/sys/dev/scd/scdvar.h Modified: head/sys/dev/scd/scd.c ============================================================================== --- head/sys/dev/scd/scd.c Tue Nov 18 21:58:57 2014 (r274678) +++ head/sys/dev/scd/scd.c Tue Nov 18 22:02:37 2014 (r274679) @@ -120,7 +120,7 @@ static int get_result(struct scd_softc * static void print_error(struct scd_softc *, int errcode); static void scd_start(struct scd_softc *); -static timeout_t scd_timeout; +static void scd_timeout(void *); static void scd_doread(struct scd_softc *, int state, struct scd_mbx *mbxin); static int scd_eject(struct scd_softc *); @@ -153,7 +153,7 @@ static struct cdevsw scd_cdevsw = { .d_ioctl = scdioctl, .d_strategy = scdstrategy, .d_name = "scd", - .d_flags = D_DISK | D_NEEDGIANT, + .d_flags = D_DISK, }; int @@ -163,11 +163,13 @@ scd_attach(struct scd_softc *sc) unit = device_get_unit(sc->dev); + SCD_LOCK(sc); init_drive(sc); sc->data.flags = SCDINIT; sc->data.audio_status = CD_AS_AUDIO_INVALID; bioq_init(&sc->data.head); + SCD_UNLOCK(sc); sc->scd_dev_t = make_dev(&scd_cdevsw, 8 * unit, UID_ROOT, GID_OPERATOR, 0640, "scd%d", unit); @@ -184,18 +186,18 @@ scdopen(struct cdev *dev, int flags, int sc = (struct scd_softc *)dev->si_drv1; - /* not initialized*/ - if (!(sc->data.flags & SCDINIT)) - return (ENXIO); - - /* invalidated in the meantime? mark all open part's invalid */ - if (sc->data.openflag) + /* mark all open part's invalid */ + SCD_LOCK(sc); + if (sc->data.openflag) { + SCD_UNLOCK(sc); return (ENXIO); + } XDEBUG(sc, 1, "DEBUG: status = 0x%x\n", SCD_READ(sc, IREG_STATUS)); if ((rc = spin_up(sc)) != 0) { print_error(sc, rc); + SCD_UNLOCK(sc); return (EIO); } if (!(sc->data.flags & SCDTOC)) { @@ -205,18 +207,21 @@ scdopen(struct cdev *dev, int flags, int if (rc == ERR_NOT_SPINNING) { rc = spin_up(sc); if (rc) { - print_error(sc, rc);\ + print_error(sc, rc); + SCD_UNLOCK(sc); return (EIO); } continue; } device_printf(sc->dev, "TOC read error 0x%x\n", rc); + SCD_UNLOCK(sc); return (EIO); } } sc->data.openflag = 1; sc->data.flags |= SCDVALID; + SCD_UNLOCK(sc); return (0); } @@ -228,17 +233,17 @@ scdclose(struct cdev *dev, int flags, in sc = (struct scd_softc *)dev->si_drv1; - if (!(sc->data.flags & SCDINIT) || !sc->data.openflag) - return (ENXIO); + SCD_LOCK(sc); + KASSERT(sc->data.openflag, ("device not open")); if (sc->data.audio_status != CD_AS_PLAY_IN_PROGRESS) { (void)send_cmd(sc, CMD_SPIN_DOWN, 0); sc->data.flags &= ~SCDSPINNING; } - /* close channel */ sc->data.openflag = 0; + SCD_UNLOCK(sc); return (0); } @@ -246,12 +251,12 @@ scdclose(struct cdev *dev, int flags, in static void scdstrategy(struct bio *bp) { - int s; struct scd_softc *sc; sc = (struct scd_softc *)bp->bio_dev->si_drv1; /* if device invalidated (e.g. media change, door open), error */ + SCD_LOCK(sc); if (!(sc->data.flags & SCDVALID)) { device_printf(sc->dev, "media changed\n"); bp->bio_error = EIO; @@ -276,17 +281,17 @@ scdstrategy(struct bio *bp) bp->bio_resid = 0; /* queue it */ - s = splbio(); bioq_disksort(&sc->data.head, bp); - splx(s); /* now check whether we can perform processing */ scd_start(sc); + SCD_UNLOCK(sc); return; bad: bp->bio_flags |= BIO_ERROR; done: + SCD_UNLOCK(sc); bp->bio_resid = bp->bio_bcount; biodone(bp); return; @@ -296,27 +301,22 @@ static void scd_start(struct scd_softc *sc) { struct bio *bp; - int s = splbio(); - if (sc->data.flags & SCDMBXBSY) { - splx(s); + SCD_ASSERT_LOCKED(sc); + if (sc->data.flags & SCDMBXBSY) return; - } bp = bioq_takefirst(&sc->data.head); if (bp != 0) { /* block found to process, dequeue */ sc->data.flags |= SCDMBXBSY; - splx(s); } else { /* nothing to do */ - splx(s); return; } sc->data.mbx.retry = 3; sc->data.mbx.bp = bp; - splx(s); scd_doread(sc, SCD_S_BEGIN, &(sc->data.mbx)); return; @@ -326,39 +326,47 @@ static int scdioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) { struct scd_softc *sc; + int error; sc = (struct scd_softc *)dev->si_drv1; XDEBUG(sc, 1, "ioctl: cmd=0x%lx\n", cmd); - if (!(sc->data.flags & SCDVALID)) + SCD_LOCK(sc); + if (!(sc->data.flags & SCDVALID)) { + SCD_UNLOCK(sc); return (EIO); + } + error = 0; switch (cmd) { case DIOCGMEDIASIZE: *(off_t *)addr = (off_t)sc->data.disksize * sc->data.blksize; - return (0); break; case DIOCGSECTORSIZE: *(u_int *)addr = sc->data.blksize; - return (0); break; case CDIOCPLAYTRACKS: - return scd_playtracks(sc, (struct ioc_play_track *) addr); + error = scd_playtracks(sc, (struct ioc_play_track *) addr); + break; case CDIOCPLAYBLOCKS: - return (EINVAL); + error = EINVAL; + break; case CDIOCPLAYMSF: - return scd_playmsf(sc, (struct ioc_play_msf *) addr); + error = scd_playmsf(sc, (struct ioc_play_msf *) addr); + break; case CDIOCREADSUBCHANNEL_SYSSPACE: return scd_subchan(sc, (struct ioc_read_subchannel *) addr, 1); case CDIOCREADSUBCHANNEL: return scd_subchan(sc, (struct ioc_read_subchannel *) addr, 0); case CDIOREADTOCHEADER: - return scd_toc_header (sc, (struct ioc_toc_header *) addr); + error = scd_toc_header (sc, (struct ioc_toc_header *) addr); + break; case CDIOREADTOCENTRYS: return scd_toc_entrys (sc, (struct ioc_read_toc_entry*) addr); case CDIOREADTOCENTRY: - return scd_toc_entry (sc, (struct ioc_read_toc_single_entry*) addr); + error = scd_toc_entry (sc, (struct ioc_read_toc_single_entry*) addr); + break; case CDIOCSETPATCH: case CDIOCGETVOL: case CDIOCSETVOL: @@ -367,34 +375,43 @@ scdioctl(struct cdev *dev, u_long cmd, c case CDIOCSETMUTE: case CDIOCSETLEFT: case CDIOCSETRIGHT: - return (EINVAL); + error = EINVAL; + break; case CDIOCRESUME: - return scd_resume(sc); + error = scd_resume(sc); + break; case CDIOCPAUSE: - return scd_pause(sc); + error = scd_pause(sc); + break; case CDIOCSTART: - return (EINVAL); + error = EINVAL; + break; case CDIOCSTOP: - return scd_stop(sc); + error = scd_stop(sc); + break; case CDIOCEJECT: - return scd_eject(sc); + error = scd_eject(sc); + break; case CDIOCALLOW: - return (0); + break; case CDIOCSETDEBUG: #ifdef SCD_DEBUG scd_debuglevel++; #endif - return (0); + break; case CDIOCCLRDEBUG: #ifdef SCD_DEBUG scd_debuglevel = 0; #endif - return (0); + break; default: device_printf(sc->dev, "unsupported ioctl (cmd=0x%lx)\n", cmd); - return (ENOTTY); + error = ENOTTY; + break; } + SCD_UNLOCK(sc); + return (error); } /*************************************************************** @@ -573,6 +590,7 @@ scd_subchan(struct scd_softc *sc, struct data.what.position.absaddr.msf.minute = bcd2bin(q.abs_msf[0]); data.what.position.absaddr.msf.second = bcd2bin(q.abs_msf[1]); data.what.position.absaddr.msf.frame = bcd2bin(q.abs_msf[2]); + SCD_UNLOCK(sc); if (nocopyout == 0) { if (copyout(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len))!=0) @@ -680,6 +698,7 @@ scd_timeout(void *arg) struct scd_softc *sc; sc = (struct scd_softc *)arg; + SCD_ASSERT_LOCKED(sc); scd_doread(sc, sc->ch_state, sc->ch_mbxsave); } @@ -693,6 +712,7 @@ scd_doread(struct scd_softc *sc, int sta caddr_t addr; static char sdata[3]; /* Must be preserved between calls to this function */ + SCD_ASSERT_LOCKED(sc); loop: switch (state) { case SCD_S_BEGIN: @@ -707,7 +727,7 @@ loop: case SCD_S_WAITSTAT: sc->ch_state = SCD_S_WAITSTAT; - untimeout(scd_timeout, (caddr_t)sc, sc->ch); + callout_stop(&sc->timer); if (mbx->count-- <= 0) { device_printf(sc->dev, "timeout. drive busy.\n"); goto harderr; @@ -716,7 +736,7 @@ loop: trystat: if (IS_BUSY(sc)) { sc->ch_state = SCD_S_WAITSTAT; - sc->ch = timeout(scd_timeout, (caddr_t)sc, hz/100); /* XXX */ + callout_reset(&sc->timer, hz / 100, scd_timeout, sc); /* XXX */ return; } @@ -754,19 +774,19 @@ nextblock: mbx->count = 100; sc->ch_state = SCD_S_WAITFIFO; - sc->ch = timeout(scd_timeout, (caddr_t)sc, hz/100); /* XXX */ + callout_reset(&sc->timer, hz / 100, scd_timeout, sc); /* XXX */ return; case SCD_S_WAITSPIN: sc->ch_state = SCD_S_WAITSPIN; - untimeout(scd_timeout,(caddr_t)sc, sc->ch); + callout_stop(&sc->timer); if (mbx->count-- <= 0) { device_printf(sc->dev, "timeout waiting for drive to spin up.\n"); goto harderr; } if (!STATUS_BIT(sc, SBIT_RESULT_READY)) { sc->ch_state = SCD_S_WAITSPIN; - sc->ch = timeout(scd_timeout, (caddr_t)sc, hz/100); /* XXX */ + callout_reset(&sc->timer, hz / 100, scd_timeout, sc); /* XXX */ return; } SCD_WRITE(sc, OREG_CONTROL, CBIT_RESULT_READY_CLEAR); @@ -787,14 +807,14 @@ nextblock: case SCD_S_WAITFIFO: sc->ch_state = SCD_S_WAITFIFO; - untimeout(scd_timeout,(caddr_t)sc, sc->ch); + callout_stop(&sc->timer); if (mbx->count-- <= 0) { device_printf(sc->dev, "timeout. write param not ready.\n"); goto harderr; } if (!FSTATUS_BIT(sc, FBIT_WPARAM_READY)) { sc->ch_state = SCD_S_WAITFIFO; - sc->ch = timeout(scd_timeout, (caddr_t)sc,hz/100); /* XXX */ + callout_reset(&sc->timer, hz / 100, scd_timeout, sc); /* XXX */ return; } XDEBUG(sc, 1, "mbx->count (writeparamwait) = %d(%d)\n", mbx->count, 100); @@ -807,12 +827,11 @@ writeparam: SCD_WRITE(sc, OREG_COMMAND, CMD_SPIN_UP); mbx->count = 300; sc->ch_state = SCD_S_WAITSPIN; - sc->ch = timeout(scd_timeout, (caddr_t)sc, hz/100); /* XXX */ + callout_reset(&sc->timer, hz / 100, scd_timeout, sc); /* XXX */ return; } /* send the read command */ - critical_enter(); SCD_WRITE(sc, OREG_WPARAMS, sdata[0]); SCD_WRITE(sc, OREG_WPARAMS, sdata[1]); SCD_WRITE(sc, OREG_WPARAMS, sdata[2]); @@ -820,7 +839,6 @@ writeparam: SCD_WRITE(sc, OREG_WPARAMS, 0); SCD_WRITE(sc, OREG_WPARAMS, 1); SCD_WRITE(sc, OREG_COMMAND, CMD_READ); - critical_exit(); mbx->count = RDELAY_WAITREAD; for (i = 0; i < 50; i++) { @@ -830,12 +848,12 @@ writeparam: } sc->ch_state = SCD_S_WAITREAD; - sc->ch = timeout(scd_timeout, (caddr_t)sc, hz/100); /* XXX */ + callout_reset(&sc->timer, hz / 100, scd_timeout, sc); /* XXX */ return; case SCD_S_WAITREAD: sc->ch_state = SCD_S_WAITREAD; - untimeout(scd_timeout,(caddr_t)sc, sc->ch); + callout_stop(&sc->timer); if (mbx->count-- <= 0) { if (STATUS_BIT(sc, SBIT_RESULT_READY)) goto got_param; @@ -847,7 +865,7 @@ writeparam: if (!(sc->data.flags & SCDVALID)) goto changed; sc->ch_state = SCD_S_WAITREAD; - sc->ch = timeout(scd_timeout, (caddr_t)sc, hz/100); /* XXX */ + callout_reset(&sc->timer, hz / 100, scd_timeout, sc); /* XXX */ return; } XDEBUG(sc, 2, "mbx->count (after RDY_BIT) = %d(%d)\n", mbx->count, RDELAY_WAITREAD); @@ -868,7 +886,7 @@ got_data: case SCD_S_WAITPARAM: sc->ch_state = SCD_S_WAITPARAM; - untimeout(scd_timeout,(caddr_t)sc, sc->ch); + callout_stop(&sc->timer); if (mbx->count-- <= 0) { device_printf(sc->dev, "timeout waiting for params\n"); goto readerr; @@ -877,7 +895,7 @@ got_data: waitfor_param: if (!STATUS_BIT(sc, SBIT_RESULT_READY)) { sc->ch_state = SCD_S_WAITPARAM; - sc->ch = timeout(scd_timeout, (caddr_t)sc, hz/100); /* XXX */ + callout_reset(&sc->timer, hz / 100, scd_timeout, sc); /* XXX */ return; } #ifdef SCD_DEBUG @@ -1293,7 +1311,9 @@ waitfor_status_bits(struct scd_softc *sc { break; } + SCD_UNLOCK(sc); pause("waitfor", hz/10); + SCD_LOCK(sc); } } if ((c & bits_set) == bits_set && @@ -1363,6 +1383,7 @@ scd_toc_entrys (struct scd_softc *sc, st toc_entry.addr.msf.second = bcd2bin(sc->data.toc[i].start_msf[1]); toc_entry.addr.msf.frame = bcd2bin(sc->data.toc[i].start_msf[2]); } + SCD_UNLOCK(sc); /* copy the data back */ if (copyout(&toc_entry, te->data, sizeof(struct cd_toc_entry)) != 0) Modified: head/sys/dev/scd/scd_isa.c ============================================================================== --- head/sys/dev/scd/scd_isa.c Tue Nov 18 21:58:57 2014 (r274678) +++ head/sys/dev/scd/scd_isa.c Tue Nov 18 22:02:37 2014 (r274679) @@ -125,6 +125,7 @@ scd_alloc_resources (device_t dev) sc = device_get_softc(dev); error = 0; + mtx_init(&sc->mtx, "scd", NULL, MTX_DEF); if (sc->port_type) { sc->port = bus_alloc_resource_any(dev, sc->port_type, @@ -134,13 +135,8 @@ scd_alloc_resources (device_t dev) error = ENOMEM; goto bad; } - sc->port_bst = rman_get_bustag(sc->port); - sc->port_bsh = rman_get_bushandle(sc->port); } - mtx_init(&sc->mtx, device_get_nameunit(dev), - "Interrupt lock", MTX_DEF | MTX_RECURSE); - bad: return (error); } @@ -152,14 +148,10 @@ scd_release_resources (device_t dev) sc = device_get_softc(dev); - if (sc->port) { + if (sc->port) bus_release_resource(dev, sc->port_type, sc->port_rid, sc->port); - sc->port_bst = 0; - sc->port_bsh = 0; - } - if (mtx_initialized(&sc->mtx) != 0) - mtx_destroy(&sc->mtx); + mtx_destroy(&sc->mtx); return; } Modified: head/sys/dev/scd/scdvar.h ============================================================================== --- head/sys/dev/scd/scdvar.h Tue Nov 18 21:58:57 2014 (r274678) +++ head/sys/dev/scd/scdvar.h Tue Nov 18 22:02:37 2014 (r274679) @@ -40,27 +40,26 @@ struct scd_softc { struct resource * port; int port_rid; int port_type; - bus_space_tag_t port_bst; - bus_space_handle_t port_bsh; struct mtx mtx; - struct callout_handle ch; + struct callout timer; int ch_state; struct scd_mbx * ch_mbxsave; struct scd_data data; }; -#define SCD_LOCK(_sc) splx(&(_sc)->mtx -#define SCD_UNLOCK(_sc) splx(&(_sc)->mtx +#define SCD_LOCK(_sc) mtx_lock(&_sc->mtx) +#define SCD_UNLOCK(_sc) mtx_unlock(&_sc->mtx) +#define SCD_ASSERT_LOCKED(_sc) mtx_assert(&_sc->mtx, MA_OWNED) #define SCD_READ(_sc, _reg) \ - bus_space_read_1(_sc->port_bst, _sc->port_bsh, _reg) + bus_read_1(_sc->port, _reg) #define SCD_READ_MULTI(_sc, _reg, _addr, _count) \ - bus_space_read_multi_1(_sc->port_bst, _sc->port_bsh, _reg, _addr, _count) + bus_read_multi_1(_sc->port, _reg, _addr, _count) #define SCD_WRITE(_sc, _reg, _val) \ - bus_space_write_1(_sc->port_bst, _sc->port_bsh, _reg, _val) + bus_write_1(_sc->port, _reg, _val) int scd_probe (struct scd_softc *); int scd_attach (struct scd_softc *); From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 22:12:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5EA286A9; Tue, 18 Nov 2014 22:12:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A8CBB9A; Tue, 18 Nov 2014 22:12:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIMCqk6096330; Tue, 18 Nov 2014 22:12:52 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIMCqfO096329; Tue, 18 Nov 2014 22:12:52 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201411182212.sAIMCqfO096329@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 18 Nov 2014 22:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274680 - head/sys/dev/wds X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 22:12:52 -0000 Author: jhb Date: Tue Nov 18 22:12:51 2014 New Revision: 274680 URL: https://svnweb.freebsd.org/changeset/base/274680 Log: Add locking to wds(4) and mark MPSAFE. - Add per-softc mutex. - Use mutex for CAM SIM lock. - Use bus_*() instead of inb() and outb(). - Use bus_alloc_resource_any() when reasonable. Tested by: no one Modified: head/sys/dev/wds/wd7000.c Modified: head/sys/dev/wds/wd7000.c ============================================================================== --- head/sys/dev/wds/wd7000.c Tue Nov 18 22:02:37 2014 (r274679) +++ head/sys/dev/wds/wd7000.c Tue Nov 18 22:12:51 2014 (r274680) @@ -159,8 +159,8 @@ __FBSDID("$FreeBSD$"); #include #include -#define WDSTOPHYS(wp, a) ( ((u_long)a) - ((u_long)wp->dx) + ((u_long)wp->dx_p) ) -#define WDSTOVIRT(wp, a) ( ((char *)a) - ((char*)wp->dx_p) + ((char *)wp->dx) ) +#define WDSTOPHYS(wp, a) ( ((uintptr_t)a) - ((uintptr_t)wp->dx) + (wp->dx_p) ) +#define WDSTOVIRT(wp, a) ( ((a) - (wp->dx_p)) + ((char *)wp->dx) ) /* 0x10000 (64k) should be enough. But just to be sure... */ #define BUFSIZ 0x12000 @@ -298,8 +298,8 @@ struct wdsdx { struct wds { device_t dev; + struct mtx lock; int unit; - int addr; int drq; struct cam_sim *sim; /* SIM descriptor for this card */ struct cam_path *path; /* wildcard path for this card */ @@ -307,7 +307,7 @@ struct wds { u_int32_t data_free; u_int32_t wdsr_free; struct wdsdx *dx; - struct wdsdx *dx_p; /* physical address */ + bus_addr_t dx_p; /* physical address */ struct resource *port_r; int port_rid; struct resource *drq_r; @@ -323,7 +323,8 @@ struct wds { static int wds_probe(device_t dev); static int wds_attach(device_t dev); -static void wds_intr(struct wds *wp); +static void wds_intr(void *arg); +static void wds_intr_locked(struct wds *wp); static void wds_action(struct cam_sim * sim, union ccb * ccb); static void wds_poll(struct cam_sim * sim); @@ -345,8 +346,8 @@ static void wds_done(struct wds *wp, static int wds_runsense(struct wds *wp, struct wds_req *r); static int wds_getvers(struct wds *wp); -static int wds_cmd(int base, u_int8_t * p, int l); -static void wds_wait(int reg, int mask, int val); +static int wds_cmd(struct wds *wp, u_int8_t * p, int l); +static void wds_wait(struct wds *wp, int reg, int mask, int val); static struct wds_req *cmdtovirt(struct wds *wp, u_int32_t phys); @@ -455,6 +456,7 @@ static int wds_probe(device_t dev) { struct wds *wp; + unsigned long addr; int error = 0; int irq; @@ -466,14 +468,13 @@ wds_probe(device_t dev) wp->unit = device_get_unit(dev); wp->dev = dev; - wp->addr = bus_get_resource_start(dev, SYS_RES_IOPORT, 0 /*rid*/); - if (wp->addr == 0 || wp->addr <0x300 - || wp->addr > 0x3f8 || wp->addr & 0x7) { - device_printf(dev, "invalid port address 0x%x\n", wp->addr); + addr = bus_get_resource_start(dev, SYS_RES_IOPORT, 0 /*rid*/); + if (addr == 0 || addr <0x300 || addr > 0x3f8 || addr & 0x7) { + device_printf(dev, "invalid port address 0x%lx\n", addr); return (ENXIO); } - if (bus_set_resource(dev, SYS_RES_IOPORT, 0, wp->addr, WDS_NPORTS) < 0) + if (bus_set_resource(dev, SYS_RES_IOPORT, 0, addr, WDS_NPORTS) < 0) return (ENXIO); /* get the DRQ */ @@ -491,9 +492,8 @@ wds_probe(device_t dev) } wp->port_rid = 0; - wp->port_r = bus_alloc_resource(dev, SYS_RES_IOPORT, &wp->port_rid, - /*start*/ 0, /*end*/ ~0, - /*count*/ 0, RF_ACTIVE); + wp->port_r = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &wp->port_rid, + RF_ACTIVE); if (wp->port_r == NULL) return (ENXIO); @@ -519,32 +519,29 @@ wds_attach(device_t dev) int error = 0; wp = (struct wds *)device_get_softc(dev); + mtx_init(&wp->lock, "wds", NULL, MTX_DEF); wp->port_rid = 0; - wp->port_r = bus_alloc_resource(dev, SYS_RES_IOPORT, &wp->port_rid, - /*start*/ 0, /*end*/ ~0, - /*count*/ 0, RF_ACTIVE); + wp->port_r = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &wp->port_rid, + RF_ACTIVE); if (wp->port_r == NULL) - return (ENXIO); + goto bad; /* We must now release resources on error. */ wp->drq_rid = 0; - wp->drq_r = bus_alloc_resource(dev, SYS_RES_DRQ, &wp->drq_rid, - /*start*/ 0, /*end*/ ~0, - /*count*/ 0, RF_ACTIVE); + wp->drq_r = bus_alloc_resource_any(dev, SYS_RES_DRQ, &wp->drq_rid, + RF_ACTIVE); if (wp->drq_r == NULL) goto bad; wp->intr_rid = 0; - wp->intr_r = bus_alloc_resource(dev, SYS_RES_IRQ, &wp->intr_rid, - /*start*/ 0, /*end*/ ~0, - /*count*/ 0, RF_ACTIVE); + wp->intr_r = bus_alloc_resource_any(dev, SYS_RES_IRQ, &wp->intr_rid, + RF_ACTIVE); if (wp->intr_r == NULL) goto bad; - error = bus_setup_intr(dev, wp->intr_r, INTR_TYPE_CAM | INTR_ENTROPY, - NULL, (driver_intr_t *)wds_intr, (void *)wp, - &wp->intr_cookie); + error = bus_setup_intr(dev, wp->intr_r, INTR_TYPE_CAM | INTR_ENTROPY | + INTR_MPSAFE, NULL, wds_intr, wp, &wp->intr_cookie); if (error) goto bad; @@ -557,8 +554,8 @@ wds_attach(device_t dev) /*maxsize*/ sizeof(* wp->dx), /*nsegments*/ 1, /*maxsegsz*/ sizeof(* wp->dx), /*flags*/ 0, - /*lockfunc*/busdma_lock_mutex, - /*lockarg*/&Giant, + /*lockfunc*/NULL, + /*lockarg*/NULL, &wp->bustag); if (error) goto bad; @@ -607,15 +604,17 @@ wds_attach(device_t dev) goto bad; sim = cam_sim_alloc(wds_action, wds_poll, "wds", (void *) wp, - wp->unit, &Giant, 1, 1, devq); + wp->unit, &wp->lock, 1, 1, devq); if (sim == NULL) { cam_simq_free(devq); goto bad; } wp->sim = sim; + mtx_lock(&wp->lock); if (xpt_bus_register(sim, dev, 0) != CAM_SUCCESS) { cam_sim_free(sim, /* free_devq */ TRUE); + mtx_unlock(&wp->lock); goto bad; } if (xpt_create_path(&pathp, /* periph */ NULL, @@ -623,14 +622,17 @@ wds_attach(device_t dev) CAM_LUN_WILDCARD) != CAM_REQ_CMP) { xpt_bus_deregister(cam_sim_path(sim)); cam_sim_free(sim, /* free_devq */ TRUE); + mtx_unlock(&wp->lock); goto bad; } + mtx_unlock(&wp->lock); wp->path = pathp; return (0); bad: wds_free_resources(wp); + mtx_destroy(&wp->lock); if (error) return (error); else /* exact error is unknown */ @@ -759,19 +761,29 @@ wdsr_alloc(struct wds *wp) } static void -wds_intr(struct wds *wp) +wds_intr(void *arg) +{ + struct wds *wp; + + wp = arg; + mtx_lock(&wp->lock); + wds_intr_locked(wp); + mtx_unlock(&wp->lock); +} + +static void +wds_intr_locked(struct wds *wp) { struct wds_req *rp; struct wds_mb *in; u_int8_t stat; u_int8_t c; - int addr = wp->addr; DBG(DBX "wds%d: interrupt [\n", wp->unit); smallog('['); - if (inb(addr + WDS_STAT) & WDS_IRQ) { - c = inb(addr + WDS_IRQSTAT); + if (bus_read_1(wp->port_r, WDS_STAT) & WDS_IRQ) { + c = bus_read_1(wp->port_r, WDS_IRQSTAT); if ((c & WDSI_MASK) == WDSI_MSVC) { c = c & ~WDSI_MASK; in = &wp->dx->imbs[c]; @@ -790,7 +802,7 @@ wds_intr(struct wds *wp) } else device_printf(wp->dev, "weird interrupt, irqstat=0x%x\n", c); - outb(addr + WDS_IRQACK, 0); + bus_write_1(wp->port_r, WDS_IRQACK, 0); } else { smallog('?'); } @@ -934,12 +946,12 @@ wds_runsense(struct wds *wp, struct wds_ scsi_ulto3b(sizeof(struct scsi_sense_data), r->cmd.len); r->cmd.write = 0x80; - outb(wp->addr + WDS_HCR, WDSH_IRQEN | WDSH_DRQEN); + bus_write_1(wp->port_r, WDS_HCR, WDSH_IRQEN | WDSH_DRQEN); wp->dx->ombs[r->ombn].stat = 1; c = WDSC_MSTART(r->ombn); - if (wds_cmd(wp->addr, &c, sizeof c) != 0) { + if (wds_cmd(wp, &c, sizeof c) != 0) { device_printf(wp->dev, "unable to start outgoing sense mbox\n"); wp->dx->ombs[r->ombn].stat = 0; wdsr_ccb_done(wp, r, r->ccb, CAM_AUTOSENSE_FAIL); @@ -958,12 +970,9 @@ static int wds_getvers(struct wds *wp) { struct wds_req *r; - int base; u_int8_t c; int i; - base = wp->addr; - r = wdsr_alloc(wp); if (!r) { device_printf(wp->dev, "no request slot available!\n"); @@ -978,10 +987,10 @@ wds_getvers(struct wds *wp) bzero(&r->cmd, sizeof r->cmd); r->cmd.cmd = WDSX_GETFIRMREV; - outb(base + WDS_HCR, WDSH_DRQEN); + bus_write_1(wp->port_r, WDS_HCR, WDSH_DRQEN); c = WDSC_MSTART(r->ombn); - if (wds_cmd(base, (u_int8_t *) & c, sizeof c)) { + if (wds_cmd(wp, (u_int8_t *) & c, sizeof c)) { device_printf(wp->dev, "version request failed\n"); wp->wdsr_free |= (1 << r->id); wp->dx->ombs[r->ombn].stat = 0; @@ -989,14 +998,14 @@ wds_getvers(struct wds *wp) } while (1) { i = 0; - while ((inb(base + WDS_STAT) & WDS_IRQ) == 0) { + while ((bus_read_1(wp->port_r, WDS_STAT) & WDS_IRQ) == 0) { DELAY(9000); if (++i == 100) { device_printf(wp->dev, "getvers timeout\n"); return (-1); } } - wds_intr(wp); + wds_intr_locked(wp); if (r->flags & WR_DONE) { device_printf(wp->dev, "firmware version %d.%02d\n", r->cmd.targ, r->cmd.scb[0]); @@ -1016,9 +1025,8 @@ wdsr_ccb_done(struct wds *wp, struct wds /* To implement timeouts we would need to know how to abort the * command on controller, and this is a great mystery. * So for now we just pass the responsibility for timeouts - * to the controlles itself, it does that reasonably good. + * to the controller itself, it does that reasonably good. */ - /* untimeout(_timeout, (caddr_t) hcb, ccb->ccb_h.timeout_ch); */ /* we're about to free a hcb, so the shortage has ended */ frag_free(wp, r->mask); if (wp->want_wdsr && status != CAM_REQUEUE_REQ) { @@ -1040,7 +1048,6 @@ wds_scsi_io(struct cam_sim * sim, struct struct wds *wp; struct ccb_hdr *ccb_h; struct wds_req *r; - int base; u_int8_t c; int error; int n; @@ -1072,7 +1079,6 @@ wds_scsi_io(struct cam_sim * sim, struct xpt_done((union ccb *) csio); return; } - base = wp->addr; /* * this check is mostly for debugging purposes, @@ -1150,11 +1156,11 @@ wds_scsi_io(struct cam_sim * sim, struct scsi_ulto3b(0, r->cmd.next); - outb(base + WDS_HCR, WDSH_IRQEN | WDSH_DRQEN); + bus_write_1(wp->port_r, WDS_HCR, WDSH_IRQEN | WDSH_DRQEN); c = WDSC_MSTART(r->ombn); - if (wds_cmd(base, &c, sizeof c) != 0) { + if (wds_cmd(wp, &c, sizeof c) != 0) { device_printf(wp->dev, "unable to start outgoing mbox\n"); wp->dx->ombs[r->ombn].stat = 0; wdsr_ccb_done(wp, r, r->ccb, CAM_RESRC_UNAVAIL); @@ -1170,16 +1176,13 @@ static void wds_action(struct cam_sim * sim, union ccb * ccb) { int unit = cam_sim_unit(sim); - int s; DBG(DBX "wds%d: action 0x%x\n", unit, ccb->ccb_h.func_code); switch (ccb->ccb_h.func_code) { case XPT_SCSI_IO: - s = splcam(); DBG(DBX "wds%d: SCSI IO entered\n", unit); wds_scsi_io(sim, &ccb->csio); DBG(DBX "wds%d: SCSI IO returned\n", unit); - splx(s); break; case XPT_RESET_BUS: /* how to do it right ? */ @@ -1242,7 +1245,7 @@ wds_action(struct cam_sim * sim, union c static void wds_poll(struct cam_sim * sim) { - wds_intr((struct wds *)cam_sim_softc(sim)); + wds_intr_locked(cam_sim_softc(sim)); } /* part of initialization done in probe() */ @@ -1251,32 +1254,29 @@ wds_poll(struct cam_sim * sim) static int wds_preinit(struct wds *wp) { - int base; int i; - base = wp->addr; - /* * Sending a command causes the CMDRDY bit to clear. */ - outb(base + WDS_CMD, WDSC_NOOP); - if (inb(base + WDS_STAT) & WDS_RDY) + bus_write_1(wp->port_r, WDS_CMD, WDSC_NOOP); + if (bus_read_1(wp->port_r, WDS_STAT) & WDS_RDY) return (ENXIO); /* * the controller exists. reset and init. */ - outb(base + WDS_HCR, WDSH_ASCRESET | WDSH_SCSIRESET); + bus_write_1(wp->port_r, WDS_HCR, WDSH_ASCRESET | WDSH_SCSIRESET); DELAY(30); - outb(base + WDS_HCR, 0); + bus_write_1(wp->port_r, WDS_HCR, 0); - if ((inb(base + WDS_STAT) & (WDS_RDY)) != WDS_RDY) { + if ((bus_read_1(wp->port_r, WDS_STAT) & (WDS_RDY)) != WDS_RDY) { for (i = 0; i < 10; i++) { - if ((inb(base + WDS_STAT) & (WDS_RDY)) == WDS_RDY) + if ((bus_read_1(wp->port_r, WDS_STAT) & (WDS_RDY)) == WDS_RDY) break; DELAY(40000); } - if ((inb(base + WDS_STAT) & (WDS_RDY)) != WDS_RDY) + if ((bus_read_1(wp->port_r, WDS_STAT) & (WDS_RDY)) != WDS_RDY) /* probe timeout */ return (ENXIO); } @@ -1291,23 +1291,20 @@ static int wds_init(struct wds *wp) { struct wds_setup init; - int base; int i; struct wds_cmd wc; - base = wp->addr; - - outb(base + WDS_HCR, WDSH_DRQEN); + bus_write_1(wp->port_r, WDS_HCR, WDSH_DRQEN); isa_dmacascade(wp->drq); - if ((inb(base + WDS_STAT) & (WDS_RDY)) != WDS_RDY) { + if ((bus_read_1(wp->port_r, WDS_STAT) & (WDS_RDY)) != WDS_RDY) { for (i = 0; i < 10; i++) { - if ((inb(base + WDS_STAT) & (WDS_RDY)) == WDS_RDY) + if ((bus_read_1(wp->port_r, WDS_STAT) & (WDS_RDY)) == WDS_RDY) break; DELAY(40000); } - if ((inb(base + WDS_STAT) & (WDS_RDY)) != WDS_RDY) + if ((bus_read_1(wp->port_r, WDS_STAT) & (WDS_RDY)) != WDS_RDY) /* probe timeout */ return (1); } @@ -1321,18 +1318,18 @@ wds_init(struct wds *wp) init.nomb = WDS_NOMB; init.nimb = WDS_NIMB; - wds_wait(base + WDS_STAT, WDS_RDY, WDS_RDY); - if (wds_cmd(base, (u_int8_t *) & init, sizeof init) != 0) { + wds_wait(wp, WDS_STAT, WDS_RDY, WDS_RDY); + if (wds_cmd(wp, (u_int8_t *) & init, sizeof init) != 0) { device_printf(wp->dev, "wds_cmd init failed\n"); return (1); } - wds_wait(base + WDS_STAT, WDS_INIT, WDS_INIT); + wds_wait(wp, WDS_STAT, WDS_INIT, WDS_INIT); - wds_wait(base + WDS_STAT, WDS_RDY, WDS_RDY); + wds_wait(wp, WDS_STAT, WDS_RDY, WDS_RDY); bzero(&wc, sizeof wc); wc.cmd = WDSC_DISUNSOL; - if (wds_cmd(base, (char *) &wc, sizeof wc) != 0) { + if (wds_cmd(wp, (char *) &wc, sizeof wc) != 0) { device_printf(wp->dev, "wds_cmd init2 failed\n"); return (1); } @@ -1340,29 +1337,26 @@ wds_init(struct wds *wp) } static int -wds_cmd(int base, u_int8_t * p, int l) +wds_cmd(struct wds *wp, u_int8_t * p, int l) { - int s = splcam(); while (l--) { do { - outb(base + WDS_CMD, *p); - wds_wait(base + WDS_STAT, WDS_RDY, WDS_RDY); - } while (inb(base + WDS_STAT) & WDS_REJ); + bus_write_1(wp->port_r, WDS_CMD, *p); + wds_wait(wp, WDS_STAT, WDS_RDY, WDS_RDY); + } while (bus_read_1(wp->port_r, WDS_STAT) & WDS_REJ); p++; } - wds_wait(base + WDS_STAT, WDS_RDY, WDS_RDY); - - splx(s); + wds_wait(wp, WDS_STAT, WDS_RDY, WDS_RDY); return (0); } static void -wds_wait(int reg, int mask, int val) +wds_wait(struct wds *wp, int reg, int mask, int val) { - while ((inb(reg) & mask) != val) + while ((bus_read_1(wp->port_r, reg) & mask) != val) ; } @@ -1394,9 +1388,9 @@ wds_print(void) if (wp == NULL) continue; printf("wds%d: want_wdsr=0x%x stat=0x%x irq=%s irqstat=0x%x\n", - unit, wp->want_wdsr, inb(wp->addr + WDS_STAT) & 0xff, - (inb(wp->addr + WDS_STAT) & WDS_IRQ) ? "ready" : "no", - inb(wp->addr + WDS_IRQSTAT) & 0xff); + unit, wp->want_wdsr, bus_read_1(wp->port_r, WDS_STAT) & 0xff, + (bus_read_1(wp->port_r, WDS_STAT) & WDS_IRQ) ? "ready" : "no", + bus_read_1(wp->port_r, WDS_IRQSTAT) & 0xff); for (i = 0; i < MAXSIMUL; i++) { r = &wp->dx->req[i]; if( wp->wdsr_free & (1 << r->id) ) { From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 22:22:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A928B25; Tue, 18 Nov 2014 22:22:32 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 119A7C97; Tue, 18 Nov 2014 22:22:32 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id EEB84B9C4; Tue, 18 Nov 2014 17:22:30 -0500 (EST) From: John Baldwin To: Adrian Chadd Subject: Re: svn commit: r274635 - head/sys/dev/pci Date: Tue, 18 Nov 2014 17:20:01 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201411172025.sAHKPLMl055666@svn.freebsd.org> <2245618.H2SPKlpWdS@ralph.baldwin.cx> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201411181720.01235.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 18 Nov 2014 17:22:31 -0500 (EST) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Dmitry Chagin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 22:22:32 -0000 On Monday, November 17, 2014 6:17:25 pm Adrian Chadd wrote: > On 17 November 2014 14:45, John Baldwin wrote: > > On Monday, November 17, 2014 08:25:21 PM Dmitry Chagin wrote: > >> Author: dchagin > >> Date: Mon Nov 17 20:25:21 2014 > >> New Revision: 274635 > >> URL: https://svnweb.freebsd.org/changeset/base/274635 > >> > >> Log: > >> Use the correct device as the power_for_sleep() method > >> always pass request up to parent bridge. > >> > >> Reviewed by: jhb > >> MFC after: 1 week > >> xMFC: r274386,r274397 > > > > Hmm, I had misread this diff as being another instance of what Adrian had > > found. I think this is actually not correct. The parent of a pci device > > ('dev' here) is a pciX device. pciX devices do not implement the > > PCIB_POWER_FOR_SLEEP method from pcib_if.m, so this probably just broke > > Adrian's Asus laptop as now it will always use D3 again and ignore _SxD. > > > > You said that this change fixed your laptop, yes? Did it work before Adrian's > > change in r274386 and break afterwards? > > Hm, it doesn't cascade up to the parent of dev if it's called? No, not all kobj methods do this. In this case this is a pcib_if method, so it is an interface supported by PCI bridge devices only. PCI bus devices aren't bridges, so they don't implement it. Similarly, pcib devices don't implement pci_if.m methods either. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 22:35:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0251374; Tue, 18 Nov 2014 22:35:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACC04DB1; Tue, 18 Nov 2014 22:35:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAIMZKEd006387; Tue, 18 Nov 2014 22:35:20 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAIMZKj3006386; Tue, 18 Nov 2014 22:35:20 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201411182235.sAIMZKj3006386@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 18 Nov 2014 22:35:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274681 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 22:35:20 -0000 Author: delphij Date: Tue Nov 18 22:35:19 2014 New Revision: 274681 URL: https://svnweb.freebsd.org/changeset/base/274681 Log: Make vfs.zfs.max_recordsize read-write at runtime. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Nov 18 22:12:51 2014 (r274680) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Nov 18 22:35:19 2014 (r274681) @@ -63,7 +63,7 @@ SYSCTL_DECL(_vfs_zfs); * of this setting. */ int zfs_max_recordsize = 1 * 1024 * 1024; -SYSCTL_INT(_vfs_zfs, OID_AUTO, max_recordsize, CTLFLAG_RDTUN, +SYSCTL_INT(_vfs_zfs, OID_AUTO, max_recordsize, CTLFLAG_RWTUN, &zfs_max_recordsize, 0, "Maximum block size. Expect dragons when tuning this."); From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 22:44:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FCA17CC; Tue, 18 Nov 2014 22:44:00 +0000 (UTC) Received: from mail-la0-x22c.google.com (mail-la0-x22c.google.com [IPv6:2a00:1450:4010:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AFA07E94; Tue, 18 Nov 2014 22:43:59 +0000 (UTC) Received: by mail-la0-f44.google.com with SMTP id ge10so1065136lab.31 for ; Tue, 18 Nov 2014 14:43:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=6scIQWERWwSw7TNqc1ekEUsDYDbsarhcxMkVJqgnbzc=; b=g8Vu2TSZF9mD7e6VhZMvKlLy9Ea3mK8eg9qdXQFALQ1MfYiYy6ETLQNhH5glc2sogI jh1t8oe0mdROchvuipINWfawwSUjNVVI2joebxbbA/+Ojw5b7wy1+Ccpwlwsa8QS9HmW VHNdmNqBgx0G9YBiYLwmftSSjLjRWovRjv6JKVMEtfGLVziPhMB6HHF8SaRkeP2FYN04 P1lupyIQrohzutjwFLCn2sIu/g4kFcLVNF30ucp1BmKwUwC9eDrpMxZtoQUuSNBoN1e0 qm2i5APnI3OWH3E1HKCcCj5EzSoV+gR6z4UX9t58lx/aCllxuSjzrQ5yLl/1TKb3T998 DYag== MIME-Version: 1.0 X-Received: by 10.152.88.100 with SMTP id bf4mr1905001lab.74.1416350637781; Tue, 18 Nov 2014 14:43:57 -0800 (PST) Sender: mahrens@gmail.com Received: by 10.112.210.4 with HTTP; Tue, 18 Nov 2014 14:43:57 -0800 (PST) In-Reply-To: <20141118220030.GA31347@zxy.spb.ru> References: <201411181840.sAIIe2C7094558@svn.freebsd.org> <20141118220030.GA31347@zxy.spb.ru> Date: Tue, 18 Nov 2014 14:43:57 -0800 X-Google-Sender-Auth: zQlPeRCmxtIsvcojNBVBHYRpEqw Message-ID: Subject: Re: svn commit: r274673 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs From: Matthew Ahrens To: Slawa Olhovchenkov Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "src-committers@freebsd.org" , Xin LI X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 22:44:00 -0000 On Tue, Nov 18, 2014 at 2:00 PM, Slawa Olhovchenkov wrote: > On Tue, Nov 18, 2014 at 06:40:02PM +0000, Xin LI wrote: > > > Author: delphij > > Date: Tue Nov 18 18:40:01 2014 > > New Revision: 274673 > > URL: https://svnweb.freebsd.org/changeset/base/274673 > > > > Log: > > Allow tuning zfs_max_recordsize via loader tunable. Tuning is NOT > > recommended. > > This is not tuning, this is simple guard. > And can be safe changed (incrased, at the least) in any time. > For some workload optimal is maximum, i.e. 16MB. > May be better comment: increasing this value required strong > understaning after-effects of increasing memory consumption and > bulk data transfers. (sorry for english) > I agree -- setting recordsize to 16MB is an easy way to make performance suck if you don't know what you're doing. But it isn't dangerous from a correctness point of view. --matt > > > Requested by: Slawa Olhovchenkov > > MFC after: 2 weeks > > Thanks, can you allow RW? > > > Modified: > > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c > > > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c > > > ============================================================================== > > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c > Tue Nov 18 18:03:40 2014 (r274672) > > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c > Tue Nov 18 18:40:01 2014 (r274673) > > @@ -51,6 +51,8 @@ > > #include > > #include > > > > +SYSCTL_DECL(_vfs_zfs); > > + > > /* > > * The SPA supports block sizes up to 16MB. However, very large blocks > > * can have an impact on i/o latency (e.g. tying up a spinning disk for > > @@ -61,6 +63,9 @@ > > * of this setting. > > */ > > int zfs_max_recordsize = 1 * 1024 * 1024; > > +SYSCTL_INT(_vfs_zfs, OID_AUTO, max_recordsize, CTLFLAG_RDTUN, > > + &zfs_max_recordsize, 0, > > + "Maximum block size. Expect dragons when tuning this."); > > > > #define SWITCH64(x, y) \ > > { \ > > _______________________________________________ > > svn-src-all@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/svn-src-all > > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > > From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 22:57:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07365A18; Tue, 18 Nov 2014 22:57:55 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DB689F8F; Tue, 18 Nov 2014 22:57:54 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [12.229.62.2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 5B628221D5; Tue, 18 Nov 2014 14:57:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1416351474; x=1416365874; bh=sEEA2TvypbiI1Ye7Qg4RBhcKldfwXw5hCKXrdQe9Iy0=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=K+9FrWjA1o4qMZ8ygEe6NerSQxYOtmGEc2M39uFlIJoyu3KKUsZjKzpjTqfcRr5ZZ WftwMLMqYu7VqwEyNHUkw7q+roz0seS0h3tkvMNBJ5g7YmIl4NF8ST3GY6SSqibOPG W5YNA8kRpEU37L8PIWJNoBUrvdYI2rthHtQLnQuo= Message-ID: <546BCEF1.7080009@delphij.net> Date: Tue, 18 Nov 2014 14:57:53 -0800 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Slawa Olhovchenkov , Xin LI Subject: Re: svn commit: r274673 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201411181840.sAIIe2C7094558@svn.freebsd.org> <20141118220030.GA31347@zxy.spb.ru> In-Reply-To: <20141118220030.GA31347@zxy.spb.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 22:57:55 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 11/18/14 14:00, Slawa Olhovchenkov wrote: > On Tue, Nov 18, 2014 at 06:40:02PM +0000, Xin LI wrote: > >> Author: delphij Date: Tue Nov 18 18:40:01 2014 New Revision: >> 274673 URL: https://svnweb.freebsd.org/changeset/base/274673 >> >> Log: Allow tuning zfs_max_recordsize via loader tunable. Tuning >> is NOT recommended. > > This is not tuning, this is simple guard. And can be safe changed > (incrased, at the least) in any time. FWIW: It can be safely decreased: the ability to read such pool is maintained. > For some workload optimal is maximum, i.e. 16MB. > > May be better comment: increasing this value required strong > understaning after-effects of increasing memory consumption and > bulk data transfers. (sorry for english) That's true, but not free. I don't think we have carefully evaluated the situation (and possible mitigation measures, like, do we need to make some improvements to the slab allocator? It's never exposed to workload like this before, etc.), and people tend to make uninformed changes all the times (a lot of FreeBSD tuning guide gives wrong instructions). >> Requested by: Slawa Olhovchenkov MFC after: 2 >> weeks > > Thanks, can you allow RW? Sure, done in 274681. I didn't do it at the beginning because I don't think it's a good idea to make it easy for users to fiddle with it, and power users who actually need to tweak do not change it often. But you are right there is no real technical reason not to allow read-write. >> Modified: >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c >> >> >> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c >> ============================================================================== >> >> - --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Nov 18 18:03:40 2014 (r274672) >> +++ >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c >> Tue Nov 18 18:40:01 2014 (r274673) @@ -51,6 +51,8 @@ #include >> #include >> >> +SYSCTL_DECL(_vfs_zfs); + /* * The SPA supports block sizes up to >> 16MB. However, very large blocks * can have an impact on i/o >> latency (e.g. tying up a spinning disk for @@ -61,6 +63,9 @@ * of >> this setting. */ int zfs_max_recordsize = 1 * 1024 * 1024; >> +SYSCTL_INT(_vfs_zfs, OID_AUTO, max_recordsize, CTLFLAG_RDTUN, + >> &zfs_max_recordsize, 0, + "Maximum block size. Expect dragons >> when tuning this."); >> >> #define SWITCH64(x, y) \ { \ >> _______________________________________________ >> svn-src-all@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/svn-src-all To >> unsubscribe, send any mail to >> "svn-src-all-unsubscribe@freebsd.org" - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0 iQIcBAEBCgAGBQJUa87xAAoJEJW2GBstM+nsPrgP/0o9O/AiiFJZhCezZc29oMQe Za4m5U3sWCPTb1x5fc3A5pKq1frT2GUvbUAjh21yuN5A8GfMt8A4v+nQ4i/asZ3C GkyU7Zkv0sW/14DR3nhRrLTNCum6p2Yk0XkxDBnUlBVzoJzbbbqin9PtTbe6i330 mav6E17V0AelCk8BoWpnhCcQbLObP9zvklzqknjlPHl5d81ERhfyp1p+BjPexdML ykOb3ZsjC0+8MfNmlKEyUga6Saz6vQXVqtXhkMuvqE8VNSfedXO+EpOweOID2SDU 7S4bwkFfu0GuBdqHSXTWsp3ncNiN/KfuX5fAUjb8Aoqp2RCHbft+DS2mnxSw/S7/ cUpOoC1ga+cUU4KLEgm3DG8y1LZH3KPyrzwFzXfY31lgOttCosQi9IeWgigGW975 3jhU7Oz+CX6oMPoAWhujAD3yGKVp2Qp2lePl12pl+F73jrwJ7UaTbKWZlNkofX0T o9/u/tqtna7NY3w9/z7WRDQFZvFEp2laARNAlr8QcakIuCXsDnG26LxFHbtLld0M R/88EYYJgWLPWD7TzapkrKhqbaf6sn6Z7m4M0Oo+MbFRNSII59/rTZsAbDI9PgiZ ScnaQldbnJdi0yMp8VyHrPDFqJtByhL/dQvmcTYf2QItnFEu1Hf3Os1nD+p3+8Z+ sdEBf8XuZdlMIcRIzFR2 =Gccl -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Tue Nov 18 23:11:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61400E05; Tue, 18 Nov 2014 23:11:43 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B18B1A2; Tue, 18 Nov 2014 23:11:43 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.82 (FreeBSD)) (envelope-from ) id 1Xqrvv-0009P1-K5; Wed, 19 Nov 2014 03:11:39 +0400 Date: Wed, 19 Nov 2014 03:11:39 +0400 From: Slawa Olhovchenkov To: d@delphij.net Subject: Re: svn commit: r274673 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20141118231139.GO9763@zxy.spb.ru> References: <201411181840.sAIIe2C7094558@svn.freebsd.org> <20141118220030.GA31347@zxy.spb.ru> <546BCEF1.7080009@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <546BCEF1.7080009@delphij.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 23:11:43 -0000 On Tue, Nov 18, 2014 at 02:57:53PM -0800, Xin Li wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 11/18/14 14:00, Slawa Olhovchenkov wrote: > > On Tue, Nov 18, 2014 at 06:40:02PM +0000, Xin LI wrote: > > > >> Author: delphij Date: Tue Nov 18 18:40:01 2014 New Revision: > >> 274673 URL: https://svnweb.freebsd.org/changeset/base/274673 > >> > >> Log: Allow tuning zfs_max_recordsize via loader tunable. Tuning > >> is NOT recommended. > > > > This is not tuning, this is simple guard. And can be safe changed > > (incrased, at the least) in any time. > > FWIW: It can be safely decreased: the ability to read such pool is > maintained. > > > For some workload optimal is maximum, i.e. 16MB. > > > > May be better comment: increasing this value required strong > > understaning after-effects of increasing memory consumption and > > bulk data transfers. (sorry for english) > > That's true, but not free. I don't think we have carefully evaluated > the situation (and possible mitigation measures, like, do we need to > make some improvements to the slab allocator? It's never exposed to > workload like this before, etc.), and people tend to make uninformed > changes all the times (a lot of FreeBSD tuning guide gives wrong > instructions). Now I start production with raidz1 and recordsize 2MB. > >> Requested by: Slawa Olhovchenkov MFC after: 2 > >> weeks > > > > Thanks, can you allow RW? > > Sure, done in 274681. > > I didn't do it at the beginning because I don't think it's a good idea > to make it easy for users to fiddle with it, and power users who > actually need to tweak do not change it often. But you are right > there is no real technical reason not to allow read-write. Thanks, just bad if required reboot creating zfs set with >1MB recordsize. At this point site may be in prodation, for example. > >> Modified: > >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c > >> > >> > >> > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c > >> ============================================================================== > >> > >> > - --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c > Tue Nov 18 18:03:40 2014 (r274672) > >> +++ > >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c > >> Tue Nov 18 18:40:01 2014 (r274673) @@ -51,6 +51,8 @@ #include > >> #include > >> > >> +SYSCTL_DECL(_vfs_zfs); + /* * The SPA supports block sizes up to > >> 16MB. However, very large blocks * can have an impact on i/o > >> latency (e.g. tying up a spinning disk for @@ -61,6 +63,9 @@ * of > >> this setting. */ int zfs_max_recordsize = 1 * 1024 * 1024; > >> +SYSCTL_INT(_vfs_zfs, OID_AUTO, max_recordsize, CTLFLAG_RDTUN, + > >> &zfs_max_recordsize, 0, + "Maximum block size. Expect dragons > >> when tuning this."); > >> > >> #define SWITCH64(x, y) \ { \ > >> _______________________________________________ > >> svn-src-all@freebsd.org mailing list > >> http://lists.freebsd.org/mailman/listinfo/svn-src-all To > >> unsubscribe, send any mail to > >> "svn-src-all-unsubscribe@freebsd.org" > > > - -- > Xin LI https://www.delphij.net/ > FreeBSD - The Power to Serve! Live free or die > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0 > > iQIcBAEBCgAGBQJUa87xAAoJEJW2GBstM+nsPrgP/0o9O/AiiFJZhCezZc29oMQe > Za4m5U3sWCPTb1x5fc3A5pKq1frT2GUvbUAjh21yuN5A8GfMt8A4v+nQ4i/asZ3C > GkyU7Zkv0sW/14DR3nhRrLTNCum6p2Yk0XkxDBnUlBVzoJzbbbqin9PtTbe6i330 > mav6E17V0AelCk8BoWpnhCcQbLObP9zvklzqknjlPHl5d81ERhfyp1p+BjPexdML > ykOb3ZsjC0+8MfNmlKEyUga6Saz6vQXVqtXhkMuvqE8VNSfedXO+EpOweOID2SDU > 7S4bwkFfu0GuBdqHSXTWsp3ncNiN/KfuX5fAUjb8Aoqp2RCHbft+DS2mnxSw/S7/ > cUpOoC1ga+cUU4KLEgm3DG8y1LZH3KPyrzwFzXfY31lgOttCosQi9IeWgigGW975 > 3jhU7Oz+CX6oMPoAWhujAD3yGKVp2Qp2lePl12pl+F73jrwJ7UaTbKWZlNkofX0T > o9/u/tqtna7NY3w9/z7WRDQFZvFEp2laARNAlr8QcakIuCXsDnG26LxFHbtLld0M > R/88EYYJgWLPWD7TzapkrKhqbaf6sn6Z7m4M0Oo+MbFRNSII59/rTZsAbDI9PgiZ > ScnaQldbnJdi0yMp8VyHrPDFqJtByhL/dQvmcTYf2QItnFEu1Hf3Os1nD+p3+8Z+ > sdEBf8XuZdlMIcRIzFR2 > =Gccl > -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Wed Nov 19 05:38:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0EFE7BB; Wed, 19 Nov 2014 05:38:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82E84D2D; Wed, 19 Nov 2014 05:38:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAJ5ckpp005435; Wed, 19 Nov 2014 05:38:46 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAJ5cjUY005432; Wed, 19 Nov 2014 05:38:45 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201411190538.sAJ5cjUY005432@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 19 Nov 2014 05:38:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274684 - in head: share/man/man4 sys/dev/usb sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2014 05:38:46 -0000 Author: kevlo Date: Wed Nov 19 05:38:45 2014 New Revision: 274684 URL: https://svnweb.freebsd.org/changeset/base/274684 Log: Add Trendnet TEW-646UBH. Submitted by: bolshakov_1 at yahoo dot com Modified: head/share/man/man4/rsu.4 head/sys/dev/usb/usbdevs head/sys/dev/usb/wlan/if_rsu.c Modified: head/share/man/man4/rsu.4 ============================================================================== --- head/share/man/man4/rsu.4 Wed Nov 19 01:07:58 2014 (r274683) +++ head/share/man/man4/rsu.4 Wed Nov 19 05:38:45 2014 (r274684) @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd May 3, 2014 +.Dd November 19, 2014 .Dt RSU 4 .Os .Sh NAME @@ -119,6 +119,7 @@ wireless network adapters, including: .It Sitecom WL-349 v1 .It Sitecom WL-353 .It Sweex LW154 +.It TRENDnet TEW-646UBH .It TRENDnet TEW-648UB .It TRENDnet TEW-649UB .El Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Nov 19 01:07:58 2014 (r274683) +++ head/sys/dev/usb/usbdevs Wed Nov 19 05:38:45 2014 (r274684) @@ -4370,6 +4370,7 @@ product TREK THUMBDRIVE_8MB 0x9988 Thumb /* TRENDnet products */ product TRENDNET RTL8192CU 0x624d RTL8192CU +product TRENDNET TEW646UBH 0x646b TEW-646UBH product TRENDNET RTL8188CU 0x648b RTL8188CU /* Tripp-Lite products */ Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Wed Nov 19 01:07:58 2014 (r274683) +++ head/sys/dev/usb/wlan/if_rsu.c Wed Nov 19 05:38:45 2014 (r274684) @@ -121,6 +121,7 @@ static const STRUCT_USB_HOST_ID rsu_devs RSU_DEV_HT(SITECOMEU, WL349V1), RSU_DEV_HT(SITECOMEU, WL353), RSU_DEV_HT(SWEEX2, LW154), + RSU_DEV_HT(TRENDNET, TEW646UBH), #undef RSU_DEV_HT #undef RSU_DEV }; From owner-svn-src-all@FreeBSD.ORG Wed Nov 19 06:04:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A44FFB4; Wed, 19 Nov 2014 06:04:47 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [IPv6:2001:470:1f05:b76::196]) by mx1.freebsd.org (Postfix) with ESMTP id 76D14FBD; Wed, 19 Nov 2014 06:04:47 +0000 (UTC) Received: from [10.0.1.20] (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id 25841341F83D; Tue, 18 Nov 2014 22:04:47 -0800 (PST) Subject: Re: svn commit: r274672 - in head/contrib/libxo: . libxo xolint Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=us-ascii From: Alfred Perlstein In-Reply-To: <201411181803.sAII3fCg079794@svn.freebsd.org> Date: Tue, 18 Nov 2014 22:04:46 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <18F6425B-A767-426D-8EEF-57B7CFF3D54B@mu.org> References: <201411181803.sAII3fCg079794@svn.freebsd.org> To: Marcel Moolenaar X-Mailer: Apple Mail (2.1283) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2014 06:04:47 -0000 Marcel, is there a way to get libxo programs to emit time series data? =20= Any examples of this in the tree right now? Example would be if "netstat -1" was libxo-ified, it would also emit a = timestamp. -Alfred On Nov 18, 2014, at 10:03 AM, Marcel Moolenaar wrote: > Author: marcel > Date: Tue Nov 18 18:03:40 2014 > New Revision: 274672 > URL: https://svnweb.freebsd.org/changeset/base/274672 >=20 > Log: > Upgrade libxo to 0.1.6. >=20 > Summary of changes: > 1. Coverity defect fixes >=20 > Obtained from: https://github.com/Juniper/libxo/releases/tag/0.1.6 >=20 > Modified: > head/contrib/libxo/configure.ac > head/contrib/libxo/libxo/libxo.c > head/contrib/libxo/libxo/xoconfig.h > head/contrib/libxo/libxo/xoversion.h > head/contrib/libxo/xolint/xolint.pl >=20 > Modified: head/contrib/libxo/configure.ac > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/contrib/libxo/configure.ac Tue Nov 18 17:37:33 2014 = (r274671) > +++ head/contrib/libxo/configure.ac Tue Nov 18 18:03:40 2014 = (r274672) > @@ -12,7 +12,7 @@ > # >=20 > AC_PREREQ(2.2) > -AC_INIT([libxo], [0.1.5], [phil@juniper.net]) > +AC_INIT([libxo], [0.1.6], [phil@juniper.net]) > AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability]) >=20 > # Support silent build rules. Requires at least automake-1.11. >=20 > Modified: head/contrib/libxo/libxo/libxo.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/contrib/libxo/libxo/libxo.c Tue Nov 18 17:37:33 2014 = (r274671) > +++ head/contrib/libxo/libxo/libxo.c Tue Nov 18 18:03:40 2014 = (r274672) > @@ -317,7 +317,7 @@ xo_init_handle (xo_handle_t *xop) > cp =3D getenv("LC_ALL"); > if (cp =3D=3D NULL) > cp =3D "UTF-8"; /* Optimistic? */ > - cp =3D setlocale(LC_CTYPE, cp); > + (void) setlocale(LC_CTYPE, cp); > } >=20 > /* > @@ -607,8 +607,10 @@ xo_vsnprintf (xo_handle_t *xop, xo_buffe > rc =3D vsnprintf(xbp->xb_curp, left, fmt, va_local); >=20 > if (rc > xbp->xb_size) { > - if (!xo_buf_has_room(xbp, rc)) > + if (!xo_buf_has_room(xbp, rc)) { > + va_end(va_local); > return -1; > + } >=20 > /* > * After we call vsnprintf(), the stage of vap is not defined. > @@ -648,8 +650,10 @@ xo_printf_v (xo_handle_t *xop, const cha > rc =3D vsnprintf(xbp->xb_curp, left, fmt, va_local); >=20 > if (rc > xbp->xb_size) { > - if (!xo_buf_has_room(xbp, rc)) > + if (!xo_buf_has_room(xbp, rc)) { > + va_end(va_local); > return -1; > + } >=20 > va_end(va_local); /* Reset vap to the start */ > va_copy(va_local, vap); > @@ -974,8 +978,10 @@ xo_warn_hcv (xo_handle_t *xop, int code, > int left =3D xbp->xb_size - (xbp->xb_curp - xbp->xb_bufp); > int rc =3D vsnprintf(xbp->xb_curp, left, newfmt, vap); > if (rc > xbp->xb_size) { > - if (!xo_buf_has_room(xbp, rc)) > + if (!xo_buf_has_room(xbp, rc)) { > + va_end(va_local); > return; > + } >=20 > va_end(vap); /* Reset vap to the start */ > va_copy(vap, va_local); > @@ -1118,8 +1124,10 @@ xo_message_hcv (xo_handle_t *xop, int co > int left =3D xbp->xb_size - (xbp->xb_curp - xbp->xb_bufp); > rc =3D vsnprintf(xbp->xb_curp, left, fmt, vap); > if (rc > xbp->xb_size) { > - if (!xo_buf_has_room(xbp, rc)) > + if (!xo_buf_has_room(xbp, rc)) { > + va_end(va_local); > return; > + } >=20 > va_end(vap); /* Reset vap to the start */ > va_copy(vap, va_local); > @@ -1154,14 +1162,15 @@ xo_message_hcv (xo_handle_t *xop, int co >=20 > va_copy(va_local, vap); >=20 > - rc =3D vsnprintf(buf, bufsiz, fmt, va_local); > + rc =3D vsnprintf(bp, bufsiz, fmt, va_local); > if (rc > bufsiz) { > bufsiz =3D rc + BUFSIZ; > bp =3D alloca(bufsiz); > va_end(va_local); > va_copy(va_local, vap); > - rc =3D vsnprintf(buf, bufsiz, fmt, va_local); > + rc =3D vsnprintf(bp, bufsiz, fmt, va_local); > } > + va_end(va_local); > cp =3D bp + rc; >=20 > if (need_nl) { > @@ -1302,9 +1311,9 @@ xo_create_to_file (FILE *fp, xo_style_t=20 > * @xop XO handle to alter (or NULL for default handle) > */ > void > -xo_destroy (xo_handle_t *xop) > +xo_destroy (xo_handle_t *xop_arg) > { > - xop =3D xo_default(xop); > + xo_handle_t *xop =3D xo_default(xop_arg); >=20 > if (xop->xo_close && (xop->xo_flags & XOF_CLOSE_FP)) > xop->xo_close(xop->xo_opaque); > @@ -1315,7 +1324,7 @@ xo_destroy (xo_handle_t *xop) > xo_buf_cleanup(&xop->xo_predicate); > xo_buf_cleanup(&xop->xo_attrs); >=20 > - if (xop =3D=3D &xo_default_handle) { > + if (xop_arg =3D=3D NULL) { > bzero(&xo_default_handle, sizeof(&xo_default_handle)); > xo_default_inited =3D 0; > } else > @@ -1743,7 +1752,7 @@ xo_format_string_direct (xo_handle_t *xo > int need_enc, int have_enc) > { > int cols =3D 0; > - wchar_t wc; > + wchar_t wc =3D 0; > int ilen, olen, width; > int attr =3D (flags & XFF_ATTR); > const char *sp; >=20 > Modified: head/contrib/libxo/libxo/xoconfig.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/contrib/libxo/libxo/xoconfig.h Tue Nov 18 17:37:33 2014 = (r274671) > +++ head/contrib/libxo/libxo/xoconfig.h Tue Nov 18 18:03:40 2014 = (r274672) > @@ -158,7 +158,7 @@ > #define PACKAGE_NAME "libxo" >=20 > /* Define to the full name and version of this package. */ > -#define PACKAGE_STRING "libxo 0.1.5" > +#define PACKAGE_STRING "libxo 0.1.6" >=20 > /* Define to the one symbol short name of this package. */ > #define PACKAGE_TARNAME "libxo" > @@ -167,7 +167,7 @@ > #define PACKAGE_URL "" >=20 > /* Define to the version of this package. */ > -#define PACKAGE_VERSION "0.1.5" > +#define PACKAGE_VERSION "0.1.6" >=20 > /* If using the C implementation of alloca, define if you know the > direction of stack growth for your system; otherwise it will be > @@ -181,7 +181,7 @@ > #define STDC_HEADERS 1 >=20 > /* Version number of package */ > -#define VERSION "0.1.5" > +#define VERSION "0.1.6" >=20 > /* Define to `__inline__' or `__inline' if that's what the C compiler > calls it, or to nothing if 'inline' is not supported under any = name. */ >=20 > Modified: head/contrib/libxo/libxo/xoversion.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/contrib/libxo/libxo/xoversion.h Tue Nov 18 17:37:33 2014 = (r274671) > +++ head/contrib/libxo/libxo/xoversion.h Tue Nov 18 18:03:40 2014 = (r274672) > @@ -18,17 +18,17 @@ > /** > * The version string > */ > -#define LIBXO_VERSION "0.1.5" > +#define LIBXO_VERSION "0.1.6" >=20 > /** > * The version number > */ > -#define LIBXO_VERSION_NUMBER 1004 > +#define LIBXO_VERSION_NUMBER 1006 >=20 > /** > * The version number as a string > */ > -#define LIBXO_VERSION_STRING "1004" > +#define LIBXO_VERSION_STRING "1006" >=20 > /** > * The version number extra info as a string >=20 > Modified: head/contrib/libxo/xolint/xolint.pl > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/contrib/libxo/xolint/xolint.pl Tue Nov 18 17:37:33 2014 = (r274671) > +++ head/contrib/libxo/xolint/xolint.pl Tue Nov 18 18:03:40 2014 = (r274672) > @@ -28,6 +28,19 @@ sub main { > extract_samples() if /^-X/; > } >=20 > + if ($#ARGV < 0) { > + print STDERR "xolint [options] files ...\n"; > + print STDERR " -c invoke 'cpp' on input\n"; > + print STDERR " -C flags Pass flags to cpp\n"; > + print STDERR " -d Show debug output\n"; > + print STDERR " -D Extract xolint documentation\n"; > + print STDERR " -I Print xo_info_t data\n"; > + print STDERR " -p Print input data on errors\n"; > + print STDERR " -V Print vocabulary (list of tags)\n"; > + print STDERR " -X Print examples of invalid use\n"; > + exit(1); > + } > + > for $file (@ARGV) { > parse_file($file); > } > @@ -269,9 +282,9 @@ sub check_format { > $last =3D $prev; > next; > } > + $prev =3D $ch; > } >=20 > - $prev =3D $ch; > $build[$phase] .=3D $ch; > } >=20 > @@ -346,18 +359,6 @@ sub check_field { > info("potential missing slash after N, L, or T with format") > if $field[1] =3D~ /%/; >=20 > - #@ Format cannot be given when content is present (roles: DNLT) > - #@ xo_emit("{T:Max/%6.6s}", "Max"); > - #@ Fields with the D, N, L, or T roles can't have both > - #@ static literal content ("{T:Title}") and a > - #@ format ("{T:/%s}"). > - #@ This error will also occur when the content has a backslash > - #@ in it, like "{N:Type of I/O}"; backslashes should be escaped, > - #@ like "{N:Type of I\\/O}". Note the double backslash, one for > - #@ handling 'C' strings, and one for libxo. > - error("format cannot be given when content is present") > - if $field[1] && $field[2]; > - > #@ An encoding format cannot be given (roles: DNLT) > #@ xo_emit("{T:Max//%s}", "Max"); > #@ Fields with the D, N, L, and T roles are not emitted in > @@ -367,6 +368,21 @@ sub check_field { > if $field[3]; > } >=20 > + # Field is a decoration, label, or title > + if ($field[0] =3D~ /DLN/) { > + #@ Format cannot be given when content is present (roles: DLN) > + #@ xo_emit("{N:Max/%6.6s}", "Max"); > + #@ Fields with the D, L, or N roles can't have both > + #@ static literal content ("{L:Label}") and a > + #@ format ("{L:/%s}"). > + #@ This error will also occur when the content has a backslash > + #@ in it, like "{N:Type of I/O}"; backslashes should be escaped, > + #@ like "{N:Type of I\\/O}". Note the double backslash, one for > + #@ handling 'C' strings, and one for libxo. > + error("format cannot be given when content is present") > + if $field[1] && $field[2]; > + } > + > # A value field > if (length($field[0]) =3D=3D 0 || $field[0] =3D~ /V/) { >=20 > @@ -527,7 +543,7 @@ sub check_field_format { > #@ for non-strings. This error may occur from a typo, > #@ like "{:tag/%6..6d}" where only one period should be used. > error("max width only valid for strings") > - if $#chunks >=3D 2 && $fc =3D~ /[sS]/; > + if $#chunks >=3D 2 && $fc !~ /[sS]/; > } >=20 > sub error { >=20 From owner-svn-src-all@FreeBSD.ORG Wed Nov 19 07:24:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A3DF538; Wed, 19 Nov 2014 07:24:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C223A5B; Wed, 19 Nov 2014 07:24:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAJ7OijK057164; Wed, 19 Nov 2014 07:24:44 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAJ7OhDY057159; Wed, 19 Nov 2014 07:24:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201411190724.sAJ7OhDY057159@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 19 Nov 2014 07:24:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r274696 - in stable: 10/contrib/llvm/include/llvm/CodeGen 10/contrib/llvm/lib/CodeGen/SelectionDAG 10/contrib/llvm/patches 9/contrib/llvm/include/llvm/CodeGen 9/contrib/llvm/lib/CodeGen... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2014 07:24:44 -0000 Author: dim Date: Wed Nov 19 07:24:43 2014 New Revision: 274696 URL: https://svnweb.freebsd.org/changeset/base/274696 Log: MFC r274442: Pull in r221709 from upstream llvm trunk (by Frédéric Riss): Totally forget deallocated SDNodes in SDDbgInfo. What would happen before that commit is that the SDDbgValues associated with a deallocated SDNode would be marked Invalidated, but SDDbgInfo would keep a map entry keyed by the SDNode pointer pointing to this list of invalidated SDDbgNodes. As the memory gets reused, the list might get wrongly associated with another new SDNode. As the SDDbgValues are cloned when they are transfered, this can lead to an exponential number of SDDbgValues being produced during DAGCombine like in http://llvm.org/bugs/show_bug.cgi?id=20893 Note that the previous behavior wasn't really buggy as the invalidation made sure that the SDDbgValues won't be used. This commit can be considered a memory optimization and as such is really hard to validate in a unit-test. This should fix abnormally large memory usage and resulting OOM crashes when compiling certain ports with debug information. Reported by: Dmitry Marakasov Upstream PRs: http://llvm.org/PR19031 http://llvm.org/PR20893 MFC r274483: The fix imported into llvm in r274442 contains some C++11 constructs, which gcc in base cannot handle. Replace these with C++98 equivalents. While here, add the patch for the adapted fix. Reported by: bz, kib Pointy hat to: dim Added: stable/9/contrib/llvm/patches/patch-r274442-llvm-r221709-debug-oom.diff - copied unchanged from r274483, head/contrib/llvm/patches/patch-r274442-llvm-r221709-debug-oom.diff Modified: stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Changes in other areas also in this revision: Added: stable/10/contrib/llvm/patches/patch-r274442-llvm-r221709-debug-oom.diff - copied unchanged from r274483, head/contrib/llvm/patches/patch-r274442-llvm-r221709-debug-oom.diff Modified: stable/10/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h ============================================================================== --- stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h Wed Nov 19 07:11:29 2014 (r274695) +++ stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h Wed Nov 19 07:24:43 2014 (r274696) @@ -127,6 +127,10 @@ public: DbgValMap[Node].push_back(V); } + /// \brief Invalidate all DbgValues attached to the node and remove + /// it from the Node-to-DbgValues map. + void erase(const SDNode *Node); + void clear() { DbgValMap.clear(); DbgValues.clear(); Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Nov 19 07:11:29 2014 (r274695) +++ stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Nov 19 07:24:43 2014 (r274696) @@ -625,6 +625,15 @@ void SelectionDAG::DeleteNodeNotInCSEMap DeallocateNode(N); } +void SDDbgInfo::erase(const SDNode *Node) { + DbgValMapType::iterator I = DbgValMap.find(Node); + if (I == DbgValMap.end()) + return; + for (unsigned J = 0, N = I->second.size(); J != N; ++J) + I->second[J]->setIsInvalidated(); + DbgValMap.erase(I); +} + void SelectionDAG::DeallocateNode(SDNode *N) { if (N->OperandsNeedDelete) delete[] N->OperandList; @@ -635,10 +644,9 @@ void SelectionDAG::DeallocateNode(SDNode NodeAllocator.Deallocate(AllNodes.remove(N)); - // If any of the SDDbgValue nodes refer to this SDNode, invalidate them. - ArrayRef DbgVals = DbgInfo->getSDDbgValues(N); - for (unsigned i = 0, e = DbgVals.size(); i != e; ++i) - DbgVals[i]->setIsInvalidated(); + // If any of the SDDbgValue nodes refer to this SDNode, invalidate + // them and forget about that node. + DbgInfo->erase(N); } /// RemoveNodeFromCSEMaps - Take the specified node out of the CSE map that Copied: stable/9/contrib/llvm/patches/patch-r274442-llvm-r221709-debug-oom.diff (from r274483, head/contrib/llvm/patches/patch-r274442-llvm-r221709-debug-oom.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r274442-llvm-r221709-debug-oom.diff Wed Nov 19 07:24:43 2014 (r274696, copy of r274483, head/contrib/llvm/patches/patch-r274442-llvm-r221709-debug-oom.diff) @@ -0,0 +1,73 @@ +Pull in r221709 from upstream llvm trunk (by Frédéric Riss): + + Totally forget deallocated SDNodes in SDDbgInfo. + + What would happen before that commit is that the SDDbgValues associated with + a deallocated SDNode would be marked Invalidated, but SDDbgInfo would keep + a map entry keyed by the SDNode pointer pointing to this list of invalidated + SDDbgNodes. As the memory gets reused, the list might get wrongly associated + with another new SDNode. As the SDDbgValues are cloned when they are transfered, + this can lead to an exponential number of SDDbgValues being produced during + DAGCombine like in http://llvm.org/bugs/show_bug.cgi?id=20893 + + Note that the previous behavior wasn't really buggy as the invalidation made + sure that the SDDbgValues won't be used. This commit can be considered a + memory optimization and as such is really hard to validate in a unit-test. + +This should fix abnormally large memory usage and resulting OOM crashes +when compiling certain ports with debug information. + +Reported by: Dmitry Marakasov +Upstream PRs: http://llvm.org/PR19031 http://llvm.org/PR20893 + +Introduced here: http://svnweb.freebsd.org/changeset/base/274442 + +Index: include/llvm/CodeGen/SelectionDAG.h +=================================================================== +--- include/llvm/CodeGen/SelectionDAG.h ++++ include/llvm/CodeGen/SelectionDAG.h +@@ -127,6 +127,10 @@ class SDDbgInfo { + DbgValMap[Node].push_back(V); + } + ++ /// \brief Invalidate all DbgValues attached to the node and remove ++ /// it from the Node-to-DbgValues map. ++ void erase(const SDNode *Node); ++ + void clear() { + DbgValMap.clear(); + DbgValues.clear(); +Index: lib/CodeGen/SelectionDAG/SelectionDAG.cpp +=================================================================== +--- lib/CodeGen/SelectionDAG/SelectionDAG.cpp ++++ lib/CodeGen/SelectionDAG/SelectionDAG.cpp +@@ -625,6 +625,15 @@ void SelectionDAG::DeleteNodeNotInCSEMaps(SDNode * + DeallocateNode(N); + } + ++void SDDbgInfo::erase(const SDNode *Node) { ++ DbgValMapType::iterator I = DbgValMap.find(Node); ++ if (I == DbgValMap.end()) ++ return; ++ for (unsigned J = 0, N = I->second.size(); J != N; ++J) ++ I->second[J]->setIsInvalidated(); ++ DbgValMap.erase(I); ++} ++ + void SelectionDAG::DeallocateNode(SDNode *N) { + if (N->OperandsNeedDelete) + delete[] N->OperandList; +@@ -635,10 +644,9 @@ void SelectionDAG::DeallocateNode(SDNode *N) { + + NodeAllocator.Deallocate(AllNodes.remove(N)); + +- // If any of the SDDbgValue nodes refer to this SDNode, invalidate them. +- ArrayRef DbgVals = DbgInfo->getSDDbgValues(N); +- for (unsigned i = 0, e = DbgVals.size(); i != e; ++i) +- DbgVals[i]->setIsInvalidated(); ++ // If any of the SDDbgValue nodes refer to this SDNode, invalidate ++ // them and forget about that node. ++ DbgInfo->erase(N); + } + + /// RemoveNodeFromCSEMaps - Take the specified node out of the CSE map that From owner-svn-src-all@FreeBSD.ORG Wed Nov 19 07:24:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE8F353F; Wed, 19 Nov 2014 07:24:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A038FA5E; Wed, 19 Nov 2014 07:24:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAJ7OjdN057175; Wed, 19 Nov 2014 07:24:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAJ7OiwV057171; Wed, 19 Nov 2014 07:24:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201411190724.sAJ7OiwV057171@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 19 Nov 2014 07:24:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274696 - in stable: 10/contrib/llvm/include/llvm/CodeGen 10/contrib/llvm/lib/CodeGen/SelectionDAG 10/contrib/llvm/patches 9/contrib/llvm/include/llvm/CodeGen 9/contrib/llvm/lib/CodeGen... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2014 07:24:46 -0000 Author: dim Date: Wed Nov 19 07:24:43 2014 New Revision: 274696 URL: https://svnweb.freebsd.org/changeset/base/274696 Log: MFC r274442: Pull in r221709 from upstream llvm trunk (by Frédéric Riss): Totally forget deallocated SDNodes in SDDbgInfo. What would happen before that commit is that the SDDbgValues associated with a deallocated SDNode would be marked Invalidated, but SDDbgInfo would keep a map entry keyed by the SDNode pointer pointing to this list of invalidated SDDbgNodes. As the memory gets reused, the list might get wrongly associated with another new SDNode. As the SDDbgValues are cloned when they are transfered, this can lead to an exponential number of SDDbgValues being produced during DAGCombine like in http://llvm.org/bugs/show_bug.cgi?id=20893 Note that the previous behavior wasn't really buggy as the invalidation made sure that the SDDbgValues won't be used. This commit can be considered a memory optimization and as such is really hard to validate in a unit-test. This should fix abnormally large memory usage and resulting OOM crashes when compiling certain ports with debug information. Reported by: Dmitry Marakasov Upstream PRs: http://llvm.org/PR19031 http://llvm.org/PR20893 MFC r274483: The fix imported into llvm in r274442 contains some C++11 constructs, which gcc in base cannot handle. Replace these with C++98 equivalents. While here, add the patch for the adapted fix. Reported by: bz, kib Pointy hat to: dim Added: stable/10/contrib/llvm/patches/patch-r274442-llvm-r221709-debug-oom.diff - copied unchanged from r274483, head/contrib/llvm/patches/patch-r274442-llvm-r221709-debug-oom.diff Modified: stable/10/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Added: stable/9/contrib/llvm/patches/patch-r274442-llvm-r221709-debug-oom.diff - copied unchanged from r274483, head/contrib/llvm/patches/patch-r274442-llvm-r221709-debug-oom.diff Modified: stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Modified: stable/10/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h ============================================================================== --- stable/10/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h Wed Nov 19 07:11:29 2014 (r274695) +++ stable/10/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h Wed Nov 19 07:24:43 2014 (r274696) @@ -127,6 +127,10 @@ public: DbgValMap[Node].push_back(V); } + /// \brief Invalidate all DbgValues attached to the node and remove + /// it from the Node-to-DbgValues map. + void erase(const SDNode *Node); + void clear() { DbgValMap.clear(); DbgValues.clear(); Modified: stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp ============================================================================== --- stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Nov 19 07:11:29 2014 (r274695) +++ stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Nov 19 07:24:43 2014 (r274696) @@ -625,6 +625,15 @@ void SelectionDAG::DeleteNodeNotInCSEMap DeallocateNode(N); } +void SDDbgInfo::erase(const SDNode *Node) { + DbgValMapType::iterator I = DbgValMap.find(Node); + if (I == DbgValMap.end()) + return; + for (unsigned J = 0, N = I->second.size(); J != N; ++J) + I->second[J]->setIsInvalidated(); + DbgValMap.erase(I); +} + void SelectionDAG::DeallocateNode(SDNode *N) { if (N->OperandsNeedDelete) delete[] N->OperandList; @@ -635,10 +644,9 @@ void SelectionDAG::DeallocateNode(SDNode NodeAllocator.Deallocate(AllNodes.remove(N)); - // If any of the SDDbgValue nodes refer to this SDNode, invalidate them. - ArrayRef DbgVals = DbgInfo->getSDDbgValues(N); - for (unsigned i = 0, e = DbgVals.size(); i != e; ++i) - DbgVals[i]->setIsInvalidated(); + // If any of the SDDbgValue nodes refer to this SDNode, invalidate + // them and forget about that node. + DbgInfo->erase(N); } /// RemoveNodeFromCSEMaps - Take the specified node out of the CSE map that Copied: stable/10/contrib/llvm/patches/patch-r274442-llvm-r221709-debug-oom.diff (from r274483, head/contrib/llvm/patches/patch-r274442-llvm-r221709-debug-oom.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r274442-llvm-r221709-debug-oom.diff Wed Nov 19 07:24:43 2014 (r274696, copy of r274483, head/contrib/llvm/patches/patch-r274442-llvm-r221709-debug-oom.diff) @@ -0,0 +1,73 @@ +Pull in r221709 from upstream llvm trunk (by Frédéric Riss): + + Totally forget deallocated SDNodes in SDDbgInfo. + + What would happen before that commit is that the SDDbgValues associated with + a deallocated SDNode would be marked Invalidated, but SDDbgInfo would keep + a map entry keyed by the SDNode pointer pointing to this list of invalidated + SDDbgNodes. As the memory gets reused, the list might get wrongly associated + with another new SDNode. As the SDDbgValues are cloned when they are transfered, + this can lead to an exponential number of SDDbgValues being produced during + DAGCombine like in http://llvm.org/bugs/show_bug.cgi?id=20893 + + Note that the previous behavior wasn't really buggy as the invalidation made + sure that the SDDbgValues won't be used. This commit can be considered a + memory optimization and as such is really hard to validate in a unit-test. + +This should fix abnormally large memory usage and resulting OOM crashes +when compiling certain ports with debug information. + +Reported by: Dmitry Marakasov +Upstream PRs: http://llvm.org/PR19031 http://llvm.org/PR20893 + +Introduced here: http://svnweb.freebsd.org/changeset/base/274442 + +Index: include/llvm/CodeGen/SelectionDAG.h +=================================================================== +--- include/llvm/CodeGen/SelectionDAG.h ++++ include/llvm/CodeGen/SelectionDAG.h +@@ -127,6 +127,10 @@ class SDDbgInfo { + DbgValMap[Node].push_back(V); + } + ++ /// \brief Invalidate all DbgValues attached to the node and remove ++ /// it from the Node-to-DbgValues map. ++ void erase(const SDNode *Node); ++ + void clear() { + DbgValMap.clear(); + DbgValues.clear(); +Index: lib/CodeGen/SelectionDAG/SelectionDAG.cpp +=================================================================== +--- lib/CodeGen/SelectionDAG/SelectionDAG.cpp ++++ lib/CodeGen/SelectionDAG/SelectionDAG.cpp +@@ -625,6 +625,15 @@ void SelectionDAG::DeleteNodeNotInCSEMaps(SDNode * + DeallocateNode(N); + } + ++void SDDbgInfo::erase(const SDNode *Node) { ++ DbgValMapType::iterator I = DbgValMap.find(Node); ++ if (I == DbgValMap.end()) ++ return; ++ for (unsigned J = 0, N = I->second.size(); J != N; ++J) ++ I->second[J]->setIsInvalidated(); ++ DbgValMap.erase(I); ++} ++ + void SelectionDAG::DeallocateNode(SDNode *N) { + if (N->OperandsNeedDelete) + delete[] N->OperandList; +@@ -635,10 +644,9 @@ void SelectionDAG::DeallocateNode(SDNode *N) { + + NodeAllocator.Deallocate(AllNodes.remove(N)); + +- // If any of the SDDbgValue nodes refer to this SDNode, invalidate them. +- ArrayRef DbgVals = DbgInfo->getSDDbgValues(N); +- for (unsigned i = 0, e = DbgVals.size(); i != e; ++i) +- DbgVals[i]->setIsInvalidated(); ++ // If any of the SDDbgValue nodes refer to this SDNode, invalidate ++ // them and forget about that node. ++ DbgInfo->erase(N); + } + + /// RemoveNodeFromCSEMaps - Take the specified node out of the CSE map that From owner-svn-src-all@FreeBSD.ORG Wed Nov 19 07:44:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6F9BEEA; Wed, 19 Nov 2014 07:44:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93623C85; Wed, 19 Nov 2014 07:44:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAJ7iMMW067140; Wed, 19 Nov 2014 07:44:22 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAJ7iM12067139; Wed, 19 Nov 2014 07:44:22 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201411190744.sAJ7iM12067139@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 19 Nov 2014 07:44:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274697 - head/sys/cddl/contrib/opensolaris/uts/common/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2014 07:44:22 -0000 Author: dim Date: Wed Nov 19 07:44:21 2014 New Revision: 274697 URL: https://svnweb.freebsd.org/changeset/base/274697 Log: Fix the following -Werror warning from clang 3.5.0, while building cddl/lib/libctf: In file included from cddl/contrib/opensolaris/common/ctf/ctf_create.c:31: In file included from sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h:34: sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h:334:9: warning: '_ILP32' macro redefined [-Wmacro-redefined] #define _ILP32 ^ :26:9: note: previous definition is here #define _ILP32 1 ^ 1 warning generated. This is because clang 3.5.0 started predefining _ILP32 and __ILP32__ for the i386 arch. (Earlier versions already predefined _LP64 and __LP64__ for the x86_64 arch.) Reviewed by: emaste, avg, smh, delphij, markj Differential Revision: https://reviews.freebsd.org/D1187 Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h Wed Nov 19 07:24:43 2014 (r274696) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h Wed Nov 19 07:44:21 2014 (r274697) @@ -331,7 +331,9 @@ extern "C" { /* * Define the appropriate "implementation choices". */ +#if !defined(_ILP32) #define _ILP32 +#endif #if !defined(_I32LPx) && defined(_KERNEL) #define _I32LPx #endif From owner-svn-src-all@FreeBSD.ORG Wed Nov 19 07:47:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2EBF218F; Wed, 19 Nov 2014 07:47:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B4B8CB4; Wed, 19 Nov 2014 07:47:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAJ7lbmE067634; Wed, 19 Nov 2014 07:47:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAJ7lbwx067633; Wed, 19 Nov 2014 07:47:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201411190747.sAJ7lbwx067633@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 19 Nov 2014 07:47:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274698 - head/sys/contrib/ngatm/netnatm/saal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2014 07:47:38 -0000 Author: dim Date: Wed Nov 19 07:47:37 2014 New Revision: 274698 URL: https://svnweb.freebsd.org/changeset/base/274698 Log: Fix the following -Werror warning from clang 3.5.0, while building lib/libngatm: sys/contrib/ngatm/netnatm/saal/saal_sscop.c:4030:32: error: 'break' is bound to current loop, GCC binds it to the enclosing loop [-Werror,-Wgcc-compat] } while(sn < sscop->vr_h && !QFIND(&sscop->rbuf, sn)); ^ sys/contrib/ngatm/netnatm/saal/saal_sscop.c:173:4: note: expanded from macro 'QFIND' break; \ ^ 1 error generated. The idea is to remove any ambiguity by replacing the macro with an equivalent static inline function. Reviewed by: emaste, rpaulo See also: http://reviews.llvm.org/D2518 Differential Revision: https://reviews.freebsd.org/D1188 Modified: head/sys/contrib/ngatm/netnatm/saal/saal_sscop.c Modified: head/sys/contrib/ngatm/netnatm/saal/saal_sscop.c ============================================================================== --- head/sys/contrib/ngatm/netnatm/saal/saal_sscop.c Wed Nov 19 07:44:21 2014 (r274697) +++ head/sys/contrib/ngatm/netnatm/saal/saal_sscop.c Wed Nov 19 07:47:37 2014 (r274698) @@ -163,18 +163,17 @@ static void sscop_set_state(struct sscop } \ } while(0) - -#define QFIND(Q,RN) \ - ({ \ - struct sscop_msg *_msg = NULL, *_m; \ - MSGQ_FOREACH(_m, (Q)) { \ - if(_m->seqno == (RN)) { \ - _msg = _m; \ - break; \ - } \ - } \ - _msg; \ - }) +static inline struct sscop_msg *QFIND(sscop_msgq_head_t *q, u_int rn) +{ + struct sscop_msg *msg = NULL, *m; + MSGQ_FOREACH(m, q) { + if(m->seqno == rn) { + msg = m; + break; + } + } + return msg; +} #define QINSERT(Q,M) \ do { \ From owner-svn-src-all@FreeBSD.ORG Wed Nov 19 08:49:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E83F7E26; Wed, 19 Nov 2014 08:49:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3CE931D; Wed, 19 Nov 2014 08:49:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAJ8n0Nq095459; Wed, 19 Nov 2014 08:49:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAJ8n0Iw095454; Wed, 19 Nov 2014 08:49:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201411190849.sAJ8n0Iw095454@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 19 Nov 2014 08:49:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274699 - in stable/10/sys/dev/usb: . serial X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2014 08:49:01 -0000 Author: hselasky Date: Wed Nov 19 08:48:59 2014 New Revision: 274699 URL: https://svnweb.freebsd.org/changeset/base/274699 Log: MFC r274227: Add new USB IDs. Modified: stable/10/sys/dev/usb/serial/u3g.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/10/sys/dev/usb/serial/u3g.c Wed Nov 19 07:47:37 2014 (r274698) +++ stable/10/sys/dev/usb/serial/u3g.c Wed Nov 19 08:48:59 2014 (r274699) @@ -469,6 +469,8 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(QUALCOMMINC, E2003, 0), U3G_DEV(QUALCOMMINC, K3772_Z, 0), U3G_DEV(QUALCOMMINC, K3772_Z_INIT, U3GINIT_SCSIEJECT), + U3G_DEV(QUALCOMMINC, MF195E, 0), + U3G_DEV(QUALCOMMINC, MF195E_INIT, U3GINIT_SCSIEJECT), U3G_DEV(QUALCOMMINC, MF626, 0), U3G_DEV(QUALCOMMINC, MF628, 0), U3G_DEV(QUALCOMMINC, MF633R, 0), Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Wed Nov 19 07:47:37 2014 (r274698) +++ stable/10/sys/dev/usb/usbdevs Wed Nov 19 08:48:59 2014 (r274699) @@ -3640,6 +3640,8 @@ product QUALCOMMINC E0086 0x0086 3G mode product QUALCOMMINC SURFSTICK 0x0117 1&1 Surf Stick product QUALCOMMINC K3772_Z_INIT 0x1179 K3772-Z Initial product QUALCOMMINC K3772_Z 0x1181 K3772-Z +product QUALCOMMINC MF195E_INIT 0x1514 MF195E initial +product QUALCOMMINC MF195E 0x1516 MF195E product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage product QUALCOMMINC E2002 0x2002 3G modem product QUALCOMMINC E2003 0x2003 3G modem From owner-svn-src-all@FreeBSD.ORG Wed Nov 19 08:51:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3EDBF84; Wed, 19 Nov 2014 08:51:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A3C933C; Wed, 19 Nov 2014 08:51:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAJ8pGhM099203; Wed, 19 Nov 2014 08:51:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAJ8pGAg099201; Wed, 19 Nov 2014 08:51:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201411190851.sAJ8pGAg099201@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 19 Nov 2014 08:51:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r274700 - in stable/9/sys/dev/usb: . serial X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2014 08:51:16 -0000 Author: hselasky Date: Wed Nov 19 08:51:15 2014 New Revision: 274700 URL: https://svnweb.freebsd.org/changeset/base/274700 Log: MFC r274227: Add new USB IDs. Modified: stable/9/sys/dev/usb/serial/u3g.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/9/sys/dev/usb/serial/u3g.c Wed Nov 19 08:48:59 2014 (r274699) +++ stable/9/sys/dev/usb/serial/u3g.c Wed Nov 19 08:51:15 2014 (r274700) @@ -470,6 +470,8 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(QUALCOMMINC, E2003, 0), U3G_DEV(QUALCOMMINC, K3772_Z, 0), U3G_DEV(QUALCOMMINC, K3772_Z_INIT, U3GINIT_SCSIEJECT), + U3G_DEV(QUALCOMMINC, MF195E, 0), + U3G_DEV(QUALCOMMINC, MF195E_INIT, U3GINIT_SCSIEJECT), U3G_DEV(QUALCOMMINC, MF626, 0), U3G_DEV(QUALCOMMINC, MF628, 0), U3G_DEV(QUALCOMMINC, MF633R, 0), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Wed Nov 19 08:48:59 2014 (r274699) +++ stable/9/sys/dev/usb/usbdevs Wed Nov 19 08:51:15 2014 (r274700) @@ -3640,6 +3640,8 @@ product QUALCOMMINC E0086 0x0086 3G mode product QUALCOMMINC SURFSTICK 0x0117 1&1 Surf Stick product QUALCOMMINC K3772_Z_INIT 0x1179 K3772-Z Initial product QUALCOMMINC K3772_Z 0x1181 K3772-Z +product QUALCOMMINC MF195E_INIT 0x1514 MF195E initial +product QUALCOMMINC MF195E 0x1516 MF195E product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage product QUALCOMMINC E2002 0x2002 3G modem product QUALCOMMINC E2003 0x2003 3G modem From owner-svn-src-all@FreeBSD.ORG Wed Nov 19 08:55:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7DB5D1A8; Wed, 19 Nov 2014 08:55:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EDA65E3; Wed, 19 Nov 2014 08:55:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAJ8t8cC099752; Wed, 19 Nov 2014 08:55:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAJ8t83Z099751; Wed, 19 Nov 2014 08:55:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201411190855.sAJ8t83Z099751@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 19 Nov 2014 08:55:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r274701 - stable/9/usr.sbin/usbconfig X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2014 08:55:08 -0000 Author: hselasky Date: Wed Nov 19 08:55:07 2014 New Revision: 274701 URL: https://svnweb.freebsd.org/changeset/base/274701 Log: MFC r274435: Decode more fields when dumping USB descriptors. - Some minor style changes while at it. Modified: stable/9/usr.sbin/usbconfig/dump.c Directory Properties: stable/9/usr.sbin/ (props changed) Modified: stable/9/usr.sbin/usbconfig/dump.c ============================================================================== --- stable/9/usr.sbin/usbconfig/dump.c Wed Nov 19 08:51:15 2014 (r274700) +++ stable/9/usr.sbin/usbconfig/dump.c Wed Nov 19 08:55:07 2014 (r274701) @@ -110,7 +110,6 @@ dump_field(struct libusb20_device *pdev, printf(" \n"); return; } - if (strcmp(field, "bmAttributes") == 0) { switch (value & 0x03) { case 0: @@ -142,7 +141,6 @@ dump_field(struct libusb20_device *pdev, return; } } - if ((field[0] == 'i') && (field[1] != 'd')) { /* Indirect String Descriptor */ if (value == 0) { @@ -157,7 +155,84 @@ dump_field(struct libusb20_device *pdev, printf(" <%s>\n", temp_string); return; } + if (strlen(plevel) == 2 || strlen(plevel) == 6) { + + /* Device and Interface Descriptor class codes */ + + if (strcmp(field, "bInterfaceClass") == 0 || + strcmp(field, "bDeviceClass") == 0) { + switch (value) { + case 0x00: + printf(" \n"); + break; + case 0x01: + printf("